Background
The MAC-in-MAC protocol is also called PBB (provider backbone bridge) protocol, and as a two-layer VPN (virtual private network) technology, it encapsulates the user MAC address into the operator MAC address by MAC (media access control) address nesting, thereby isolating different user services.
An SPB (shortest path bridge) network adopting a MAC-in-MAC protocol is called an SPBM (shortest path bridge of MAC-in-MAC mode) network, as shown in fig. 1, which is a networking schematic diagram of the SPBM network, and a backbone network thereof mainly includes BEB (backbone edge bridge) devices, BCB (backbone core bridge) devices, and backbone links therebetween.
The BEB equipment is responsible for carrying out MAC-in-MAC encapsulation on a message from a user network and forwarding the message to a backbone network; or, decapsulate the MAC-in-MAC message from the backbone network and forward the decapsulated message to the user network; when the BEB device performs MAC-in-MAC encapsulation on the packet, it will get the MAC address and VLAN (virtual local area network) allocated by the operator, where the MAC address allocated by the operator is a B-MAC (backbone MAC) and the VLAN allocated by the operator is a B-VLAN (backbone VLAN). The BCB equipment is responsible for forwarding the MAC-in-MAC message according to the B-MAC and the B-VLAN, and the BCB equipment only needs to forward the message and learn the MAC address in a backbone network and does not need to learn a large number of MAC addresses in a user network.
The SPBM network supports load sharing by supporting multiple ECT (equal cost tree) algorithms; specifically, an SPT (shortest Path Tree) set is calculated through a specific ECT algorithm, and forwarding table entries corresponding to the SPT set are printed to the same B-VLAN, so that the ECT algorithm and the B-VLAN are in one-to-one correspondence.
As shown in fig. 2, two SPT trees with a as the root are calculated by using two ECT algorithms, each ECT algorithm corresponds to an SPT set in one SPT tree, and different ECT algorithms correspond to different SPT sets; further, load sharing is achieved by mapping traffic of different I-SIDs (backbone service instance numbers, one service instance represents a class of service or a user, and an I-SID is a unique number of the service instance) to different B-VLANs, and applying SPT sets of different ECT algorithms to the different B-VLANs.
For example, by mapping the traffic of I-SID1 to B-VLAN1 and B-VLAN1 corresponds to ECT algorithm 1, the traffic of I-SID1 can be sent through the SPT tree corresponding to ECT algorithm 1; and the traffic of the I-SID2 is mapped to the B-VLAN2, and the B-VLAN2 corresponds to the ECT algorithm 2, so that the traffic of the I-SID2 can be sent through the SPT tree corresponding to the ECT algorithm 2; through the above process, the traffic of I-SID1 and I-SID2 can be transmitted through different SPT trees to achieve load sharing.
However, if it is necessary to migrate some traffic of the I-SID to a new ECT algorithm (for example, the traffic of the I-SID2 is mapped to the B-VLAN1, and the B-VLAN1 corresponds to the ECT algorithm 1), ECT migration is generated, and in order to reduce I-SID traffic interruption during the ECT migration as much as possible, ECT smooth migration is required, but implementation details during the ECT smooth migration are not defined in the prior art.
Disclosure of Invention
The invention provides an ECT smooth migration method and device, which aim to reduce interruption of I-SID flow as much as possible in the ECT migration process and realize ECT smooth migration.
In order to achieve the above object, an embodiment of the present invention provides an ECT smooth migration method for an equivalence tree, including the following steps:
when the network equipment learns that the flow of the backbone network service instance number I-SID needs to be migrated from a first backbone network virtual local area network (B-VLAN) to a second B-VLAN, broadcasting a first link state protocol data unit (LSP) message and a second LSP message; the first LSP message carries a corresponding relation between the second B-VLAN and the second ECT, and the second LSP message carries a corresponding relation between the I-SID and the second B-VLAN;
when the network equipment receives a first LSP message and a second LSP message of other network equipment, determining that the I-SID corresponds to the second ECT by using the corresponding relation between the I-SID and the second B-VLAN and the corresponding relation between the second B-VLAN and the second ECT, and performing topology calculation by using the second ECT to obtain a second unicast tunnel corresponding to the I-SID;
before receiving first LSP messages and second LSP messages of all specified network devices, the network device sends the flow of the I-SID by using a first unicast tunnel corresponding to the I-SID, wherein the first unicast tunnel is obtained by performing topology calculation based on a first ECT corresponding to the first B-VLAN;
and after receiving the first LSP messages and the second LSP messages of all the appointed network equipment, the network equipment transmits the flow of the I-SID by using a second unicast tunnel corresponding to the I-SID.
The network device sends the traffic of the I-SID by using the first unicast tunnel corresponding to the I-SID, which specifically includes: aiming at the traffic of the I-SID received through a first unicast tunnel corresponding to the I-SID or a second unicast tunnel corresponding to the I-SID, the network equipment sends the traffic of the I-SID by using the first unicast tunnel corresponding to the I-SID;
the network device sends the traffic of the I-SID by using the second unicast tunnel corresponding to the I-SID, which specifically includes: and aiming at the traffic of the I-SID received through a first unicast tunnel corresponding to the I-SID or a second unicast tunnel corresponding to the I-SID, the network equipment transmits the traffic of the I-SID by using the second unicast tunnel corresponding to the I-SID.
After the network device receives the first LSP packet and the second LSP packet of all designated network devices, the method further includes:
the network equipment broadcasts a third LSP message for deleting the first unicast tunnel, wherein the third LSP message carries the corresponding relation between the I-SID and the first B-VLAN;
and after receiving all the third LSP messages of the specified network equipment, the network equipment deletes the first unicast tunnel corresponding to the I-SID.
After the network device receives the first LSP packet and the second LSP packet of all designated network devices, the method further includes:
the network equipment deletes a first multicast tunnel corresponding to the I-SID, wherein the first multicast tunnel is obtained by performing topology calculation based on a first ECT corresponding to the first B-VLAN; and the number of the first and second groups,
the network equipment performs topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID;
or,
the network equipment performs topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID; and the number of the first and second groups,
and the network equipment deletes the first multicast tunnel corresponding to the I-SID, wherein the first multicast tunnel is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN.
The ECT smooth migration method is applied to a shortest path bridge SPBM network in a MAC-in-MAC mode, and network equipment in the SPBM network is backbone network edge bridge BEB equipment or backbone network core bridge BCB equipment.
An embodiment of the present invention provides a network device, including:
the link state protocol data unit LSP message sending module is used for broadcasting a first LSP message and a second LSP message when knowing that the flow of the backbone network service instance number I-SID needs to be migrated from a first backbone network virtual local area network B-VLAN to a second B-VLAN; the first LSP message carries a corresponding relation between the second B-VLAN and a second equivalent tree ECT, and the second LSP message carries a corresponding relation between the I-SID and the second B-VLAN;
a tunnel management module, configured to determine that the I-SID corresponds to the second ECT by using a correspondence between the I-SID and the second B-VLAN and a correspondence between the second B-VLAN and the second ECT when receiving a first LSP packet and a second LSP packet of another network device, and perform topology calculation by using the second ECT to obtain a second unicast tunnel corresponding to the I-SID;
a data sending module, configured to send a traffic of the I-SID by using a first unicast tunnel corresponding to the I-SID before receiving first LSP messages and second LSP messages of all specified network devices, where the first unicast tunnel is obtained by performing topology calculation based on a first ECT corresponding to the first B-VLAN; and after receiving the first LSP messages and the second LSP messages of all the appointed network equipment, sending the flow of the I-SID by using a second unicast tunnel corresponding to the I-SID.
The data sending module is specifically configured to, before receiving first LSP messages and second LSP messages of all specified network devices, send traffic of the I-SID by using a first unicast tunnel corresponding to the I-SID for traffic of the I-SID received through the first unicast tunnel corresponding to the I-SID or a second unicast tunnel corresponding to the I-SID; after receiving the first LSP messages and the second LSP messages of all the specified network equipment, aiming at the traffic of the I-SID received through the first unicast tunnel corresponding to the I-SID or the second unicast tunnel corresponding to the I-SID, the traffic of the I-SID is sent by using the second unicast tunnel corresponding to the I-SID.
The LSP message sending module is further configured to broadcast a third LSP message for deleting the first unicast tunnel after receiving the first LSP message and the second LSP message of all the designated network devices, where the third LSP message carries the correspondence between the I-SID and the first B-VLAN;
the tunnel management module is further configured to delete the first unicast tunnel corresponding to the I-SID after receiving all third LSP messages of the specified network device.
The tunnel management module is further configured to delete the first multicast tunnel corresponding to the I-SID after receiving the first LSP messages and the second LSP messages of all the designated network devices, where the first multicast tunnel is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN; performing topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID; or,
after receiving the first LSP messages and the second LSP messages of all the appointed network equipment, carrying out topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID; and deleting the first multicast tunnel corresponding to the I-SID, wherein the first multicast tunnel is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN.
The network equipment is applied to the shortest path bridge SPBM network in the MAC-in-MAC mode and is backbone network edge bridge BEB equipment or backbone network core bridge BCB equipment in the SPBM network.
Compared with the prior art, the embodiment of the invention at least has the following advantages: in the embodiment of the invention, the interruption of I-SID flow can be reduced as much as possible in the ECT migration process by defining the specific implementation technology in the ECT smooth migration process, and the ECT smooth migration is realized.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The embodiment of the invention provides an ECT smooth migration method, which is characterized in that the interruption of I-SID flow is reduced as much as possible in the ECT migration process by defining the implementation details in the ECT smooth migration process, and the ECT smooth migration is realized; the method can be applied to an SPBM network, and the network equipment in the SPBM network is BEB equipment or BCB equipment. As shown in fig. 3, the method may include the steps of:
step 301, when knowing that the traffic of the I-SID (taking I-SID1 as an example later) needs to be migrated from the first B-VLAN to the second B-VLAN (that is, the traffic configured with I-SID1 is migrated from the first B-VLAN to the second B-VLAN), the network device broadcasts a first LSP (link state protocol data unit) message and a second LSP message. For convenience of description, the processing procedure of each network device in the SPBM network is the same, and the following description will be given by processing of one network device.
In the embodiment of the invention, the B-VLAN corresponds to the B-VID (VLAN ID of an operator backbone network), namely when the network equipment knows that the flow of the I-SID1 needs to be transferred from a first B-VID to a second B-VID, the first LSP message and the second LSP message are broadcasted; the following description will be made by taking a B-VLAN as an example.
In the embodiment of the invention, the first LSP message is used for informing the corresponding relation between the B-VLAN and the ECT, and the first LSP message carries the corresponding relation between the second B-VLAN and the second ECT; further, the U-bit in the first LSP packet may be set as a first identifier (e.g., 1), and the U-bit indicates, for the first identifier, that the currently notified B-VLAN (i.e., the second B-VLAN) carries traffic of I-SID 1.
In the embodiment of the invention, the second LSP message is used for informing the corresponding relation between the I-SID and the B-VLAN, and the second LSP message carries the corresponding relation between the I-SID1 and the second B-VLAN; further, the R flag in the second LSP packet may be set to be the second identifier (1), and the T flag may be set to be the third identifier (e.g. 1); the R mark indicates that the network device sending the second LSP packet can receive traffic of I-SID1, and the T mark indicates that the network device sending the second LSP packet can send traffic of I-SID 1.
Step 302, when the network device receives the first LSP message and the second LSP message of other network devices, the corresponding relationship between the I-SID1 and the second B-VLAN and the corresponding relationship between the second B-VLAN and the second ECT carried in the LSP message are used to determine that the I-SID1 corresponds to the second ECT, and the second ECT is used to perform topology calculation to obtain a second unicast tunnel corresponding to the I-SID 1.
Specifically, after the network device analyzes the corresponding relationship between the I-SID1 and the second B-VLAN from the second LSP packet and analyzes the corresponding relationship between the second B-VLAN and the second ECT from the first LSP packet, it may be known that the traffic of the I-SID1 will be carried on the SPT set obtained by the second ECT calculation, and therefore the network device may perform topology calculation using the second ECT to obtain the second unicast tunnel (including the unicast entry and the unicast tunnel information) corresponding to the I-SID 1.
Step 303, before receiving the first LSP message and the second LSP message of all designated network devices (i.e. the network devices that broadcast the correspondence between I-SID1 and the first B-VLAN before the traffic of I-SID1 migrates from the first B-VLAN to the second B-VLAN), the network device sends the traffic of I-SID1 using the first unicast tunnel corresponding to I-SID 1; after receiving the first LSP messages and the second LSP messages of all the specified network devices, the network device sends the flow of the I-SID1 by using a second unicast tunnel corresponding to the I-SID 1.
In the embodiment of the invention, before the traffic of the I-SID1 is migrated from the first B-VLAN to the second B-VLAN, the traffic of the I-SID1 needs to be transmitted through a unicast tunnel corresponding to the first B-VLAN, so that the network equipment can perform topology calculation based on the first ECT corresponding to the first B-VLAN to obtain a first unicast tunnel corresponding to the I-SID 1; and then, before receiving the first LSP messages and the second LSP messages of all the specified network devices, sending the traffic of the I-SID1 by using a first unicast tunnel corresponding to the I-SID 1.
Specifically, after the network device obtains the second unicast tunnel corresponding to the I-SID1, before receiving the first LSP messages and the second LSP messages of all the designated network devices, the first unicast tunnel corresponding to the I-SID1 cannot be covered by the second unicast tunnel corresponding to the I-SID1, where the first unicast tunnel corresponding to the I-SID1 is the primary unicast tunnel and the second unicast tunnel corresponding to the I-SID1 is the standby unicast tunnel; that is, the second unicast tunnel corresponding to the I-SID1 can receive the traffic of the I-SID1 but cannot transmit the traffic of the I-SID 1; the first unicast tunnel corresponding to the I-SID1 can receive the traffic of the I-SID1 and can also transmit the traffic of the I-SID 1.
Based on this, the network device sends the traffic of the I-SID1 by using the first unicast tunnel corresponding to the I-SID1, including: for the traffic of the I-SID1 received through the first unicast tunnel or the second unicast tunnel corresponding to the I-SID1, the network device sends the traffic of the I-SID1 by using the first unicast tunnel corresponding to the I-SID 1.
In the embodiment of the invention, after the traffic of the I-SID1 is migrated from the first B-VLAN to the second B-VLAN, the traffic of the I-SID1 needs to be transmitted through a unicast tunnel corresponding to the second B-VLAN, so that the network equipment can perform topology calculation based on the second ECT corresponding to the second B-VLAN to obtain a second unicast tunnel corresponding to the I-SID 1; and then after receiving the first LSP messages and the second LSP messages of all the specified network devices, sending the traffic of the I-SID1 by using a second unicast tunnel corresponding to the I-SID 1.
Specifically, the network device detects the second LSP message carrying the corresponding relationship between the I-SID1 and the second B-VLAN, and if the network device learns that all the specified network devices (namely all the network devices having the corresponding relationship between the I-SID1 and the first B-VLAN) issue the corresponding relationship between the I-SID1 and the second B-VLAN, the ECT migration configuration is considered to be completed, and the flow migration of the I-SID1 is started; because the difference between the LSP message transmission time and the computing power of each network device exists, the time for all network devices in the network to start ECT migration has difference, so after receiving the first LSP messages and the second LSP messages of all specified network devices, the first unicast tunnel corresponding to the I-SID1 is not deleted immediately, at this moment, the first unicast tunnel corresponding to the I-SID1 is a standby unicast tunnel, and the second unicast tunnel corresponding to the I-SID1 is a main unicast tunnel; that is, the first unicast tunnel corresponding to the I-SID1 can receive the traffic of the I-SID1, but cannot transmit the traffic of the I-SID 1; the second unicast tunnel corresponding to the I-SID1 can receive the traffic of the I-SID1 and can also transmit the traffic of the I-SID 1.
Based on this, the network device sends the traffic of the I-SID1 by using the second unicast tunnel corresponding to the I-SID1, including: for the traffic of the I-SID1 received through the first unicast tunnel or the second unicast tunnel corresponding to the I-SID1, the network device sends the traffic of the I-SID1 by using the second unicast tunnel corresponding to the I-SID 1.
In summary, in the embodiment of the present invention, during the ECT smooth migration, the primary unicast tunnel is used to send the traffic of the I-SID1, and the primary unicast tunnel and the standby unicast tunnel are used to receive the traffic of the I-SID1, so as to ensure the traffic continuity of the I-SID 1.
In the embodiment of the invention, after receiving the first LSP messages and the second LSP messages of all the specified network devices, the network device also needs to broadcast a third LSP message for deleting the first unicast tunnel, wherein the third LSP message is used for informing the corresponding relation between the I-SID and the B-VLAN, and the third LSP message carries the corresponding relation between the I-SID1 and the first B-VLAN;
the R flag in the third LSP message may be set to the second identifier (1), and the T flag may be set to the fourth identifier (e.g., 0); the R mark indicates that the network device sending the third LSP packet can receive the traffic of I-SID1, and the T mark indicates that the network device sending the third LSP packet cannot send the traffic of I-SID 1.
Furthermore, after receiving the third LSP messages of all the designated network devices, the network device does not need to send the third LSP messages carrying the correspondence between I-SID1 and the first B-VLAN; when the LSP issued by all network equipment in the network does not carry the corresponding relation between the I-SID1 and the first B-VLAN, the first unicast tunnel corresponding to the I-SID1 is deleted, and at the moment, the first unicast tunnel does not carry the flow of the I-SID 1.
In addition, after the traffic of the I-SID1 is migrated from the first B-VLAN to the second B-VLAN, if the first B-VLAN does not carry any traffic of the I-SID, the network device further needs to send an LSP packet carrying a correspondence between the first B-VLAN and the first ECT, and a U-bit in the LSP packet may be set to a fifth identifier (e.g., 0), where the U-bit indicates that the currently notified B-VLAN (i.e., the first B-VLAN) does not carry any traffic of the I-SID.
In the embodiment of the invention, after receiving the first LSP messages and the second LSP messages of all the specified network devices, the network device deletes the first multicast tunnel corresponding to the I-SID1 (which is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN), and performs topology calculation by using the second ECT corresponding to the second B-VLAN to obtain the second multicast tunnel corresponding to the I-SID 1. Or after receiving the first LSP messages and the second LSP messages of all the specified network devices, performing topology calculation by using the second ECT corresponding to the second B-VLAN to obtain the second multicast tunnel corresponding to the I-SID1, and deleting the first multicast tunnel corresponding to the I-SID1 (obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN).
Based on the same inventive concept as the above method, an embodiment of the present invention further provides a network device, as shown in fig. 4, where the network device includes:
the LSP message sending module 11 is configured to broadcast a first link state protocol data unit LSP message and a second LSP message when it is known that the traffic of the backbone network service instance number I-SID needs to be migrated from a first backbone network virtual local area network B-VLAN to a second B-VLAN; the first LSP message carries a corresponding relation between the second B-VLAN and a second equivalent tree ECT, and the second LSP message carries a corresponding relation between the I-SID and the second B-VLAN;
a tunnel management module 12, configured to determine that the I-SID corresponds to the second ECT by using a correspondence between the I-SID and the second B-VLAN and a correspondence between the second B-VLAN and the second ECT when receiving a first LSP packet and a second LSP packet of another network device, and perform topology calculation by using the second ECT to obtain a second unicast tunnel corresponding to the I-SID;
a data sending module 13, configured to send, before receiving first LSP messages and second LSP messages of all specified network devices, traffic of the I-SID using a first unicast tunnel corresponding to the I-SID, where the first unicast tunnel is obtained by performing topology calculation based on a first ECT corresponding to the first B-VLAN; and after receiving the first LSP messages and the second LSP messages of all the appointed network equipment, sending the flow of the I-SID by using a second unicast tunnel corresponding to the I-SID.
The data sending module 13 is specifically configured to, before receiving the first LSP packet and the second LSP packet of all the designated network devices, send the traffic of the I-SID by using the first unicast tunnel corresponding to the I-SID for the traffic of the I-SID received through the first unicast tunnel corresponding to the I-SID or the second unicast tunnel corresponding to the I-SID; after receiving the first LSP messages and the second LSP messages of all the specified network equipment, aiming at the traffic of the I-SID received through the first unicast tunnel corresponding to the I-SID or the second unicast tunnel corresponding to the I-SID, the traffic of the I-SID is sent by using the second unicast tunnel corresponding to the I-SID.
The LSP packet sending module 11 is further configured to broadcast a third LSP packet for deleting a first unicast tunnel after receiving the first LSP packet and the second LSP packet of all designated network devices, where the third LSP packet carries the corresponding relationship between the I-SID and the first B-VLAN;
the tunnel management module 12 is further configured to delete the first unicast tunnel corresponding to the I-SID after receiving all the third LSP messages of the specified network device.
The tunnel management module 12 is further configured to delete the first multicast tunnel corresponding to the I-SID after receiving the first LSP packet and the second LSP packet of all the designated network devices, where the first multicast tunnel is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN; performing topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID; or,
after receiving the first LSP messages and the second LSP messages of all the appointed network equipment, carrying out topology calculation by using the second ECT corresponding to the second B-VLAN to obtain a second multicast tunnel corresponding to the I-SID; and deleting the first multicast tunnel corresponding to the I-SID, wherein the first multicast tunnel is obtained by performing topology calculation based on the first ECT corresponding to the first B-VLAN.
In the embodiment of the invention, the network equipment is applied to a shortest path bridge SPBM network in a MAC-in-MAC mode and is backbone network edge bridge BEB equipment or backbone network core bridge BCB equipment in the SPBM network.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.