WO2016095442A1 - 数据传输方法及装置 - Google Patents
数据传输方法及装置 Download PDFInfo
- Publication number
- WO2016095442A1 WO2016095442A1 PCT/CN2015/080175 CN2015080175W WO2016095442A1 WO 2016095442 A1 WO2016095442 A1 WO 2016095442A1 CN 2015080175 W CN2015080175 W CN 2015080175W WO 2016095442 A1 WO2016095442 A1 WO 2016095442A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- egress
- service
- offset
- package
- load sharing
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
Definitions
- the present invention relates to the field of communications, and in particular to a data transmission method and apparatus.
- Equal Cost Multi-Path is a technique for improving the shortest path-based internal gateway routing protocol in IP networks.
- the algorithm chooses the optimal one.
- ECMP has been improved, and traffic is distributed among multiple equal-cost paths.
- Fast Re-Route is to ensure the reliability of the network.
- the local backup path is established in advance. When the link or node fails, the service is quickly switched from the fault path to the backup path before the route converges.
- Example of a load balancing scenario 1000 routes. Each route learns from eight shared links. This route forms load sharing. There are eight outlets. Multi-Protocol Label Switching is used for each egress. , hereinafter referred to as MPLS) labels (encapsulated into outgoing packets) are different, that is, each route corresponds to 8 outgoing MPLS labels, 1000 routes correspond to 1000 export encapsulation tables, and each egress encapsulation table contains 8 entries. An outgoing MPLS label is stored in each entry.
- MPLS Multi-Protocol Label Switching
- Example of fast rerouting scenario 1000 routes. Each route learns from two active and standby links. This route forms primary and backup protection. There are two outlets, and each outgoing MPLS label corresponds to the outgoing MPLS label. The outgoing packets are different, that is, each route corresponds to two outgoing MPLS labels, one corresponding to the primary outgoing MPLS label, and one corresponding to the outgoing outgoing MPLS label, and 1000 routes correspond to 1000 export encapsulation tables, each of which is exported.
- the encapsulation table contains two entries, each of which holds an outgoing MPLS label.
- the load sharing service and the fast re-routing service respectively correspond to two sets of processes and two sets of entries.
- the embodiment of the invention provides a data transmission method and device, so as to solve at least the problem that the prior art table item resource and the network processor instruction resource are wasted, and the maintenance workload is large.
- a data transmission method including: obtaining a policy table base address for a load sharing service and a fast rerouting service according to a pre-acquired service table; and acquiring a first code corresponding to the load sharing service, according to The first coding and the policy table base address read policy table obtains an offset of the first multipath egress encapsulation table corresponding to the load sharing service, where the first code is used to indicate that the load sharing service query obtains an offset corresponding to the policy table;
- the second code corresponding to the rerouting service according to the second coding and the policy table base address reading policy table, obtains the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service, and the second code is used to indicate the fast rerouting
- the service query obtains the offset corresponding to the policy table, and reads the corresponding first multi-path egress encapsulation table according to the offset of the first multi-path egress encapsulation
- the first code is composed of the service parameter corresponding to the load sharing service in the policy table, and the service parameter includes at least one of the following: a destination MAC address, a source MAC address, a destination IP address, and a source IP address of the packet. .
- the offset of the first multipath egress encapsulation table corresponding to the load sharing service is obtained according to the first encoding and the policy table base address reading policy table, including: reading according to the first encoding and the policy table base address The policy table is obtained, and the offset of multiple consecutive entries existing in the first multipath egress encapsulation table is obtained.
- the corresponding first multi-path egress encapsulation table is read according to the offset of the first multi-path egress encapsulation table, and the corresponding first egress encapsulation information is obtained, including: offset according to multiple consecutive entries
- the first multi-path egress encapsulation table is read, and the corresponding first egress encapsulation information is obtained.
- the first egress encapsulation information is the egress encapsulation information of the M equal-cost load sharing paths, where M is the number of shared links.
- the load sharing service includes at least one of the following: a service corresponding to the equal-cost load sharing path and a service corresponding to the weighted load sharing path, and when the load sharing service is a service corresponding to the weighted load sharing path, Before the pre-acquisition service table is used for the load balancing service and the fast re-routing service to obtain the policy table base address, the method further includes: dividing the weighted load sharing path into multiple equal-cost load sharing paths according to a preset value, and the preset value is Multiple conventions between weighted load sharing paths.
- the obtaining the second code corresponding to the fast rerouting service includes: obtaining the current state information corresponding to the fast rerouting service according to the policy table, where the current state information includes at least one of the following: using the active link, using The alternate link; encodes the current state according to the preset code to obtain the second code.
- the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service is obtained according to the second encoding and the policy table base address reading policy table, including: according to the second encoding and the policy table base address
- the policy table is read to obtain the offset of two consecutive entries in the second multipath egress encapsulation table.
- the offsets of the two consecutive entries include: indicating the primary egress encapsulation entry and the alternate egress encapsulation entry.
- the corresponding second egress egress encapsulation table is read according to the offset of the second multipath egress encapsulation table, and the corresponding second egress encapsulation information is obtained, including: offset according to two consecutive entries And reading the corresponding second multi-path egress package table to obtain corresponding second egress package information, where the second egress package information includes: main egress package information and alternate egress package information.
- a data transmission apparatus including: an obtaining module, configured to acquire a policy table base address for a load sharing service and a fast rerouting service according to a pre-acquired service table; And the first code is configured to obtain the first code corresponding to the load sharing service, where the first code is used to indicate that the load sharing service query obtains an offset corresponding to the policy table; and the first reading module is configured to read according to the first code and the policy table base address.
- the policy table obtains an offset of the first multipath egress encapsulation table corresponding to the load sharing service;
- the second encoding obtaining module is configured to obtain a second encoding corresponding to the fast rerouting service, and the second encoding is used to indicate the fast rerouting service query Obtaining an offset corresponding to the policy table;
- the second reading module is configured to: according to the second encoding and the policy table base address reading policy table, obtain an offset of the second multipath egress encapsulation table corresponding to the fast rerouting service;
- the information reading module is configured to read the corresponding first multipath export encapsulation table according to the offset of the first multipath egress encapsulation table, and obtain the pair A first outlet encapsulation information; and a second information reading module, a second set of multipath based on the offset outlet package table reads the corresponding second multi-path table package outlet, the second outlet to obtain information corresponding to the package.
- the first reading module includes: a first reading unit, configured to read the policy table according to the first encoding and the policy table base address, and obtain multiple existing in the first multipath export encapsulation table. The offset of consecutive entries.
- the first information reading module includes: a first information reading unit configured to read the corresponding first multi-path export encapsulation table according to the offset of the plurality of consecutive entries, to obtain a corresponding The first egress encapsulation information, where the first egress encapsulation information is the egress package information of the M equal-cost load sharing paths, and M is the number of shared links.
- the second code acquisition module includes: a parameter obtaining unit, configured to obtain current state information corresponding to the fast rerouting service according to the policy table, where the current state information includes at least one of the following: using the active link, The standby link is used; the coding unit is configured to encode the current state according to the preset code to obtain the second code.
- the second reading module includes: a second reading unit, configured to read the policy table according to the second encoding and the policy table base address, to obtain two existing in the second multipath export encapsulation table. Offset of consecutive entries. The offset of two consecutive entries includes: indicates the primary egress encapsulation entry and the alternate egress encapsulation entry.
- the second information reading module includes: a second information reading unit configured to read the corresponding second multipath export encapsulation table according to the offset of the two consecutive entries, to obtain a corresponding
- the second egress package information includes: a main egress package information and an alternate egress package information.
- the base table of the load sharing service and the fast rerouting service is obtained according to the pre-acquired service table; the first code corresponding to the load sharing service is obtained, and the base code and the policy table base address reading policy are used according to the first code and the policy table.
- the table obtains an offset of the first multipath egress encapsulation table corresponding to the load sharing service, where the first code is used to indicate that the load sharing service query obtains an offset corresponding to the policy table, and the second code corresponding to the fast rerouting service is obtained, according to the first
- the second encoding and the policy table base address reading policy table obtains the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service, and the second encoding is used to indicate that the fast rerouting service query obtains the offset corresponding to the policy table;
- the offset of the first multipath egress encapsulation table reads the corresponding first multipath egress encapsulation table to obtain corresponding first egress encapsulation information; and reads the corresponding second multipath according to the offset of the second multipath egress encapsulation table Exporting the encapsulation table, obtaining the corresponding second egress package information, solving the waste of the resource of the table item and the network
- FIG. 1 is a schematic diagram of two sets of processes and two sets of entries respectively corresponding to a load sharing service and a fast rerouting service according to the prior art;
- FIG. 3 is a block diagram showing the structure of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 4 is a block diagram showing the structure of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 5 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 6 is a block diagram showing the structure of a data transmission device according to an embodiment of the present invention.
- FIG. 7 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 8 is a block diagram showing the structure of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 9 is a flowchart of a multi-path service process according to an embodiment of the present invention.
- FIG. 11 is a specific structure of an outlet package table according to an embodiment of the present invention.
- FIG. 12 is a flow chart of a weighted load sharing service provided by an embodiment of the present invention.
- FIG. 2 is a flowchart of data transmission according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
- Step S202 obtaining a policy table base address for the load sharing service and the fast rerouting service according to the pre-acquired service table;
- the data transmission method provided by the embodiment of the present invention can be applied to a routing device, and can be applied to a cell that covers a 2G network, a 3G network, or a 4G network, and the routing device provides the load sharing service and the fast rerouting service according to the service table.
- Unified policy table base address can be applied to a routing device, and can be applied to a cell that covers a 2G network, a 3G network, or a 4G network, and the routing device provides the load sharing service and the fast rerouting service according to the service table.
- Unified policy table base address Unified policy table base address.
- Step S204 Acquire a first code corresponding to the load sharing service, and obtain an offset of the first multipath egress encapsulation table corresponding to the load sharing service according to the first encoding and the policy table base address reading policy table, where the first code is used to indicate The load sharing service query obtains an offset corresponding to the policy table.
- the routing device combines the first encoding in step S204 with the policy table base address obtained in the load sharing service in step S202, and can be indexed to the corresponding position in the load balancing service in the policy table, and the load sharing service is obtained by reading the policy table.
- the offset is used to index the load sharing service into the corresponding first multipath egress encapsulation table.
- the policy table base address in step S202 is used to index the load sharing service to the policy table, and the first code in step S204 can index the load sharing service to the location corresponding to the policy table.
- Step S206 obtaining a second code corresponding to the fast rerouting service, and obtaining an offset of the second multipath egress encapsulation table corresponding to the fast rerouting service according to the second coding and the policy table base address reading policy table, where the second coding is used Instructing the fast rerouting service query to obtain an offset corresponding to the policy table;
- step S206 is the same as step S204, except that step S206 is to use the same policy table base address as the load sharing service in step S204 for the fast rerouting service, and combine the second code reading corresponding to the fast rerouting service.
- the policy table obtains an offset of the fast rerouting service corresponding to the second multipath egress encapsulation table.
- Step S208 reading the corresponding first multipath egress package table according to the offset of the first multipath egress package table, to obtain corresponding first egress package information
- the first egress encapsulation table corresponding to the load sharing service is obtained by reading the first multipath egress encapsulation table, in the embodiment of the present invention.
- the egress packet information may be a Multi-Protocol Label Switching (MPLS) label.
- MPLS Multi-Protocol Label Switching
- Step S210 Read the corresponding second multi-path egress package table according to the offset of the second multi-path egress package table, to obtain corresponding second egress package information.
- the method is the same as the step S208, except that the offset of the second multipath egress encapsulation table obtained in step S206 is combined with the offset of the second multipath egress encapsulation table obtained in step S206 to obtain a load.
- the first egress package information corresponding to the service is shared.
- the second encoding and the policy table base address reading policy table obtains the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service, and the second encoding is used to indicate that the fast rerouting service query obtains the offset corresponding to the policy table;
- the offset of the first multipath egress encapsulation table reads the corresponding first multipath egress encapsulation table to obtain corresponding first egress encapsul
- the load sharing service and the fast re-routing service jointly use the same policy table and the multi-path egress encapsulation table, and the difference is only corresponding to the different service type policy table and the multi-path egress.
- the package table provides corresponding information, and thus it is seen that it is different from the related art.
- the load balancing service and the fast rerouting service need to use two sets of entries when performing service processing, which increases the consumption of network resources in the instruction interaction, reduces the efficiency of instruction interaction, and is related to the maintenance of the different service related technologies. Different entries exist, which increases maintenance costs and reduces maintenance efficiency.
- step S204 the first code corresponding to the load sharing service is obtained, including:
- Step 1 Obtain a service parameter corresponding to the load sharing service according to the policy table, where the service parameter includes at least one of the following: a destination MAC address, a source MAC address, a destination IP address, and a source IP address of the packet;
- the embodiment of the present invention only takes the service parameter corresponding to the obtained load sharing service as the destination MAC address, the source MAC address, the destination IP address, and the source IP address of the packet as an example to implement the embodiment of the present invention.
- the data transmission method shall prevail and shall not be specifically limited.
- Step 2 encode the service parameters according to the preset code to obtain the first code.
- the first code in the embodiment of the present invention may be a hash value obtained by a hash operation, by using a hash code to obtain a corresponding first code.
- the coding calculation may be performed according to one or a combination of two or more of the service parameters in the Step 1 in the coding of the service parameters, and the embodiment of the present invention is only based on the implementation of the data transmission method, and is not limited.
- step S204 the offset of the first multipath egress encapsulation table corresponding to the load sharing service is obtained according to the first encoding and the policy table base address reading policy table, including:
- the offset of the plurality of consecutive entries existing in the first multipath egress encapsulation table is obtained according to the first coding and policy table base address read policy table.
- the policy table is read, and multiple consecutive entries existing in the first multipath egress encapsulation table corresponding to the load sharing service are obtained. Offset.
- step S208 the corresponding first multi-path egress package table is obtained according to the offset of the first multi-path egress package table, and the corresponding first egress package information is obtained, including:
- the corresponding first egress encapsulation table is obtained according to the offset of the multiple consecutive entries, and the corresponding first egress encapsulation information is obtained, and the first egress encapsulation information is the egress encapsulation information of the M equivalent load sharing paths, where To share the number of links.
- the first multipath egress encapsulation table is read to obtain the first egress encapsulation information corresponding to the load sharing service.
- the content of the corresponding load sharing service policy table entry is the offset of the M consecutive entries in the multipath egress encapsulation table, where M is the number of shared links; and the multipath egress encapsulation is read by the offset of the M consecutive entries.
- the table obtains the egress encapsulation information of the M equal-cost load sharing paths, and M is the number of shared links.
- the load sharing service includes at least one of the following: a service corresponding to the equal-cost load sharing path and a service corresponding to the weighted load sharing path, and when the load sharing service is a service corresponding to the weighted load sharing path, Step S202: Before obtaining the policy table base address for the load sharing service and the fast rerouting service according to the pre-acquired service table, the method further includes:
- step S201 the weighted load sharing path is divided into multiple equal-cost load sharing paths according to a preset value, and the preset value is a common divisor between multiple weighted load sharing paths.
- the service is allocated due to different weight ratios before the load sharing service and the fast rerouting service obtain the policy table base address according to the pre-acquired service table.
- the sharing precision exceeds the standard, that is, the actual shared bandwidth has a large deviation from the theoretical single value calculated by the weight.
- the embodiment of the present invention firstly obtains a minimum common divisor for all the weight load sharing paths, and then decomposes all the weight load sharing paths into a plurality of weight load sharing paths according to the minimum common divisor, that is, The weights of the multiple load sharing paths are the same, so as to avoid the problem that the actual shared bandwidth and the theoretical single value calculated by the weight are greatly deviated. Finally, the multiple equal load sharing paths obtained after the decomposition are according to the steps. S202 to step S210 perform processing.
- step S206 the second code corresponding to the fast rerouting service is obtained, including:
- Step 1 Obtain current state information corresponding to the fast rerouting service according to the policy table, where the current state information includes at least one of the following: using the active link and using the standby link;
- Step 2 encode the current state according to the preset encoding to obtain the second encoding.
- step S206 a corresponding second encoding is acquired for the fast rerouting service.
- the fast rerouting service is encoded by the current state information.
- the encoding mode uses hash encoding as an example.
- the hash value of the fast rerouting service is set to 0, that is, no offset is performed. .
- step S206 the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service is obtained according to the second encoding and the policy table base address reading policy table, including:
- step S206 corresponding to the load sharing service in step S204, in step S206, according to the second encoding and the policy table base address reading policy table, the offset method of the second multipath egress encapsulation table corresponding to the fast rerouting service is the same, and the difference is obtained.
- the offset of the second multipath egress encapsulation table corresponding to the fast rerouting service is obtained, where the offset of the second multipath egress encapsulation table may be: two consecutive tables in the second multipath egress encapsulation table.
- the offset of the item, the first consecutive entry is the primary egress encapsulation entry, and the second consecutive entry is the alternate egress encapsulation entry.
- the offset is 0;
- the offset value is 1 when switching quickly to standby.
- step S210 the corresponding second multi-path egress package table is obtained according to the offset of the second multi-path egress package table, and the corresponding second egress package information is obtained, including:
- the second egress encapsulation table is read according to the offset of the two consecutive entries, and the corresponding second egress encapsulation information is obtained.
- the second egress encapsulation information includes: the main egress encapsulation information and the standby egress encapsulation information.
- step S210 is the same as step S208.
- step S210 is to obtain the second egress package information corresponding to the fast rerouting service.
- the content of the second egress encapsulation table entry is two egress encapsulation information in a primary standby relationship
- the first egress encapsulation information is the primary egress export encapsulation information
- the second egress encapsulation information is an alternate egress. Package information.
- the first multipath egress encapsulation table and the second multipath egress encapsulation table are the same multipath egress encapsulation table in actual use, which is implemented in the embodiment of the present invention.
- the data transmission method only corresponds to the load sharing service and the fast re-routing service, and provides corresponding service configurations. The purpose of saving instruction resources is achieved, waste of instruction resources is avoided, and maintenance efficiency is improved by using the same policy table and multi-path export package table to reduce maintenance costs and manual work of maintenance work.
- a data transmission device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
- the term "module” may implement a combination of software and/or hardware of a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- FIG. 3 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention.
- the data transmission apparatus includes: an acquisition module 31, a first encoding acquisition module 32, a first reading module 33, and a second encoding acquisition. a module 34, a second reading module 35, a first information reading module 36, and a second information reading module 37, wherein
- the obtaining module 31 is configured to acquire a policy table base address for the load sharing service and the fast rerouting service according to the pre-acquired service table;
- the first code obtaining module 32 is configured to obtain a first code corresponding to the load sharing service, where the first code is used to indicate that the load sharing service query obtains an offset corresponding to the policy table;
- the first reading module 33 is electrically connected to the obtaining module 31 and the first encoding acquiring module 32, and is configured to obtain a first multipath egress package corresponding to the load sharing service according to the first encoding and the policy table base address reading policy table. Offset of the table;
- the second code obtaining module 34 is configured to obtain a second code corresponding to the fast rerouting service, where the second code is used to indicate that the fast rerouting service query obtains an offset corresponding to the policy table.
- the second reading module 35 establishes an electrical connection with the obtaining module 31 and the second encoding acquiring module 34, and is configured to obtain a second multi-path exit corresponding to the fast rerouting service according to the second encoding and the policy table base address reading policy table.
- the first information reading module 36 is electrically connected to the first reading module 33, and is configured to read the corresponding first multi-path egress package table according to the offset of the first multi-path egress package table to obtain a corresponding first egress.
- Package information is electrically connected to the first reading module 33, and is configured to read the corresponding first multi-path egress package table according to the offset of the first multi-path egress package table to obtain a corresponding first egress.
- the second information reading module 37 establishes an electrical connection with the second reading module 35, and is configured to read the corresponding second multi-path egress packaging table according to the offset of the second multi-path egress packaging table to obtain a corresponding second egress. Package information.
- FIG. 4 is a structural block diagram of a data transmission apparatus according to a preferred embodiment of the present invention.
- the first reading module 33 includes:
- the first reading unit 331 is configured to obtain an offset of the plurality of consecutive entries existing in the first multipath egress encapsulation table according to the first encoding and the policy table base address reading policy table.
- FIG. 5 is a structural block diagram of a data transmission apparatus according to a preferred embodiment of the present invention.
- the first information reading module 36 includes:
- the first information reading unit 361 is configured to read the corresponding first multi-path egress package table according to the offset of the plurality of consecutive entries, and obtain corresponding first egress package information, where the first egress package information is M, etc.
- FIG. 6 is a structural block diagram of a data transmission apparatus according to a preferred embodiment of the present invention.
- the second code acquisition module 34 includes a parameter acquisition unit 341 and an encoding unit 342.
- the parameter obtaining unit 341 is configured to obtain current state information corresponding to the fast rerouting service according to the policy table, where the current state information includes at least one of the following: using the active link and using the standby link;
- the encoding unit 342 establishes an electrical connection with the parameter obtaining unit 341, and is configured to encode the current state according to the preset encoding to obtain a second encoding.
- FIG. 7 is a structural block diagram of a data transmission apparatus according to a preferred embodiment of the present invention.
- the second reading module 35 includes:
- the second reading unit 351 is configured to obtain an offset of two consecutive entries existing in the second multipath egress encapsulation table according to the second encoding and the policy table base address reading policy table, and the offset of the two consecutive entries
- the move includes: indicating the primary egress encapsulation entry and the alternate egress encapsulation entry.
- FIG. 8 is a structural block diagram of a data transmission apparatus according to a preferred embodiment of the present invention.
- the second information reading module 37 includes:
- the second information reading unit 371 is configured to read the corresponding second multi-path egress package table according to the offset of the two consecutive entries, to obtain corresponding second egress package information, where the second egress package information includes: Export package information and alternate exit package information.
- the data transmission method provided by the embodiment of the present invention achieves the effect of reducing the inventory resource and the network processor instruction and reducing the maintenance workload by abstracting the load sharing service and the fast rerouting service flow.
- the weighted load sharing service is virtualized into an equal-cost path load sharing service, thereby achieving the purpose of improving the sharing accuracy of the weighted load sharing service.
- FIG. 9 is a multi-path service processing flow provided by an embodiment of the present invention.
- the business process is as follows:
- the load sharing service and the fast re-routing service uniformly obtain the policy table base address according to the service table, and load-sharing the service, and the policy table offset is the media access control layer (MAC) and the source MAC address of the packet.
- the hash value obtained by hashing the destination IP address, the source IP address, and the like.
- the hash value is fixed to 0, that is, no offset is performed;
- the result of the policy table is an offset of two or more consecutive entries in a multipath egress encapsulation table;
- the result of the policy table is the offset of two consecutive entries in the multi-path egress encapsulation table. The first is the primary egress encapsulation entry, and the second is the alternate egress encapsulation entry.
- FIG. 10 is a specific structure of a sharing policy table according to an embodiment of the present invention.
- the content of the shared policy table entry is the offset of M consecutive entries in the multipath egress encapsulation table, where M is the number of shared links;
- the content of the micro-table entry is the offset of two consecutive entries in the multi-path egress encapsulation table, the first is the primary egress encapsulation entry, and the second is the alternate egress encapsulation entry.
- the offset value is 0.
- the offset value is 1.
- FIG. 11 is a specific structure of an outlet package table according to an embodiment of the present invention.
- the content of the egress package table entry is the egress package information of the M equal load sharing path, where M is the number of shared links;
- the contents of the egress encapsulation table entry are two egress encapsulation information in a primary standby relationship, the first is the primary export encapsulation information, and the second is the alternate egress encapsulation information.
- FIG. 12 is a flow chart of a weighted load sharing service provided by an embodiment of the present invention.
- a shared load policy entry applies for a continuous space in a fixed number.
- a remainder entry occurs. No matter how many weight paths are selected to arrange the remainder entries, it may appear.
- the sharing accuracy exceeds the standard, that is, the actual shared bandwidth has a large deviation from the theoretical bandwidth value calculated by weight.
- the embodiment of the invention provides a specific embodiment of the weighted load sharing service:
- the weight is the minimum common divisor
- the weighted load sharing path is virtualized into an equivalent load sharing path, and is uniformly processed according to an equivalent load burden path.
- an ECMP group consists of two shared links, one is a 1G bandwidth link (hereinafter referred to as 1G), and the other is a 10G bandwidth link (hereinafter referred to as 10G).
- 1G 1G bandwidth link
- 10G 10G bandwidth link
- 1G and 10G need to be arranged in 32 shared strategy table entries.
- 32*10G/(1G+10G) 29 (take Integrity, if one item is left, if 1G is arranged, the accuracy of 1G sharing will exceed the standard.
- the over-standard rate 1/2, that is, 50% exceeding the standard, but the operator's requirement is not more than 10%. Note: This is just a simple example. This example can be circumvented by arranging the remaining 1 item to 10G. However, for some sharing scenarios, the remaining items will cause the item to share the accuracy without exceeding the line.
- the 10G is virtualized into 10 1G bandwidth links, so that the weighted load sharing is virtualized into 11 equivalent load sharing entries, that is, the sharing micro-table saves 11 equivalent load sharing entries. Therefore, for any weight ratio, there is no problem that the sharing precision exceeds the standard in the prior art.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the technical solution provided by the embodiment of the present invention can be applied to a data transmission process, which solves the problem that the resource of the table item and the network processor instruction is wasted, and the maintenance workload is large, thereby achieving the effect of saving the instruction resource and reducing the maintenance workload. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种数据传输方法及装置。该方法包括:依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;获取负荷分担业务对应的第一编码依据第一编码和策略表基址读取策略表得到对应负荷分担业务的第一多路径出口封装表的偏移;获取快速重路由业务对应的第二编码依据第二编码和策略表基址读取策略表得到对应快速重路由业务的第二多路径出口封装表的偏移;依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表得到对应的第一出口封装信息;依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表得到对应的第二出口封装信息。本发明解决了表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题。
Description
本发明涉及通信领域,具体而言,涉及一种数据传输方法及装置。
等价多路径(Equal Cost Multi-Path,简称ECMP)是改进IP网络中基于最短路径的内部网关路由协议不足的一种技术。在传统最短路径算法中,如果两条或多条最短路径同时存在,算法会选择最优的一条。而ECMP作了改进,流量在多条等价路径中分配。
快速重路由(Fast Re-Route)是为了保证网络可靠性,事先建立本地备份路径,当链路或节点发生故障时,在路由收敛之前,快速地将业务从故障路径切换到备份路径上去。
负荷分担场景举例:1000条路由,每条路由从8条分担链路分别学习到,这条路由形成负荷分担,出口有8个,每个出口对应的出向多协议标签交换(Multi-Protocol Label Switching,简称为MPLS)标签(封装到出去的报文中)不同,即每条路由对应8个出向MPLS标签,1000条路由就对应1000个出口封装表,每个出口封装表中包含8个条目,每个条目中保存一个出向MPLS标签。
快速重路由场景举例:1000条路由,每条路由从两条主备链路分别学习到,这条路由形成主用和备用保护,出口有两个,每个出口对应的出向MPLS标签(封装到出去的报文中)不同,即每条路由对应两个出向MPLS标签,一个对应主用的出向MPLS标签,一个对应备用的出向MPLS标签,1000条路由就对应1000个出口封装表,每个出口封装表中包含两个条目,每个条目中保存一个出向MPLS标签。
对以上两种业务,现有技术如图1所示,负荷分担业务和快速重路由业务分别对应两套流程和两套表项。
针对现有技术中表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种数据传输方法及装置,以至少解决现有技术表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题。
根据本发明的一个实施例,提供了一种数据传输方法,包括:依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;获取负荷分担业务对应的第一编码,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;获取快速重路由业务对应的第二编码,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
在本发明实施例中,第一编码由策略表中的负荷分担业务对应的业务参数组成,业务参数包括以下至少之一:报文的目的MAC地址、源MAC地址、目的IP地址和源IP地址。
在本发明实施例中,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,包括:依据第一编码和策略表基址读取策略表,得到第一多路径出口封装表中存在的多个连续表项的偏移。
在本发明实施例中,依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,包括:依据多个连续表项的偏移,读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,第一出口封装信息为M条等价负荷分担路径的出口封装信息,M为分担链路数。
在本发明实施例中,负荷分担业务包括以下至少之一:等价负荷分担路径对应的业务、带权重负荷分担路径对应的业务,在负荷分担业务为带权重负荷分担路径对应的业务时,在依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址之前,还包括:将带权重负荷分担路径,依据预设值分为多条等价负荷分担路径,预设值为多条带权重负荷分担路径之间的公约数。
在本发明实施例中,获取快速重路由业务对应的第二编码,包括:依据策略表获取快速重路由业务对应的当前状态信息,当前状态信息包括以下至少之一:使用主用链路、使用备用链路;依据预设编码对当前状态进行编码,得到第二编码。
在本发明实施例中,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,包括:依据第二编码和策略表基址读取策略表,得到第二多路径出口封装表中存在的两个连续表项的偏移,两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
在本发明实施例中,依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,包括:依据两个连续表项的偏移,读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
根据本发明的另一实施例,提供了一种数据传输装置,包括:获取模块,设置为依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;第一编码获取模块,设置为获取负荷分担业务对应的第一编码,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;第一读取模块,设置为依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移;第二编码获取模块,设置为获取快速重路由业务对应的第二编码,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;第二读取模块,设置为依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移;第一信息读取模块,设置为依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;第二信息读取模块,设置为依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
在本发明实施例中,第一读取模块,包括:第一读取单元,设置为依据第一编码和策略表基址读取策略表,得到第一多路径出口封装表中存在的多个连续表项的偏移。
在本发明实施例中,第一信息读取模块,包括:第一信息读取单元,设置为依据多个连续表项的偏移,读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,第一出口封装信息为M条等价负荷分担路径的出口封装信息,M为分担链路数。
在本发明实施例中,第二编码获取模块,包括:参数获取单元,设置为依据策略表获取快速重路由业务对应的当前状态信息,当前状态信息包括以下至少之一:使用主用链路、使用备用链路;编码单元,设置为依据预设编码对当前状态进行编码,得到第二编码。
在本发明实施例中,第二读取模块,包括:第二读取单元,设置为依据第二编码和策略表基址读取策略表,得到第二多路径出口封装表中存在的两个连续表项的偏移,两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
在本发明实施例中,第二信息读取模块,包括:第二信息读取单元,设置为依据两个连续表项的偏移,读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
通过本发明实施例,采用依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;获取负荷分担业务对应的第一编码,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;获取快速重路由业务对应的第二编码,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,解决了表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题,进而达到了节约指令资源减轻维护工作量的效果。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据现有技术中负荷分担业务和快速重路由业务分别对应两套流程和两套表项;
图2是根据本发明实施例的数据传输的流程图;
图3是根据本发明实施例的数据传输装置的结构框图;
图4是根据本发明实施例的数据传输装置的结构框图;
图5是根据本发明实施例的数据传输装置的结构框图;
图6是根据本发明实施例的数据传输装置的结构框图;
图7是根据本发明实施例的数据传输装置的结构框图;
图8是根据本发明实施例的数据传输装置的结构框图;
图9是本发明实施例提供的多路径业务处理流程;
图10是本发明实施例提供的分担策略表具体结构;
图11是本发明实施例提供的出口封装表具体结构;以及,
图12是本发明实施例提供的带权重负荷分担业务流程。
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
实施例一
在本实施例中提供了一种数据传输方法,图2是根据本发明实施例的数据传输的流程图,如图2所示,该流程包括如下步骤:
步骤S202,依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;
具体的,本发明实施例提供的数据传输方法可以适用于路由设备,并可以运用于覆盖有2G网络、3G网络或4G网络的小区,路由设备依据业务表为负荷分担业务和快速重路由业务提供统一的策略表基址。
步骤S204,获取负荷分担业务对应的第一编码,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;
具体的,路由设备结合步骤S204中的第一编码和步骤S202中负荷分担业务获取的策略表基址能够索引至负荷分担业务在策略表中对应的位置,通过读取策略表,得到负荷分担业务对应第一多路径出口封装表的偏移,其中,该偏移用于将负荷分担业务索引至对应的第一多路径出口封装表中。
这里步骤S202中的策略表基址用于将负荷分担业务索引至策略表,步骤S204中的第一编码能够将负荷分担业务索引至策略表对应的位置。
步骤S206,获取快速重路由业务对应的第二编码,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;
具体的,步骤S206与步骤S204相同,区别在于,步骤S206是对快速重路由业务通过使用与步骤S204中负荷分担业务相同的策略表基址,并结合快速重路由业务对应的第二编码读取策略表,得到快速重路由业务对应第二多路径出口封装表的偏移。
步骤S208,依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;
具体的,结合步骤S204中得到的第一多路径出口封装表的偏移,通过读取第一多路径出口封装表,得到负荷分担业务对应的第一出口封装信息,在本发明实施例中第一出口封装信息可以为多协议标签交换(Multi-Protocol Label Switching,简称MPLS)标签。
步骤S210,依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
具体的,与步骤S208中相同,区别在于,在对应快速重路由业务时,结合步骤S206中得到的第二多路径出口封装表的偏移,通过读取第二多路径出口封装表,得到负荷分担业务对应的第一出口封装信息。
通过上述步骤,采用依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;获取与负荷分担业务对应的第一编码,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;获取与快速重路由业务对应的第二编码,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,解决了表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题,进而达到了节约指令资源减轻维护工作量的效果。
由上可知,本发明实施例提供的数据传输方法中,负荷分担业务和快速重路由业务共同使用同一策略表以及多路径出口封装表,区别仅在于对应上述不同的业务类型策略表以及多路径出口封装表提供对应的信息,由此看出,区别于相关技术中。负荷分担业务和快速重路由业务在进行业务处理时,需要使用两套表项,在指令交互中增加了网络资源的消耗,降低了指令交互效率,并在维护上由于对应上述不同业务相关技术中存在不同的表项,使得维护成本提升,维护效率降低。
在本发明实施例中,步骤S204中,获取与负荷分担业务对应的第一编码,包括:
Step1,依据策略表获取负荷分担业务对应的业务参数,业务参数包括以下至少之一:报文的目的MAC地址、源MAC地址、目的IP地址和源IP地址;
具体的,本发明实施例仅以获取到的负荷分担业务对应的业务参数为报文的目的MAC地址、源MAC地址、目的IP地址和源IP地址为例进行说明,以实现本发明实施例提供的数据传输方法为准,不作具体限定。
Step2,依据预设编码对业务参数进行编码,得到第一编码。
具体的,结合Step1获取到的负荷分担业务对应的业务参数,通过哈希编码,得到对应的第一编码,其中,本发明实施例中的第一编码可以为通过哈希运算得到的哈希值,并且在对业务参数进行编码时可以依据Step1中业务参数中的一种或两种以上的组合进行编码计算,本发明实施例仅以实现数据传输方法为准,具体不做限定。
在本发明实施例中,步骤S204中,依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移,包括:
依据第一编码和策略表基址读取策略表,得到第一多路径出口封装表中存在的多个连续表项的偏移。
具体的,结合上述Step1和Step2中得到的第一编码和步骤S202中的策略表基址,读取策略表,得到对应负荷分担业务的第一多路径出口封装表中存在的多个连续表项的偏移。
在本发明实施例中,步骤S208中,依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,包括:
依据多个连续表项的偏移,读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,第一出口封装信息为M条等价负荷分担路径的出口封装信息,M为分担链路数。
具体的,结合步骤S204中得到对应负荷分担业务的第一多路径出口封装表的偏移,读取第一多路径出口封装表,得到对应负荷分担业务的第一出口封装信息。其中,对应负荷分担业务策略表表项内容为多路径出口封装表内M条连续表项的偏移,M为分担链路数;通过上述M条连续表项的偏移读取多路径出口封装表,将得到M条等价负荷分担路径的出口封装信息,M为分担链路数。
在本发明实施例中,负荷分担业务包括以下至少之一:等价负荷分担路径对应的业务、带权重负荷分担路径对应的业务,在负荷分担业务为带权重负荷分担路径对应的业务时,在步骤S202,依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址之前,还包括:
步骤S201,将带权重负荷分担路径,依据预设值分为多条等价负荷分担路径,预设值为多条带权重负荷分担路径之间的公约数。
具体的,在依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址之前,当负荷分担业务为带权重负荷分担路径对应的业务时,由于存在由于不同的权重比例排布时会出现余数条目,不论如何将该余数条目安排入其他权重路径,将会出现分担精度超标,即,实际分担带宽与按权重计算的理论单款值存在较大偏差的问题。
所以本发明实施例在实施步骤S202之前,首先对全部的权重负荷分担路径求最小公约数,然后,将上述全部的权重负荷分担路径依据该最小公约数分解成多条权重负荷分担路径,即,使得多条负荷分担路径的权重均相同,以避免实际分担带宽与按权重计算的理论单款值存在较大偏差的问题的出现,最后,将分解后得到的多条等价负荷分担路径依据步骤S202至步骤S210进行处理。
在本发明实施例中,步骤S206中,获取与快速重路由业务对应的第二编码,包括:
Step1,依据策略表获取快速重路由业务对应的当前状态信息,当前状态信息包括以下至少之一:使用主用链路、使用备用链路;
Step2,依据预设编码对当前状态进行编码,得到第二编码。
具体的,与步骤S204中的Step1和Step2方法相同,区别在于,在步骤S206中是对快速重路由业务获取对应的第二编码。其中,对快速重路由业务通过当前状态信息进行编码,该编码方式以哈希编码为例,在对应的策略表偏移中快速重路由业务的哈希值设置为0,即,不做偏移。
在本发明实施例中,步骤S206中,依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移,包括:
依据第二编码和策略表基址读取策略表,得到第二多路径出口封装表中存在的两个连续表项的偏移,两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
具体的,对应于步骤S204中负荷分担业务,步骤S206中依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移方法相同,区别在于,步骤S206是对应快速重路由业务得到对应的第二多路径出口封装表的偏移,其中第二多路径出口封装表的偏移可以为:第二多路径出口封装表内两条连续表项的偏移,第一条连续表项为主用出口封装表项,第二条连续表项为备用出口封装表项,当业务处于主用时,该偏移值为0;当业务在收敛前快速切换到备用时,该偏移值为1。
在本发明实施例中,步骤S210,依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,包括:
依据两个连续表项的偏移,读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
具体的,结合步骤S206,步骤S210与步骤S208实现方法相同,区别在于,步骤S210是对应快速重路由业务得到第二出口封装信息。其中,对于快速重路由业务,第二出口封装表表项内容为两条呈主备用关系的出口封装信息,第一条出口封装信息为主用出口封装信息,第二条出口封装信息为备用出口封装信息。
综上,本发明实施例提供的数据传输方法中,第一多路径出口封装表与第二多路径出口封装表在实际运用中为同一多路径出口封装表,在实现本发明实施例提供的数据传输方法中仅对应负荷分担业务和快速重路由业务,提供对应的业务配置。达到了节约指令资源的目的,避免了指令资源浪费,并且由于使用同一策略表和多路径出口封装表降低了维护成本以及维护工作的人工工作量,提升了维护效率。
实施例二
在本实施例中还提供了一种数据传输装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本发明实施例的数据传输装置的结构框图,如图3所示,该数据传输装置包括:获取模块31、第一编码获取模块32、第一读取模块33、第二编码获取模块34、第二读取模块35、第一信息读取模块36和第二信息读取模块37,其中,
获取模块31,设置为依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;
第一编码获取模块32,设置为获取负荷分担业务对应的第一编码,第一编码用于指示负荷分担业务查询得到策略表对应的偏移;
第一读取模块33,与获取模块31和第一编码获取模块32建立电连接,设置为依据第一编码和策略表基址读取策略表,得到对应负荷分担业务的第一多路径出口封装表的偏移;
第二编码获取模块34,设置为获取快速重路由业务对应的第二编码,第二编码用于指示快速重路由业务查询得到策略表对应的偏移;
第二读取模块35,与获取模块31和第二编码获取模块34建立电连接,设置为依据第二编码和策略表基址读取策略表,得到对应快速重路由业务的第二多路径出口封装表的偏移;
第一信息读取模块36,与第一读取模块33建立电连接,设置为依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;
第二信息读取模块37,与第二读取模块35建立电连接,设置为依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
在本发明实施例中,图4是根据本发明优选实施例的数据传输装置的结构框图,如图4所示,第一读取模块33,包括:
第一读取单元331,设置为依据第一编码和策略表基址读取策略表,得到第一多路径出口封装表中存在的多个连续表项的偏移。
在本发明实施例中,图5是根据本发明优选实施例的数据传输装置的结构框图,如图5所示,第一信息读取模块36,包括:
第一信息读取单元361,设置为依据多个连续表项的偏移,读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,第一出口封装信息为M条等价负荷分担路径的出口封装信息,M为分担链路数。
在本发明实施例中,图6是根据本发明优选实施例的数据传输装置的结构框图,如图6所示,第二编码获取模块34,包括:参数获取单元341和编码单元342,其中,
参数获取单元341,设置为依据策略表获取快速重路由业务对应的当前状态信息,当前状态信息包括以下至少之一:使用主用链路、使用备用链路;
编码单元342,与参数获取单元341建立电连接,设置为依据预设编码对当前状态进行编码,得到第二编码。
在本发明实施例中,图7是根据本发明优选实施例的数据传输装置的结构框图,如图7所示,第二读取模块35,包括:
第二读取单元351,设置为依据第二编码和策略表基址读取策略表,得到第二多路径出口封装表中存在的两个连续表项的偏移,两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
在本发明实施例中,图8是根据本发明优选实施例的数据传输装置的结构框图,如图8所示,第二信息读取模块37,包括:
第二信息读取单元371,设置为依据两个连续表项的偏移,读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
鉴于现有技术存在的问题,本发明实施例提供的数据传输的方法达到的效果是通过抽象负荷分担业务和快速重路由业务流程,以达到缩减表项资源和网络处理器指令、降低维护工作量的目的;另外将带权重路径负荷分担业务虚拟成等价路径负荷分担业务,达到提高带权重的负荷分担业务的分担精度的目的。
具体如下,图9是本发明实施例提供的多路径业务处理流程。
业务处理流程如下:
901,负荷分担业务和快速重路由业务统一根据业务表获取策略表基址,对负荷分担业务,策略表偏移为对报文目的媒体接入控制层(Media Access Control,简称MAC)、源MAC、目的IP、源IP等字段进行哈希后获得的哈希值;对快速重路由业务,该哈希值固定为0,即不做偏移;
902,根据901获取的策略表基址加上哈希值读取分担策略表,对负荷分担业务,策略表结果为一个多路径出口封装表内两条以上连续表项的偏移;对快速重路由业务,策略表结果为一个多路径出口封装表内两条连续表项的偏移,第一条为主用出口封装表项,第二条为备用出口封装表项;
903,根据902获取的多路径出口封装表偏移读取多路径出口封装表,获取出口封装信息。
图10是本发明实施例提供的分担策略表具体结构。
1001,对负荷分担业务,分担策略表表项内容为多路径出口封装表内M条连续表项的偏移,M为分担链路数;
1002,对快速重路由业务,微略表表项内容为多路径出口封装表内两条连续表项的偏移,第一条为主用出口封装表项,第二条为备用出口封装表项,当业务处于主用时,该偏移值为0,当业务在收敛前快速切换到备用时,该偏移值为1;
图11是本发明实施例提供的出口封装表具体结构。
1101,对负荷分担业务,出口封装表表项内容为M条等价负荷分担路径的出口封装信息,M为分担链路数;
1102,对快速重路由业务,出口封装表表项内容为两条呈主备用关系的出口封装信息,第一条为主用出口封装信息,第二条为备用出口封装信息。
图12是本发明实施例提供的带权重负荷分担业务流程。
对带权重负荷分担路径,现有技术中一个分担策略表项按固定数目申请连续空间,不同的权重比例排布时会出现余数条目,不管如何选择一些权重路径来排布余数条目,都可能出现分担精度超标,即实际分担带宽与按权重计算的理论带宽值存在较大偏差。本发明实施例提供一种带权重负荷分担业务具体实施例:
1201,对带权重负荷分担路径,取权重最小公约数;
1202,将非最小权重路径分解成M条最小权重路径;
1203,进行1202的分解后,带权重的负荷分担路径虚拟成等价负荷分担路径,统一按等价负荷负担路径处理。
比如:一个ECMP组包含两条分担链路,一个为1G带宽链路(以下简称1G),一个为10G带宽链路(以下简称10G),如果分担微略表大小定义为32:
现有技术中,需要将1G和10G排布到32个分担策略表表项中,1G的排布次数为:32*1G/(1G+10G)=2(取整),10G的排布次数为:32*10G/(1G+10G)=29(取
整),剩下1个条目如果排布1G,会造成1G分担精度超标,超标率=1/2,即超标50%,但运营商要求不超过10%。注意:这里只是举一个简单的例子,这个例子可以通过将剩下的1个条目排布10G来规避,但对一些分担场景,剩下的条目不管排哪个,都会造成该条目分担精度超标。
本发明实施例中,将10G虚拟成10个1G的带宽链路,这样带权重的负荷分担被虚拟成11个等价的负荷分担条目,即分担微略表保存11个等价的负荷分担条目,这样对任意权重比例,都不存在现有技术中存在的分担精度超标的问题。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
本发明实施例提供的技术方案,可以应用于数据传输过程,解决了表项资源和网络处理器指令资源浪费大,并且维护工作量大的问题,进而达到了节约指令资源减轻维护工作量的效果。
Claims (14)
- 一种数据传输方法,包括:依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;获取所述负荷分担业务对应的第一编码,依据所述第一编码和所述策略表基址读取策略表,得到对应所述负荷分担业务的第一多路径出口封装表的偏移,所述第一编码用于指示所述负荷分担业务查询得到所述策略表对应的偏移;获取所述快速重路由业务对应的第二编码,依据所述第二编码和所述策略表基址读取所述策略表,得到对应所述快速重路由业务的第二多路径出口封装表的偏移,所述第二编码用于指示所述快速重路由业务查询得到所述策略表对应的偏移;依据所述第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;依据所述第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
- 根据权利要求1所述的方法,其中,所述第一编码由所述策略表中的所述负荷分担业务对应的业务参数通过编码组成,所述业务参数包括以下至少之一:报文的目的MAC地址、源MAC地址、目的IP地址和源IP地址。
- 根据权利要求2所述的方法,其中,所述依据所述第一编码和所述策略表基址读取策略表,得到对应所述负荷分担业务的第一多路径出口封装表的偏移,包括:依据所述第一编码和所述策略表基址读取策略表,得到所述第一多路径出口封装表中存在的多个连续表项的偏移。
- 根据权利要求3所述的方法,其中,所述依据所述第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息,包括:依据所述多个连续表项的偏移,读取对应的所述第一多路径出口封装表,得到对应的所述第一出口封装信息,所述第一出口封装信息为M条等价负荷分担路径的出口封装信息,所述M为分担链路数。
- 根据权利要求4所述的方法,其中,所述负荷分担业务包括以下至少之一:等价负荷分担路径对应的业务、带权重负荷分担路径对应的业务,在所述负荷分担业务为带权重负荷分担路径对应的业务时,在依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址之前,还包括:将所述带权重负荷分担路径,依据预设值分为多条等价负荷分担路径,所述预设值为多条带权重负荷分担路径之间的公约数。
- 根据权利要求1所述的方法,其中,所述获取所述快速重路由业务对应的第二编码,包括:依据所述策略表获取所述快速重路由业务对应的当前状态信息,所述当前状态信息包括以下至少之一:使用主用链路、使用备用链路;依据预设编码对所述当前状态进行编码,得到所述第二编码。
- 根据权利要求6所述的方法,其中,所述依据所述第二编码和所述策略表基址读取所述策略表,得到对应所述快速重路由业务的第二多路径出口封装表的偏移,包括:依据所述第二编码和所述策略表基址读取策略表,得到所述第二多路径出口封装表中存在的两个连续表项的偏移,所述两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
- 根据权利要求7所述的方法,其中,所述依据所述第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息,包括:依据所述两个连续表项的偏移,读取对应的所述第二多路径出口封装表,得到对应的所述第二出口封装信息,所述第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
- 一种数据传输装置,包括:获取模块,设置为依据预先获取的业务表为负荷分担业务和快速重路由业务获取策略表基址;第一编码获取模块,设置为获取所述负荷分担业务对应的第一编码,所述第一编码用于指示所述负荷分担业务查询得到所述策略表对应的偏移;第一读取模块,设置为依据所述第一编码和所述策略表基址读取策略表,得到对应所述负荷分担业务的第一多路径出口封装表的偏移;第二编码获取模块,设置为获取所述快速重路由业务对应的第二编码,所述第二编码用于指示所述快速重路由业务查询得到所述策略表对应的偏移;第二读取模块,设置为依据所述第二编码和所述策略表基址读取所述策略表,得到对应所述快速重路由业务的第二多路径出口封装表的偏移;第一信息读取模块,设置为依据第一多路径出口封装表的偏移读取对应的第一多路径出口封装表,得到对应的第一出口封装信息;第二信息读取模块,设置为依据第二多路径出口封装表的偏移读取对应的第二多路径出口封装表,得到对应的第二出口封装信息。
- 根据权利要求9所述的装置,其中,所述第一读取模块,包括:第一读取单元,设置为依据所述第一编码和所述策略表基址读取策略表,得到所述第一多路径出口封装表中存在的多个连续表项的偏移。
- 根据权利要求10所述的装置,其中,所述第一信息读取模块,包括:第一信息读取单元,设置为依据所述多个连续表项的偏移,读取对应的所述第一多路径出口封装表,得到对应的所述第一出口封装信息,所述第一出口封装信息为M条等价负荷分担路径的出口封装信息,所述M为分担链路数。
- 根据权利要求9所述的装置,其中,所述第二编码获取模块,包括:参数获取单元,设置为依据所述策略表获取所述快速重路由业务对应的当前状态信息,所述当前状态信息包括以下至少之一:使用主用链路、使用备用链路;编码单元,设置为依据预设编码对所述当前状态进行编码,得到所述第二编码。
- 根据权利要求12所述的装置,其中,所述第二读取模块,包括:第二读取单元,设置为依据所述第二编码和所述策略表基址读取策略表,得到所述第二多路径出口封装表中存在的两个连续表项的偏移,所述两个连续表项的偏移包括:指示主用出口封装表项和备用出口封装表项。
- 根据权利要求13所述的装置,其中,所述第二信息读取模块,包括:第二信息读取单元,设置为依据所述两个连续表项的偏移,读取对应的所述第二多路径出口封装表,得到对应的所述第二出口封装信息,所述第二出口封装信息包括:主用出口封装信息和备用出口封装信息。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410802658.4A CN105790973B (zh) | 2014-12-18 | 2014-12-18 | 数据传输方法及装置 |
CN201410802658.4 | 2014-12-18 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016095442A1 true WO2016095442A1 (zh) | 2016-06-23 |
Family
ID=56125780
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/080175 WO2016095442A1 (zh) | 2014-12-18 | 2015-05-29 | 数据传输方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105790973B (zh) |
WO (1) | WO2016095442A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116192735A (zh) * | 2021-11-26 | 2023-05-30 | 苏州盛科通信股份有限公司 | Ecmp快速切换备份的方法及装置、电子设备和存储介质 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106656859A (zh) * | 2016-10-17 | 2017-05-10 | 盛科网络(苏州)有限公司 | 获取网络芯片wrr最优权值的方法及系统 |
CN113660160B (zh) * | 2021-08-20 | 2023-04-28 | 烽火通信科技股份有限公司 | 一种ucmp负载分担的方法和装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744563A (zh) * | 2004-08-31 | 2006-03-08 | 杭州华为三康技术有限公司 | 在以太网交换机上实现策略路由的方法 |
CN101098335A (zh) * | 2006-06-29 | 2008-01-02 | 中兴通讯股份有限公司 | 一种路由表聚合装置及其方法 |
CN101860482A (zh) * | 2010-05-25 | 2010-10-13 | 中兴通讯股份有限公司 | 二层虚拟专用网络快速重路由方法及装置 |
US20110158237A1 (en) * | 2009-12-30 | 2011-06-30 | Verizon Patent And Licensing, Inc. | Modification of peer-to-peer based feature network based on changing conditions / session signaling |
-
2014
- 2014-12-18 CN CN201410802658.4A patent/CN105790973B/zh active Active
-
2015
- 2015-05-29 WO PCT/CN2015/080175 patent/WO2016095442A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744563A (zh) * | 2004-08-31 | 2006-03-08 | 杭州华为三康技术有限公司 | 在以太网交换机上实现策略路由的方法 |
CN101098335A (zh) * | 2006-06-29 | 2008-01-02 | 中兴通讯股份有限公司 | 一种路由表聚合装置及其方法 |
US20110158237A1 (en) * | 2009-12-30 | 2011-06-30 | Verizon Patent And Licensing, Inc. | Modification of peer-to-peer based feature network based on changing conditions / session signaling |
CN101860482A (zh) * | 2010-05-25 | 2010-10-13 | 中兴通讯股份有限公司 | 二层虚拟专用网络快速重路由方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116192735A (zh) * | 2021-11-26 | 2023-05-30 | 苏州盛科通信股份有限公司 | Ecmp快速切换备份的方法及装置、电子设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN105790973B (zh) | 2019-01-25 |
CN105790973A (zh) | 2016-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8730793B2 (en) | Method and apparatus providing network redundancy and high availability to remote network nodes | |
US9742575B2 (en) | Explicit list encoding of sparse multicast group membership information with Bit Index Explicit Replication (BIER) | |
US9548919B2 (en) | Transparent network service header path proxies | |
RU2530338C2 (ru) | Предварительно подготовленное сопряжение на основе состояния линий связи поставщиков (plsb) с маршрутизируемым резервированием | |
EP3253011B1 (en) | Method and device for shortest path bridging (spb) enhanced resilience with loop mitigation | |
US8588081B2 (en) | Monitoring a flow set to detect faults | |
US9515845B2 (en) | Utility communication method and system | |
US11652749B2 (en) | High availability for hardware-based packet flow processing | |
US9678840B2 (en) | Fast failover for application performance based WAN path optimization with multiple border routers | |
CN102611618B (zh) | 路由保护切换方法及装置 | |
TW201225579A (en) | Load balancing in shortest-path-bridging networks | |
US11588740B2 (en) | Scaling host policy via distribution | |
WO2020244439A1 (zh) | 实现报文镜像的方法、装置及存储介质 | |
WO2016095442A1 (zh) | 数据传输方法及装置 | |
CN103441930A (zh) | 一种mpls te分组转发与管理方法及装置 | |
Chen et al. | Scalable and flexible traffic steering for service function chains | |
US11799782B2 (en) | Scaling host policy via distribution | |
US9007910B2 (en) | Load balancing across a link aggregation group | |
CN110300073A (zh) | 级联端口的目标选择方法、聚合装置及存储介质 | |
CN103916321A (zh) | 定义软件定义网络的网络元件的查找表实现的方法和设备 | |
Mirjalily et al. | An approach to select the best spanning tree in Metro Ethernet networks | |
US9794168B2 (en) | Scalable continuity test for a group of communication paths | |
US20230269201A1 (en) | Pooling smart nics for network disaggregation | |
WO2023088244A1 (zh) | 一种路径确定方法及装置 | |
WO2024104007A1 (zh) | 报文发送方法、装置、存储介质及电子装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15868954 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15868954 Country of ref document: EP Kind code of ref document: A1 |