WO2010045838A1 - 报文处理的方法和装置 - Google Patents

报文处理的方法和装置 Download PDF

Info

Publication number
WO2010045838A1
WO2010045838A1 PCT/CN2009/074280 CN2009074280W WO2010045838A1 WO 2010045838 A1 WO2010045838 A1 WO 2010045838A1 CN 2009074280 W CN2009074280 W CN 2009074280W WO 2010045838 A1 WO2010045838 A1 WO 2010045838A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
node
packet
lsp
processing
Prior art date
Application number
PCT/CN2009/074280
Other languages
English (en)
French (fr)
Inventor
�龙昊
张海燕
曾理
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010045838A1 publication Critical patent/WO2010045838A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a packet processing method and apparatus. Background technique
  • Ethernet and Multi-Protocol Label Switching are two common packet switching technologies.
  • Ethernet technology is usually used for local area networks, and MPLS technology is usually used for core networks.
  • MPLS-based networks can quickly Forwards service packets and supports enterprise virtual private networks (VPNs).
  • VPNs enterprise virtual private networks
  • MPLS-based technology is evolving toward the transport network. Since the ring topology is particularly suitable for fast service protection switching, the current transmission network usually adopts a ring topology, and the transmission network using MPLS technology is also carried on the ring physical topology due to the fiber laying.
  • the connection between adjacent nodes is usually a two-way connection, which may be a physical link or a logical connection.
  • the label forwarding table of the label switching path (LSP) needs to be established according to the routing information of the packet, and is saved on the node. The node forwards the corresponding LSP according to the label forwarding table.
  • a backup LSP is set up for each LSP.
  • the switchover is performed on the backup LSP.
  • the MPLS ring network protection solution in the prior art is based on the physical ring topology, and performs switching of services up and down and transmission paths at the LSP layer.
  • a closed-loop backup LSP is established for each protected LSP.
  • the node that detects the link failure is detected.
  • the service is switched to the backup LSP, and the backup LSP is forwarded to another fault point and then switched back to the original LSP before continuing transmission.
  • the LSPs in the network cannot be shared and used by multiple services, resulting in waste of LSPs and label resources. Summary of the invention
  • the embodiment of the invention provides a packet processing method and device, which can improve the utilization rate of the medium transmission path and the label resource of the network.
  • the technical solution is as follows:
  • a method for processing a text comprising:
  • the packet is processed according to the node operation; if the matching node operation is not found, the packet is forwarded according to the outer label.
  • the embodiment of the invention further provides a device for processing a message, the device comprising:
  • a receiving module configured to receive a service packet transmitted in the network
  • An obtaining module configured to obtain an outer label and an inner label in the packet
  • a searching module configured to search for a matching node operation according to the inner label, or find a matching node operation according to the inner label and the outer label;
  • a processing module configured to process the packet according to the search result of the searching module, and if the matching node operation is found, process the packet according to the node operation; if no matching is found
  • the node operates to forward the packet according to the outer label.
  • the embodiment of the present invention processes the packet according to the outer label and the inner label of the service packet. Now receiving services from different nodes of the same transmission path saves label resources and improves network performance. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are to be regarded as Other drawings may also be obtained from these drawings without the inventive labor.
  • FIG. 1 is a flowchart of a method for processing a message according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for processing a message according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a service protection method in a packet processing method according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic diagram of an application scenario of a packet processing method according to Embodiments 3 and 5 of the present invention
  • FIG. 5 is another schematic diagram of an application scenario of a packet processing method according to Embodiments 3 and 5 of the present invention.
  • FIG. 6 is still another schematic diagram of an application scenario of a packet processing method according to Embodiments 3 and 5 of the present invention.
  • FIG. 7 is a schematic diagram of an application scenario of a packet processing method according to Embodiment 3 of the present invention
  • FIG. 8 is a flowchart of a packet processing method according to Embodiment 4 of the present invention.
  • FIG. 9 is a flowchart of a service protection method in a packet processing method according to Embodiment 5 of the present invention
  • FIG. 10 is a structural diagram of an apparatus for processing a message according to Embodiment 6 of the present invention. detailed description
  • An embodiment of the present invention provides a packet processing method.
  • the method includes: 101: Receive a service packet transmitted in a network;
  • the packet is processed according to the operation of the node, and the process ends.
  • the packet is forwarded according to the outer label, and the process ends.
  • the packet is processed according to the outer label and the inner label of the service packet, and services are received from different nodes of the same transmission path, which saves label resources and improves network performance.
  • An embodiment of the present invention provides a packet processing method, where the method includes: processing an service packet in a network by using an outer label and an inner label, and using an outer label for forwarding a service packet; Differentiate between different businesses. Specifically, different outer tags and inner tags can be selected in different networks. For example, in an MPLS network, an LSP label can be selected as an inner label, and a PW label as an inner label. In a VLAN, you can select the outer VLAN tag as the outer label and the inner VLAN tag as the inner label.
  • Pre-configure processing entries in each node of the network specifically: determining the outer label and the corresponding label of each service packet in the network according to the mapping relationship between the preset service packet and the outer label and the inner label. Layer labels, and configure the node operations corresponding to each service >3 ⁇ 4 text in each node.
  • the processing entry includes: an outer label of the service packet, an inner label, and an Activation label, where
  • the Act ion tag is the node operation corresponding to the outer tag and the inner tag.
  • the Act ion tag includes: Drop: Receive, that is, the message is removed and is not forwarded.
  • Drop and Cont inue Receive and forward, that is, copy a packet to be received at the local node, and forward the packet according to the outer label of the packet.
  • Di scard Discard, that is, discard the ⁇ message.
  • the network edge node determines the outer label and the inner part of the service text according to the mapping relationship between the preset service >3 ⁇ 4 text and the outer label and the inner label when the user side receives the service packet. Layer label, the outer label and the inner label are encapsulated into the message and forwarded.
  • the node in the network After receiving the packet, the node in the network obtains the outer label and the inner label in the packet, and transmits the packet to the destination node in the network.
  • the specific steps of packet processing are:
  • a node in the network receives a service packet transmitted in the network.
  • the node that receives the packet searches for the matching node, it searches for the outer label and the inner label according to the outer label and the inner label.
  • the processing table pre-configured by the node the outer label and the inner layer in the packet are searched. If the matching entry is matched, the packet is processed according to the node operation in the entry; if the matching processing entry is not found, according to the outer label The message is forwarded.
  • Table 1 shows the processing entries of a node.
  • the outer label is the LSP label
  • the inner label is the PW label.
  • the packet is processed according to the found node operation, and the process ends.
  • the processing entries in Table 1 are taken as an example. If there are LSPs in the processing entries. If the label and the PW label match the entry, the corresponding node operation is determined according to the matching entry. If there is no entry matching the PW label in the processing entry, only the entry matching the LSP label is based on the LSP label. Forward the message. When the packet is forwarded according to the LSP label, the forwarding entry can be forwarded according to the LSP label. For example, the forwarding entry is shown in Table 2.
  • the node After the node receives the LSP label of 100 from the port 3 and the PW label is 20, if the processing entry is Drop, the packet is removed and is not forwarded; After receiving the LSP label of 200 and the PW label is 40, the Query message is Drop and Cont inue, and the packet is copied at the local node, and the packet is forwarded according to the LSP label of the packet; After receiving the 4 ⁇ LSP label from the port 3 and the PW label is 40, the node discards the corresponding node operation and discards the packet. If the node receives the packet from port 3, the node directly discards the packet.
  • the label is forwarded according to the LSP label because there is no corresponding PW label in the processing entry. After querying the table 2, the label is exchanged to 300 on the egress port. If the LSP label is 500 and the PW label is 30, and the LSP label is not matched in Table 2, the node determines that the unknown packet is discarded. In the embodiment of the present invention, the packet is processed according to the outer label and the inner label of the service packet, so that services are received from different nodes of the same transmission path, which saves label resources and improves network performance.
  • the embodiment of the present invention provides a method for processing a message in a ring network, and further, a method for performing service protection in a process of processing a ring network packet is further proposed.
  • the method for processing a packet according to the embodiment of the present invention is the same as that of the embodiment 2, and is applied to the ring network, for example, to an MPLS ring network.
  • the outer label can be an LSP label
  • the inner label can be For the PW label.
  • the two closed-loop LSPs configured may be two ring LSPs in opposite directions or two bidirectional ring LSPs. .
  • a ring network consisting of six nodes A, B, C, D, E, and F is taken as an example.
  • two closed-loop LSPs including all six nodes and opposite directions are configured: LSPs in a counterclockwise direction
  • LSP_CW the LSP in the clockwise direction
  • the LSP label and the PW label of the service are determined according to the mapping between the preset service packet, the LSP label, and the PW label, and the ring is matched according to the LSP label and the PW label.
  • the processing entries of the nodes in the network are pre-configured.
  • the PW label of each service packet is unique to the entire network, and the lower ring node of the service and the network must be configured.
  • the upper ring node and other intermediate nodes need to be customized according to the specific application.
  • the configuration of the scenario is as follows: In the ring network, the upper ring node is the network edge node that receives the service packet on the user side, and the lower ring node is the egress node forwarded by the packet in the ring network.
  • the PW label is 1 0 in the mapping between the service text and the LSP label and the PW label.
  • the LSP label is the label on the LSP _CC and is mapped to the LSP_CC. If forwarding is performed, the PW label is set to 1 0 and belongs to LSP_CC on node C.
  • the node corresponding to the LSP label in the direction is a Drop; if the node E needs to take a packet when forwarding the packet (in the case of multicast), the PW label can be 10 and belong to the LSP- in the node E.
  • the node operation corresponding to the LSP label in the CC direction is configured as Drop and Continue.
  • the packets can be forwarded in the ring network.
  • the service protection mechanism is not available and the security of service packet processing cannot be guaranteed. For example, when a link fails, service protection cannot be performed, and service packets are lost.
  • the network service can be protected before the packet is processed.
  • the method for performing service protection on the MPLS ring network is as follows:
  • the ?8>3 ⁇ 4 text includes:
  • Faulty port information where the faulty port is the ring port that detects the fault, and can be a forward port or a reverse port.
  • the inbound port that receives the packet is the forward port
  • the outbound port that forwards the packet is the reverse port.
  • a destination identification identity where the sending node is the node that detected the link failure and sent an APS message.
  • Source identification identity where the destination node is the faulty link or the neighboring node of the node.
  • Protection switching request information Includes the type of switching that triggers APS, such as SF (Signal Fail) or NR (No Request).
  • SF Synignal Fail
  • NR No Request
  • a node in the ring network detects a link fault, it enters the Wrapping state and sends APS packets on the two ring LSPs, that is, encapsulates the LSP-CC and LSP-CW directions in the APS packets.
  • the LSP label is transmitted on the corresponding ring LSP, where the APS label is preset.
  • the special value of the special PW label is used to distinguish the APS packet from the service packet.
  • the node in the ring network receives and identifies the APS packet according to the special PW label, and then sends the APS packet to the current node for processing, and performs corresponding operations of the service protection.
  • the specific method is:
  • the APS packet is forwarded according to the LSP label in the APS packet.
  • the Wra ping state is entered, and the corresponding node on the current node is corresponding according to the faulty port information in the APS packet.
  • the port is set to the failed port.
  • the specific method is: when the faulty port information in the APS packet is the forward port of the sending node, the reverse port of the current node is set as the faulty port; otherwise, the faulty port information in the APS packet is the sending node. When the port is reversed, the forward port of the current node is set as the faulty port.
  • the APS packet is sent on the two ring LSPs respectively.
  • the node identifier is the identifier of the node D
  • the destination node identifier is the identifier of the node E.
  • the switching type in the protection switching request information is a signal failure.
  • node E After receiving the APS packet, node E identifies that the local node is the destination node. If the faulty port is the forward port, the reverse port of the node is set as the faulty port. The outgoing port facing node D is set as the faulty port.
  • the node that enters the Wra ping state performs the LSP direction switching on all the service packets sent from the non-failed port to the faulty port.
  • the LSP label in the packet is switched to the reverse LSP label, and the LSP is switched according to the LSP.
  • the tag processes the message.
  • the packet can be forwarded in the ring network, and the forwarding packet has certain security.
  • the specific steps are as follows:
  • the upper ring node encapsulates the LSP label and the PW label in the outer layer of the service packet, and according to the LSP The tag forwards the message. For example, if the LSP label of the packet belongs to the label on the LSP_CC, the packet is forwarded in a counterclockwise direction.
  • the packet After the other node receives the packet, if the current node is in the Wra ping state, the packet is processed according to the service protection method; if the current node is normal, the LSP label and the PW label in the packet are obtained, and According to the LSP label and the PW label query processing entry, when the corresponding node operation can be found, the packet is processed according to the node operation; when the matching node operation is not found, the packet is forwarded according to the LSP label. .
  • the following describes the method for processing service packets and the method for service protection in the MPLS ring network in combination with specific application scenarios.
  • the PW label of the packet is 1
  • the LSP label is the label on the LSP_CC
  • the PW label of the packet is 12, and the LSP label is the label on the LSP_CW, and is forwarded in the LSP_CW direction.
  • the first application scenario is as follows: The link and the node are normal, and the node F transmits the service to the node C as an example.
  • the LSP label and the PW label in the LSP_CC direction are pre-configured to be 1 0.
  • the node operation of the service message is Drop.
  • the node F After the service packet arrives at the node F, the node F encapsulates the LSP label and the PW label of the packet according to the mapping between the preset packet and the LSP label and the PW label, where the LSP label is LSP_CC.
  • the label, PW label is 1 0.
  • the text is processed to node E in the LSP _CC direction.
  • the node E After receiving the packet, the node E obtains the LSP label and the PW label in the packet, and searches for the corresponding node operation according to the LSP label and the PW label. The node E determines the forwarder of the packet according to the LSP label, because the operation corresponding to the LSP label and the PW label is not pre-configured in the configuration entry of the node E.
  • the direction is LSP_CC, and the message is processed to the node D in the LSP_CC direction, and the node D processes the message to the node C in the same manner.
  • the node C After receiving the packet, the node C obtains the LSP label and the PW label in the packet, searches for the corresponding node operation according to the LSP label and the PW label, and finds that the packet is Drop, and then decapsulates and receives the packet.
  • the second application scenario is as follows: The two-way fault occurs on the link, and the node F transmits the service to the node C as an example.
  • the LSP label and the PW label 10 are pre-configured in the LSP_CC direction.
  • the node operation of the message is Drop.
  • each node in the ring network composed of nodes A, B, C, D, E, and F is normal, but the link between node E and node D is faulty, and node D and node E detect After the link is faulty, the switch is in the Wrapp ing state.
  • the port corresponding to the faulty link is configured as the faulty port.
  • the APS packets are sent in the direction of the two LSPs.
  • the protection switching request in the APS packet is invalid.
  • the node D and the node E obtain the LSP label and the PW label in the packet, which are processed by the APS module of the node E.
  • the APS module determines that the current state of the node is the Wrapping state, and then ignores The received APS ⁇ text.
  • the node F After the service packet arrives at the F node, the node F encapsulates the LSP label and the PW label of the packet according to the mapping between the preset packet and the LSP label and the PW label, where the LSP label is on the LSP_CC. Label, PW label is 10. After encapsulation, the file is forwarded to node E in the LSP_CC direction.
  • the service packet is transmitted from the non-failed port to the failed port, so the node E will The packet is switched from the LSP_CC to the LSP_CW for transmission.
  • the LSP label of the packet is switched to the label in the LSP_CW direction, and the corresponding node operation is searched according to the LSP label and the PW label in the LSP_CW direction after the handover.
  • the operation corresponding to the LSP label and the PW label is not pre-configured, and the node E determines the packet forwarding according to the LSP label.
  • the packet is forwarded to F on LSP_CW according to the switched LSP label.
  • the node F obtains the LSP label in the LSP_CW direction, and the PW label is 1 0.
  • the corresponding operation is performed according to the LSP label and the PW label. If the operation is performed, the packet is forwarded to the node A in the LSP_CW direction according to the LSP label, and the node A forwards the packet to the node B according to the same method, and the node B forwards the packet to the node C.
  • the node C After receiving the packet, the node C obtains the LSP label information and the PW label information in the packet, and finds the LSP label in the LSP_CW direction and the node operation corresponding to the PW label being 10, because the corresponding node is not pre-configured. If the operation is performed, the packet is forwarded to the node D according to the LSP label.
  • the node D After receiving the packet, the node D is in the Wrapp ing state, and the service packet is transmitted from the non-failed port to the faulty port. Therefore, the LSP_CW label in the text is switched to the LSP_CC label, according to the LSP_CC label and the ⁇ after the handover.
  • the tag searches for the corresponding node operation. Since the corresponding node operation is not configured in advance, the message is forwarded to the node C in the LSP_CC direction.
  • the node C After receiving the text, the node C obtains the label of the LSP in the LSP_CC direction, and the PW label is 1 0. According to the LSP label and the PW label, if the corresponding node operation is found as Drop, the packet is received, and the process ends. .
  • the link has a one-way fault.
  • each node in the ring network consisting of nodes A, B, C, D, E, and F is normal, but the node E is in the direction of node D.
  • the link has failed, and the link from node D to node E is still normal, so only node D detects the link failure.
  • Node D detects that the link in the direction from node E to node D has failed, enters the Wrapp ing state, sets the port corresponding to the faulty link as the faulty port, and sets the forward port of node D as the faulty port, and
  • the APS packet is sent in the direction of the two LSPs, where the faulty port information is the forward port, the sending node identifier is the identifier of the node D, the destination node identifier is the identifier of the node E, and the switching type in the protection switching request information is the signal failure.
  • the node E obtains the LSP label and the PW label in the packet, and the APS module processes the APS module.
  • the current state of the node is normal.
  • the node is set to the Wrapp ing state, and the faulty port information in the APS packet is the forward port of the node D.
  • the reverse port is set to the failed port, and the outgoing port facing node D is set as the failed port.
  • the node in the processing entry of the node C pre-configures the LSP label in the LSP-CC direction and the node operation in the service label of the ⁇ label 10 as a Drop.
  • the forwarding process is the same as the second application scenario, and is not described here.
  • the node C transmits the service to the node F
  • the LSP label in the LSP-CW direction and the node operation of the service label in the LSP-CW are pre-configured as Drop, and the node D is at this time.
  • the link from the node D to the node E is still normal. Since the packets are transmitted between the non-faulty ports, normal service transmission can be performed, and details are not described herein.
  • the fourth application scenario is as follows: The node is faulty, and the node F transmits the service to the node C as an example.
  • the node and the link are both normal, but the node C is faulty.
  • the node D and the node B detect that the data cannot be transmitted with the node C. It is determined that the link to the node C has failed and enters the Wrapping state and will face the node C.
  • the port is set to the failed port.
  • the solution proposed by the embodiment of the present invention is as follows:
  • the upper ring node of a service receives the service packet encapsulating the outer label and the inner label corresponding to the service from the ring port
  • the service packet is discarded. That is, when the upper ring node receives the packet again in the direction of forwarding the service packet, it indicates that the packet is forwarded in the ring network and the packet is discarded.
  • the LSP label in the LSP_CC direction and the PW label 10 are Di scard.
  • Node D and Node B detect that the link to node C has failed and enter Wrapp ing
  • the port corresponding to the faulty link is set as the faulty port, and the APS packet is sent in the direction of the two LSPs.
  • the destination node is the node C.
  • the role of the APS packet is ignored here.
  • the node F After the service packet arrives at the node F, the node F encapsulates the LSP label and the PW label of the packet according to the mapping between the preset packet and the LSP label and the PW label, where the LSP label is on the LSP_CC. Label, PW label is 10. After encapsulation, the file is forwarded to node E in the LSP_CC direction.
  • the node E forwards the packet to the node D.
  • the node D is in the Wrapping state, and the service packet is transmitted from the non-failed port to the faulty port.
  • the packet is switched from the LSP_CC to the LSP-CW for transmission.
  • the LSP label of the packet is switched to the label in the LSP_CW direction, and the corresponding node operation is searched according to the label and the PW label in the LSP_CW direction after the handover. Since the corresponding node operation is not configured in advance, the node D determines the report according to the LSP label.
  • the forwarding direction of the file is LSP-CW, and the >3 ⁇ 4 text is forwarded to E on the LSP_CW according to the switched LSP label.
  • the node E forwards the packet to the node F.
  • the node F obtains the LSP label of the packet belonging to the LSP_CW, and the PW label is 10, and searches for the corresponding node operation according to the LSP label and the PW label.
  • the packet is forwarded to the node A in the LSP_CW direction according to the LSP label, and the node A forwards the packet to the node B in the same manner.
  • the node B After receiving the packet, the node B is in the Wrapp ing state, and the service packet is transmitted from the non-failed port to the faulty port.
  • the LSP_CW label in the packet is switched to the LSP_CC label according to the switched LSP_CC label and the ⁇ label.
  • the corresponding node operation is searched. Since the corresponding node operation is not configured in advance, the packet is forwarded to the node A in the LSP_CC direction.
  • the node A continues to forward the packet until it is forwarded to the node F.
  • the node F searches for the corresponding node operation as Di scard according to the LSP label and the ⁇ label, and discards the packet, and the process ends.
  • the embodiment of the present invention processes the packet according to the LSP label and the PW label of the service packet, and can receive the service report from different nodes of the same LSP when receiving multiple service packets in the network. This saves label resources and is suitable for ring network applications.
  • the embodiment of the present invention provides a packet processing method, which simplifies the method provided in Embodiment 2.
  • the configuration is performed only according to the inner label; when the node processes the packet , and only find the corresponding operation according to the inner label, as shown in FIG. 8, the method includes:
  • Pre-configure processing entries in each node of the network specifically: determining the outer label and the corresponding label of each service packet in the network according to the mapping relationship between the preset service packet and the outer label and the inner label. Layer labels, and configure the node operations corresponding to each service >3 ⁇ 4 text in each node.
  • the processing entry includes: a service inner layer label and an act ion label, where the Act ion label is a node operation corresponding to the outer label and the inner label, and the Act ion label includes:
  • Drop Receive, that is, the message is removed and is not forwarded.
  • Drop and Cont inue Receive and forward, that is, copy a packet to be received at the local node, and forward the packet according to the outer label of the packet.
  • the network edge node determines the outer label and the inner part of the service text according to the mapping relationship between the preset service >3 ⁇ 4 text and the outer label and the inner label when the user side receives the service packet. Layer label, the outer label and the inner label are encapsulated into the message and forwarded.
  • the node in the network After receiving the packet, the node in the network obtains the outer label and the inner label in the packet, and transmits the packet to the destination node in the network.
  • the specific steps of packet processing are:
  • a node in the network receives a service packet transmitted in the network.
  • 802 Get the outer label and the inner label in the message.
  • 803 In the pre-configured processing table item, find a matching node operation according to the inner layer label; if a matching node operation is found, execute 804, and if no matching node operation is found, execute 805.
  • 804 Process the packet according to the found node operation; 805: Forward the packet according to the outer label.
  • the node that receives the packet searches for the matching node, it searches for the processing entry corresponding to the inner label in the packet according to the inner label, and searches for the processing entry matching the inner label in the packet. If the matching processing entry is found, the packet is processed according to the node operation in the entry; if the matching processing entry is not found, the packet is forwarded according to the outer label.
  • the embodiment of the present invention processes the packet according to the inner label of the service packet, and forwards the packet according to the outer label.
  • the packet can be sent from different nodes of the same transmission path. Receives service packets, saves label resources, and is suitable for application in a ring network.
  • the embodiment of the present invention provides a method for processing a message in a ring network, and further, a method for performing service protection in a process of processing a ring network packet is further proposed.
  • the method for processing a packet according to the embodiment of the present invention is the same as that of Embodiment 4, and is specifically applied to a ring network, for example, to an MPLS ring network.
  • the outer label can be an LSP label
  • the inner label can be For the PW label.
  • the two closed-loop LSPs configured may be two ring LSPs in opposite directions or two bidirectional ring LSPs. .
  • a ring network consisting of six nodes A, B, C, D, E, and F is taken as an example.
  • two closed-loop LSPs including all six nodes and opposite directions are configured: B node to node A
  • the LSP in the counterclockwise direction is LSP-CC
  • the LSP in the clockwise direction from node A to node B is LSP_CW.
  • the LSP label and the PW label of the service "3 ⁇ 4 text" are determined according to the mapping relationship between the preset service packet and the LSP label and the PW label, and according to the PW label in the ring network
  • the processing entry of the node is pre-configured, where the PW label of each service packet is completely network-only.
  • the lower ring node of the service packet must be configured.
  • the upper ring node and other intermediate nodes need to be configured according to specific application scenarios.
  • the PW label is 10 in the mapping between the service text and the LSP label and the PW label.
  • the LSP label is the label on the LSP_CC and is mapped to the LSP_CC. If the forwarding is performed, the node corresponding to the PW label is configured as a node on the node C. If the node E needs to copy a packet when forwarding the packet, the PW label can be set to 10 in the node E. The operation is configured as Drop and Continue.
  • the packets can be forwarded in the ring network.
  • the service protection mechanism is insufficient and the correctness of service packet processing cannot be guaranteed.
  • the network service can be protected before the packet is processed.
  • the method for performing service protection on the MPLS ring network is as follows:
  • a node When a node detects a link fault, the node is set to a Wrapping state, the port corresponding to the failed link is set as a fault port, and an APS packet is sent.
  • the ?8>3 ⁇ 4 text includes:
  • Faulty port information where the faulty port is the ring port that detects the fault, and can be a forward port or a reverse port.
  • the inbound port that receives the packet is the forward port
  • the outbound port that forwards the packet is the reverse port.
  • a destination identification identity where the sending node is the node that detected the link failure and sent an APS message.
  • Source identification identity where the destination node is the faulty link or the neighboring node of the node.
  • Protection switching request information Includes the type of switching that triggers APS, such as SF (Signal Fail) or NR (No Request).
  • SF Synignal Fail
  • NR No Request
  • a node in the ring network detects a link fault, it enters a Wrapping state, and is divided into Do not send APS packets on the two ring LSPs.
  • the LSP labels in the LSP_CC and LSP_CW directions are encapsulated in the APS packets and then transmitted on the corresponding ring LSP.
  • the PW label of the APS text is preset.
  • the special value of the special PW label is used to distinguish the APS packet from the service packet.
  • the node in the ring network After receiving the APS packet according to the special PW label, the node in the ring network sends the APS packet to the node for processing, and performs corresponding operations of the service protection.
  • the specific method is;
  • the APS packet is forwarded according to the LSP label in the APS packet.
  • the destination node of the APS packet enters the Wra ping state, and sets the corresponding port on the current node as the faulty port according to the faulty port information in the APS packet.
  • the specific method is as follows: When the faulty port information in the APS packet is the forward port of the sending node, the current node reverse port is set as the faulty port; otherwise, the faulty port information in the APS packet is the reverse of the sending node. When the port is forwarded, the forward port of the current node is set as the faulty port.
  • the node that enters the Wra ping state performs the LSP direction switching on all the service packets sent from the non-failed port to the faulty port.
  • the LSP label in the packet is switched to the reverse LSP label, and the LSP is switched according to the LSP.
  • the tag processes the message.
  • the packet can be forwarded in the ring network, and the forwarding packet has certain security.
  • the specific steps are as follows:
  • the upper ring node encapsulates the LSP label and the PW label in the outer layer of the service packet, and forwards the packet according to the LSP label. For example, if the LSP label of the packet belongs to the label on the LSP_CC, the packet is forwarded in a counterclockwise direction.
  • the packet After the other node receives the packet, if the current node is in the Wra ping state, the packet is processed according to the service protection method; if the current node is normal, the LSP label and the PW label in the packet are obtained, and According to the PW tag query processing entry, when the corresponding node operation can be found The packet is processed according to the node operation. When the matching node is not found, the packet is forwarded according to the LSP label.
  • the following describes the method for processing service packets and the method for service protection in the MPLS ring network in combination with specific application scenarios.
  • the PW label of the packet is 1
  • the LSP label is the label on the LSP_CC
  • the PW label of the packet is 12, and the LSP label is the label on the LSP_CW, and is forwarded in the LSP-CW direction.
  • the first application scenario is as follows: The link and the node are normal, and the node F transmits the service to the node C as an example. In the processing entry of the node C, the node operation of the service packet with the PW label being 10 is pre-configured. For Drop.
  • the node F After the service packet arrives at the node F, the node F encapsulates the LSP label and the ⁇ label in the ⁇ ⁇ ⁇ , , , , , , , ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ Is 1 0. After encapsulation, the packet is forwarded to node E in the LSP_CC direction.
  • the node E After receiving the packet, the node E obtains the LSP label and the PW label in the packet, and searches for the corresponding node operation according to the PW label. The node E determines that the forwarding direction of the packet is LSP_CC according to the LSP label, and forwards the packet to the node D in the LSP_CC direction, because the operation corresponding to the PW label is not pre-configured in the configuration entry of the node E. Node D forwards the message to node C in the same way.
  • the node C After receiving the packet, the node C obtains the LSP label and the PW label in the packet, searches for the corresponding node operation according to the PW label, and finds that the packet is Drop, and then decapsulates and receives the packet.
  • the second application scenario is as follows: The two-way fault occurs on the link, and the node F transmits the service to the node C as an example.
  • the node operation of the service packet with the PW label being 10 is pre-configured as Drop.
  • the process of service protection in this scenario is as follows:
  • each node in the ring network composed of nodes A, B, C, D, E, and F is normal, but the link between node E and node D is faulty, and node D and node E detect After the link is faulty, the switch is in the Wrapp ing state.
  • the port corresponding to the faulty link is configured as the faulty port.
  • the APS packets are sent in the direction of the two LSPs.
  • the protection switching request in the APS packet is invalid.
  • the node D and the node E obtain the LSP label and the PW label in the packet, which are processed by the APS module of the node E.
  • the APS module determines that the current state of the node is the Wrapping state, and then ignores The received APS packet.
  • the node F After the service packet arrives at the F node, the node F encapsulates the LSP label and the ⁇ label in the ⁇ ⁇ ⁇ , , , , , , , ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ Is 10. After encapsulation, the packet is forwarded to node E in the LSP_CC direction.
  • the node E Since the node E is in the Wrapping state, and the ingress port of the node E is a non-failed port, but the egress port is a faulty port, the service packet is transmitted from the non-failed port to the failed port, so the node E will The packet is switched from LSP_CC to LSP_CW for transmission.
  • the LSP label of the packet is switched to the label in the LSP_CW direction, and the corresponding node operation is searched according to the PW label.
  • the PW label is not pre-configured in the configuration entry of the node E.
  • the node E determines that the packet forwarding direction is LSP_CW according to the LSP label, and forwards the packet to F on the LSP-CW according to the switched LSP label.
  • the node F After receiving the packet, the node F obtains the LSP label in the LSP_CW direction, and the PW label is 10, and searches for the corresponding operation according to the PW label.
  • the label forwards the packet to the node A in the LSP_CW direction.
  • the node A forwards the packet to the node B in the same way, and the node B forwards the packet to the node C.
  • the link has a one-way fault.
  • each node in the ring network consisting of nodes A, B, C, D, E, and F is normal, but the node E is in the direction of node D.
  • the link has failed, and the link from node D to node E is still normal, so only node D detects the link failure.
  • Node D detects that the link in the direction from node E to node D has failed, enters the Wrapp ing state, sets the port corresponding to the faulty link as the faulty port, and sets the forward port of node D as the faulty port, and
  • the APS packet is sent in the direction of the two LSPs, where the faulty port information is the forward port, the sending node identifier is the identifier of the node D, the destination node identifier is the identifier of the node E, and the switching type in the protection switching request information is the signal failure.
  • the node E After receiving the APS packet, the node E obtains the LSP label and the ⁇ label in the packet, and is processed by the APS module of the node E.
  • the APS module determines that the current state of the node is normal, and identifies the node as the destination node according to the destination node identifier. , the local port is set to the Wrapp ing state, and the faulty port information in the APS packet is the forward port of the node D, then the reverse port of the node is set as the faulty port, and the outgoing port facing the node D is set to Faulty port.
  • the node operation of the service packet with the PW label 10 is pre-configured as a Drop, and the packet forwarding process and the second application scenario are performed at this time. The same, no longer repeat them.
  • the node operation of the service >3 ⁇ 4 text of the PW tag is pre-configured as a Drop, and the node D is in the Wrapp ing state, but the node D is The link in the direction of the E is still normal.
  • the packets are transmitted between the non-faulty ports. Therefore, normal service transmission can be performed.
  • the embodiment of the present invention processes the packet according to the LSP label and the PW label of the service packet, and can receive the service packet from different nodes of the same LSP when receiving multiple service packets in the network, thereby saving the label resource. Suitable for ring network applications.
  • Example 6
  • An embodiment of the present invention provides a device for processing a message.
  • the device includes: a receiving module 1001, configured to receive a service packet transmitted in a network;
  • the obtaining module 1002 is configured to obtain an outer label and an inner label in the packet.
  • the searching module 1003 is configured to search for a matching node operation according to the inner label, or find a matching node operation according to the inner label and the outer label;
  • the processing module 1004 is configured to process the packet according to the search result of the searching module 1003, and if the matching node operation is found, process the packet according to the node operation; if no matching node operation is found , the packet is forwarded according to the outer label.
  • the processing module 1004 is specifically configured to: when the searching module 1003 finds that the matching node operates as the received message, receives the message according to the node operation. When the searching module 1003 finds that the matching node operates as a discarding message, the packet is discarded according to the node operation.
  • the outer label is an LSP label
  • the inner label is a pseudo line PW label.
  • the ring network is used in the embodiment of the present invention, two ring LSPs are pre-configured in the ring network, and the two ring LSPs may be two ring LSPs in opposite directions or two bidirectional ring LSPs.
  • the device further includes:
  • a configuration module configured to: when the device is an edge node that receives the packet, in the device, the outer label of the packet and the node corresponding to the inner label are pre-configured to discard the packet;
  • the processing module 1004 is configured to discard the packet when the search module 1003 finds that the matched node operation is a discarding message according to the inner label and the outer label.
  • the apparatus may further include:
  • a detecting module configured to detect whether a link between the adjacent node is faulty
  • the fault processing module is configured to: when the detecting module detects that the link with the neighboring node is faulty, switch the service packet received from one ring LSP to another ring LSP for processing;
  • An APS module configured to detect, when the detection module detects a fault with a link between the neighboring node And sending an automatic protection switching APS packet to the neighboring node in the network, where the APS packet is used by the neighboring node to switch the service packet received from a ring LSP after receiving the APS packet. Processed on another ring LSP.
  • a PW label is encapsulated in the APS packet, and the value of the PW label is a preset value, and the PW label is used by the current node to identify the APS packet.
  • the packet is processed according to the inner label of the service packet, and the packet is forwarded according to the outer label, so that when receiving multiple service packets in the network, different nodes on the same transmission path can be obtained.
  • Receives service packets which saves label resources and is suitable for ring network applications.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

报文处理的方法和装置 本申请要求于 2008 年 10 月 22 日提交中国专利局、 申请号为 200810167337.6, 发明名称为 艮文处理的方法和装置" 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及网络通信技术领域, 特别涉及一种报文处理的方法和装置。 背景技术
以太网和多协议标签交换(MPLS, Multi-Protocol Label Switching ) 是两种常见的包交换技术, 以太网技术通常用于局域网, 而 MPLS技术通常用 于核心网络,基于 MPLS技术的网络能够快速地转发业务报文并能很好的支持 企业虚拟专用网络( VPN, Virtual Private Network) 。 目前基于 MPLS技术 正在向传送网的方向演进。 由于环网拓朴特别适合于快速业务保护倒换, 因 此目前的传送网通常采用环型拓朴结构, 采用 MPLS技术的传送网, 由于光纤 铺设的原因, 也会承载在环形物理拓朴上。
在 MPLS网络中, 相邻节点之间的连接通常是双向的连接, 可以为物理的 链路, 也可以为逻辑上的连接; 网络中的节点上通常存在很多业务流, 业务 报文在传输时, 需要根据报文的路由信息建立标签交换路径 (LSP, Label Switching Path) 的标签转发表, 并保存在节点上, 节点根据标签转发表建 立对应的 LSP对报文进行转发。
为保证报文的正常转发, 还需要提供相应的保护机制, 目前的 MPLS环网 保护的方案中是为每条 LSP建立备份的 LSP, 当工作 LSP发生链路故障时, 切换到备份的 LSP上。 现有技术中的 MPLS环网络保护方案基于物理环拓朴, 在 LSP层进行业务的上下和传输路径的切换。 在该方案中, 为每个被保护的 LSP建立一个闭环的备份 LSP, 当出现链路故障时, 在检测到链路故障的节点 上将业务切换到备份 LSP ,沿着备份 LSP转发到另一个故障点后切换回原 LSP 再继续传输。
在对现有技术进行研究后, 发明人发现:
由于涉及标签交换, 网络中的 LSP无法共享给多个业务进行使用, 造成 LSP以及标签资源的浪费。 发明内容
本发明实施例提供了一种报文处理的方法和装置, 可以提高网络的中传 输路径和标签资源的利用率。 所述技术方案如下:
一种 ^艮文处理的方法, 所述方法包括:
接收网络中传输的业务报文;
获取所述报文中的外层标签和内层标签;
根据所述内层标签查找匹配的节点操作, 或根据所述内层标签和外层标 签查找匹配的节点操作;
如果查找到匹配的节点操作,则根据所述节点操作对所述报文进行处理; 如果未查找到匹配的节点操作, 则根据所述外层标签对所述报文进行转 发。
本发明实施例还提供了一种报文处理的装置, 所述装置包括:
接收模块, 用于接收网络中传输的业务报文;
获取模块, 用于获取所述报文中的外层标签和内层标签;
查找模块, 用于根据所述内层标签查找匹配的节点操作, 或根据所述内 层标签和外层标签查找匹配的节点操作;
处理模块, 用于根据所述查找模块的查找结果, 对所述报文进行处理, 如果查找到匹配的节点操作, 则根据所述节点操作对所述报文进行处理; 如 果未查找到匹配的节点操作, 则根据所述外层标签对所述报文进行转发。
本发明实施例根据业务报文的外层标签和内层标签对报文进行处理, 实 现从同一个传输路径的不同节点上接收业务, 节约了标签资源, 提高了网络 性能。 附图说明 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例 1提供的报文处理的方法流程图;
图 2是本发明实施例 2提供的报文处理的方法流程图;
图 3是本发明实施例 3提供的报文处理的方法中的业务保护方法流程图; 图 4是本发明实施例 3和 5提供的报文处理的方法的应用场景的一示意 图;
图 5是本发明实施例 3和 5提供的报文处理的方法的应用场景的另一示 意图;
图 6是本发明实施例 3和 5提供的报文处理的方法的应用场景的又一示 意图;
图 7是本发明实施例 3提供的报文处理的方法的应用场景的示意图; 图 8是本发明实施例 4提供的报文处理的方法流程图;
图 9是本发明实施例 5提供的报文处理的方法中的业务保护方法流程图; 图 1 0是本发明实施例 6提供的报文处理的装置的结构图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发 明实施方式作进一步地详细描述。 显然, 所描述的实施例仅仅是本发明一部 分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术 人员在没有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明 保护的范围。
实施例 1
本发明实施例提供了一种报文处理的方法, 参见图 1 , 该方法包括: 101: 接收网络中传输的业务报文;
102: 获取该报文中的外层标签和内层标签;
103: 根据该内层标签查找匹配的节点操作; 或根据该内层标签和外层标 签查找匹配的节点操作; 如果查找到匹配的节点操作, 执行 104 ; 如果未查 找到匹配的节点操作, 执行 1 05。
104: 根据该节点操作对该报文进行处理, 流程结束。
105 : 根据该外层标签对该报文进行转发, 流程结束。
本发明实施例根据业务报文的外层标签和内层标签对报文进行处理, 实 现从同一个传输路径的不同节点上接收业务, 节约了标签资源, 提高了网络 性能。
实施例 2
本发明实施例提供了一种报文处理的方法, 该方法包括: 使用外层标签 和内层标签处理网络中的业务报文, 外层标签用于对业务报文进行转发; 内 层标签用于区分不同的业务。 具体的, 在不同网络中, 可以选取不同的外层 标签和内层标签。 比如在 MPLS网络, 可以选取 LSP标签为内层标签, PW标 签为内层标签。 在 VLAN中, 可以选取外层的 VLAN标签作为外层标签, 内层 的 VLAN标签作为内层标签。
在报文处理前, 需要进行如下准备步骤:
在网络的各个节点中预先配置处理表项, 具体为: 根据预设的业务报文 和外层标签、 内层标签的映射关系, 确定网络中的各个业务报文所对应的外 层标签和内层标签, 并在各节点中配置各个业务 >¾文所对应的节点操作。
该处理表项包括: 业务报文的外层标签、 内层标签和 Ac t ion标签,其中, Act ion标签为外层标签和内层标签所对应的节点操作, Act ion标签包括: Drop: 接收, 即取下该报文, 不再转发。
Drop and Cont inue: 接收并转发, 即复制一份报文在本节点接收, 同时 根据报文的外层标签转发报文。
Di scard: 丟弃, 即丟弃该 ^艮文。
在上述准备步骤完成后, 网络边缘节点在用户侧接收到业务报文时, 根 据预设的业务 >¾文和外层标签、 内层标签的映射关系, 确定该业务 文的外 层标签和内层标签, 将该外层标签和内层标签封装到该报文中并转发。
网络中的节点收到该报文后, 获取该报文中的外层标签和内层标签, 将 该报文在网络中传输到目的节点。 参见图 2 , 报文处理的具体步骤为:
201: 网络中的节点接收网络中传输的业务报文。
202: 获取该报文中的外层标签和内层标签。
203: 在预先配置的处理表项中, 根据该外层标签和内层标签查找匹配的 节点操作; 如果查找到匹配的节点操作, 则执行 204 , 如果未查找到匹配的 节点操作, 则执行 205。
接收到报文的节点在查找匹配的节点操作时, 同时根据外层标签和内层 标签进行查找, 即在该节点预先配置的处理表项中, 查找与报文中的外层标 签和内层标签同时匹配的处理表项, 如果能查找到相匹配的处理表项, 则根 据该表项中的节点操作对该报文进行处理; 如果未查找到匹配的处理表项, 根据该外层标签对该报文进行转发。
如表 1所示为某节点的处理表项, 在该表项中, 外层标签为 LSP标签, 内层标签为 PW标签, 节点在接收到业务报文时, 根据报文中的 LSP标签和 PW标签查询该表项确定节点操作。
204: 根据查找到的该节点操作对该报文进行处理, 流程结束。
205: 根据该外层标签对该报文进行转发, 流程结束。
具体的, 以表 1 中的处理表项为例进行说明, 如果处理表项中有与 LSP 标签和 PW标签同时匹配的表项, 则根据该匹配表项确定相应的节点操作; 如 果处理表项中没有与 PW标签匹配的表项, 仅有与 LSP标签匹配的表项, 则根 据 LSP标签转发报文。 在根据 LSP标签转发报文时, 可以根据 LSP标签查找 转发表项对 文进行转发, 如表 2所示为转发表项的示例。
需要说明的是, 如果接收到的报文中的外层标签与处理表项中的外层标 签都不匹配, 则判定为未知报文进行丟弃处理。
表 1
Figure imgf000008_0001
表 2
Figure imgf000008_0002
例如, 上述的节点从端口 3接收至 LSP标签为 100 , PW标签为 20的 ^艮文 后, 查询到处理表项为 Drop , 则取下该报文, 不再转发; 当该节点从端口 3 接收到 LSP标签为 200 , PW标签为 40的^艮文后, 查询到处理表项为 Drop and Cont inue , 则在本节点复制该报文, 同时根据报文的 LSP标签转发报文; 当 该节点从端口 3接收到 LSP标签为 1 00 , PW标签为 40的4艮文后, 查询到相应 的节点操作为 Di sca rd丟弃, 则直接丟弃该报文; 如果该节点从端口 3接收 到 LSP标签为 100 , PW标签为 30的 ^艮文, 由于处理表项中没有对应的 PW标 签, 则直接根据 LSP标签进行转发, 即查询表 2后, 在出端口将标签交换为 300 , 从端口 5转发出去; 如果节点接收到 LSP标签为 500 , PW标签为 30的 报文, 表 2中没有匹配的 LSP标签, 则判定为未知报文进行丟弃处理。 本发明实施例根据业务报文的外层标签和内层标签对报文进行处理, 实 现从同一个传输路径的不同节点上接收业务, 节约了标签资源, 提高了网络 性能。
实施例 3
本发明实施例提供了一种环网络中报文处理的方法, 并在此基础上, 进 一步提出了在环网络报文处理的过程中进行业务保护的方法。
本发明实施例提供的报文处理的方法与实施例 2相同, 具体应用于环网 络中, 比如应用于 MPLS环网络, 在该 MPLS环网络中, 外层标签可以为 LSP 标签, 内层标签可以为 PW标签。
在报文处理前, 需要进行如下准备步骤:
在该 MPLS环网络中, 配置两个相反方向的闭环 LSP , 两个闭环均包含环 网络中的所有节点, 配置的两个闭环 LSP可以是方向相反的两个环 LSP或者 是两个双向环 LSP。
具体的, 以 A、 B、 C、 D、 E、 F六个节点组成的环网为例, 在环网中, 配 置包含全部六个节点且方向相反的两个闭环 LSP : 逆时针方向的 LSP 为 LSP -CC , 顺时针方向的 LSP为 LSP_ CW。
对于每个在环网中传输的业务, 根据预设的业务报文和 LSP标签、 PW标 签的映射关系, 确定业务"¾文的 LSP标签和 PW标签, 并根据该 LSP标签和 PW标签对环网中的节点的处理表项进行预先配置, 其中, 每个业务报文的 PW 标签全网唯一, 业务 ·艮文的下环节点必须进行配置, 上环节点和其他中间节 点需要根据具体的应用场景进行配置。 需要说明的是, 在环网络中, 上环节 点即在用户侧接收到业务报文的网络边缘节点, 下环节点即报文在环网络中 转发的出口节点。
例如一个上环节点为 F、 下环节点为 C 的业务 文, 在业务 文和 LSP 标签、 PW标签的映射关系中, 其 PW标签为 1 0 , LSP标签为 LSP _CC上的标签, 映射到 LSP_CC上进行转发,则在节点 C上配置 PW标签为 1 0以及属于 LSP_CC 方向上的 LSP标签所对应的节点操作为 Drop; 如果节点 E需要在转发报文时 取下一份报文(组播的情况) , 则可以在节点 E中将 PW标签为 10以及属于 LSP-CC方向上的 LSP标签所对应的节点操作配置为 Drop and Continue。
在上述准备工作完成后, 就可以在环网络中进行报文的转发, 但此时缺 少业务保护机制, 不能保证业务报文处理的安全性。 比如, 在链路发生故障 时, 不能进行业务传输的保护处理, 造成业务报文丟失。
进一步的, 为保证报文在环网络中转发的安全性, 在报文处理前, 还可 以进行网络业务的保护,参见图 3,在该 MPLS环网上进行业务保护的方法为:
301: 环网络中的相邻节点之间进行链路检测。
302: 当有节点检测到链路故障时, 则将该节点设置为回绕(Wrapping) 状态, 将发生故障的链路所对应的端口设置为故障端口, 并发送自动保护倒 换 ( APS, Automatic Protection Switching )报文。
进一步的, 在 ?8>¾文的协议处理单元中, ?8>¾文包括:
故障端口信息, 其中故障端口为检测到故障的环端口, 可以为正向端口 或反向端口, 通常规定接收报文的入端口为正向端口, 转发报文的出端口为 反向端口。
发送节点标识 ( Destination identification identity) , 其中发送节 点即检测到链路故障并发送 APS报文的节点。
目的节点标识( Source identification identity ) , 其中目的节点为 发生故障的链路或节点的相邻相关节点。
保护倒换请求信息: 包括触发 APS的倒换类型, 如信号失效 SF (Signal Fail )或无请求 NR (No Request )。 在本实施例中, 节点检测到链路故障时, 则发送的 APS报文中的保护倒换请求信息的倒换类型为信号失效。
具体的, 当环网中的节点检测到链路故障时, 进入 Wrapping状态, 并分 别在两个环 LSP上发送 APS报文,即分别在 APS报文中封装 LSP-CC和 LSP-CW 方向上的 LSP标签后在相应的环 LSP上传输,其中 APS 文的 ΡΨ标签为预设 的特殊值, 该特殊的 PW标签用于 APS报文与业务报文进行区分。
303 : 环网中的节点接收并根据特殊的 PW标签识别出该 APS报文后, 则 发送给当前节点的 APS模块进行处理, 进行业务保护的相应操作。 具体方法 为:
1 )如果当前节点已经处于 Wrapp ing状态, 则忽略该 APS >艮文。
2 )如果当前节点处于正常状态, 且通过目的节点标识判断出当前节点不 是该 APS报文的目的节点, 则根据将该 APS报文中的 LSP标签转发该 APS报 文。
3 )如果当前节点处于正常状态, 且通过目的节点标识判断当前节点是该 APS报文的目的节点, 则进入 Wra pp ing状态, 并根据该 APS报文中的故障端 口信息将当前节点上对应的端口设置为故障端口。 具体方法为: 当 APS报文 中的故障端口信息为发送节点的正向端口时, 则将当前节点的反向端口设为 故障端口; 反之, 当 APS报文中的故障端口信息为发送节点的反向端口时, 则将当前节点的正向端口设为故障端口。
例如, 节点 E到节点 D方向上的链路发生了故障, 节点 D检测到正向端 口出现了故障, 则分别在两个环 LSP上发送 APS报文, 其中故障端口信息为 正向端口, 发送节点标识为节点 D的标识, 目的节点标识为节点 E的标识, 保护倒换请求信息中的倒换类型为信号失效。 节点 E在接收到 APS报文后, 识别出本节点为目的节点, 故障端口为正向端口, 则将本节点的反向端口设 置为故障端口, 即将面向节点 D的出端口设置为故障端口。
进入 Wra pp ing状态的节点,将所有从非故障端口向故障端口发送的业务 报文都进行 LSP方向的切换,即将报文中的 LSP标签切换为反向的 LSP标签, 并根据切换后的 LSP标签对报文进行处理。
在上述准备步骤和业务保护步骤执行之后, 就可以在该环网络中转发报 文, 并且转发报文具有一定的安全性, 具体步骤为:
1 ) 由上环节点在业务报文的外层封装 LSP标签和 PW标签, 并根据 LSP 标签转发报文。 例如报文的 LSP标签属于 LSP_CC上的标签, 则按照逆时针方 向转发报文。
2 )其他节点在接收到报文后, 如果当前节点处于 Wra pp ing状态, 则按 照业务保护的方法对报文进行处理;如果当前节点正常,则获取报文中的 LSP 标签和 PW标签, 并根据 LSP标签和 PW标签查询处理表项, 当能查找到相应 的节点操作时, 则根据节点操作对报文进行处理; 当未查找到匹配的节点操 作时, 则根据 LSP标签对报文进行转发。
下面结合具体的应用场景介绍该 MPLS 环网络中业务报文处理的方法和 业务保护的方法。
参见图 4 , 在节点 A、 B、 C、 D、 E、 F组成的环网中, 对于上环节点为 F , 下环节点为 C的业务 ^艮文, 在业务 ·艮文和 LSP标签、 ΡΨ标签的映射关系中, 该报文的 PW标签为 1 0 , LSP标签为 LSP_CC上的标签, 在 LSP_CC方向上进行 转发; 对于上环节点为 C, 下环节点为 F的业务报文, 在业务报文和 LSP标 签、 PW标签的映射关系中, 该 ^艮文的 PW标签为 12 , LSP标签为 LSP_CW上的 标签, 在 LSP_ CW方向上进行转发。
第一种应用场景: 链路和节点都正常, 以节点 F向节点 C传输业务为例 进行说明, 则在节点 C的处理表项中, 预先配置 LSP_CC方向上的 LSP标签和 PW标签为 1 0的业务报文的节点操作为 Drop。
在该场景中报文处理的过程如下:
在该业务报文到达节点 F后, 节点 F根据预设的报文和 LSP标签、 PW标 签的映射关系, 在报文中封装该报文的 LSP标签和 PW标签, 其中 LSP标签为 LSP _CC上的标签, PW标签为 1 0。 封装后在 LSP _CC方向上将该 文处理到节 点 E。
节点 E在收到报文后, 获取报文中的 LSP标签和 PW标签, 根据 LSP标签 和 PW标签查找相应的节点操作。由于在节点 E的配置表项中没有预先配置该 LSP标签和 PW标签所对应的操作, 则节点 E根据 LSP标签确定报文的转发方 向为 LSP_CC , 在 LSP_CC方向上将该报文处理到节点 D , 节点 D按照相同的方 法将报文处理到节点 C。
节点 C在收到报文后, 获取报文中的 LSP标签和 PW标签, 根据 LSP标签 和 PW标签查找相应的节点操作, 查找到为 Drop , 则将报文解封装并接收。
第二种应用场景: 链路发生双向故障, 以节点 F向节点 C传输业务为例 进行说明, 则在节点 C的处理表项中, 预先配置 LSP_CC方向上的 LSP标签和 PW标签为 10的业务报文的节点操作为 Drop。
在该场景中业务保护的过程如下:
参见图 5 , 在节点 A、 B、 C、 D、 E、 F组成的环网中的各个节点都正常, 但节点 E和节点 D之间的链路发生了故障, 节点 D和节点 E检测到链路故障 后进入 Wrapp ing 状态, 将故障链路对应的端口设置为故障端口, 并在两个 LSP方向上同时发送 APS报文, 且 APS报文中的保护倒换请求为信号失效。 补充说明的是, 节点 D和节点 E接收到 APS报文后, 获取报文中的 LSP标签 和 PW标签, 由节点 E 的 APS 模块处理, APS模块判断本节点目前状态为 Wrapp ing状态, 则忽略所接收到的 APS ^艮文。
在该场景中报文处理的过程如下:
在该业务报文到达 F节点后, 节点 F根据预设的报文和 LSP标签、 PW标 签的映射关系, 在报文中封装该报文的 LSP标签和 PW标签, 其中 LSP标签为 LSP_CC上的标签, PW标签为 10。 封装后在 LSP_CC方向上将该 文转发到节 点 E。
由于节点 E处于 Wrapp ing状态,并且业务>¾文的在节点 E的入端口为非 故障端口, 但出端口为故障端口, 业务报文从非故障端口向故障端口进行传 输, 因此节点 E将该报文从 LSP_CC上切换到 LSP_CW上进行传输, 即将报文 的 LSP标签切换为 LSP_CW方向上的标签, 并根据切换后的 LSP_CW方向上的 LSP标签和 PW标签查找相应的节点操作, 由于在节点 E的配置表项中没有预 先配置 LSP标签和 PW标签所对应的操作,则节点 E根据 LSP标签确定报文转 发方向为 LSP_CW, 则根据切换后的 LSP标签在 LSP_CW上将报文转发到 F。 节点 F在收到报文后,获取报文中的 LSP标签为 LSP _CW方向上的 LSP标 签, PW标签为 1 0 , 并根据 LSP标签和 PW标签查找相应的操作, 由于没有预 先配置相应的节点操作,则根据 LSP标签在 LSP_ CW方向将该报文转发到节点 A , 节点 A按照相同的方法将报文转发到节点 B , 节点 B将报文转发到节点 C。
节点 C在收到报文后, 获取报文中的 LSP标签信息和 PW标签信息, 查找 到 LSP _CW方向上的 LSP标签和 PW标签为 1 0所对应的节点操作, 由于没有预 先配置相应的节点操作, 则根据 LSP标签将该报文转发到节点 D。
节点 D收到报文后, 由于处于 Wrapp ing状态, 并且业务报文是从非故障 端口向故障端口进行传输, 因此将 文中的 LSP_ CW标签切换为 LSP_ CC标签, 根据切换后的 LSP_CC标签和 ΡΨ标签查找相应的节点操作, 由于没有预先配 置相应的节点操作, 则在 LSP_CC方向上将报文转发到节点 C。
节点 C在收到 文后, 获取 文中的 LSP标签为 LSP_ CC方向上的标签, PW标签为 1 0 , 根据 LSP标签和 PW标签, 查找对应的节点操作为 Drop , 则接 收该艮文, 流程结束。
第三种应用场景: 链路发生单向故障, 参见图 6 , 在节点 A、 B、 C、 D、 E、 F组成的环网中的各个节点都正常, 但节点 E到节点 D方向上的链路发生了 故障, 节点 D到节点 E方向上的链路依然正常, 因此只有节点 D检测到链路 故障。
在该场景中业务保护的过程如下:
节点 D检测到节点 E到节点 D方向上的链路发生了故障, 进入 Wrapp ing 状态, 将故障链路所对应的端口设置为故障端口, 即将节点 D的正向端口设 置为故障端口, 并在两个 LSP方向上发送 APS报文, 其中故障端口信息为正 向端口, 发送节点标识为节点 D的标识, 目的节点标识为节点 E的标识, 保 护倒换请求信息中的倒换类型为信号失效。 节点 E在接收到 APS报文后, 获 取才艮文中的 LSP标签和 PW标签, 由节点 E的 APS模块处理, APS模块判断本 节点目前状态为正常, 根据目的节点标识识别出本节点为目的节点, 则将本 节点设置为 Wrapp ing状态,并且 APS报文中的故障端口信息为节点 D的正向 端口, 则将本节点的反向端口设置为故障端口, 即将面向节点 D的出端口设 置为故障端口。
在该场景中, 报文处理的过程为:
当节点 F 向节点 C传输业务时, 则在节点 C 的处理表项中, 预先配置 LSP-CC方向上的 LSP标签和 ΡΨ标签为 10的业务 >¾文的节点操作为 Drop ,此 时对 文的转发过程与第二种应用场景相同, 不再赘述。
当节点 C 向节点 F传输业务时, 则在节点 F 的处理表项中, 预先配置 LSP-CW方向上的 LSP标签和 ΡΨ标签为 12的业务 >¾文的节点操作为 Drop ,此 时节点 D处于 Wrapp ing状态, 但节点 D到节点 E方向上的链路依然正常, 由 于是在非故障端口之间传输报文, 因此可以进行正常的业务传输, 此处不再 赘述。
第四种应用场景: 节点故障, 以节点 F向节点 C传输业务为例进行说明, 参见图 7 , 在节点 A、 B、 C、 D、 E、 F组成的环网中, 环网络中的各个节点和 链路都正常, 但节点 C发生了故障, 节点 D和节点 B检测到无法与节点 C进 行数据传输, 判定为面向节点 C的链路发生了故障, 进入 Wrapp ing状态, 将 面向节点 C的端口设置为故障端口。
为防止报文的转发形成环路, 本发明实施例提出的解决措施为: 当一个 业务的上环节点从环端口上接收到封装有该业务对应的外层标签和内层标签 的业务报文时, 则丟弃该业务报文。 即上环节点在业务报文转发的方向上再 次接收到该报文时, 说明报文在环网络中的转发形成了环路, 此时应丟弃该 报文。 以本场景为例, 在节点 F的处理表项中, 配置 LSP_CC方向上的 LSP标 签和 PW标签为 10对应的操作为 Di scard。
在该场景中业务保护的过程如下:
节点 D和节点 B检测到面向节点 C的链路发生了故障,进入 Wrapp ing状 态,将故障链路所对应的端口设置为故障端口,并在两个 LSP方向上发送 APS 报文。 需要说明的是, 本实施例中节点 B和节点 D发送的 APS报文中, 目的 节点都为节点 C , 但由于节点 C故障, 此处忽略 APS报文的作用。
在该场景中业务报文处理的过程如下:
在该业务报文到达节点 F后, 节点 F根据预设的报文和 LSP标签、 PW标 签的映射关系, 在报文中封装该报文的 LSP标签和 PW标签, 其中 LSP标签为 LSP_CC上的标签, PW标签为 10。 封装后在 LSP_CC方向上将该 文转发到节 点 E。
节点 E将报文转发到节点 D, 由于节点 D处于 Wrapp ing状态, 并且业务 报文是从非故障端口向故障端口进行传输, 则将该报文从 LSP_CC 上切换到 LSP-CW上进行传输, 即将报文的 LSP标签切换为 LSP_CW方向上的标签, 并 根据切换后的 LSP_CW方向上的标签和 PW标签查找相应的节点操作, 由于没 有预先配置相应的节点操作, 则节点 D根据 LSP 标签确定报文转发方向为 LSP-CW, 则根据切换后的 LSP标签在 LSP_CW上将 >¾文转发到 E。
节点 E将报文转发到节点 F , 节点 F在收到报文后, 获取报文中的 LSP 标签属于 LSP_CW, PW标签为 10 , 并根据 LSP标签和 PW标签查找相应的节点 操作, 由于没有预先配置相应的节点操作, 则根据 LSP标签在 LSP_CW方向将 该报文转发到节点 A , 节点 A按照相同的方法将报文转发到节点 B。
节点 B收到报文后, 由于处于 Wrapp ing状态, 并且业务报文是从非故障 端口向故障端口进行传输, 将报文中的 LSP_CW标签切换为 LSP_CC标签, 根 据切换后的 LSP_CC标签和 ΡΨ标签查找相应的节点操作, 由于没有预先配置 相应的节点操作, 则在 LSP_CC方向上将报文转发到节点 A。
节点 A继续转发报文直至转发到节点 F , 节点 F根据 LSP标签和 ΡΨ标签 查找相应的节点操作为 Di scard, 则丟弃该报文, 流程结束。
本发明实施例根据业务报文的 LSP标签和 PW标签对报文进行处理, 实现 在网络中接收多种业务报文时, 可以从同一个 LSP的不同节点上接收业务报 文, 节约了标签资源, 适合在环型网络应用。
实施例 4
本发明实施例提供了一种报文处理的方法, 该方法对实施例 2提供的方 法进行了简化, 在预先配置节点操作时, 仅根据内层标签进行配置; 节点在 对报文进行处理时, 也仅根据内层标签查找相应的操作, 如图 8所示, 该方 法包括:
在报文处理前, 需要进行如下准备步骤:
在网络的各个节点中预先配置处理表项, 具体为: 根据预设的业务报文 和外层标签、 内层标签的映射关系, 确定网络中的各个业务报文所对应的外 层标签和内层标签, 并在各节点中配置各个业务 >¾文所对应的节点操作。
该处理表项包括: 业务 文内层标签和 Act ion标签, 其中, Act ion标 签为外层标签和内层标签所对应的节点操作, Act ion标签包括:
Drop: 接收, 即取下该报文, 不再转发。
Drop and Cont inue: 接收并转发, 即复制一份报文在本节点接收, 同时 根据报文的外层标签转发报文。
在上述准备步骤完成后, 网络边缘节点在用户侧接收到业务报文时, 根 据预设的业务 >¾文和外层标签、 内层标签的映射关系, 确定该业务 文的外 层标签和内层标签, 将该外层标签和内层标签封装到该报文中并转发。
网络中的节点收到该报文后, 获取该报文中的外层标签和内层标签, 将 该报文在网络中传输到目的节点。 参见图 8 , 报文处理的具体步骤为:
801: 网络中的节点接收网络中传输的业务报文。
802: 获取该报文中的外层标签和内层标签。
803: 在预先配置的处理表项中, 根据内层标签查找匹配的节点操作; 如 果查找到匹配的节点操作, 则执行 804 , 如果未查找到匹配的节点操作, 则 执行 805。
804: 根据查找到的该节点操作对该报文进行处理; 805: 根据该外层标签对该报文进行转发。
接收到报文的节点在查找匹配的节点操作时, 根据内层标签进行查找在 该节点预先配置的处理表项中, 查找与报文中的内层标签匹配的处理表项, 如果能查找到相匹配的处理表项, 则根据该表项中的节点操作对该报文进行 处理; 如果未查找到匹配的处理表项, 根据该外层标签对该报文进行转发。
需要说明的是, 如果接收到的报文中的外层标签与处理表项中的外层标 签都不匹配, 则判定为未知报文进行丟弃处理。
本发明实施例根据业务报文的内层标签对报文进行处理, 根据外层标签 对报文进行转发, 实现在网络中接收多种业务报文时, 可以从同一个传输路 径的不同节点上接收业务报文, 节约了标签资源, 适合在环型网络中应用。
实施例 5
本发明实施例提供了一种环网络中报文处理的方法, 并在此基础上, 进 一步提出了在环网络报文处理的过程中进行业务保护的方法。
本发明实施例提供的报文处理的方法与实施例 4相同, 具体应用于环网 络中, 比如应用于 MPLS环网络, 在该 MPLS环网络中, 外层标签可以为 LSP 标签, 内层标签可以为 PW标签。
在报文处理前, 需要进行如下准备步骤:
在该 MPLS环网络中, 配置两个相反方向的闭环 LSP , 两个闭环均包含环 网络中的所有节点, 配置的两个闭环 LSP可以是方向相反的两个环 LSP或者 是两个双向环 LSP。
具体的, 以 A、 B、 C、 D、 E、 F六个节点组成的环网为例, 在环网中, 配 置包含全部六个节点且方向相反的两个闭环 LSP : B节点到 A节点的逆时针方 向的 LSP为 LSP-CC , A节点到 B节点顺时针方向的 LSP为 LSP _CW。
对于每个在环网中传输的业务, 根据预设的业务报文和 LSP标签、 PW标 签的映射关系, 确定业务"¾文的 LSP标签和 PW标签, 并根据该 PW标签对环 网中的节点的处理表项进行预先配置, 其中, 每个业务报文的 PW标签全网唯 一, 业务报文的下环节点必须进行配置, 上环节点和其他中间节点需要根据 具体的应用场景进行配置。
例如一个上环节点为 F、 下环节点为 C 的业务 文, 在业务 文和 LSP 标签、 PW标签的映射关系中, 其 PW标签为 10, LSP标签为 LSP_CC上的标签, 映射到 LSP_CC上进行转发,则在节点 C上配置 PW标签为 10所对应的节点操 作为 Drop; 如果节点 E需要在转发报文时复制一份报文, 则可以在节点 E中 将 PW标签为 10所对应的节点操作配置为 Drop and Continue。
在上述准备工作完成后, 就可以在环网络中进行报文的转发, 但此时缺 少业务保护机制, 不能保证业务报文处理的正确性。
进一步的, 为保证报文在环网络中转发的安全性, 在报文处理前, 还可 以进行网络业务的保护,参见图 9,在该 MPLS环网上进行业务保护的方法为:
901: 环网络中的相邻节点之间进行链路检测。
902: 当有节点检测到链路故障时, 则将该节点设置为 Wrapping状态, 将发生故障的链路所对应的端口设置为故障端口, 并发送 APS报文。
进一步的, 在 ?8>¾文的协议处理单元中, ?8>¾文包括:
故障端口信息, 其中故障端口为检测到故障的环端口, 可以为正向端口 或反向端口, 通常规定接收报文的入端口为正向端口, 转发报文的出端口为 反向端口。
发送节点标识 ( Destination identification identity) , 其中发送节 点即检测到链路故障并发送 APS报文的节点。
目的节点标识( Source identification identity ) , 其中目的节点为 发生故障的链路或节点的相邻相关节点。
保护倒换请求信息: 包括触发 APS的倒换类型, 如信号失效 SF (Signal Fail )或无请求 NR (No Request )。 在本实施例中, 节点检测到链路故障时, 则发送的 APS报文中的保护倒换请求信息的倒换类型为信号失效。
具体的, 当环网中的节点检测到链路故障时, 进入 Wrapping状态, 并分 别在两个环 LSP上发送 APS报文,即在分别在 APS报文中封装 LSP _CC和 LSP _CW 方向上的 LSP标签后在相应的环 LSP上传输,其中 APS 文的 PW标签为预设 的特殊值, 该特殊的 PW标签用于 APS报文与业务报文进行区分。
903 : 环网中的节点接收并根据特殊的 PW标签识别出该 APS报文后, 则 发送给该节点的 APS模块进行处理, 进行业务保护的相应操作。 具体方法为;
1 )如果当前节点已经处于 Wrapp ing状态, 则忽略该 APS >艮文。
2 )如果当前节点处于正常状态, 且通过目的节点标识判断出当前节点不 是该 APS报文的目的节点, 则根据将该 APS报文中的 LSP标签转发该 APS报 文。
3 )如果当前节点处于正常状态, 且通过目的节点标识判断当前节点是该
APS报文的目的节点, 则进入 Wra pp ing状态, 并根据该 APS报文中的故障端 口信息将当前节点上对应的端口设置为故障端口。 具体方法为: 当 APS报文 中的故障端口信息为发送节点的正向端口时, 则将当前节点反向端口设为故 障端口; 反之, 当 APS报文中的故障端口信息为发送节点的反向端口时, 则 将当前节点的正向端口设为故障端口。
进入 Wra pp ing状态的节点,将所有从非故障端口向故障端口发送的业务 报文都进行 LSP方向的切换,即将报文中的 LSP标签切换为反向的 LSP标签, 并根据切换后的 LSP标签对报文进行处理。
在上述准备步骤和业务保护步骤执行之后, 就可以在该环网络中转发报 文, 并且转发报文具有一定的安全性, 具体步骤为:
1 ) 由上环节点在业务报文的外层封装 LSP标签和 PW标签, 并根据 LSP 标签转发报文。 例如报文的 LSP标签属于 LSP_CC上的标签, 则按照逆时针方 向转发报文。
2 )其他节点在接收到报文后, 如果当前节点处于 Wra pp ing状态, 则按 照业务保护的方法对报文进行处理;如果当前节点正常,则获取报文中的 LSP 标签和 PW标签, 并根据 PW标签查询处理表项, 当能查找到相应的节点操作 时, 则根据节点操作对报文进行处理; 当未查找到匹配的节点操作时, 则根 据 LSP标签对报文进行转发。
下面结合具体的应用场景介绍该 MPLS 环网络中业务报文处理的方法和 业务保护的方法。
参见图 4 , 在节点 A、 B、 C、 D、 E、 F组成的环网中, 对于上环节点为 F , 下环节点为 C的业务 ^艮文, 在业务 ·艮文和 LSP标签、 ΡΨ标签的映射关系中, 该报文的 PW标签为 1 0 , LSP标签为 LSP_CC上的标签, 在 LSP_CC方向上进行 转发; 对于上环节点为 C, 下环节点为 F的业务报文, 在业务报文和 LSP标 签、 PW标签的映射关系中, 该 ^艮文的 PW标签为 12 , LSP标签为 LSP_CW上的 标签, 在 LSP- CW方向上进行转发。
第一种应用场景: 链路和节点都正常, 以节点 F向节点 C传输业务为例 进行说明, 则在节点 C的处理表项中, 预先配置 PW标签为 1 0的业务报文的 节点操作为 Drop。
在该场景中报文处理的过程如下:
在该业务报文到达节点 F后, 节点 F根据预设的报文和 LSP标签、 PW标 签的映射关系, 在 ·艮文中封装 LSP标签和 ΡΨ标签, 其中 LSP标签为 LSP_CC 上的标签, PW标签为 1 0。 封装后在 LSP_CC方向上将该报文转发到节点 E。
节点 E在收到报文后, 获取报文中的 LSP标签和 PW标签, 根据 PW标签 查找相应的节点操作。由于在节点 E的配置表项中没有预先配置该 PW标签所 对应的操作,则节点 E根据 LSP标签确定报文的转发方向为 LSP_ CC ,在 LSP _CC 方向上将该报文转发到节点 D , 节点 D按照相同的方法将报文转发到节点 C。
节点 C在收到报文后, 获取报文中的 LSP标签和 PW标签, 根据 PW标签 查找相应的节点操作, 查找到为 Drop , 则将报文解封装并接收。
第二种应用场景: 链路发生双向故障, 以节点 F向节点 C传输业务为例 进行说明, 则在节点 C的处理表项中, 预先配置 PW标签为 1 0的业务报文的 节点操作为 Drop。 在该场景中业务保护的过程如下:
参见图 5 , 在节点 A、 B、 C、 D、 E、 F组成的环网中的各个节点都正常, 但节点 E和节点 D之间的链路发生了故障, 节点 D和节点 E检测到链路故障 后进入 Wrapp ing 状态, 将故障链路对应的端口设置为故障端口, 并在两个 LSP方向上同时发送 APS报文, 且 APS报文中的保护倒换请求为信号失效。 补充说明的是, 节点 D和节点 E接收到 APS报文后, 获取报文中的 LSP标签 和 PW标签, 由节点 E 的 APS 模块处理, APS模块判断本节点目前状态为 Wrapp ing状态, 则忽略所接收到的 APS报文。
在该场景中报文处理的过程如下:
在该业务报文到达 F节点后, 节点 F根据预设的报文和 LSP标签、 PW标 签的映射关系, 在 ·艮文中封装 LSP标签和 ΡΨ标签, 其中 LSP标签为 LSP_CC 上的标签, PW标签为 10。 封装后在 LSP_CC方向上将该报文转发到节点 E。
由于节点 E处于 Wrapp ing状态,并且业务>¾文的在节点 E的入端口为非 故障端口, 但出端口为故障端口, 业务报文从非故障端口向故障端口进行传 输, 因此节点 E将该报文从 LSP_CC上切换到 LSP_CW上进行传输, 即将报文 的 LSP标签切换为 LSP_CW方向上的标签, 并根据 PW标签查找相应的节点操 作, 由于在节点 E的配置表项中没有预先配置 PW标签所对应的操作, 则节点 E根据 LSP标签确定报文转发方向为 LSP_CW, 则根据切换后的 LSP标签在 LSP-CW上将报文转发到 F。
节点 F在收到报文后,获取报文中的 LSP标签为 LSP_CW方向上的 LSP标 签, PW标签为 10 , 并根据 PW标签查找相应的操作, 由于没有预先配置相应 的节点操作, 则根据 LSP标签在 LSP_CW方向将该报文转发到节点 A, 节点 A 按照相同的方法将报文转发到节点 B, 节点 B将报文转发到节点 C。
节点 C在收到 文后, 获取 文中的 LSP标签为 LSP_CW方向上的标签, PW标签为 10 ,根据该 PW标签, 查找对应的节点操作为 Drop , 则接收该报文, 流程结束。 第三种应用场景: 链路发生单向故障, 参见图 6 , 在节点 A、 B、 C、 D、 E、 F组成的环网中的各个节点都正常, 但节点 E到节点 D方向上的链路发生了 故障, 节点 D到节点 E方向上的链路依然正常, 因此只有节点 D检测到链路 故障。
在该场景中业务保护的过程如下:
节点 D检测到节点 E到节点 D方向上的链路发生了故障, 进入 Wrapp ing 状态, 将故障链路所对应的端口设置为故障端口, 即将节点 D的正向端口设 置为故障端口, 并在两个 LSP方向上发送 APS报文, 其中故障端口信息为正 向端口, 发送节点标识为节点 D的标识, 目的节点标识为节点 E的标识, 保 护倒换请求信息中的倒换类型为信号失效。 节点 E在接收到 APS报文后, 获 取才艮文中的 LSP标签和 ΡΨ标签, 由节点 E的 APS模块处理, APS模块判断本 节点目前状态为正常, 根据目的节点标识识别出本节点为目的节点, 则将本 节点设置为 Wrapp ing状态,并且 APS报文中的故障端口信息为节点 D的正向 端口, 则将本节点的反向端口设置为故障端口, 即将面向节点 D的出端口设 置为故障端口。
在该场景中, 报文处理的过程为:
当节点 F向节点 C传输业务时, 则在节点 C的处理表项中, 预先配置 PW 标签为 10的业务报文的节点操作为 Drop , 此时对报文的转发过程与第二种 应用场景相同, 不再赘述。
当节点 C向节点 F传输业务时, 则在节点 F的处理表项中, 预先配置 PW 标签为 12的业务 >¾文的节点操作为 Drop , 此时节点 D处于 Wrapp ing状态, 但节点 D到节点 E方向上的链路依然正常, 由于是在非故障端口之间传输报 文, 因此可以进行正常的业务传输, 此处不再赘述。
本发明实施例根据业务报文的 LSP标签和 PW标签对报文进行处理, 实现 在网络中接收多种业务报文时, 可以从同一个 LSP的不同节点上接收业务报 文, 节约了标签资源, 适合在环型网络应用。 实施例 6
本发明实施例提供了一种报文处理的装置, 参见图 10, 该装置包括: 接收模块 1001, 用于接收网络中传输的业务报文;
获取模块 1002, 用于获取该报文中的外层标签和内层标签;
查找模块 1003, 用于根据该内层标签查找匹配的节点操作, 或根据该内 层标签和外层标签查找匹配的节点操作;
处理模块 1004, 用于根据该查找模块 1003 的查找结果, 对该报文进行 处理, 如果查找到匹配的节点操作, 则根据该节点操作对该报文进行处理; 如果未查找到匹配的节点操作, 则根据该外层标签对该报文进行转发。
进一步的, 该处理模块 1004, 具体用于当该查找模块 1003查找到匹配 的节点操作为接收报文时,则根据该节点操作接收该报文。当该查找模块 1003 查找到匹配的节点操作为丟弃报文时, 则根据该节点操作丟弃该报文。
再一步的, 在 MPLS网络中, 该外层标签为 LSP标签, 该内层标签为伪线 PW 标签。 本发明实施例在环网络中应用时, 在环网络中预先配置了两个环 LSP, 两个环 LSP可以是方向相反的两个环 LSP或者是两个双向环 LSP。 在该 环网络中, 该装置还包括:
配置模块, 用于当该装置为接收到该报文的边缘节点时, 则在该装置中, 预先配置该报文的外层标签和内层标签所对应的节点操作为丟弃报文;
相应的, 该处理模块 1004, 用于在该查找模块 1003根据该内层标签和 外层标签查找到匹配的节点操作为丟弃报文时, 则丟弃该报文。
具体地, 为了提供业务保护的功能, 该装置还可以包括:
检测模块, 用于检测与相邻节点之间的链路是否发生了故障;
故障处理模块, 用于当该检测模块检测到与该相邻节点之间的链路发生 故障时, 将从一个环 LSP上接收到的业务报文切换到另一个环 LSP上进行处 理;
APS 模块, 用于当该检测模块检测到与该相邻节点之间的链路发生故障 时, 在该网络中向该相邻节点发送自动保护倒换 APS报文, 该 APS报文用于 该相邻节点接收到该 APS报文后, 将从一个环 LSP上接收到的业务报文切换 到另一个环 LSP上进行处理。
其中, 该 APS >艮文中封装有 PW标签, 该 PW标签的值为预设值, 该 PW标 签用于当前节点对 APS报文进行识别。
本发明实施例根据业务报文的内层标签对报文进行处理, 根据外层标签 对报文进行转发, 实现在网络中接收多种业务报文时, 可以从同一个传输路 径上的不同节点上接收业务报文, 节约了标签资源, 适合在环型网络应用。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成, 所述程序可以存储于一计算机可 读取存储介质中, 所述存储介质为计算机的软盘、 硬盘或光盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明 的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发 明的保护范围之内。

Claims

权 利 要 求 书
1、 一种报文处理的方法, 其特征在于, 所述方法包括:
接收网络中传输的业务报文;
获取所述报文中的外层标签和内层标签;
根据所述内层标签查找匹配的节点操作, 或根据所述内层标签和外层标 签查找匹配的节点操作;
如果查找到匹配的节点操作,则根据所述节点操作对所述报文进行处理; 如果未查找到匹配的节点操作, 则根据所述外层标签对所述报文进行转 发。
2、 根据权利要求 1所述的报文处理的方法, 其特征在于, 所述外层标签 为标签交换路径 LSP标签, 所述内层标签为伪线 PW标签。
3、 根据权利要求 1所述的报文处理的方法, 其特征在于, 所述如果查找 到匹配的节点操作, 则根据所述节点操作对所述报文进行处理, 具体包括: 如果查找到匹配的节点操作为接收报文, 则根据所述节点操作接收所述 报文;
如果查找到匹配的节点操作为丟弃报文, 则根据所述节点操作丟弃所述 报文。
4、 根据权利要求 1所述的报文处理的方法, 其特征在于, 所述方法还包 括:
如果接收网络中传输的业务报文的节点是边缘节点 , 则在所述接收网络 中传输的业务报文之前, 还包括: 预先配置所述报文的外层标签和内层标签 所对应的节点操作为丟弃报文;
相应地, 所述根据所述内层标签和外层标签查找匹配的节点操作; 如果 查找到匹配的节点操作, 则根据所述节点操作对所述报文进行处理, 具体包 括: 根据所述内层标签和外层标签查找匹配的节点操作, 当查找到匹配的节 点操作为丟弃 文时, 则丟弃所述报文。
5、 根据权利要求 2所述的报文处理的方法, 其特征在于, 所述网络为包 括两个环 LSP的环网络, 所述接收网络中传输的业务报文之前, 还包括:
检测与相邻节点之间的链路是否发生了故障;
如果与所述相邻节点之间的链路发生了故障,则将从一个环 LSP上接收到 的业务 文切换到另一个环 LSP上进行处理;并向所述相邻节点发送自动保护 倒换 APS报文, 所述 APS报文用于所述相邻节点接收到所述 APS报文后, 也将从 一个环 LSP上接收到的业务报文切换到另一个环 LSP上进行处理。
6、 根据权利要求 5所述的 >¾文处理的方法, 其特征在于, 所述两个环 LSP 是方向相反的两个环 LSP或者是两个双向环 LSP。
7、 根据权利要求 5所述的报文处理的方法, 其特征在于,
所述 APS报文中封装有 PW标签, 所述 PW标签的值为预设值, 用于当前节点 对 APS报文进行识别。
8、 一种报文处理的装置, 其特征在于, 所述装置包括:
接收模块, 用于接收网络中传输的业务报文;
获取模块, 用于获取所述报文中的外层标签和内层标签;
查找模块, 用于根据所述内层标签查找匹配的节点操作, 或根据所述内 层标签和外层标签查找匹配的节点操作;
处理模块, 用于根据所述查找模块的查找结果, 对所述报文进行处理, 如果查找到匹配的节点操作, 则根据所述节点操作对所述报文进行处理; 如 果未查找到匹配的节点操作, 则根据所述外层标签对所述报文进行转发。
9、 根据权利要求 8所述的报文处理的装置, 其特征在于, 所述外层标签 为 LSP标签, 所述内层标签为 PW标签。
1 0、 根据权利要求 8所述的报文处理的装置, 其特征在于,
所述处理模块, 具体用于当所述查找模块查找到匹配的节点操作为接收 报文时, 则根据所述节点操作接收所述报文; 当所述查找模块查找到匹配的 节点操作为丟弃报文时, 则根据所述节点操作丟弃所述报文。
1 1、 根据权利要求 8所述的报文处理的装置, 其特征在于, 所述装置还包 括:
配置模块, 用于当所述装置为边缘节点时, 在所述装置中, 预先配置所 述报文的外层标签和内层标签所对应的节点操作为丟弃报文;
相应地, 所述处理模块, 用于在所述查找模块根据所述内层标签和外层 标签查找到匹配的节点操作为丟弃报文时, 则丟弃所述报文。
12、 根据权利要求 9所述的报文处理的装置, 其特征在于, 所述网络为包 括两个环 LSP的环网络, 所述装置还包括:
检测模块, 用于检测所述装置与相邻节点之间的链路是否发生了故障; 故障处理模块, 用于当所述检测模块检测到与所述相邻节点之间的链路 发生故障时, 将从一个环 LSP上接收到的业务报文切换到另一个环 LSP上进行 处理;
APS模块,用于当所述检测模块检测到与所述相邻节点之间的链路发生故 障时, 向所述相邻节点发送 APS报文, 所述 APS报文用于所述相邻节点接收到 所述 APS报文后 ,将从一个环 LSP上接收到的业务报文切换到另一个环 LSP上进 行处理。
1 3、 根据权利要求 12所述的报文处理的装置, 其特征在于, 所述两个环 LSP是方向相反的两个环 LSP或者是两个双向环 LSP。
14、 根据权利要求 1 2所述的报文处理的装置, 其特征在于,
所述 APS报文中封装有 PW标签, 所述 PW标签的值为预设值, 用于当前节点 对 APS报文进行识别。
PCT/CN2009/074280 2008-10-22 2009-09-28 报文处理的方法和装置 WO2010045838A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008101673376A CN101729361B (zh) 2008-10-22 2008-10-22 报文处理的方法和装置
CN200810167337.6 2008-10-22

Publications (1)

Publication Number Publication Date
WO2010045838A1 true WO2010045838A1 (zh) 2010-04-29

Family

ID=42118945

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074280 WO2010045838A1 (zh) 2008-10-22 2009-09-28 报文处理的方法和装置

Country Status (2)

Country Link
CN (1) CN101729361B (zh)
WO (1) WO2010045838A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510328A (zh) * 2020-04-09 2020-08-07 中国南方电网有限责任公司超高压输电公司柳州局 通道异常短时恢复方法
CN112019420A (zh) * 2020-09-04 2020-12-01 苏州盛科科技有限公司 一种vxlan边缘节点组播报文转发的实现方法及装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123101B (zh) * 2011-03-21 2015-04-01 中兴通讯股份有限公司 一种报文处理方法及装置
CN104734956B (zh) * 2012-02-13 2018-06-15 华为技术有限公司 业务路由系统及业务处理的方法、设备
CN103841013B (zh) * 2012-11-21 2017-06-16 新华三技术有限公司 Trill网络中的报文转发方法及设备
CN105959953B (zh) * 2015-09-14 2019-07-09 杭州迪普科技股份有限公司 一种安全业务的处理方法和装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866923A (zh) * 2006-02-24 2006-11-22 华为技术有限公司 一种实现捆绑接口边到边伪线仿真服务的方法及系统
CN101115005A (zh) * 2007-08-13 2008-01-30 中兴通讯股份有限公司 一种实现边缘到边缘伪线仿真的方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1728698B (zh) * 2004-07-30 2010-08-25 国家数字交换系统工程技术研究中心 并行结构保序流量平衡系统及基于流分类的报文调度方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866923A (zh) * 2006-02-24 2006-11-22 华为技术有限公司 一种实现捆绑接口边到边伪线仿真服务的方法及系统
CN101115005A (zh) * 2007-08-13 2008-01-30 中兴通讯股份有限公司 一种实现边缘到边缘伪线仿真的方法和装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510328A (zh) * 2020-04-09 2020-08-07 中国南方电网有限责任公司超高压输电公司柳州局 通道异常短时恢复方法
CN111510328B (zh) * 2020-04-09 2022-08-30 中国南方电网有限责任公司超高压输电公司柳州局 通道异常短时恢复方法
CN112019420A (zh) * 2020-09-04 2020-12-01 苏州盛科科技有限公司 一种vxlan边缘节点组播报文转发的实现方法及装置
CN112019420B (zh) * 2020-09-04 2022-03-29 苏州盛科科技有限公司 一种vxlan边缘节点组播报文转发的实现方法及装置

Also Published As

Publication number Publication date
CN101729361A (zh) 2010-06-09
CN101729361B (zh) 2012-05-02

Similar Documents

Publication Publication Date Title
WO2019105066A1 (zh) 处理路由的方法和装置、以及数据传输的方法和装置
US9781032B1 (en) MPLS label usage in ethernet virtual private networks
CN105743689B (zh) 对多宿主以太网虚拟专网中的链路故障的快速收敛
US20130272114A1 (en) Pseudo wire switching method and device
US9397931B1 (en) Fast convergence in singly-homed ethernet virtual private networks
WO2016101646A1 (zh) 以太虚拟网络的接入方法及装置
US20170099180A1 (en) Fast convergence of evpn networks for multi homing topologies
EP3151485A1 (en) Egress node protection in evpn all-active topology
EP3148127A1 (en) Egress protection for bum traffic with link failures in evpn
WO2010069175A1 (zh) 一种建立双向转发检测的方法、系统及设备
WO2020024828A1 (zh) 通信方法、通信设备和通信系统
WO2013182059A1 (zh) 多协议标签交换流量工程隧道建立方法及设备
WO2012075831A1 (zh) 一种实现组播保护的方法及系统
WO2012149862A1 (zh) 环网故障切换方法和装置
WO2011144169A1 (zh) 一种报文的发送方法和装置
WO2012130034A1 (zh) 一种vpls快速重路由方法和设备
WO2011060667A1 (zh) 一种虚拟专用局域网络中链路保护的方法及设备
WO2012079375A1 (zh) 虚拟专用网络的链路保护方法和系统
WO2012119500A1 (zh) 选取当前备份路由的方法和路由器
WO2020001389A1 (zh) 一种避免环路的通信方法、设备和系统
WO2020168854A1 (zh) 一种evpn组播方法、装置及系统
WO2010045838A1 (zh) 报文处理的方法和装置
WO2022083563A1 (zh) 链路检测方法、链路检测装置、终端设备和存储介质
CN111064596A (zh) 对于用于多宿主节点故障的bum流量的节点保护
WO2013029438A1 (zh) 以太网接口保护方法及网络侧设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09821559

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09821559

Country of ref document: EP

Kind code of ref document: A1