CN105024928B - A kind of pretection switch method and apparatus of multi-protocol label switching network - Google Patents
A kind of pretection switch method and apparatus of multi-protocol label switching network Download PDFInfo
- Publication number
- CN105024928B CN105024928B CN201510475749.6A CN201510475749A CN105024928B CN 105024928 B CN105024928 B CN 105024928B CN 201510475749 A CN201510475749 A CN 201510475749A CN 105024928 B CN105024928 B CN 105024928B
- Authority
- CN
- China
- Prior art keywords
- transit lsp
- standby
- index
- lsp
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 101150094878 SNC1 gene Proteins 0.000 claims description 97
- 238000012545 processing Methods 0.000 claims description 13
- 230000009471 action Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 238000004904 shortening Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 101100242909 Streptococcus pneumoniae (strain ATCC BAA-255 / R6) pbpA gene Proteins 0.000 description 3
- 101100269618 Streptococcus pneumoniae serotype 4 (strain ATCC BAA-334 / TIGR4) aliA gene Proteins 0.000 description 3
- 238000013499 data model Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/50—Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
-
- 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
- H04L41/06—Management of faults, events, alarms or notifications
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of pretection switch method and apparatus of MPLS network, including:It stores primary transit lsp and data record sheet and is issued to forwarding chip, the data record sheet of primary transit lsp enters label and message forwarding-table item including primary transit lsp;Forwarding chip generates the hardware forwarding table of primary transit lsp, and the hardware forwarding table of primary transit lsp includes index, enters tag recognition and message forwarding-table item, the index of primary transit lsp that forwarding chip is returned to CPU;Spare transit lsp and data record sheet are stored, the data record sheet of spare transit lsp enters label and message forwarding-table item including spare transit lsp;When carrying out pretection switch, the corresponding message forwarding-table item of index of transit lsp primary in forwarding chip is revised as the message forwarding-table item of spare transit lsp to be switched to by CPU.The present invention realizes Subnetwork connection 1 in MPLS:The quick of 1 protection is switched.
Description
Technical Field
The present invention relates to the field of Multi-Protocol Label Switching (MPLS), and in particular, to a protection Switching method and apparatus for a MPLS network.
Background
A communication system is required to have high reliability, for example, when a Packet Transport Network (PTN) performs service provisioning, a corresponding service protection mechanism needs to be planned at the same time. The g.8131 definition includes subnet connection (SNC) 1:1 protection for link protection at network intermediate nodes. Subnet connection 1:1 is protected as protection between two transmission label forwarding paths (transit lsp, transit label switched paths) with the same incoming label, as shown in fig. 1, when a primary link is selected to transmit a service, label X1 of a label forwarding path (lsp, label switched paths) of a message on a packet forwarding device P1 device is switched to Y1, and after lsp label switching of the primary link, the label is finally switched to X2 on a packet forwarding device P2 device; when the standby link is selected for transmission, the lsp label of the packet is switched to Z1 in the packet forwarding device P1, and finally switched to X2 in the packet forwarding device P2 after the lsp label of the standby link is switched. The edge devices PE1 and PE2 of the network are unaware of the subnet connection 1:1 protection established across the network by which both communications are communicated.
According to the definitions of the international telecommunication union telecommunication standard ITU-T g.808.1 and the Metro Ethernet Forum (MEF), a time model of network protection switching is shown in fig. 2. The time for network protection switching includes the time from fault detection to fault discovery, the time from fault discovery to fault maintenance to the start of protection operation, the time from the start of protection operation to fault notification, and the time from fault notification to switching operation for the completion of protection operation. The time for recovering a typical carrier-class service failure is required to be within 50ms, and in other cases where the time is fixed, the performance of protection switching is usually optimized by shortening the protection switching time.
In the prior art, an internal structure of a packet forwarding device is shown in fig. 3, and includes a CPU and a PTN forwarding chip, and in order to quickly implement protection switching, the CPU in the packet forwarding device generally controls the PTN switching chip to implement a manner of deleting before creating.
Specifically, as shown in fig. 4, in the subnet connection 1:1 protection switching service model, after the CPU in the packet forwarding device configures the subnet connection 1:1 protection, the MPLS packet carrying the protected lsp label X1 is transmitted on the primary transit lsp by default, and the lsp label X1 is switched to lsp label Y1, which is shown in the flow shown by the solid line in fig. 4. When the primary transit lsp fails, the service may be switched to the backup transit lsp for carrying, which is a flow shown by a dotted line in fig. 4, and the MPLS packet of the lsp label X1 is converted into an MPLS packet carrying an lsp label Y2. In the PTN traffic forwarding chip, an lsp in-label is typically used to identify which transit lsp the MPLS-TP message should be processed by. In the subnet connection 1:1 protection scenario, the primary and backup transit lsps cannot coexist in the PTN forwarding chip at the same time because their incoming labels are the same. In the packet forwarding apparatus shown in fig. 3, the existence form of the transit lsp is different between the CPU and the PTN forwarding chip, and in the CPU, the transit lsp exists in a software form, that is, the attribute contained in the transit lsp is stored in the memory in the form of a data table entry record, and the attribute contains information such as the software table entry index, the incoming label, the outgoing port, dmac, vlan, exp, and the like of the transit lsp; in the PTN forwarding chip, the transit lsp exists in the form of a hardware forwarding table, that is, the transit lsp includes information such as a hardware table entry index, an entry tag, an exit port, dmac, vlan, and exp of the transit lsp. The primary transit lsp has corresponding entities in both the CPU and the PTN forwarding chip, that is, a software entity exists in the CPU and a corresponding hardware entry exists in the PTN forwarding chip; the spare transit lsp only has a software entity in the CPU, and cannot create a hardware table entry of the transit lsp in the PTN forwarding chip.
To implement the sub-network connection 1:1 protection switching, the prior art usually adopts a method of deleting a transit lsp and then creating a new transit lsp, as shown in fig. 5. Establishing a subnet connection 1:1 protection group by adopting a primary and a secondary transit lsp, completing the establishment of the primary and the secondary transit lsps, defaulting to select a working primary transit lsp to carry service after the protection group is established, configuring the primary transit lsp to a PTN forwarding chip, and realizing the secondary transit lsp only in a CPU in a software form; when the operation of primary switching to standby occurs, deleting the primary transit lsp in the PTN forwarding chip, changing the primary transit lsp into a software storage state, and then creating a standby transit lsp; when the standby switching operation is switched to the main operation, the standby transit lsp is deleted, the standby transit lsp is changed into a software form, and then the main transit lsp is created. Therefore, the subnet connection protection switching method of deleting and then creating the transit lsp has two operations of writing all the related hardware table entries of the transit lsp, which consumes a long time, so that the switching operation time becomes a bottleneck of protection switching performance.
Disclosure of Invention
In order to solve the technical problem, the invention provides a protection switching method and a device for a multi-protocol label switching network, which can realize the fast switching of the subnet connection 1:1 protection in the MPLS.
In order to achieve the object of the present invention, an embodiment of the present invention provides a protection switching method for a multi-protocol label switching network, including: the CPU stores the created data recording tables of the primary transit lsp and sends the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; the forwarding chip generates a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU; the CPU stores the created standby transit lsp and a data record table of the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp; the CPU stores the created SNC1:1 protection group, establishes the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp, and forms SNC1:1, protection; when protection switching is carried out, the CPU modifies the message forwarding table entry corresponding to the index of the primary transit lsp in the forwarding chip into the message forwarding table entry of the standby transit lsp to be switched to.
Further, the index of the primary transit lsp comprises a label index and a message forwarding index of the primary transit lsp; the CPU acquires an internal incoming label as an incoming label table entry of the standby transit lsp and sends the incoming label table entry and a message forwarding table entry of the standby transit lsp to a forwarding chip; the forwarding chip generates a hardware forwarding table of the standby transit lsp according to the label entry table and the message forwarding table of the standby transit lsp, and returns an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a label index and a message forwarding index of the standby transit lsp; when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
Further, the CPU obtains an internal incoming label as an incoming label table entry of the standby transit lsp, specifically: the CPU allocates a port identification label as an entry label table item of the standby transit lsp based on a port which is suspended or not used for message input; alternatively, a reserved tag is used as an in-tag entry for the standby transit lsp.
Further, the index of the primary transit lsp comprises a label index and a message forwarding index of the primary transit lsp; the CPU sends a message forwarding table entry of a standby transit lsp to a forwarding chip; the forwarding chip generates a hardware forwarding table of the standby transit lsp according to the message forwarding table entry of the standby transit lsp, and returns an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a message forwarding index of the standby transit lsp; when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
Further, in the forwarding chip, the hardware forwarding table includes a hardware forwarding table of the primary transit lsp and a hardware forwarding table of the backup transit lsp, and the hardware forwarding table of the primary transit lsp includes a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the backup transit lsp; the hardware forwarding table of the standby transit lsp at least comprises a message forwarding table entry and an index of the standby transit lsp.
Further, in the forwarding chip, the hardware forwarding table includes a tag identification table and a message forwarding table, where the tag identification table at least includes a tag identification table entry and an index of the primary transit lsp; the message forwarding table comprises a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the standby transit lsp.
Further, the association relationship between the SNC1:1 protection group and the primary and standby transit lsps is as follows: the SNC1:1 protection group comprises the primary transit lsp and the standby transit lsp; the method further comprises the following steps: if the SNC1:1 protection needs to be deleted, the SNC1:1 protection group is deleted firstly, and then the standby fransitlsp and the primary fransitlsp are deleted.
Further, the method further comprises: if the SNC1 needs to be deleted: 1 protection group and traffic is transmitted on the standby transit lsp, then after deleting the SNC1: before the protection group 1, the service is switched back to the primary transit lsp.
The invention provides a protection switching device of a multi-protocol label switching network in one embodiment, which comprises a Central Processing Unit (CPU) and a forwarding chip, wherein the CPU is used for storing created data recording tables of a primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, and the data recording table of the primary transit lsp comprises a label entry and a message forwarding entry of the primary transit lsp; storing a created data record table of the standby transit lsp and the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp; storing the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary and standby transit lsp, and forming SNC1:1, protection; the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU; the CPU is further configured to modify a packet forwarding table entry corresponding to an index of a primary transit lsp in the forwarding chip to a packet forwarding table entry of a standby transit lsp to be switched to when protection switching is performed.
Further, the index of the primary transit lsp comprises a label index and a message forwarding index of the primary transit lsp; the CPU is also used for acquiring an internal incoming label as an incoming label table entry of the standby transit lsp and sending the incoming label table entry and the message forwarding table entry of the standby transit lsp to the forwarding chip; the forwarding chip is further configured to generate a hardware forwarding table of the standby transit lsp according to the label entry and the message forwarding entry of the standby transit lsp, and return an index of the hardware forwarding table of the standby transit lsp to the CPU, where the index of the standby transit lsp includes a label index and a message forwarding index of the standby transit lsp; when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
Further, the CPU obtains an internal incoming label as an incoming label table entry of the standby transit lsp, specifically: the CPU allocates a port identification label as an entry label table item of the standby transit lsp based on a port which is suspended or not used for message input; alternatively, a reserved tag is used as an in-tag entry for the standby transit lsp.
Further, the index of the primary transit lsp comprises a label index and a message forwarding index of the primary transit lsp; the CPU is also used for sending a message forwarding table entry of the standby transit lsp to the forwarding chip; the forwarding chip is further configured to generate a hardware forwarding table of the standby transit lsp according to the packet forwarding table entry of the standby transit lsp, and return an index of the hardware forwarding table of the standby transit lsp to the CPU, where the index of the standby transit lsp includes a packet forwarding index of the standby transit lsp; when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
Further, in the forwarding chip, the hardware forwarding table includes a hardware forwarding table of the primary transit lsp and a hardware forwarding table of the backup transit lsp, and the hardware forwarding table of the primary transit lsp includes a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the backup transit lsp; the hardware forwarding table of the standby transit lsp at least comprises a message forwarding table entry and an index of the standby transit lsp.
Further, in the forwarding chip, the hardware forwarding table includes a tag identification table and a message forwarding table, where the tag identification table at least includes a tag identification table entry and an index of the primary transit lsp; the message forwarding table comprises a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the standby transit lsp.
According to the invention, aiming at the PTN forwarding chip supporting the standby transit lsp, when the primary transit lsp is created, the forwarding chip respectively creates the entry tag identification and the message forwarding table entry and index of the primary transit lsp; because the label identification flow of the standby transit lsp is the same as that of the primary transit lsp, when the standby transit lsp is created, the forwarding chip only needs to create the list item and the index for forwarding the message of the standby transit lsp; when protection switching is needed, the message forwarding table entry corresponding to the incoming label table entry of the primary transit lsp is modified to be the message forwarding table entry to be switched to the transit lsp, so that the problem that in the prior art, the protection switching operation of the backup transit lsp is created after the primary transit lsp is deleted is avoided, and the purpose of shortening the time consumption of the protection switching operation is achieved. Aiming at a common PTN forwarding chip which does not support a standby transit lsp, a primary transit lsp creates an entry entity in the forwarding chip, and the standby transit lsp does not create an entry entity in the forwarding chip; when switching occurs, modifying the attribute content of the message forwarding table entry of the primary transit lsp in the chip to realize switching; or when creating the primary transit lsp, the forwarding chip creates entry and index of the primary transit lsp for label identification and message forwarding respectively; through allocating port identification labels or using reserved labels as internal incoming labels of the standby transit lsp, when creating the standby transit lsp, the forwarding chip creates the internal incoming labels of the standby transit lsp and the list items and indexes for forwarding the message; when protection switching is needed, modifying the message forwarding table entry corresponding to the incoming label identification table entry of the primary transit lsp, and pointing to the message forwarding table entry of the transit lsp to be switched to complete switching operation, thereby greatly shortening the time consumption of protection switching operation. Therefore, the fast switching of the sub-network connection 1:1 protection in the MPLS is realized, and the performance of the protection switching can be greatly improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is an architectural diagram of subnet connection 1:1 protection in the prior art.
Fig. 2 is a schematic diagram of a prior art model of protection switching time.
Fig. 3 is a schematic diagram of a structure of a packet forwarding apparatus in the prior art.
Fig. 4 is a schematic diagram of a model of subnet connection 1:1 protection switching in the prior art.
Fig. 5 is a schematic flow chart of subnet connection 1:1 protection switching in the prior art.
FIG. 6 is a schematic diagram of the establishment of an entity relationship data model protected by SNC1:1 in the present invention.
Fig. 7 is a schematic flow chart of performing protection switching operation based on SNC1:1 protection in the present invention.
Fig. 8 is a flowchart illustrating a protection switching method of a multi-protocol label switching network according to an embodiment of the present invention.
Fig. 9 is a flowchart illustrating a protection switching method of a multi-protocol label switching network according to a first embodiment of the present invention.
Fig. 10 is a schematic diagram of a processing flow of a transit lsp inside a forwarding chip according to a first embodiment of the present invention.
Fig. 11 is a flowchart illustrating a method for implementing SNC1:1 protection switching operation by modifying a packet forwarding flow in the first embodiment of the present invention.
Fig. 12 is a flowchart illustrating a protection switching method of a multi-protocol label switching network according to a second embodiment of the present invention.
Fig. 13 is a flowchart illustrating a method for implementing SNC1:1 protection switching operation by modifying a packet forwarding flow in the second embodiment of the present invention.
Fig. 14 is a flowchart illustrating a protection switching method of a multi-protocol label switching network according to a third embodiment of the present invention.
Fig. 15 is a flowchart illustrating a method for implementing SNC1:1 protection switching operation by modifying a packet forwarding flow in the third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
In the present invention, an Entity relationship (E-R) data model protected by SNC1:1 is established as shown in FIG. 6 by using an Entity association method. The SNC1:1 protection includes three entities: SNC1:1 protection group, primary transit lsp and standby transit lsp; the relationships between the entities are: the SNC1:1 protection group has a containment relationship with the primary and backup Transitlsps. The basis for realizing the SNC1:1 protection of the invention is to realize the data model shown in FIG. 6 on equipment, store the SNC1:1 entity, the primary transit lsp entity and the standby transit lsp entity in the CPU of FIG. 3, and when switching is needed, the CPU operates a forwarding chip to complete the protection switching operation.
The flow of the creation and operation of the SNC1:1 protection is shown in fig. 7, and includes:
step 701, creating a primary transit lsp.
At step 702, a backup transit lsp is created.
Step 703, creating an SNC1:1 protection group based on the primary transit lsp and the backup transit lsp to form SNC1:1 protection.
After the SNC1:1 protection creation is completed, the primary transit lsp bearer service is selected by default, and with continued reference to fig. 7, the method further includes:
step 704, determine whether to need to switch the service, if yes, go to step 705, if no, go to step 706.
Step 705, performing SNC1:1 protection switching, returning to step 704;
step 706, judging whether to delete SNC1:1 protection, if yes, executing step 707; if not, return to step 704.
Step 707, delete SNC1:1 protected group.
At step 708, the standby transit lsp is deleted.
And step 709, deleting the primary transit lsp.
It should be noted that when creating the SNC1:1 protection, the primary transit lsp is created first, the backup transit lsp is created, and finally the SNC1:1 protection group is created. If the SNC1:1 protection needs to be deleted, deleting the SNC1:1 protection group, and then deleting the standby transit lsp and the primary transit lsp; when the SNC1:1 protection group exists, the spare and primary transit lsps are not allowed to be deleted.
As shown in fig. 8, the protection switching method for a multi-protocol label switching MPLS network of the present invention includes:
step 801, a CPU stores created data recording tables of a primary transit lsp and a primary transit lsp, and issues the data recording table of the primary transit lsp to the forwarding chip, where the data recording table of the primary transit lsp includes an entry label table entry and a packet forwarding table entry of the primary transit lsp; the forwarding chip generates a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU;
step 802, a CPU stores created data record tables of a standby transit lsp and a standby transit lsp, where the data record table of the standby transit lsp includes an entry label table and a message forwarding table of the standby transit lsp;
step 803, the CPU stores the created SNC1:1 protection group, establishes an association relationship between the SNC1:1 protection group and the primary and secondary transit lsps, and forms SNC1:1, protection;
step 804, when performing protection switching, the CPU modifies the packet forwarding table entry corresponding to the index of the primary transit lsp in the forwarding chip to the packet forwarding table entry of the standby transit lsp to be switched to.
The invention also provides a protection switching device of the multi-protocol label switching MPLS network, which comprises a central processing unit CPU and a forwarding chip, wherein,
the CPU is used for storing the created data recording tables of the primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; the CPU stores the created standby transit lsp and a data recording table of the standby transit lsp, wherein the data recording table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp; the CPU stores the created SNC1:1 protection group, establishes the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp, and forms SNC1:1, protection;
the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU;
the CPU is further configured to modify a packet forwarding table entry corresponding to an index of the primary transit lsp in the forwarding chip to a packet forwarding table entry of the standby transit lsp to be switched to when protection switching is performed.
Based on SNC1:1 protection, a method and a device for realizing SNC1:1 protection switching by a common PTN forwarding chip of which the hardware does not support the backup transit lsp and a method and a device for realizing SNC1:1 protection switching by a PTN forwarding chip of which the hardware supports the backup transit lsp are respectively introduced.
The first embodiment is as follows:
in this embodiment, initially, a primary transit lsp creates an entry entity in a forwarding chip, and a standby transit lsp does not create an entry entity in the forwarding chip; when switching occurs, modifying the attribute content of the message forwarding table entry of the primary transit lsp in the chip to realize switching.
Fig. 9 is a flowchart illustrating a protection switching method for a multi-protocol label switching network according to an embodiment of the present invention, which is applied to a PTN forwarding chip in which a transit lsp corresponds to only one hardware table, and is combined with a process of creating SNC1:1 protection shown in fig. 7, where the method includes:
step 901, the CPU stores the created primary transit lsp and then issues a data record table of the primary transit lsp to the forwarding chip, and the forwarding chip creates an entry and an index for the entry identification of the primary transit lsp and forwarding the packet according to the issued data record table, and returns the entry identification of the primary transit lsp and the index for forwarding the packet to the CPU.
As shown in fig. 10, in the PTN forwarding chip, the processing flow of the transit lsp is divided into two flows of label identification and message forwarding, where the two flows are in the same table entry, and the forwarding chip allocates index information hwId1 to the transit lsp; the hardware forwarding table entry in the PTN forwarding chip corresponding to the transit lsp is shown as the hardware forwarding table entry of the primary transit lsp in the forwarding chip of table 1, and the incoming label identification and packet forwarding processes are in one-to-one correspondence in the table entry.
TABLE 1
The incoming label identification process supports global label identification and port label identification, wherein the global label identification does not concern incoming port information, and the same message which can enter a forwarding chip from any port is identified as the same message; in port label identification, the same message entering from different ports is identified as different message.
The message forwarding process comprises the steps of changing the lsp label of the message, changing the exp value, modifying the ETH head of the outer layer, sending the modified message to a designated port and the like.
Therefore, in this step, the user operation triggers creation of the primary transit lsp, the CPU stores the primary transit lsp and issues it to the PTN forwarding chip, an entry identification and a packet forwarding entry of the primary transit lsp are created in the PTN forwarding chip, and a hardware entry index of the primary transit lsp is returned to the CPU.
The CPU stores the created primary transit lsp and then sends a data recording table of the primary transit lsp to the forwarding chip, and the forwarding chip respectively creates entry label identification and message forwarding table entries and indexes of the primary transit lsp as shown in table 1. The forwarding chip creates an entry tag identification entry of the primary transit lsp, which includes an entry tag x1, the entry for packet forwarding includes an exit tag y1, an exit port1, a destination dmac, an outer vlan1, lsp tag exp information, ttl action 1, a source mac address localmac, an lsp tag processing action swap, and the like, and returns a hardware entry index hwId1 of the primary transit lsp in the forwarding chip to the CPU, and the CPU stores the index into a hardware entry index attribute in a software entry record of the primary transit lsp, as shown in a data record table of the primary transit lsp in the CPU in table 2.
TABLE 2
Step 902, the CPU stores the created backup transit lsp and does not issue the backup transit lsp to the forwarding chip, the table entry information of the backup transit lsp stored in the CPU is shown in the data record table of the backup transit lsp in the CPU in table 3, and the content of the hardware table entry index attribute is null, which indicates that the hardware table entry resource is not allocated for the backup transit lsp in the forwarding chip.
TABLE 3
Step 903, the CPU stores the created SNC1:1 protection group, establishes an association relationship between the SNC1:1 protection group and the primary transit lsp and the backup transit lsp, and forms SNC1:1 protection.
In this step, the SNC1:1 protection group is associated with the primary transit lsp and the backup transit lsp in an inclusion relationship, that is, the SNC1:1 protection group includes the primary transit lsp and the backup transit lsp.
Step 904, when protection switching is performed, the hardware table index of the primary transit lsp is obtained, and the attribute of the transit lsp message forwarding flow table entry in the forwarding chip is modified to the message forwarding attribute to be switched to the transit lsp.
Specifically, the method for switching from the primary transit lsp to the standby transit lsp includes acquiring a hardware table entry index hwId1 of the primary transit lsp, modifying a corresponding message forwarding table entry attribute to be a message forwarding attribute of the standby transit lsp, and achieving the effect of changing the hardware forwarding table content of the primary transit lsp in the forwarding chip of table 1 into the hardware forwarding table content when the service selects the standby transit lsp for transmission in the forwarding chip of table 4; the method for switching from the standby transit lsp to the primary transit lsp includes the steps of obtaining a hardware table index hwId1 of the primary transit lsp, modifying a corresponding message forwarding table attribute to be a message forwarding attribute of the primary transit lsp, and changing a hardware forwarding table content when a service in a forwarding chip of table 4 selects the standby transit lsp for transmission into a hardware forwarding table content of the primary transit lsp in the forwarding chip of table 1.
TABLE 4
In the prior art, the time consuming point of SNC1:1 protection switching needs to create another transit lsp again after deleting one transit lsp. Comparing the difference between forwarding table entries of the primary transit lsp and the standby transit lsp in the PTN forwarding chip, because the entry labels of the primary transit lsp and the standby transit lsp are the same, the entry label identification process is completely the same, the main difference is in the packet forwarding process, and the entry of the primary transit lsp and the entry of the standby transit lsp are different.
In this embodiment, the ingress label of the primary transit lsp and the ingress label of the backup transit lsp are the same, and the forwarding features are different, such as the channel label of the outer layer switch, the vlan of the next hop, the mac address of the next hop, exp, and egress port. As shown in fig. 11, the working transit lsp defaults to the primary transit lsp, and the traffic is carried on the primary transit lsp; when switching is needed, acquiring a hardware table entry index in a table entry record of a primary transit lsp in a CPU: and the hwId1 modifies the forwarding characteristic in the message forwarding table entry corresponding to the incoming label identification table entry into the forwarding characteristic in the message forwarding table entry of the transit lsp to be switched according to the forwarding characteristic of the transit lsp to be switched. For example, when the primary transit lsp is switched to the standby transit lsp, the forwarding feature in the message forwarding table entry of the primary transit lsp corresponding to the entry label table entry is modified to the forwarding feature in the message forwarding table entry of the standby transit lsp; and if the standby transit lsp is switched to the primary transit lsp, modifying the forwarding characteristic in the message forwarding table entry of the standby transit lsp corresponding to the entry of the incoming label table to the forwarding characteristic in the message forwarding table entry of the primary transit lsp.
For example, the tag identification index x1 of the primary transit lsp and the message forwarding table information of the corresponding primary transit lsp are obtained, for example, the relevant information such as the egress port tag y1, the egress port number port1, the dmac1, the vlan1, the exp1, and the like; when the primary transit lsp needs to be switched to the backup transit lsp, since the incoming labels are the same and are all x1, the identification of the incoming label is not required to be changed, only the identification index x1 of the incoming label and the message forwarding table information of the corresponding primary transit lsp need to be changed, and the relevant information such as the outgoing port label y1, the outgoing port number ports 1, dmac1, vlan1, exp1 is modified into the outgoing port label y2, the outgoing port number ports 2, dmac2, vlan2, exp2, thereby completing the switching operation from the primary transit lsp to the backup transit lsp.
Compared with the existing method for deleting and then creating the transit lsp to realize protection switching, the method for deleting and then creating the transit lsp optimizes the table entry operation of the forwarding chip which writes the transit lsp twice into the operation of writing partial table entries of the transit lsp once, and can realize the protection switching operation more quickly; in addition, when the SNC1:1 function is implemented, only one hardware table entry resource of a transitilsp is occupied in the PTN forwarding chip. By applying the technology of the invention, the SNC1:1 is realized in the PTN forwarding chip of which the transit lsp only corresponds to one hardware table, and better protection switching performance can be obtained.
A protection switching method for a multi-protocol label switching network according to an embodiment a further provides a protection switching device for a multi-protocol label switching network, including:
the CPU is used for storing the created data recording tables of the primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; storing a created data record table of the standby transit lsp and the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp; storing the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary and standby transit lsp, and forming SNC1:1, protection;
the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU;
and the CPU is also used for modifying the message forwarding table entry corresponding to the index of the primary transit lsp in the forwarding chip into the message forwarding table entry of the standby transit lsp to be switched to when protection switching is performed.
Example two:
in this embodiment, initially, a primary transit lsp creates an entry entity in a forwarding chip, and a standby transit lsp creates an entry entity in the forwarding chip using a reservation label; when switching occurs, modifying the message forwarding index corresponding to the entry tag identification table entry of the primary transit lsp in the chip to realize switching.
In the PTN forwarding chip, the processing of the transit lsp can be divided into two flows of label identification and message forwarding, so that the transit lsp can be designed into two tables, namely a label identification table and a message forwarding table, in the PTN forwarding chip; the form of the transit lsp in the PTN forwarding chip is the bound incoming label identification table and the message forwarding table, and the forwarding chip table entry corresponding to the transit lsp needs to be bound and created.
Fig. 12 is a flowchart illustrating a protection switching method of a multi-protocol label switching network according to a second embodiment of the present invention, which is applied to a PTN forwarding chip in which a transit lsp corresponds to an entry label identification table and a packet forwarding table, and is combined with a creation process of SNC1:1 protection shown in fig. 7, where the method includes:
step 1201, the CPU stores the created primary transit lsp and then issues it to the forwarding chip, and the forwarding chip creates an entry tag identification entry and a packet forwarding entry of the primary transit lsp, and returns an entry tag identification entry of the primary transit lsp and an index of the packet forwarding table to the CPU.
The forwarding chip creates entry and index of entry identification and message forwarding of the primary transit lsp as shown in a hardware forwarding table of the primary transit lsp in the forwarding chip of table 5, the forwarding chip creates entry identification x1 of the primary transit lsp, the entry of message forwarding includes an exit tag y1, an exit port1, a destination dmac, an outer vlan1, lsp tag exp information, ttl action information ttl1, a source mac address localmac, a lsp tag processing action swap, and the like, and returns the entry identification and message forwarding index of the primary transit lsp to the CPU. The CPU stores the two indexes into the hardware label index and the hardware forwarding index attribute in the master fransistosp software table entry record respectively, as shown in the data record table of the master fransistosp in the CPU of table 6;
TABLE 5
TABLE 6
Step 1202, the CPU stores the created backup transit lsp and obtains the internal incoming label and then issues the internal incoming label to the forwarding chip, the forwarding chip creates the internal incoming label table and the packet forwarding table and the index of the backup transit lsp, and returns the internal incoming label table and the packet forwarding table index of the backup transit lsp to the CPU.
In the PTN forwarding chip, a packet forwarding table of transit lsp must be created by binding with an incoming label identification table. In order to create a message forwarding table of the standby transit lsp in the forwarding chip, a legal incoming label identification table must be created for the standby transit lsp together. And requires that the tagging identification process can only be used for the creation of a backup transit lsp and not be used for the actual bearer service.
In a preferred embodiment of creating the entry tag identification table of the standby transit lsp in this step, a method of using a port identification tag may be adopted, specifically, a port0 which is floating or not used for message input is selected, and a port identification tag x0 is assigned based on the port0 as an internal entry tag of the standby transit lsp.
In another preferred embodiment of this step to create the in-label identification table of the standby transit lsp, a method of reserving a label, specifically, restricting the reservation label x0 from being allocated for use by the user, may be employed, using the reservation label as an internal in-label of the standby transit lsp.
The forwarding chip creates an entry tag identification table of the standby transit lsp and a message forwarding table, respectively, as shown in a hardware forwarding table of the standby transit lsp in the forwarding chip of table 7, the entry tag identification table of the standby transit lsp created by the forwarding chip includes an entry tag x0 and an entry port0 (used in a port identification tag scheme), the entry for message forwarding includes an exit tag y2, an exit port2, a destination dmac2, an outer vlan2, lsp tag exp information exp2, ttl action information ttl2, a source mac address localmac, a packet processing action swap, and the like, and returns indexes of the entry tag identification table of the standby transit lsp and the message forwarding table to the CPU. The CPU stores the two indexes into the hardware tag index and the hardware forwarding index attribute in the spare transit lsp software table entry record, respectively, as shown in the data record table of the spare transit lsp in the CPU of table 8;
TABLE 7
TABLE 8
Step 1203, the CPU stores the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp to form SNC1:1 protection.
The specific implementation manner of this step is similar to that of step 903 in the first embodiment, and is not described herein again.
Step 1204, when needing protection switching, the CPU modifies the incoming label identification table of the primary transit lsp and directs it to the message forwarding table entry of the transit lsp to be switched to.
In this step, the label entry identification table index of the primary transit lsp and the packet forwarding index of the transit lsp to be switched are obtained, and the attribute of the packet forwarding index in the label entry identification table of the primary transit lsp is modified to point to the packet forwarding flow of the transit lsp to be switched. As shown in fig. 13, for example, when the primary transit lsp is switched to the backup transit lsp, the message forwarding index corresponding to the modified entry label identification table entry points to the message forwarding index of the backup transit lsp, so as to achieve the effect of changing the hardware forwarding table content of the primary transit lsp in the forwarding chip of table 5 into the hardware forwarding table content of the switching-to-backup transit lsp forwarding chip of table 9; when the standby transit lsp is switched to the primary transit lsp, the message forwarding index corresponding to the entry of the modified entry label identification table points to the message forwarding index of the primary transit lsp, which has the effect of changing the content of the hardware forwarding table of table 9 switched to the standby transit lsp forwarding chip to the content of the hardware forwarding table of the primary transit lsp in the forwarding chip of table 5 in step 1201.
TABLE 9
In this embodiment, when switching is required, the switching operation can be completed only by modifying one message forwarding index attribute in the tag identification table, so that the performance of protection switching can be greatly improved.
Corresponding to the protection switching method of the mpls network in the second embodiment, there is further provided a protection switching device of the mpls network, including:
the CPU is used for storing the created data recording tables of the primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; storing a created data record table of the standby transit lsp and the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp, and an internal incoming label is acquired as the incoming label table entry of the standby transit lsp; storing the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp, and forming SNC1:1, protection;
the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, the forwarding chip returns the index of the primary transit lsp to the CPU, and the index of the primary transit lsp comprises a tag index of the primary transit lsp and a message forwarding index; generating a hardware forwarding table of the standby transit lsp according to the label entry table and the message forwarding table of the standby transit lsp, and returning an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a label index and a message forwarding index of the standby transit lsp;
and the CPU is also used for modifying the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched when protection switching is performed.
The method comprises the following steps that a CPU obtains an internal label as a label entry table item of a standby transit lsp, and specifically comprises the following steps: the CPU allocates a port identification label as an entry label table item of the standby transit lsp based on a port which is suspended or not used for message input; or the CPU uses the reserved label as the entry label table item of the standby transit lsp.
Example three:
in this embodiment, initially, a primary transit lsp creates an entry entity in a forwarding chip, and a standby transit lsp only creates a packet forwarding entry entity; when switching occurs, modifying the message forwarding index corresponding to the entry tag identification table entry of the primary transit lsp in the chip to realize switching.
In the PTN forwarding chip, the processing of the transit lsp can be divided into two flows of label identification and message forwarding, so that the transit lsp can be designed into two tables, namely a label identification table and a message forwarding table, in the PTN forwarding chip; the form of the transit lsp in the PTN forwarding chip is a bound incoming label identification table and a message forwarding table, and a forwarding chip table entry corresponding to the transit lsp needs to be bound and created; considering that in the SNC1:1 protection switching scenario, the standby transit lsp only needs to have a message forwarding table, and when the protection group needs to be switched to the standby transit lsp, only the incoming label identification table needs to be bound with the message forwarding table of the standby transit lsp.
Fig. 14 is a schematic flow chart of a protection switching method of a multi-protocol label switching network in an embodiment of the present invention, which is applied to a PTN forwarding chip of a transit lsp corresponding to an entry label identification table and a packet forwarding table, and combined with a creation process of SNC1:1 protection shown in fig. 7, the method includes:
step 1401, the CPU stores the created primary transit lsp and then issues attribute information of the primary transit lsp to the forwarding chip, and the forwarding chip creates entry and index of the primary transit lsp for tag identification and packet forwarding, and returns the entry and index of the primary transit lsp to the CPU for tag identification and packet forwarding.
The forwarding chip creates entry and index of entry identification and message forwarding of the primary transit lsp as shown in a hardware forwarding table of the primary transit lsp in the forwarding chip of table 10, the forwarding chip creates entry identification x1 of the primary transit lsp, the entry of message forwarding includes exit tag y1, exit port1, destination dmac1, outer vlan1, lsp tag exp information exp1, ttl action information ttl1, source mac address localmac, lsp tag processing action swap, and the like, and returns the entry identification and index of the message forwarding table of the primary transit lsp to the CPU. The CPU stores the two indexes into the hardware tag index and the hardware forwarding index attribute in the entry record of the master transit lsp software, respectively, as shown in the data record table of the master transit lsp in the CPU of table 11.
Watch 10
TABLE 11
Step 1402, the CPU stores the created backup transit lsp, only sends the content of the message forwarding table entry to the forwarding chip, the forwarding chip creates a message forwarding table of the backup transit lsp, allocates a message forwarding table index, and returns the message forwarding table index of the backup transit lsp to the CPU.
The forwarding chips respectively create message forwarding tables of the standby transit lsps, as shown in the hardware forwarding tables of the standby transit lsps in the forwarding chip of table 12, entries of the message forwarding tables of the standby transit lsps created by the forwarding chips include an outgoing label y2, an outgoing port2, a destination dmac2, an outer vlan2, lsp label exp information exp2, ttl action information ttl2, a source mac address localmac, lsp label processing action swap, and the like, and return an index Id2_2 of the message forwarding tables of the standby transit lsps to the CPU. The CPU stores the index into the hardware forwarding index attribute in the spare transit lsp software table entry record, as shown in the table 13 for the data record of the spare transit lsp in the CPU.
TABLE 12
Watch 13
Step 1403, the CPU stores the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp to form SNC1:1 protection.
In this step, the SNC1:1 protection group is associated with the primary transit lsp and the backup transit lsp in an inclusion relationship, that is, the SNC1:1 protection group includes the primary transit lsp and the backup transit lsp.
Step 1404, when protection switching is needed, the CPU modifies the incoming label identification table of the primary transit lsp and directs it to the packet forwarding table entry of the transit lsp to which it is to be switched.
In this step, the incoming label identification index of the primary transit lsp and the packet forwarding index of the transit lsp to be switched to are obtained, and the packet forwarding index corresponding to the incoming label identification entry of the primary transit lsp is modified to point to the transit lsp to be switched to. As shown in fig. 15, for example, when the primary transit lsp is switched to the backup transit lsp, the message forwarding index corresponding to the modified entry label identification table entry points to the message forwarding index of the backup transit lsp, so as to change the hardware forwarding table content of the primary transit lsp in the forwarding chip of table 10 into the hardware forwarding table content of the forwarding chip switched to the backup transit lsp of table 14; when the standby transit lsp is switched to the primary transit lsp, the message forwarding index corresponding to the entry of the modified entry label identification table points to the message forwarding index of the primary transit lsp, which has the effect of changing the content of the hardware forwarding table of table 14 switched to the standby transit lsp forwarding chip to the content of the hardware forwarding table of the primary transit lsp in the forwarding chip of table 10 in step 1301.
TABLE 14
In this embodiment, when switching is required, the switching operation can be completed only by modifying one message forwarding index attribute in the tag identification table, so that the performance of protection switching can be greatly improved.
Compared with the second embodiment, in this embodiment, the standby transit lsp corresponds to only the packet forwarding table entry in the forwarding chip, and the standby transit lsp does not have a corresponding tag entry identification table, so that resources of the tag entry identification table are saved.
Corresponding to the protection switching method of the mpls network in the third embodiment, there is further provided a protection switching device of the mpls network, including:
the CPU is used for storing the created data recording tables of the primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; storing the created data record tables of the standby transit lsp and sending a message forwarding table item of the standby transit lsp to a forwarding chip, wherein the data record table of the standby transit lsp comprises an incoming label table item and a message forwarding table item of the standby transit lsp; storing the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp, and forming SNC1:1, protection;
the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, the forwarding chip returns the index of the primary transit lsp to the CPU, and the index of the primary transit lsp comprises a tag index of the primary transit lsp and a message forwarding index; generating a hardware forwarding table of the standby transit lsp according to the message forwarding table entry of the standby transit lsp, and returning an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a message forwarding index of the standby transit lsp;
and the CPU is also used for modifying the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched when protection switching is performed.
In the forwarding chip in this embodiment, the hardware forwarding table includes a hardware forwarding table of a primary transit lsp and a hardware forwarding table of a backup transit lsp, where the hardware forwarding table of the primary transit lsp includes a packet forwarding table entry and an index of the primary transit lsp and a packet forwarding table entry and an index of the backup transit lsp; the hardware forwarding table of the standby transit lsp at least comprises a message forwarding table entry and an index of the standby transit lsp.
Example four:
in this embodiment, initially, the primary transit lsp creates an entry tag identification entry entity and a packet forwarding entry entity in the forwarding chip, respectively, and the standby transit lsp creates only a packet forwarding entry entity; when switching occurs, modifying the message forwarding index corresponding to the entry tag identification table entry of the primary transit lsp in the chip to realize switching.
In the PTN forwarding chip, the processing of the transit lsp can be divided into two flows of label identification and message forwarding, so that the transit lsp can be designed into two tables, namely a label identification table and a message forwarding table, in the PTN forwarding chip; in the modified embodiment three, the label entry identification table and the packet forwarding table of the primary transit lsp are bound to create a flow, and the label entry identification table and the packet forwarding table corresponding to the transit lsp are created separately, so as to obtain forwarding chip table entries of the primary transit lsp and the backup transit lsp, as shown in the SNC1:1 protection of the primary transit lsp and the packet forwarding table of the backup transit lsp working in the primary transit lsp and the table 16. When the SNC1:1 protection works in the backup transit lsp, the in-tag identification table in the forwarding chip is shown in table 17 for the SNC1:1 protection work in the backup transit lsp. The other steps are similar to the method of example three.
Watch 15
TABLE 16
TABLE 17
Corresponding to the protection switching method of the multi-protocol label switching network of the fourth embodiment, a protection switching device of the multi-protocol label switching network is further provided, in the forwarding chip of the present embodiment, the hardware forwarding table includes a label entry identification table and a packet forwarding table, where the label entry identification table at least includes a label entry identification table entry and an index of the primary transit lsp; the message forwarding table comprises a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the standby transit lsp. The other steps are similar to those of the third embodiment.
In the first, second, third, and fourth embodiments, the protection switching operation created after deletion in the prior art is avoided, and the protection switching operation is completed by modifying one attribute information of the tag identification table, so as to achieve the purpose of shortening the time consumption of the protection switching operation.
Furthermore, in the first to fourth embodiments of the present invention, in order to ensure data consistency of the PTN forwarding table entry, in SNC1:1, when the protection group is deleted, if the service is transmitted on the standby transit lsp, the service needs to be switched back to the primary transit lsp for transmission. At SNC1:1 protection group exists, if deletion of the standby transit lsp is allowed, it is also guaranteed that when the standby transit lsp entry on the forwarding chip is deleted, SNC1: the protection group 1 is switched back to the primary transit lsp, i.e. the states of the primary transit lsp and the standby transit lsp are guaranteed to be the states working in the primary transit lsp.
In the protection switching method and device of the multi-protocol label switching network, aiming at a PTN forwarding chip supporting a standby transit lsp, when a primary transit lsp is created, the forwarding chip respectively creates an entry and an index of the primary transit lsp for label identification and message forwarding; because the label identification flow of the standby transit lsp is the same as that of the primary transit lsp, when the standby transit lsp is created, the forwarding chip only needs to create the list item and index for forwarding the message of the standby transit lsp; when protection switching is needed, the message forwarding table entry corresponding to the incoming label table entry of the primary transit lsp is modified to be the message forwarding table entry to be switched to the transit lsp, so that the problem that in the prior art, the protection switching operation of the backup transit lsp is created after the primary transit lsp is deleted is avoided, and the purpose of shortening the time consumption of the protection switching operation is achieved. Aiming at a common PTN forwarding chip which does not support a standby transit lsp, a primary transit lsp creates an entry entity in the forwarding chip, and the standby transit lsp does not create an entry entity in the forwarding chip; when switching occurs, modifying the attribute content of the message forwarding table entry of the primary transit lsp in the chip to realize switching; or when creating the primary transit lsp, the forwarding chip creates entry and index of the primary transit lsp for label identification and message forwarding respectively; creating an internal label of the standby transit lsp and a table entry and an index for forwarding a message when the standby transit lsp is created by allocating a port identification label or using a reserved label as the internal label of the standby transit lsp; when protection switching is needed, modifying the message forwarding table entry corresponding to the incoming label identification table entry of the primary transit lsp, and pointing to the message forwarding table entry of the transit lsp to be switched to complete switching operation, thereby greatly shortening the time consumption of protection switching operation. Therefore, the fast switching of the sub-network connection 1:1 protection in the MPLS is realized, and the performance of the protection switching can be greatly improved.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (14)
1. A protection switching method for a multi-protocol label switching (MPLS) network is characterized by comprising the following steps:
the CPU stores the created data recording tables of the primary transit lsp and sends the data recording table of the primary transit lsp to a forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table item and a message forwarding table item of the primary transit lsp; the forwarding chip generates a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU;
the CPU stores the created standby transit lsp and a data record table of the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp;
the CPU stores the created SNC1:1 protection group, establishes the association relationship between the SNC1:1 protection group and the primary transit lsp and the standby transit lsp, and forms SNC1:1, protection;
when protection switching is carried out, the CPU modifies a message forwarding table entry corresponding to the index of the primary transit lsp in the forwarding chip into a message forwarding table entry of the standby transit lsp to be switched to;
the SNC1:1 protection group is related to the primary transit lsp and the standby transit lsp in the following way: the SNC1:1 protection group comprises the primary transit lsp and the standby transit lsp;
when the SNC1:1 protection is created, a primary transit lsp is created first, a standby transit lsp is created, and finally an SNC1:1 protection group is created.
2. The method according to claim 1, wherein the index of the primary transit lsp comprises a label index and a packet forwarding index of the primary transit lsp;
the CPU acquires an internal incoming label as an incoming label table entry of the standby transit lsp and sends the incoming label table entry and a message forwarding table entry of the standby transit lsp to a forwarding chip; the forwarding chip generates a hardware forwarding table of the standby transit lsp according to the label entry table and the message forwarding table of the standby transit lsp, and returns an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a label index and a message forwarding index of the standby transit lsp;
when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
3. The method according to claim 2, wherein the CPU obtains an internal incoming label as an incoming label table entry of a standby transitilsp, specifically:
the CPU allocates a port identification label as an entry label table item of the standby Transitlsp based on a port which is suspended or not used for message input; or,
using a reserved tag as an in-tag entry for the standby transit lsp.
4. The method according to claim 2, wherein the index of the primary transit lsp comprises a label index and a packet forwarding index of the primary transit lsp;
the CPU sends a message forwarding table entry of a standby transit lsp to a forwarding chip; the forwarding chip generates a hardware forwarding table of the standby transit lsp according to the message forwarding table entry of the standby transit lsp, and returns an index of the hardware forwarding table of the standby transit lsp to the CPU, wherein the index of the standby transit lsp comprises a message forwarding index of the standby transit lsp;
when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
5. The method according to claim 4, wherein in the forwarding chip, the hardware forwarding table comprises a hardware forwarding table of a primary transit lsp and a hardware forwarding table of a backup transit lsp, and the hardware forwarding table of the primary transit lsp comprises a message forwarding table entry and index of the primary transit lsp and a message forwarding table entry and index of the backup transit lsp; the hardware forwarding table of the standby transit lsp at least comprises a message forwarding table entry and an index of the standby transit lsp.
6. The method of claim 4, wherein in the forwarding chip, the hardware forwarding table includes an incoming label identification table and a packet forwarding table, wherein the incoming label identification table at least includes an incoming label identification table entry and an index of the primary transit lsp; the message forwarding table comprises a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the standby transit lsp.
7. The method according to any one of claims 1 to 6, further comprising: if the SNC1:1 protection needs to be deleted, the SNC1:1 protection group is deleted firstly, and then the standby transit lsp and the primary transit lsp are deleted.
8. The method of claim 7, further comprising:
if the SNC1 needs to be deleted: 1 protection group and traffic is transmitted on the standby transit lsp, then after deleting the SNC1: before the protection group 1, the service is switched back to the primary transit lsp.
9. A protection switching device of a multi-protocol label switching (MPLS) network is characterized by comprising the following steps:
the central processing unit CPU is used for storing the created data recording tables of the primary transit lsp and sending the data recording table of the primary transit lsp to the forwarding chip, wherein the data recording table of the primary transit lsp comprises an incoming label table entry and a message forwarding table entry of the primary transit lsp; storing a created data record table of the standby transit lsp and the standby transit lsp, wherein the data record table of the standby transit lsp comprises an incoming label table entry and a message forwarding table entry of the standby transit lsp; storing the created SNC1:1 protection group, establishing the association relationship between the SNC1:1 protection group and the primary and standby transit lsp, and forming SNC1:1, protection;
the forwarding chip is used for generating a hardware forwarding table of the primary transit lsp according to the issued data record table, wherein the hardware forwarding table of the primary transit lsp comprises an index of the primary transit lsp, an entry tag identification table and a message forwarding table, and the forwarding chip returns the index of the primary transit lsp to the CPU;
the CPU is also used for modifying a message forwarding table entry corresponding to the index of the primary transit lsp in the forwarding chip into a message forwarding table entry of the standby transit lsp to be switched to when protection switching is performed;
the SNC1:1 protection group is related to the primary transit lsp and the standby transit lsp in the following way: the SNC1:1 protection group comprises the primary transit lsp and the standby transit lsp;
when the SNC1:1 protection is created, a primary transit lsp is created first, a standby transit lsp is created, and finally an SNC1:1 protection group is created.
10. The apparatus according to claim 9, wherein the index of the primary transit lsp comprises a label index and a packet forwarding index of the primary transit lsp;
the CPU is also used for acquiring an internal incoming label as an incoming label table entry of the standby transit lsp and sending the incoming label table entry and the message forwarding table entry of the standby transit lsp to the forwarding chip;
the forwarding chip is further configured to generate a hardware forwarding table of the standby transit lsp according to the label entry and the message forwarding entry of the standby transit lsp, and return an index of the hardware forwarding table of the standby transit lsp to the CPU, where the index of the standby transit lsp includes a label index and a message forwarding index of the standby transit lsp;
when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
11. The apparatus according to claim 10, wherein the CPU obtains an internal incoming label as an incoming label table entry of a standby transit lsp, specifically:
the CPU allocates a port identification label as an entry label table item of the standby Transitlsp based on a port which is suspended or not used for message input; or,
using a reserved tag as an in-tag entry for the standby transit lsp.
12. The apparatus according to claim 10, wherein the index of the primary transit lsp comprises a label index and a packet forwarding index of the primary transit lsp;
the CPU is also used for sending a message forwarding table entry of the standby transit lsp to the forwarding chip;
the forwarding chip is further configured to generate a hardware forwarding table of the standby transit lsp according to the packet forwarding table entry of the standby transit lsp, and return an index of the hardware forwarding table of the standby transit lsp to the CPU, where the index of the standby transit lsp includes a packet forwarding index of the standby transit lsp;
when protection switching is carried out, the CPU modifies the message forwarding index corresponding to the label index of the primary transit lsp in the forwarding chip into the message forwarding index of the standby transit lsp to be switched.
13. The apparatus according to claim 12, wherein in the forwarding chip, the hardware forwarding table includes a hardware forwarding table of a primary transit lsp and a hardware forwarding table of a backup transit lsp, and the hardware forwarding table of the primary transit lsp includes a packet forwarding table entry and index of the primary transit lsp and a packet forwarding table entry and index of the backup transit lsp; the hardware forwarding table of the standby transit lsp at least comprises a message forwarding table entry and an index of the standby transit lsp.
14. The apparatus of claim 12, wherein in the forwarding chip, the hardware forwarding table includes an incoming label identification table and a packet forwarding table, wherein the incoming label identification table at least includes an incoming label identification table entry and an index of the primary transit lsp; the message forwarding table comprises a message forwarding table entry and an index of the primary transit lsp and a message forwarding table entry and an index of the standby transit lsp.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510475749.6A CN105024928B (en) | 2015-08-05 | 2015-08-05 | A kind of pretection switch method and apparatus of multi-protocol label switching network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510475749.6A CN105024928B (en) | 2015-08-05 | 2015-08-05 | A kind of pretection switch method and apparatus of multi-protocol label switching network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105024928A CN105024928A (en) | 2015-11-04 |
CN105024928B true CN105024928B (en) | 2018-06-26 |
Family
ID=54414650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510475749.6A Active CN105024928B (en) | 2015-08-05 | 2015-08-05 | A kind of pretection switch method and apparatus of multi-protocol label switching network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105024928B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107332696B (en) * | 2017-06-15 | 2019-10-25 | 烽火通信科技股份有限公司 | Solve the system and method for relaying configuration random ordering |
CN107786436B (en) * | 2017-09-22 | 2020-12-01 | 烽火通信科技股份有限公司 | VPN network and protection switching method |
CN114598639B (en) * | 2022-01-28 | 2023-12-26 | 新华三技术有限公司合肥分公司 | Message processing method and device |
CN115190004A (en) * | 2022-06-22 | 2022-10-14 | 杭州云合智网技术有限公司 | Network protection method with clear main and standby |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100433721C (en) * | 2006-01-23 | 2008-11-12 | 杭州华三通信技术有限公司 | Method for processing label binding |
CN101616099B (en) * | 2009-08-03 | 2011-11-09 | 杭州华三通信技术有限公司 | Method and device for refreshing hardware forwarding table and routing equipment |
CN103281244A (en) * | 2013-06-17 | 2013-09-04 | 瑞斯康达科技发展股份有限公司 | Service carrying method and device of multi-protocol label switching network |
CN101877677B (en) * | 2010-06-25 | 2014-08-13 | 中兴通讯股份有限公司 | Tunnel switching method and system for multi-protocol label switching services |
CN102611629B (en) * | 2012-04-05 | 2015-05-13 | 杭州华三通信技术有限公司 | Fast re-route method and device in MPLS (Multi-Protocol Label Switching) |
-
2015
- 2015-08-05 CN CN201510475749.6A patent/CN105024928B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100433721C (en) * | 2006-01-23 | 2008-11-12 | 杭州华三通信技术有限公司 | Method for processing label binding |
CN101616099B (en) * | 2009-08-03 | 2011-11-09 | 杭州华三通信技术有限公司 | Method and device for refreshing hardware forwarding table and routing equipment |
CN101877677B (en) * | 2010-06-25 | 2014-08-13 | 中兴通讯股份有限公司 | Tunnel switching method and system for multi-protocol label switching services |
CN102611629B (en) * | 2012-04-05 | 2015-05-13 | 杭州华三通信技术有限公司 | Fast re-route method and device in MPLS (Multi-Protocol Label Switching) |
CN103281244A (en) * | 2013-06-17 | 2013-09-04 | 瑞斯康达科技发展股份有限公司 | Service carrying method and device of multi-protocol label switching network |
Non-Patent Citations (1)
Title |
---|
"基于Linux的一种MPLS故障恢复的设计与实现";朱瑞新等;《计算机技术与发展》;20090228;第220-223页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105024928A (en) | 2015-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9973419B2 (en) | Routing management method, routing method, network controller, and router | |
CN106302206B (en) | Message forwarding processing method, device and system | |
EP3096490B1 (en) | Method for realizing network virtualization and related device and communication system | |
CN112087386B (en) | Message processing method, device and system | |
US20230300070A1 (en) | Packet Sending Method, Device, and System | |
RU2493677C2 (en) | Method and router for implementing mirroring | |
CN102611618B (en) | Route protection converting method and device | |
US20100189115A1 (en) | Edge node redundant system in label switching network | |
WO2019007316A1 (en) | Method and device for achieving bidirectional segment routing tunnel, storage medium, and apparatus | |
WO2015165311A1 (en) | Method for transmitting data packet and provider edge device | |
EP2541847B1 (en) | Method and system for establishing an associated bidirectional label-switched path | |
CN105024928B (en) | A kind of pretection switch method and apparatus of multi-protocol label switching network | |
CN104065553B (en) | Virtual network moving method and relevant device | |
CN103078794A (en) | Message processing control method and device | |
JP2020526101A (en) | Root sync | |
CN105591872A (en) | Method and device for realization of multi-data center interconnection | |
CN111669422B (en) | Message transmission method and device | |
CN102647328A (en) | Label distribution method, equipment and system | |
CN103916303A (en) | MPLS TE tunnel configuration device and method | |
CN106789523B (en) | Method and device for creating logical tunnel | |
CN106209634B (en) | Learning method and device of address mapping relation | |
CN114301839A (en) | Multicast message transmission method and device | |
WO2017000562A1 (en) | Fast re-route method and device for ring network | |
CN105681185B (en) | A kind of protection switching method and protection switching device | |
CN115242699A (en) | Message transmission method, slice generation method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |