WO2022127586A1 - 报文处理方法、节点及计算机可读存储介质 - Google Patents
报文处理方法、节点及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2022127586A1 WO2022127586A1 PCT/CN2021/134529 CN2021134529W WO2022127586A1 WO 2022127586 A1 WO2022127586 A1 WO 2022127586A1 CN 2021134529 W CN2021134529 W CN 2021134529W WO 2022127586 A1 WO2022127586 A1 WO 2022127586A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- packet
- network
- header
- forwarding detection
- forwarding
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 35
- 238000001514 detection method Methods 0.000 claims abstract description 227
- 230000005540 biological transmission Effects 0.000 claims description 40
- 238000000034 method Methods 0.000 claims description 30
- 238000005538 encapsulation Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 6
- 230000002457 bidirectional effect Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 235000008694 Humulus lupulus Nutrition 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
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
- H04L43/00—Arrangements for monitoring or testing data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
Definitions
- the embodiments of the present application relate to, but are not limited to, the field of communications technologies, and in particular, relate to a packet processing method, a node, and a computer-readable storage medium.
- RFC5881 and RFC5883 the single-hop Bidirectional Forwarding Detection (BFD) mechanism and the multi-hop BFD mechanism in IP networks are respectively defined;
- RFC5884 defines Multi-Protocol Label Switching (Multi-Protocol Label) Switching, MPLS) network label switched path (Label Switched Path, LSP) BFD mechanism;
- RFC5885 defines the Pseudowire (Pseudowire, PW) BFD mechanism;
- RFC7881 defines the IP network or MPLS network Seamless Bidirectional Forwarding Detection (Seamless Bidirectional Forwarding Detection) Forwarding Detection, S-BFD) mechanism;
- RFC7885 defines the S-BFD mechanism of PW.
- the current draft standard only involves BFD detection or S-BFD detection of a single network, and there is currently no relevant technical solution for BFD detection or S-BFD detection in the interworking state of heterogeneous networks.
- the related technical solution cannot realize BFD detection or S-BFD detection in the state of heterogeneous network intercommunication.
- Embodiments of the present application provide a packet processing method, a node, and a computer-readable storage medium.
- an embodiment of the present application provides a packet processing method, including: receiving a first forwarding detection packet from a first network, wherein a packet format of the first forwarding detection packet matches the first forwarding detection packet.
- a transmission rule of a network converting a second forwarding detection packet according to the first forwarding detection packet, wherein the packet format of the second forwarding detection packet matches the transmission rule of the second network; to the first forwarding detection packet
- the second network sends the second forwarding detection packet.
- an embodiment of the present application further provides a node, including: a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the above-mentioned part when executing the computer program
- a node including: a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the above-mentioned part when executing the computer program
- an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, where the computer-executable instructions are used to execute the packet processing method as described above.
- FIG. 1 is a schematic diagram of a network topology for implementing a packet processing method provided by an embodiment of the present application
- FIG. 2 is a flowchart of a message processing method provided by an embodiment of the present application.
- FIG. 3 is a flowchart of a second forwarding detection message obtained by conversion in a message processing method provided by another embodiment of the present application;
- FIG. 4 is a specific flowchart of obtaining a second forwarding detection message in a message processing method provided by another embodiment of the present application.
- FIG. 5 is a schematic diagram of the field structure of the Service TTL TLV provided by an embodiment of the present application.
- FIG. 6 is a specific flowchart of obtaining a second forwarding detection message in a message processing method provided by another embodiment of the present application.
- FIG. 7 is a flowchart of a message processing method provided by another embodiment of the present application.
- FIG. 8 is a schematic diagram of a network topology for implementing a packet processing method provided by a specific example of the present application.
- the present application provides a message processing method, node and computer-readable storage medium.
- a node deployed between a first network and a second network when the node receives a message from the first network that matches the format of the first network
- the first forwarding detection packet of the transmission rule of the second network is converted according to the first forwarding detection packet to obtain a second forwarding detection packet whose packet format matches the transmission rule of the second network, and then the second forwarding detection packet is sent to the second network. It realizes the transmission of forwarding detection packets in the case of intercommunication of different networks, such as the transmission of BFD packets or S-BFD packets in the case of intercommunication of different networks, so as to realize BFD detection in the state of intercommunication of heterogeneous networks or S-BFD detection.
- FIG. 1 is a schematic diagram of a network topology for executing a packet processing method provided by an embodiment of the present application.
- the network topology includes a first user equipment 110 , a first node 120 , a third node 130 , a second node 140 and a second user equipment 150 connected in sequence.
- the first node 120 is located in the first network
- the second node 140 is located in the second network
- the third node 130 is located between the first network and the second network to implement the intercommunication between the first network and the second network.
- Both the first network and the second network may be an MPLS network or an SRv6 network.
- the second network is an SRv6 network; and when the first network is an SRv6 network, the second network is an MPLS network. network.
- a three-layer virtual private network (Layer 3 Virtual Private Networks, L3VPN) chain can be established Communication links such as road, Layer 2 Virtual Private Network (L2VPN) link or Ethernet Virtual Private Network (Ehternet Virtual Private Network, EVPN) link.
- Layer 3 Virtual Private Networks, L3VPN Layer 3 Virtual Private Networks
- L2VPN Layer 2 Virtual Private Network
- EVPN Ethernet Virtual Private Network
- the first node 120, the third node 130, and the second node 140 may all be network devices such as routers or switches, and can forward packets.
- the data packet can be encapsulated into a packet format matching the transmission rules of the first network, so that the data packet can be transmitted in the first network;
- the third node 130 the data packet from the first network can be encapsulated
- the data packet of a node 120 is re-encapsulated into a packet format matching the transmission rules of the second network, so that the re-encapsulated data packet can be transmitted in the second network;
- Related processing is performed on the data packets of the three nodes 130. For example, when the second node 140 is the destination node, the second node 140 can process the payload of the data packets from the third node 130.
- the network topology and application scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application.
- the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
- topology shown in FIG. 1 does not constitute a limitation on the embodiments of the present application, and may include more or less components than shown, or combine some components, or different components layout.
- FIG. 2 is a flowchart of a packet processing method provided by an embodiment of the present application.
- the packet processing method can be applied to the third node 130 in the network topology shown in FIG. 1.
- the packet processing method includes but is not limited to step S100, step S200 and step S300.
- Step S100 Receive a first forwarding detection packet from the first network, where a packet format of the first forwarding detection packet matches a transmission rule of the first network.
- the first forwarding detection packet may be a BFD packet or an S-BFD packet
- the packet format of the first forwarding detection packet may have various implementation manners, which may be determined according to the actual application. The embodiment does not specifically limit this.
- the packet format of the first forwarding detection packet is described below with a specific example.
- the packet format of the first forwarding detection packet may be one of the following:
- " only means to separate each message field, and does not have a special meaning.
- the MPLS label stack packet field is represented as the MPLS label stack in the first forwarding detection packet
- the inner layer IPv6 Header packet field is represented as the inner layer IPv6 packet in the first forwarding detection packet.
- the UDP Header packet field represents the User Datagram Protocol (UDP) header in the first forwarding detection packet
- the BFD payload packet field represents the BFD payload in the first forwarding detection packet
- the field of the PW-ACH packet is represented as a pseudowire associated channel header (PW Associated Channel Header, PW-ACH) in the first forwarding detection packet.
- PW-ACH pseudowire associated channel header
- the label value of the underlying label points to the current node (for example, the third node 130 shown in FIG. 1 ) that receives the first forwarding detection packet.
- the Time To Live (TTL) field in the underlying label can be set to 255, or the value of the TTL field can be set according to the number of label switching that occurs in the actual forwarding path. It is not specifically limited.
- the packet format of the first forwarding detection packet may be one of the following:
- " only means to separate each message field, and does not have a special meaning.
- the outer layer IPv6 Header packet field is represented as the outer layer IPv6 packet header in the first forwarding detection packet
- the inner layer IPv6 Header packet field is represented as the first forwarding detection packet.
- the UDP Header packet field represents the UDP packet header in the first forwarding detection packet
- the BFD payload packet field represents the BFD payload in the first forwarding detection packet
- the SRH packet field represents is a segment routing header (Segment Routing Header, SRH) in the first forwarding detection packet
- the PW-ACH packet field is represented as the PW-ACH packet header in the first forwarding detection packet.
- the SRH in the above message format (4), the SRH in the message format (6), and the SRH in the message format (8) can be replaced with other similar message extension headers according to the actual situation , which is not specifically limited in this embodiment.
- the value of the destination address field in the inner IPv6 Header packet field is set to 0:0:0:0:0 :FFFF: The address value in the range of 7F00/104, so that the first forwarding detection packet can be terminated when it reaches the destination node and will not continue to be forwarded.
- the value of the Hop Limit field in the outer IPv6 header can be set to 255.
- Step S200 converting the first forwarding detection packet to obtain a second forwarding detection packet, wherein the packet format of the second forwarding detection packet matches the transmission rule of the second network.
- the first forwarding detection packet may be converted into a second forwarding detection packet whose packet format matches the transmission rules of the second network, thereby It is convenient that the second forwarding detection packet can be forwarded to the second network in the subsequent steps, so as to realize BFD detection or S-BFD detection in the state of interworking between heterogeneous networks.
- the header of the first forwarding detection packet that matches the transmission rule of the first network can be removed, and then the packet header that matches the transmission rule of the second network can be encapsulated, so as to realize the detection of the first forwarding.
- the operation of converting the packet into the second forwarding detection packet can be performed.
- the first forwarding detection packet is a BFD packet
- the packet format of the first forwarding detection packet adopts the above-mentioned packet format (1)
- the converted second forwarding detection packet The message format can be any one of the above-mentioned message format (3), message format (4), message format (5) and message format (6).
- the first forwarding detection packet is a BFD packet
- the packet format of the first forwarding detection packet adopts the above-mentioned packet format (2)
- the converted second forwarding detection packet The message format can be the above-mentioned message format (7) or message format (8).
- the first forwarding detection packet is a BFD packet
- the packet format of the first forwarding detection packet adopts the above-mentioned packet format (3), packet format (4), and packet format Any one of (5) and the packet format (6)
- the packet format of the second forwarding detection packet obtained by conversion may be the above-mentioned packet format (1). It is worth noting that when the packet format of the first forwarding detection packet adopts the above-mentioned packet format (5) or packet format (6), the first forwarding detection packet is converted into the second forwarding detection packet.
- the value of the destination address field of the inner IPv6 packet header in the second forwarding detection packet needs to be set to an address value within the range of 0:0:0:0:0:FFFF:7F00/104, so that The second forwarding detection packet can be terminated when it reaches the destination node and will no longer be forwarded.
- the first forwarding detection packet is a BFD packet
- the packet format of the first forwarding detection packet adopts the above-mentioned packet format (7) or packet format (8), then, convert The obtained message format of the second forwarding detection message may be the foregoing message format (2).
- Step S300 sending a second forwarding detection packet to the second network.
- the converted second forwarding detection packet can be forwarded to the second network, so as to realize the heterogeneous network interconnection state.
- BFD detection or S-BFD detection are examples of the first forwarding detection packet.
- the packet processing method can be The first forwarding detection packet is converted to obtain a second forwarding detection packet whose packet format matches the transmission rule of the second network, so that the second forwarding detection packet can be sent to the second network, so as to realize the communication between different networks.
- the transmission of forwarding detection packets such as the transmission of BFD packets or S-BFD packets in the case of intercommunication of different networks, can realize BFD detection or S-BFD detection in the state of intercommunication of heterogeneous networks.
- step S200 converting the first forwarding detection packet to obtain the second forwarding detection packet may include, but is not limited to, the following steps:
- Step S210 according to the first forwarding detection packet and the local forwarding entry, change the packet format of the first forwarding detection packet to obtain a second forwarding detection packet.
- the local forwarding entry may be a label forwarding entry; when the first forwarding detection packet is a packet from the SRv6 network, the local forwarding entry The forwarding table entry for the local segment identifies the forwarding table entry.
- the re-encapsulated packet format may be determined according to the first forwarding detection packet and the local forwarding entry, and then the packet format of the first forwarding detection packet is changed to the re-encapsulated packet. The following message format is obtained, thereby obtaining the second forwarding detection message.
- the packet format of the first forwarding detection packet can be changed according to the first forwarding detection packet and the local forwarding entry to obtain the second forwarding detection packet matching the transmission rule of the second network, therefore It can realize the transmission of forwarding detection packets in the case of intercommunication of different networks, such as the transmission of BFD packets or S-BFD packets in the case of intercommunication of different networks, so as to realize BFD detection or S-BFD in the intercommunication state of heterogeneous networks. BFD detection.
- step S210 may include, but is not limited to, the following steps:
- Step S211 according to the label forwarding entry and the label value in the bottom label field of the first MPLS label stack, obtain the segment identifier corresponding to the label value;
- Step S212 changing the message format of the first forwarding detection message to the first target message format matching the transmission rule of the SRv6 network;
- Step S213 filling the segment identifier into the first target message format to obtain a second forwarding detection message.
- the label value in the bottom label field of the first MPLS label stack points to the current node (for example, the third node 130 shown in FIG. 1 ) that receives the first forwarding detection packet.
- the label corresponding to the label value can be obtained in the label forwarding entry.
- change the message format of the first forwarding detection message to the first target message format that matches the transmission rule of the SRv6 network, and then fill the segment ID into the first target message format, so that you can A second forwarding detection packet is obtained.
- changing the packet format of the first forwarding detection packet to the first target packet format matching the transmission rule of the SRv6 network may be to first remove the first MPLS label stack in the first forwarding detection packet. , and then encapsulate the outer IPv6 packet header, so as to obtain the first target packet format matching the transmission rule of the SRv6 network. It should be noted that, when the outer layer IPv6 packet header is encapsulated, whether the SRH needs to be carried may also be selected according to a local policy, which is not specifically limited in this embodiment.
- the segment identifier can be filled into the destination address field in the outer layer IPv6 packet header; If the message format includes the outer IPv6 header and the SRH, the segment identifier needs to be filled into the destination address field in the outer IPv6 header and the SRH respectively.
- a first TTL field may be added to the first packet extension header. to carry the TTL value corresponding to the number of network domains that the service passes through.
- a Service TTL TLV may be added to the SRH as the first TTL field.
- the structure of the Service TTL TLV is shown in Figure 5.
- the Service TTL TLV includes the following field structure:
- Type occupies 8 bits, indicating that this TLV is Service TTL TLV;
- Length occupies 8 bits, indicating the length of this TLV without the Type field and Length field;
- TTL occupies 8 bits, indicating the TTL value of the logically last segment in the SRH to identify itself.
- the value of the TTL field in the Service TTL TLV will not change unless the packet reaches the node corresponding to the logically last segment identifier in the SRH. If the segment identifies the corresponding node, the value of the TTL field in the Service TTL TLV will be decremented by one. At this time, the node will read the value of the TTL field and perform further processing. For example, when it is confirmed that the value of the TTL field is 0 , it is not allowed to continue forwarding the packet.
- the first target packet format includes an outer IPv6 packet header and a first packet extension header (eg SRH), and the first packet extension header includes the above-mentioned newly added first TTL field.
- step S213 may include, but is not limited to, the following steps:
- the segment identifier can be filled into the first outer layer IPv6 respectively.
- the packet header and the first packet extension header are subtracted by one from the TTL value in the underlying label field and then filled into the first TTL field, thereby obtaining a second forwarding detection packet.
- the third node 130 may, according to the label forwarding entry and the label value in the bottom label field of the first MPLS label stack, The segment identifier corresponding to the label value is obtained. At this time, it means that the first forwarding detection packet has passed through a network domain. Therefore, the TTL value in the underlying label field needs to be decremented by one and then filled into the first TTL field. .
- step S210 may include, but is not limited to, the following steps:
- Step S214 obtaining label information corresponding to the destination address information according to the local segment identifier forwarding entry and the destination address information in the second outer layer IPv6 packet header;
- Step S215 changing the message format of the first forwarding detection message to a second target message format matching the transmission rule of the MPLS network;
- Step S216 filling the label information into the second target packet format to obtain a second forwarding detection packet.
- the destination address information in the second outer layer IPv6 packet header points to the current node that receives the first forwarding detection packet (for example, the third node 130 shown in FIG. 1 ), therefore, the current node receives the
- the information related to the destination can be obtained in the local segment identifier forwarding entry.
- label information corresponding to the address information then change the packet format of the first forwarding detection packet to a second target packet format matching the transmission rules of the MPLS network, and then fill the label information into the second target packet format , so that the second forwarding detection packet can be obtained.
- changing the packet format of the first forwarding detection packet to the second target packet format matching the transmission rule of the MPLS network may be to first remove the second outer layer IPv6 in the first forwarding detection packet.
- the packet header is then encapsulated with an MPLS label stack, so as to obtain a second target packet format matching the transmission rules of the MPLS network.
- the first forwarding detection packet further includes an SRH
- the SRH also needs to be removed.
- a second TTL field may be added to the SRH to carry a TTL value corresponding to the number of network domains that the service needs to pass through.
- a Service TTL TLV as shown in FIG. 5 may be added to the SRH as the second TTL field.
- the TTL value in the second TTL field (ie, the Service TTL TLV as shown in Figure 5) reflects the number of hops in the process of service data transmission.
- BGP Border Gateway Protocol
- LSP Label Switch Path
- the service data when the service data is transmitted from the first node 120 to the third node 130, it can be considered that the service data has passed through one hop.
- the service data When the service data is transmitted from the third node 130 to the second node 140, it can also be considered that the service data has undergone one hop, that is, in the process of the service data being transmitted from the first node 120 to the second node 140, the service data itself
- the number of hops is 2. Therefore, when the first node 120 sends the first forwarding detection packet to the second node 140, the value of the second TTL field may be set to 2.
- the second target packet format includes a second MPLS label stack
- the first forwarding detection packet further includes a second packet extension header (for example, SRH)
- the second packet extension header includes
- step S216 may include, but is not limited to, the following steps:
- the label information is filled into the destination label field in the second MPLS label stack, and the TTL value of the second TTL field is decremented by one and then filled into the TTL field in the destination label field to obtain a second forwarding detection packet.
- the label information corresponding to the destination address information is obtained according to the local segment identifier forwarding entry and the destination address information in the second outer layer IPv6 packet header, the label information can be filled into the second MPLS The destination label field in the label stack, and the TTL value of the second TTL field is decremented by one and then filled into the TTL field in the destination label field, thereby obtaining a second forwarding detection packet.
- the third node 130 may identify the forwarding entry according to the local segment and the destination address in the second outer IPv6 packet header information to obtain the label information corresponding to the destination address information. At this time, it means that the first forwarding detection packet has passed through a network domain. Therefore, the TTL value of the second TTL field needs to be decremented by one and then filled to the destination. TTL field in tag field.
- the packet processing method may further include: Not limited to the following steps:
- the destination port number in the UDP packet header indicates that the payload type of the first forwarding detection packet is a BFD packet or an S-BFD packet, in the UDP packet
- the front of the header encapsulates the inner IPv6 packet header.
- the first forwarding detection packet includes a UDP header, that is, when it is determined that the payload type of the first forwarding detection packet is UDP, and the destination port number in the UDP packet header indicates that the first forwarding detection packet
- the payload is a BFD packet or an S-BFD packet
- the inner IPv6 packet header is encapsulated in front of the UDP packet header.
- the value of the destination address field in the inner IPv6 header can be set to 0:0:0:0:0:0 The address value in the range of :FFFF:7F00/104, so that the second forwarding detection packet obtained in the subsequent steps can be terminated when it reaches the destination node and will no longer be forwarded. It should be noted that setting the value of the destination address field in the inner IPv6 packet header to an address value in the range of 0:0:0:0:FFFF:7F00/104 is stipulated in the RFC5884 standard. There is no description here.
- the first forwarding detection packet includes a UDP header according to the different packet formats adopted by the first forwarding detection packet. For example, when the first forwarding detection packet carries an SRH, it can be judged by the value of the Next Header field in the SRH whether the UDP packet header is included. When the value of the Next Header field in the SRH is 17 (the value specified by the existing standard) ), which indicates that the encapsulation header of the next layer of the SRH is a UDP packet header. Therefore, it can be determined that the first forwarding detection packet includes a UDP packet header.
- the first forwarding detection packet when the first forwarding detection packet does not carry SRH, it can be judged by the value of the Next Header field in the outer IPv6 packet header whether the UDP packet header is included.
- the value of the field is 17 (the value specified by the existing standard), which means that the encapsulation header at the next layer of the outer IPv6 packet header is the UDP packet header. Therefore, it can be determined that the first forwarding detection packet includes the UDP packet header. .
- the message processing method may further include, but is not limited to, the following steps:
- Step S400 Acquire first routing information advertised by the first node, where the first node belongs to the first network, the first routing information includes first flag information, and the first flag information indicates that the first node supports parsing the information in the packet. PW control word;
- Step S500 the first sign information in the first routing information is filled to the second routing information corresponding to the first routing information, wherein, the second routing information comprises the mark bit for filling the first sign information;
- Step S600 Advertise the second routing information to the second node, where the second node belongs to the second network.
- the first routing information including the first flag information advertised by the first node when the first routing information including the first flag information advertised by the first node is obtained, it can be determined that the first node can support parsing the PW control word in the packet (the definition reference standard of the PW control word). RFC4385, which is not repeated here), at this time, the first flag information in the first routing information can be filled into the second routing information corresponding to the first routing information, and then the second routing information is advertised to the second node information, so that when the second node acquires and parses the second routing information, it can determine, according to the first flag information, that the first node can support parsing the PW control word in the packet, so that the first node and the Inter-network forwarding detection packets are transmitted between the second nodes, so as to implement BFD detection or S-BFD detection in a state of interworking between heterogeneous networks.
- the first routing information includes the SRv6 SID Information Sub- defined in draft-ietf-bess-srv6-services-05 TLV.
- a flag bit can be added to the SRv6 SID Flags field of the SRv6 SID Information Sub-TLV, marked as C-flag, to indicate notification Whether the first node of the first routing information supports parsing the PW control word in the packet.
- the second routing information includes a corresponding flag bit (for example, the control word flag C-bit defined in the standard RFC8614), therefore, after acquiring the first flag information from the first routing information, you can The first flag information is filled into the flag bit (ie, the control word flag C-bit) of the second routing information, and then the second routing information carrying the first flag information is advertised to the second node.
- the first network is an MPLS network and the second network is an SRv6 network
- the first routing information advertised by the first node includes the control word flag C-bit as defined in the standard RFC8614.
- the word flag C-bit carries the first flag information.
- the flag bit used to fill the first flag information in the second routing information is the newly added flag bit C-flag in the SRv6 SID Flags field of the SRv6 SID Information Sub-TLV. Therefore, after the first flag information is obtained from the first routing information, the first flag information can be filled into the newly added flag bit C-flag of the second routing information, and then the second node is advertised to carry the The second routing information of the first flag information.
- C-flag indicates the PW control word flag. When C-flag is set to 1, it indicates that the first node that advertises the first routing information supports parsing the PW control word in the packet; when C-flag is set to When it is 0, it indicates that the first node that advertises the first routing information does not support parsing the PW control word in the packet.
- the local forwarding entry (such as the local segment identifier forwarding entry) constructed by the local node according to the received routing information , the relevant information about whether the PW control word is supported will be recorded.
- the previous encapsulation header of the PW-ACH may be the third outer IPv6 packet header or The third packet extension header (such as SRH), when the previous encapsulation header of the PW-ACH is the third outer layer IPv6 packet header, the third outer layer IPv6 packet header carries the information used to indicate the third outer layer IPv6 packet.
- the next encapsulation header of the IPv6 packet header is the indication information of the PW-ACH; when the previous encapsulation header of the PW-ACH is the third packet extension header, the third packet extension header carries information for indicating the third packet extension header.
- the next encapsulation header of the three-packet extension header is the indication information of the PW-ACH.
- the previous encapsulation header of the PW-ACH may be the fourth outer IPv6 packet header or the fourth packet extension header (such as SRH), when the previous encapsulation header of the PW-ACH is the fourth outer IPv6 packet header, the fourth outer IPv6 packet header.
- the next encapsulation header of the outer IPv6 packet header is the indication information of the PW-ACH; when the previous encapsulation header of the PW-ACH is the fourth packet extension header, the fourth packet extension header carries information for indicating The next encapsulation header of the fourth packet extension header is the indication information of the PW-ACH.
- an L3VPN link is established between the first user equipment 110 and the second user equipment 150, the L3VPN link spans the SRv6 network and the MPLS network, and the L3VPN link passes through the first node in turn 120, a third node 130 and a second node 140, wherein the first node 120 is located in the SRv6 network, the second node 140 is located in the MPLS network, and the third node 130 is located between the SRv6 network and the MPLS network to implement the SRv6 network and the MPLS network. Interworking of MPLS networks.
- the first node 120 allocates a VPN segment identifier of the END.DX4 type (denoted as sid_dx4_ce1) to the first user equipment 110, and the first node 120 advertises the VPN segment identifier to the third node 130 along with the first BGP route, and the first node 120 advertises the VPN segment identifier to the third node 130 along with the first BGP route.
- the third node 130 redistributes a VPN label (referred to as label_br_100) for the first BGP route, and advertises the VPN label to the second node 140 along with the second BGP route.
- label_br_100 a VPN label for the first BGP route
- a VPN LSP from the second node 140 to the first node 120 may be established between a node 120 and the second node 140.
- the second node 140 allocates a VPN label of type END.DX4 (marked as label_ce2) to the second user equipment 150, and the second node 140 advertises the VPN label to the third node 130 along with the third BGP route, the first After receiving the third BGP route, the three-node 130 redistributes the VPN segment identifier (referred to as sid_br_200) for the third BGP route, and advertises the VPN segment identifier to the first node 120 along with the fourth BGP route. Therefore, , a VPN LSP from the first node 120 to the second node 140 may be established between the first node 120 and the second node 140 .
- a VPN LSP from the first node 120 to the second node 140 may be established between the first node 120 and the second node 140 .
- the BFD detection process of the VPN LSP from the first node 120 to the second node 140 is as follows:
- the first node 120 constructs a BFD message and sends the BFD message to the third node 130 .
- the first node 120 may choose to carry the SRH in the BFD packet according to a local policy to optimize the BFD packet.
- the encapsulation information of the BFD packet is: "outer IPv6 Header
- the SRH also contains the Service TTL TLV, and the TTL field of the Service TTL TLV is set to 255.
- the third node 130 When the third node 130 receives the BFD packet and hits the corresponding local segment identifier forwarding entry according to the BFD packet, the third node 130 exchanges the sid_br_200 in the BFD packet into a forwarding entry based on the local segment identifier. label_ce2, and removes the entire outer IPv6 Header of the BFD packet and its SRH. In addition, the third node 130 also determines the payload type of the BFD packet according to the Next Header field in the SRH.
- the encapsulation header is a UDP packet header, and the destination port number in the UDP packet header indicates that the payload is a BFD packet, the inner IPv6 packet header is encapsulated in front of the UDP packet header, and the inner layer IPv6 packet is encapsulated.
- the destination address field of the header is set to an address value in the range 0:0:0:0:0:FFFF:7F00/104.
- the third node 130 encapsulates the outer MPLS label stack, and fills label_ce2 into the lower label in the MPLS label stack, and furthermore, from the SRH carried in the original BFD packet
- the TTL value is obtained from the Service TTL TLV, and the TTL value is decremented by 1 and then assigned to the TTL field of the underlying label.
- the third node 130 obtains the encapsulation information from the outside to the inside as "MPLS label stack
- the second node 140 parses the new BFD message, obtains the BFD payload of the inner layer, and executes the BFD processing flow.
- the BFD detection process of the VPN LSP from the second node 140 to the first node 120 is as follows:
- the second node 140 constructs a BFD message and sends the BFD message to the third node 130 .
- the encapsulation information of the BFD packet is: "MPLS label stack
- the third node 130 When the third node 130 receives the BFD packet and hits the corresponding label forwarding entry according to the BFD packet, the third node 130 exchanges label_br_100 in the BFD packet with sid_dx4_ce1 according to the label forwarding entry.
- the third node 130 can choose to carry the SRH in the BFD packet according to the local policy to optimize the BFD packet, for example, the removal destination address is in the range of 0:0:0:0:0:FFFF:7F00/104 Inner IPv6 Header, that is, convert the original packet format "MPLS Label Stack
- the removal destination address is in the range of 0:0:0:0:0:FFFF:7F00/104 Inner IPv6 Header, that is, convert the original packet format "MPLS Label Stack
- the Next Header field in the SRH is set to 17 to indicate the following
- the first layer of encapsulation header is the UDP Header.
- the third node 130 also obtains the TTL value from the bottom label of the MPLS label stack of the original BFD packet, and decrements the TTL value by 1 and stores it in the Service TTL TLV of the SRH. At this time, the third node 130 obtains a new BFD packet, and then the third node 130 sends the new BFD packet to the first node 120 .
- the first node 120 parses the new BFD message, obtains the BFD payload of the inner layer, and executes the BFD processing flow.
- a PW LSP link is established between the first user equipment 110 and the second user equipment 150, the PW LSP link spans the SRv6 network and the MPLS network, and the PW LSP link passes through the The first node 120, the third node 130 and the second node 140, wherein the first node 120 is located in the SRv6 network, the second node 140 is located in the MPLS network, and the third node 130 is located between the SRv6 network and the MPLS network to achieve Interworking between SRv6 networks and MPLS networks.
- the BFD detection process of the PW LSP from the first node 120 to the second node 140 is as follows:
- the first node 120 constructs a BFD message and sends the BFD message to the third node 130 .
- the encapsulation information of the BFD packet is from outside to inside: "outer IPv6 Header
- the PW LSP from the first node 120 to the second node 140 is formed by splicing two paths, one of which is from the first node 120 to the second node 140.
- One node 120 to the third node 130, the other path is from the third node 130 to the second node 140, therefore, the TTL field in the Service TTL TLV can be set to 2.
- the third node 130 converts the original packet format "outer IPv6 Header
- the second node 140 parses the new BFD packet and learns that the TTL field of the bottom label in the MPLS label stack is set to 1. At this time, the second node 140 determines The new BFD packet is not an ordinary data packet, so the new BFD packet is not forwarded, but the inner BFD payload in the new BFD packet is obtained, and the BFD processing process is performed.
- an embodiment of the present application also provides a node, the node includes: a memory, a processor, and a computer program stored on the memory and executable on the processor.
- the processor and memory may be connected by a bus or otherwise.
- the memory can be used to store non-transitory software programs and non-transitory computer-executable programs.
- the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
- the memory may include memory located remotely from the processor, which may be connected to the processor through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- the node in this embodiment may be applied as the third node 130 in the embodiment shown in FIG. 1 , and the node in this embodiment can form a part of the network topology in the embodiment shown in FIG. 1 , These embodiments all belong to the same inventive concept, so these embodiments have the same realization principle and technical effect, and will not be described in detail here.
- the non-transitory software programs and instructions required to implement the message processing method of the above embodiment are stored in the memory, and when executed by the processor, the message processing method in the above embodiment is executed, for example, the above-described FIG. 2 is executed.
- method steps S100 to S300 in FIG. 3 method steps S210 in FIG. 3 , method steps S211 to S213 in FIG. 4 , method steps S214 to S216 in FIG. 6 , method steps S400 to S600 in FIG. 7 .
- an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by the above-mentioned
- the execution of a processor in the node embodiment can cause the above-mentioned processor to execute the packet processing method in the above-mentioned embodiment, for example, to execute the above-described method steps S100 to S300 in FIG. 2 , method steps S210 in FIG. 3 , Method steps S211 to S213 in FIG. 4 , method steps S214 to S216 in FIG. 6 , and method steps S400 to S600 in FIG. 7 .
- the embodiments of the present application include: receiving a first forwarding detection packet from a first network, wherein the packet format of the first forwarding detection packet matches a transmission rule of the first network; converting the first forwarding detection packet to obtain a second forwarding detection packet Forwarding the detection packet, wherein the packet format of the second forwarding detection packet matches the transmission rule of the second network; and sending the second forwarding detection packet to the second network.
- the packet format is converted according to the first forwarding detection packet A second forwarding detection packet matching the transmission rule of the second network, and then sending the second forwarding detection packet to the second network, realizing the transmission of the forwarding detection packet in the case of intercommunication of different networks, for example, in the case of intercommunication of different networks
- BFD detection or S-BFD detection in the state of interworking of heterogeneous networks can be implemented.
- Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer.
- communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Multimedia (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种报文处理方法、节点及计算机可读存储介质。其中,报文处理方法包括:接收来自第一网络的第一转发检测报文,其中,第一转发检测报文的报文格式匹配第一网络的传输规则(S100);根据第一转发检测报文转换得到第二转发检测报文,其中,第二转发检测报文的报文格式匹配第二网络的传输规则(S200);向第二网络发送第二转发检测报文(S300)。
Description
相关申请的交叉引用
本申请基于申请号为202011494770.8、申请日为2020年12月17日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本申请实施例涉及但不限于通信技术领域,尤其涉及一种报文处理方法、节点及计算机可读存储介质。
在当前的标准草案中,如RFC5881和RFC5883,分别定义了IP网络中的单跳双向转发检测(Bidirectional Forwarding Detection,BFD)机制与多跳BFD机制;RFC5884定义了多协议标签交换(Multi-Protocol Label Switching,MPLS)网络的标签交换路径(Label Switched Path,LSP)的BFD机制;RFC5885定义了伪线(Pseudowire,PW)的BFD机制;RFC7881定义IP网络或MPLS网络的无缝双向转发检测(Seamless Bidirectional Forwarding Detection,S-BFD)机制;RFC7885定义了PW的S-BFD机制。即是说,当前的标准草案仅涉及单个网络的BFD检测或S-BFD检测,而针对异构网络互通状态下的BFD检测或S-BFD检测,当前并没有相关的技术方案,因此,根据当前的相关的技术方案,无法实现异构网络互通状态下的BFD检测或S-BFD检测。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请实施例提供了一种报文处理方法、节点及计算机可读存储介质。
第一方面,本申请实施例提供了一种报文处理方法,包括:接收来自第一网络的第一转发检测报文,其中,所述第一转发检测报文的报文格式匹配所述第一网络的传输规则;根据所述第一转发检测报文转换得到第二转发检测报文,其中,所述第二转发检测报文的报文格式匹配第二网络的传输规则;向所述第二网络发送所述第二转发检测报文。
第二方面,本申请实施例还提供了一种节点,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上第一方面所述的报文处理方法。
第三方面,本申请实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如上所述的报文处理方法。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。
图1是本申请一个实施例提供的用于执行报文处理方法的网络拓扑的示意图;
图2是本申请一个实施例提供的报文处理方法的流程图;
图3是本申请另一实施例提供的报文处理方法中转换得到第二转发检测报文的流程图;
图4是本申请另一实施例提供的报文处理方法中得到第二转发检测报文的具体流程图;
图5是本申请一个实施例提供的Service TTL TLV的字段结构的示意图;
图6是本申请另一实施例提供的报文处理方法中得到第二转发检测报文的具体流程图;
图7是本申请另一实施例提供的报文处理方法的流程图;
图8是本申请一个具体示例所提供的用于执行报文处理方法的网络拓扑的示意图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请提供了一种报文处理方法、节点及计算机可读存储介质,针对部署在第一网络和第二网络之间的节点,当该节点从第一网络接收到报文格式匹配第一网络的传输规则的第一转发检测报文,根据该第一转发检测报文转换得到报文格式匹配第二网络的传输规则的第二转发检测报文,而后向第二网络发送该第二转发检测报文,实现了不同网络互通情况下的转发检测报文的传输,例如在不同网络互通情况下的BFD报文或者S-BFD报文的传输,从而能够实现异构网络互通状态下的BFD检测或S-BFD检测。
下面结合附图,对本申请实施例作进一步阐述。
如图1所示,图1是本申请一个实施例提供的用于执行报文处理方法的网络拓扑的示意图。在图1的示例中,该网络拓扑包括依次连接的第一用户设备110、第一节点120、第三节点130、第二节点140和第二用户设备150。其中,第一节点120处于第一网络,第二节点140处于第二网络,第三节点130处于第一网络和第二网络之间用以实现第一网络和第二网络的互通。
第一网络和第二网络均可以为MPLS网络或者SRv6网络,具体地,当第一网络为MPLS网络,则第二网络为SRv6网络;而当第一网络为SRv6网络,则第二网络为MPLS网络。
从第一节点120通过第三节点130至第二节点140,或者从第二节点140通过第三节点130至第一节点120,可以建立有三层虚拟私有网络(Layer 3 Virtual Private Networks,L3VPN)链路、二层虚拟私有网络(Layer 2 Virtual Private Network,L2VPN)链路或者以太虚拟私有网络(Ehternet Virtual Private Network,EVPN)链路等通信链路。
第一节点120、第三节点130和第二节点140均可以是路由器或者交换机等网络设备,能够对报文进行转发。在第一节点120中,可以将数据报文封装成匹配第一网络的传输规则 的报文格式,从而使得数据报文能够在第一网络中传输;在第三节点130中,可以将来自第一节点120的数据报文重新封装成匹配第二网络的传输规则的报文格式,从而使得重新封装后的数据报文能够在第二网络中传输;在第二节点140中,可以对来自第三节点130的数据报文进行相关的处理,例如,当第二节点140为目的节点,第二节点140可以对来自第三节点130的数据报文的载荷进行处理。
本申请实施例描述的网络拓扑以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着网络拓扑的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本领域技术人员可以理解的是,图1中示出的拓扑结构并不构成对本申请实施例的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
基于上述网络拓扑的结构,提出本申请的报文处理方法的各个实施例。
如图2所示,图2是本申请一个实施例提供的报文处理方法的流程图,该报文处理方法可以应用于如图1所示网络拓扑中的第三节点130,该报文处理方法包括但不限于有步骤S100、步骤S200和步骤S300。
步骤S100,接收来自第一网络的第一转发检测报文,其中,第一转发检测报文的报文格式匹配第一网络的传输规则。
需要说明的是,第一转发检测报文可以为BFD报文或者S-BFD报文,而且,第一转发检测报文的报文格式可以有多种实施方式,根据实际应用情况而定,本实施例对此并不作具体限定。
下面以具体示例对第一转发检测报文的报文格式进行说明。
假设第一网络为MPLS网络,第一转发检测报文为BFD报文,则第一转发检测报文的报文格式可以为如下之一:
(1)MPLS标签栈|内层IPv6 Header|UDP Header|BFD payload
(2)MPLS标签栈|PW-ACH|BFD payload
需要说明的是,在上述报文格式中,符号“|”仅表示分隔各个报文字段,并不含有特殊含义。另外,在上述报文格式中,MPLS标签栈报文字段表示为第一转发检测报文中的MPLS标签栈,内层IPv6 Header报文字段表示为第一转发检测报文中的内层IPv6报文头,UDP Header报文字段表示为第一转发检测报文中的用户数据报协议(User Datagram Protocol,UDP)报文头,BFD payload报文字段表示为第一转发检测报文中的BFD载荷,PW-ACH报文字段表示为第一转发检测报文中的伪线关联通道头(PW Associated Channel Header,PW-ACH)。
值得注意的是,第一转发检测报文的MPLS标签栈报文字段中,底层标签的标签值指向接收到该第一转发检测报文的当前节点(例如图1所示的第三节点130),并且,该底层标签中的生存时间(Time To Live,TTL)字段可设置为255,或者,该TTL字段的值可根据实际转发路径中发生的标签交换次数而进行设置,本实施例对此并不作具体限定。
假设第一网络为SRv6网络,第一转发检测报文为BFD报文,则第一转发检测报文的报文格式可以为如下之一:
(3)外层IPv6 Header|内层IPv6 Header|UDP Header|BFD payload
(4)外层IPv6 Header|SRH|内层IPv6 Header|UDP Header|BFD payload
(5)外层IPv6 Header|UDP Header|BFD payload
(6)外层IPv6 Header|SRH|UDP Header|BFD payload
(7)外层IPv6 Header|PW-ACH|BFD payload
(8)外层IPv6 Header|SRH|PW-ACH|BFD payload
需要说明的是,在上述报文格式中,符号“|”仅表示分隔各个报文字段,并不含有特殊含义。另外,在上述报文格式中,外层IPv6 Header报文字段表示为第一转发检测报文中的外层IPv6报文头,内层IPv6 Header报文字段表示为第一转发检测报文中的内层IPv6报文头,UDP Header报文字段表示为第一转发检测报文中的UDP报文头,BFD payload报文字段表示为第一转发检测报文中的BFD载荷,SRH报文字段表示为第一转发检测报文中的分段路由头(Segment Routing Header,SRH),PW-ACH报文字段表示为第一转发检测报文中的PW-ACH报文头。
需要说明的是,上述报文格式(4)中的SRH、报文格式(6)中的SRH和报文格式(8)中的SRH,可以根据实际情况替换为其他的类似的报文扩展头,本实施例对此并不作具体限定。
值得注意的是,当第一转发检测报文包含有内层IPv6 Header报文字段时,该内层IPv6 Header报文字段中的目的地址字段的值,设置为0:0:0:0:0:FFFF:7F00/104范围内的地址值,使得第一转发检测报文在到达目的节点时能够终结而不再继续转发。此外,外层IPv6报文头中的Hop Limit字段的数值可以设置为255。
步骤S200,根据第一转发检测报文转换得到第二转发检测报文,其中,第二转发检测报文的报文格式匹配第二网络的传输规则。
需要说明的是,当接收到来自第一网络的第一转发检测报文后,可以将第一转发检测报文转换成报文格式匹配第二网络的传输规则的第二转发检测报文,从而便于后续步骤中可以将该第二转发检测报文转发至第二网络,以实现异构网络互通状态下的BFD检测或S-BFD检测。
需要说明的是,可以将第一转发检测报文中匹配第一网络的传输规则的报文头移除,然后封装上匹配第二网络的传输规则的报文头,从而实现将第一转发检测报文转换成第二转发检测报文的操作。
假设第一网络为MPLS网络,第一转发检测报文为BFD报文,并且第一转发检测报文的报文格式采用上述报文格式(1),那么,转换得到的第二转发检测报文的报文格式可以为上述的报文格式(3)、报文格式(4)、报文格式(5)和报文格式(6)中的任何一个。
假设第一网络为MPLS网络,第一转发检测报文为BFD报文,并且第一转发检测报文的报文格式采用上述报文格式(2),那么,转换得到的第二转发检测报文的报文格式可以为上述的报文格式(7)或报文格式(8)。
假设第一网络为SRv6网络,第一转发检测报文为BFD报文,并且第一转发检测报文的报文格式采用上述的报文格式(3)、报文格式(4)、报文格式(5)和报文格式(6)中的任何一个,那么,转换得到的第二转发检测报文的报文格式可以为上述的报文格式(1)。值得注意的是,当第一转发检测报文的报文格式采用上述的报文格式(5)或报文格式(6)时,在将第一转发检测报文转换成第二转发检测报文的过程中,需要将第二转发检测报文中的内层IPv6报文头的目的地址字段的值设置为0:0:0:0:0:FFFF:7F00/104范围内的地址值,使得第 二转发检测报文能够在到达目的节点时可以被终结而不再继续转发。
假设第一网络为SRv6网络,第一转发检测报文为BFD报文,并且第一转发检测报文的报文格式采用上述的报文格式(7)或报文格式(8),那么,转换得到的第二转发检测报文的报文格式可以为上述的报文格式(2)。
步骤S300,向第二网络发送第二转发检测报文。
需要说明的是,当将第一转发检测报文转换成第二转发检测报文后,即可将转换得到的第二转发检测报文转发至第二网络,从而实现异构网络互通状态下的BFD检测或S-BFD检测。
通过采用包括有上述步骤S100、步骤S200和步骤S300的报文处理方法,使得在从第一网络接收到报文格式匹配第一网络的传输规则的第一转发检测报文的情况下,能够根据该第一转发检测报文转换得到报文格式匹配第二网络的传输规则的第二转发检测报文,从而能够向第二网络发送该第二转发检测报文,实现在不同网络互通情况下的转发检测报文的传输,例如在不同网络互通情况下的BFD报文或者S-BFD报文的传输,从而能够实现异构网络互通状态下的BFD检测或S-BFD检测。
在一实施例中,如图3所示,步骤S200中的根据第一转发检测报文转换得到第二转发检测报文,可以包括但不限于有以下步骤:
步骤S210,根据第一转发检测报文和本地的转发表项,更改第一转发检测报文的报文格式,得到第二转发检测报文。
需要说明的是,当第一转发检测报文为来自MPLS网络的报文时,本地的转发表项可以为标签转发表项;当第一转发检测报文为来自SRv6网络的报文时,本地的转发表项可以为本地段标识转发表项。当接收第一转发检测报文后,可以先根据第一转发检测报文和本地的转发表项确定重新封装后的报文格式,然后更改第一转发检测报文的报文格式为该重新封装后的报文格式,从而得到第二转发检测报文。
需要说明的是,由于可以根据第一转发检测报文和本地的转发表项而更改第一转发检测报文的报文格式以得到匹配第二网络的传输规则的第二转发检测报文,因此能够实现不同网络互通情况下的转发检测报文的传输,例如在不同网络互通情况下的BFD报文或者S-BFD报文的传输,从而能够实现异构网络互通状态下的BFD检测或S-BFD检测。
在一实施例中,当第一网络为MPLS网络,第二网络为SRv6网络,此时,第一转发检测报文包括有第一MPLS标签栈,而本地的转发表项为标签转发表项。在这种情况下,如图4所示,步骤S210可以包括但不限于有以下步骤:
步骤S211,根据标签转发表项和第一MPLS标签栈的底层标签字段中的标签值,得到与标签值对应的段标识;
步骤S212,将第一转发检测报文的报文格式更改为匹配SRv6网络的传输规则的第一目标报文格式;
步骤S213,将段标识填充至第一目标报文格式,得到第二转发检测报文。
需要说明的是,第一MPLS标签栈的底层标签字段中的标签值指向接收到该第一转发检测报文的当前节点(例如图1所示的第三节点130),因此,在当前节点接收到了第一转发检测报文,并且根据第一MPLS标签栈的底层标签字段中的标签值命中了本地的标签转发表项的情况下,可以在该标签转发表项中获取到与该标签值对应的段标识,接着,将第一转发 检测报文的报文格式更改为匹配SRv6网络的传输规则的第一目标报文格式,然后将该段标识填充至该第一目标报文格式,从而可以得到第二转发检测报文。
需要说明的是,将第一转发检测报文的报文格式更改为匹配SRv6网络的传输规则的第一目标报文格式,可以为先移除第一转发检测报文中的第一MPLS标签栈,然后封装上外层IPv6报文头,从而得到匹配SRv6网络的传输规则的第一目标报文格式。需要说明的是,在封装上外层IPv6报文头时,还可以根据本地策略选择是否需要携带SRH,本实施例对此并不作具体限定。
需要说明的是,在第一目标报文格式仅包括外层IPv6报文头的情况下,可以将该段标识填充至该外层IPv6报文头中的目的地址字段;而在第一目标报文格式包括外层IPv6报文头和SRH的情况下,则需要将该段标识分别填充至该外层IPv6报文头中的目的地址字段和该SRH中。
在一实施例中,在第一目标报文格式包括外层IPv6报文头和第一报文扩展头(例如SRH)的情况下,可以在第一报文扩展头中新增第一TTL字段以携带与业务所经过的网络域的个数相对应的TTL值。例如,可以在SRH中新增一个Service TTL TLV作为该第一TTL字段。该Service TTL TLV的结构如图5所示,在图5中,该Service TTL TLV包括有如下字段结构:
Type:占8比特,表示本TLV为Service TTL TLV;
Length:占8比特,表示不包括Type字段和Length字段的本TLV的长度;
TTL:占8比特,表示SRH中逻辑上最后一个段标识自身的TTL值。
需要说明的是,除非报文到达了与SRH中逻辑上最后一个段标识对应的节点,Service TTL TLV中的TTL字段的值不会发生变化,而当报文到达了与SRH中逻辑上最后一个段标识对应的节点,则Service TTL TLV中的TTL字段的值会减一,此时,该节点会读取该TTL字段的值并做进一步的处理,例如,当确认该TTL字段的值为0,则不允许继续转发该报文。
需要说明的是,通过在SRH(或者其他类似的报文扩展头)中新增一个第一TTL字段(即Service TTL TLV)以携带与业务所经过的网络域的个数相对应的TTL值,能够克服当前的SRv6VPN技术中的缺失携带TTL值的能力的问题。
在一实施例中,在第一目标报文格式包括有外层IPv6报文头和第一报文扩展头(例如SRH),并且第一报文扩展头包括有上述新增的第一TTL字段的情况下,步骤S213可以包括但不限于有以下步骤:
将段标识分别填充至第一外层IPv6报文头和第一报文扩展头,并将底层标签字段中的TTL值减一后填充至第一TTL字段,得到第二转发检测报文。
需要说明的是,当根据标签转发表项和第一MPLS标签栈的底层标签字段中的标签值得到与该标签值对应的段标识后,可以将该段标识分别填充至该第一外层IPv6报文头和该第一报文扩展头,并且将该底层标签字段中的TTL值减一后填充至该第一TTL字段,从而得到第二转发检测报文。
需要说明的是,当第一转发检测报文传输到如图1中的第三节点130时,第三节点130可以根据标签转发表项和第一MPLS标签栈的底层标签字段中的标签值,得到与该标签值对应的段标识,此时,说明第一转发检测报文已经经过了一个网络域,因此,需要将该底层标签字段中的TTL值减一后再填充至该第一TTL字段。
在一实施例中,当第一网络为SRv6网络,第二网络为MPLS网络,此时,第一转发检 测报文包括有第二外层IPv6报文头,而本地的转发表项为本地段标识转发表项。在这种情况下,如图6所示,步骤S210可以包括但不限于有以下步骤:
步骤S214,根据本地段标识转发表项和第二外层IPv6报文头中的目的地址信息,得到与目的地址信息对应的标签信息;
步骤S215,将第一转发检测报文的报文格式更改为匹配MPLS网络的传输规则的第二目标报文格式;
步骤S216,将标签信息填充至第二目标报文格式,得到第二转发检测报文。
需要说明的是,第二外层IPv6报文头中的目的地址信息指向接收到该第一转发检测报文的当前节点(例如图1所示的第三节点130),因此,在当前节点接收到了第一转发检测报文,并且根据第二外层IPv6报文头中的目的地址信息命中了本地段标识转发表项的情况下,可以在该本地段标识转发表项中获取到与该目的地址信息对应的标签信息,接着,将第一转发检测报文的报文格式更改为匹配MPLS网络的传输规则的第二目标报文格式,然后将该标签信息填充至该第二目标报文格式,从而可以得到第二转发检测报文。
需要说明的是,将第一转发检测报文的报文格式更改为匹配MPLS网络的传输规则的第二目标报文格式,可以为先移除第一转发检测报文中的第二外层IPv6报文头,然后封装上MPLS标签栈,从而得到匹配MPLS网络的传输规则的第二目标报文格式。需要说明的是,当第一转发检测报文还包括有SRH,则在移除第二外层IPv6报文头时,还需要移除该SRH。
在一实施例中,在第一转发检测报文还包括有SRH的情况下,可以在SRH中新增第二TTL字段以携带与业务所需要经过的网络域的个数相对应的TTL值。例如,可以在SRH中新增一个如图5所示的Service TTL TLV作为该第二TTL字段。通过在SRH中新增一个第二TTL字段(如图5所示的Service TTL TLV)以携带与业务所需要经过的网络域的个数相对应的TTL值,能够克服当前的SRv6VPN技术中的缺失携带TTL值的能力的问题。
值得注意的是,第二TTL字段(即如图5所示的Service TTL TLV)中的TTL值,反映了业务数据传输过程中自身的跳数,具体地,该跳数取决于通过边界网关协议(Border Gateway Protocol,BGP)路由报文创建虚拟私有网络(Virtual Private Networks,VPN)标签交换路径(Label Switch Path,LSP)时所经过的锚点数量。例如,在如图1所示的网络拓扑中,假设于第一节点120为业务数据传输的首节点,第二节点140为业务数据传输的尾节点,由于第一节点120处于第一网络,第二节点140处于第二网络,第三节点130处于第一网络和第二网络之间,因此,当业务数据从第一节点120传输至第三节点130时,可以认为业务数据经过了一跳,而当业务数据从第三节点130传输至第二节点140时,也可以认为业务数据经过了一跳,即,在业务数据从第一节点120传输至第二节点140的过程中,业务数据自身的跳数为2,因此,当第一节点120向第二节点140发出第一转发检测报文时,可以将第二TTL字段的值设置为2。
在一实施例中,在第二目标报文格式包括有第二MPLS标签栈,第一转发检测报文还包括有第二报文扩展头(例如SRH),并且第二报文扩展头包括有上述新增的第二TTL字段的情况下,步骤S216可以包括但不限于有以下步骤:
将标签信息填充至第二MPLS标签栈中的目的标签字段,并将第二TTL字段的TTL值减一后填充至目的标签字段中的TTL字段,得到第二转发检测报文。
需要说明的是,当根据本地段标识转发表项和第二外层IPv6报文头中的目的地址信息得 到与该目的地址信息对应的标签信息后,可以将该标签信息填充至该第二MPLS标签栈中的目的标签字段,并且将该第二TTL字段的TTL值减一后填充至该目的标签字段中的TTL字段,从而得到第二转发检测报文。
需要说明的是,当第一转发检测报文传输到如图1中的第三节点130时,第三节点130可以根据本地段标识转发表项和第二外层IPv6报文头中的目的地址信息,得到与该目的地址信息对应的标签信息,此时,说明第一转发检测报文已经经过了一个网络域,因此,需要将该第二TTL字段的TTL值减一后再填充至该目的标签字段中的TTL字段。
在一实施例中,当第一网络为SRv6网络,第二网络为MPLS网络,则在执行步骤S216中的将标签信息填充至第二目标报文格式之前,该报文处理方法还可以包括但不限于有以下步骤:
当确定第一转发检测报文包括有UDP报文头,并且UDP报文头中的目的端口号表示第一转发检测报文的载荷类型为BFD报文或S-BFD报文,在UDP报文头的前面封装内层IPv6报文头。
需要说明的是,在将标签信息填充至第二目标报文格式之前,需要对第一转发检测报文的载荷类型进行判断。当确定第一转发检测报文包括有UDP报文头,即,当判断第一转发检测报文的载荷类型为UDP,并且该UDP报文头中的目的端口号表示该第一转发检测报文的载荷为BFD报文或S-BFD报文,则在UDP报文头的前面封装内层IPv6报文头。需要说明的是,在UDP报文头的前面封装了内层IPv6报文头后,可以将该内层IPv6报文头中的目的地址字段的值,设置为0:0:0:0:0:FFFF:7F00/104范围内的地址值,使得在后续步骤中得到的第二转发检测报文,能够在到达目的节点时可以被终结而不再继续转发。需要说明的是,将内层IPv6报文头中的目的地址字段的值设置为0:0:0:0:0:FFFF:7F00/104范围内的地址值,是RFC5884标准中的规定,此处并不展开描述。
需要说明的是,根据第一转发检测报文所采用的报文格式的不同,判断第一转发检测报文是否包括有UDP报文头,可以有不同的实施方式。例如,当第一转发检测报文携带有SRH,可以通过SRH中的Next Header字段的值判断是否包括有UDP报文头,当SRH中的Next Header字段的值为17(现有标准规定的值),即表明SRH的下一层封装头为UDP报文头,因此,可以确定第一转发检测报文包括有UDP报文头。又如,当第一转发检测报文不携带SRH,则可以通过外层IPv6报文头中的Next Header字段的值判断是否包括有UDP报文头,当外层IPv6报文头中的Next Header字段的值为17(现有标准规定的值),即表明外层IPv6报文头的下一层封装头为UDP报文头,因此,可以确定第一转发检测报文包括有UDP报文头。
在一实施例中,当第一转发检测报文和第二转发检测报文均包括有PW-ACH报文头,例如,第一转发检测报文的报文格式采用上述报文格式(2),第二转发检测报文的报文格式采用上述报文格式(7)或报文格式(8),则在这种情况下,参照图7,在执行步骤S100中的接收来自第一网络的第一转发检测报文之前,该报文处理方法还可以包括但不限于有以下步骤:
步骤S400,获取由第一节点通告的第一路由信息,其中,第一节点归属于第一网络,第一路由信息包括第一标志信息,第一标志信息表征第一节点支持解析报文中的PW控制字;
步骤S500,将第一路由信息中的第一标志信息填充至与第一路由信息对应的第二路由信 息,其中,第二路由信息包括用于填充第一标志信息的标志位;
步骤S600,向第二节点通告第二路由信息,其中,第二节点归属于第二网络。
需要说明的是,当获取到由第一节点通告的包括有第一标志信息的第一路由信息,即可以确定第一节点能够支持解析报文中的PW控制字(PW控制字的定义参考标准RFC4385,此处不再赘述),此时,可以将该第一路由信息中的第一标志信息填充至与第一路由信息对应的第二路由信息,接着,向第二节点通告该第二路由信息,使得第二节点在获取并解析该第二路由信息时,能够根据第一标志信息确定第一节点能够支持解析报文中的PW控制字,从而能够为后续步骤中实现在第一节点与第二节点之间的跨网络的转发检测报文的传输,从而能够实现异构网络互通状态下的BFD检测或S-BFD检测。
需要说明的是,当第一网络为SRv6网络,第二网络为MPLS网络,则在第一路由信息中,包括有在draft-ietf-bess-srv6-services-05中定义的SRv6 SID Information Sub-TLV。为了支持带有PW-ACH报文头的BFD检测或S-BFD检测的实现,可以在SRv6 SID Information Sub-TLV的SRv6 SID Flags字段中新增一个标志位,记为C-flag,以表示通告该第一路由信息的第一节点是否支持解析报文中的PW控制字。此时,在第二路由信息中,包括有相应的标志位(例如在标准RFC8614中定义的控制字标志C-bit),因此,当从第一路由信息中获取到第一标志信息后,可以将该第一标志信息填充至第二路由信息的上述标志位(即控制字标志C-bit)中,然后再向第二节点通告携带了该第一标志信息的第二路由信息。类似的,当第一网络为MPLS网络,第二网络为SRv6网络,则在由第一节点所通告的第一路由信息中,包括有如在标准RFC8614中定义的控制字标志C-bit,该控制字标志C-bit携带第一标志信息。此时,第二路由信息中的用于填充第一标志信息的标志位,则为在SRv6 SID Information Sub-TLV的SRv6 SID Flags字段中新增的标志位C-flag。因此,当从第一路由信息中获取到第一标志信息后,可以将该第一标志信息填充至第二路由信息的新增标志位C-flag中,然后再向第二节点通告携带了该第一标志信息的第二路由信息。
需要说明的是,C-flag表示PW控制字标志,当C-flag设置为1时,表明通告该第一路由信息的第一节点支持解析报文中的PW控制字;当C-flag设置为0时,表明通告该第一路由信息的第一节点不支持解析报文中的PW控制字。
需要说明的是,当完成上述步骤S400、步骤S500和步骤S600关于路由信息的通告的处理后,在本地节点根据接收到的路由信息而构建的本地转发表项(如本地段标识转发表项)中,会记录有是否支持PW控制字的相关信息。
值得注意的是,在第一网络为SRv6网络,并且第一转发检测报文中包括有PW-ACH的情况下,该PW-ACH的前一个封装头可以为第三外层IPv6报文头或者第三报文扩展头(如SRH),当PW-ACH的前一个封装头为第三外层IPv6报文头,则该第三外层IPv6报文头中携带有用于指示该第三外层IPv6报文头的下一个封装头为该PW-ACH的指示信息;当PW-ACH的前一个封装头为第三报文扩展头,则该第三报文扩展头中携带有用于指示该第三报文扩展头的下一个封装头为该PW-ACH的指示信息。
此外,值得注意的是,在第二网络为SRv6网络,并且第二转发检测报文中包括有PW-ACH的情况下,该PW-ACH的前一个封装头可以为第四外层IPv6报文头或者第四报文扩展头(如SRH),当PW-ACH的前一个封装头为第四外层IPv6报文头,则该第四外层IPv6报文头中携带有用于指示该第四外层IPv6报文头的下一个封装头为该PW-ACH的指示信息;当 PW-ACH的前一个封装头为第四报文扩展头,则该第四报文扩展头中携带有用于指示该第四报文扩展头的下一个封装头为该PW-ACH的指示信息。
为了更加清楚的说明报文处理方法的处理流程,下面以具体的示例进行说明。
示例一
在如图8所示的网络拓扑中,第一用户设备110和第二用户设备150之间建立有L3VPN链路,该L3VPN链路跨越SRv6网络和MPLS网络,该L3VPN链路依次通过第一节点120、第三节点130和第二节点140,其中,第一节点120处于SRv6网络内,第二节点140处于MPLS网络内,第三节点130处于SRv6网络和MPLS网络之间用以实现SRv6网络和MPLS网络的互通。
第一节点120为第一用户设备110分配END.DX4类型的VPN段标识(记为sid_dx4_ce1),并且,第一节点120将该VPN段标识随着第一BGP路由通告至第三节点130,第三节点130在接收到该第一BGP路由后,为该第一BGP路由重新分配VPN标签(记为label_br_100),并将该VPN标签随着第二BGP路由通告至第二节点140,因此,第一节点120和第二节点140之间可以建立起一条从第二节点140至第一节点120的VPN LSP。另外,第二节点140为第二用户设备150分配END.DX4类型的VPN标签(记为label_ce2),并且,第二节点140将该VPN标签随着第三BGP路由通告至第三节点130,第三节点130在接收到该第三BGP路由后,为该第三BGP路由重新分配VPN段标识(记为sid_br_200),并将该VPN段标识随着第四BGP路由通告至第一节点120,因此,第一节点120和第二节点140之间可以建立起一条从第一节点120至第二节点140的VPN LSP。
基于上述网络情况,从第一节点120至第二节点140的VPN LSP的BFD检测流程如下:
在第一节点120中:
第一节点120构建BFD报文,并将该BFD报文发送至第三节点130。第一节点120在构建BFD报文的过程中,可以根据本地策略选择在该BFD报文中携带SRH以对该BFD报文进行优化。该BFD报文的封装信息从外至内依次为:“外层IPv6 Header|SRH|UDP Header|BFD payload”,其中,外层IPv6 Header的目的地址字段设置为第一VPN段标识,其值为sid_br_200,并且,该第一VPN段标识也作为单个元素填充于SRH中逻辑上最后一个段标识字段内。另外,SRH还包含有Service TTL TLV,该Service TTL TLV的TTL字段设置为255。
在第三节点130中:
当第三节点130接收到该BFD报文,并且根据该BFD报文命中相应的本地段标识转发表项,则第三节点130根据本地段标识转发表项将该BFD报文中的sid_br_200交换成label_ce2,并将该BFD报文的整个外层IPv6 Header及其SRH移除,另外,第三节点130还根据SRH中的Next Header字段判断该BFD报文的载荷类型,当确定SRH的下一层封装头为UDP报文头,并且UDP报文头中的目的端口号表示载荷为BFD报文,则在UDP报文头的前面封装上内层IPv6报文头,并将该内层IPv6报文头的目的地址字段设置为0:0:0:0:0:FFFF:7F00/104范围内的地址值。此外,第三节点130在封装上内层IPv6报文头后,封装外层的MPLS标签栈,并将label_ce2填充至该MPLS标签栈中的底层标签,而且,从原BFD报文的SRH所携带的Service TTL TLV中获取TTL值,将该TTL值减1后赋值到该底层标签的TTL字段中,此时,第三节点130获得封装信息从外至内依次为“MPLS标签栈|内层IPv6 Header|UDP Header|BFD payload”的新的BFD报文,接着,第三节点130将该新的BFD报文发送至第 二节点140。
在第二节点140中:
当第二节点140接收到该新的BFD报文,第二节点140解析该新的BFD报文,得到内层的BFD payload,并执行BFD处理流程。
从第二节点140至第一节点120的VPN LSP的BFD检测流程如下:
在第二节点140中:
第二节点140构建BFD报文,并将该BFD报文发送至第三节点130。该BFD报文的封装信息从外至内依次为:“MPLS标签栈|内层IPv6 Header|UDP Header|BFD payload”,其中,MPLS标签栈的底层标签设置为第一VPN标签,其值为label_br_100,并且,该底层标签的TTL字段设置为255。
在第三节点130中:
当第三节点130接收到该BFD报文,并且根据该BFD报文命中相应的标签转发表项,则第三节点130根据标签转发表项将该BFD报文中的label_br_100交换成sid_dx4_ce1,此时,第三节点130可以根据本地策略选择在BFD报文中携带SRH以对该BFD报文进行优化,例如,移除目的地址处于0:0:0:0:0:FFFF:7F00/104范围内的内层IPv6 Header,即,将原报文格式“MPLS标签栈|内层IPv6 Header|UDP Header|BFD payload”转换成新的报文格式“外层IPv6 Header|SRH|UDP Header|BFD payload”,其中,将外层IPv6 Header的目的地址字段设置为sid_dx4_ce1,并且,也将sid_dx4_ce1填充至SRH中逻辑上最后一个段标识字段内,此外,SRH中的Next Header字段设置为17,用以表示下一层封装头为UDP Header。另外,第三节点130还从原BFD报文的MPLS标签栈的底层标签中获取TTL值,并且将该TTL值减1后保存至SRH的Service TTL TLV中。此时,第三节点130获得了新的BFD报文,接着,第三节点130将该新的BFD报文发送至第一节点120。
在第一节点120中:
当第一节点120接收到该新的BFD报文,第一节点120解析该新的BFD报文,得到内层的BFD payload,并执行BFD处理流程。
示例二
在如图8所示的网络拓扑中,第一用户设备110和第二用户设备150之间建立有PW LSP链路,该PW LSP链路跨越SRv6网络和MPLS网络,该PW LSP链路依次通过第一节点120、第三节点130和第二节点140,其中,第一节点120处于SRv6网络内,第二节点140处于MPLS网络内,第三节点130处于SRv6网络和MPLS网络之间用以实现SRv6网络和MPLS网络的互通。
基于上述网络情况,从第一节点120至第二节点140的PW LSP的BFD检测流程如下:
在第一节点120中:
第一节点120构建BFD报文,并将该BFD报文发送至第三节点130。该BFD报文的封装信息从外至内依次为:“外层IPv6 Header|SRH|PW-ACH|BFD payload”,其中,SRH中包含有Service TTL TLV,该Service TTL TLV中的TTL字段的值可以根据实际转发路径中发生的标签交换次数而设置,例如,在图8中,从第一节点120至第二节点140的PW LSP是由两段路径拼接而成的,其中一个路径为从第一节点120至第三节点130,另一个路径为从第三节点130至第二节点140,因此,该Service TTL TLV中的TTL字段可以设置为2。
在第三节点130中:
当第三节点130接收到该BFD报文,第三节点130将原报文格式“外层IPv6 Header|SRH|PW-ACH|BFD payload”转换成新的报文格式“MPLS标签栈|PW-ACH|BFD payload”,此外,第三节点130从原BFD报文的SRH所携带的Service TTL TLV中获取TTL值,将该TTL值减1后(即等于1)赋值到MPLS标签栈中的底层标签的TTL字段中,此时,第三节点130获得了新的BFD报文,接着,第三节点130将该新的BFD报文发送至第二节点140。
在第二节点140中:
当第二节点140接收到该新的BFD报文,第二节点140解析该新的BFD报文,获知MPLS标签栈中的底层标签的TTL字段被设置为1,此时,第二节点140确定该新的BFD报文不是普通的数据报文,因此不对该新的BFD报文进行转发,而是获取该新的BFD报文中内层的BFD payload,并执行BFD处理流程。
另外,本申请的一个实施例还提供了一种节点,该节点包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序。
处理器和存储器可以通过总线或者其他方式连接。
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
需要说明的是,本实施例中的节点,可以应用为如图1所示实施例中的第三节点130,本实施例中的节点能够构成图1所示实施例中的网络拓扑的一部分,这些实施例均属于相同的发明构思,因此这些实施例具有相同的实现原理以及技术效果,此处不再详述。
实现上述实施例的报文处理方法所需的非暂态软件程序以及指令存储在存储器中,当被处理器执行时,执行上述实施例中的报文处理方法,例如,执行以上描述的图2中的方法步骤S100至S300、图3中的方法步骤S210、图4中的方法步骤S211至S213、图6中的方法步骤S214至S216、图7中的方法步骤S400至S600。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
此外,本申请的一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述节点实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的报文处理方法,例如,执行以上描述的图2中的方法步骤S100至S300、图3中的方法步骤S210、图4中的方法步骤S211至S213、图6中的方法步骤S214至S216、图7中的方法步骤S400至S600。
本申请实施例包括:接收来自第一网络的第一转发检测报文,其中,第一转发检测报文的报文格式匹配第一网络的传输规则;根据第一转发检测报文转换得到第二转发检测报文,其中,第二转发检测报文的报文格式匹配第二网络的传输规则;向第二网络发送第二转发检测报文。根据本申请实施例提供的方案,在从第一网络接收到报文格式匹配第一网络的传输规则的第一转发检测报文的情况下,根据该第一转发检测报文转换得到报文格式匹配第二网 络的传输规则的第二转发检测报文,而后向第二网络发送该第二转发检测报文,实现了不同网络互通情况下的转发检测报文的传输,例如在不同网络互通情况下的BFD报文或者S-BFD报文的传输,从而能够实现异构网络互通状态下的BFD检测或S-BFD检测。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上是对本申请的一些实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请范围的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。
Claims (11)
- 一种报文处理方法,包括:接收来自第一网络的第一转发检测报文,其中,所述第一转发检测报文的报文格式匹配所述第一网络的传输规则;根据所述第一转发检测报文转换得到第二转发检测报文,其中,所述第二转发检测报文的报文格式匹配第二网络的传输规则;向所述第二网络发送所述第二转发检测报文。
- 根据权利要求1所述的方法,其中,所述根据所述第一转发检测报文转换得到第二转发检测报文,包括:根据所述第一转发检测报文和本地的转发表项,更改所述第一转发检测报文的报文格式,得到第二转发检测报文。
- 根据权利要求2所述的方法,其中,所述第一网络为多协议标签交换MPLS网络,所述第二网络为SRv6网络,所述第一转发检测报文包括有第一MPLS标签栈,所述本地的转发表项为标签转发表项;所述根据所述第一转发检测报文和本地的转发表项,更改所述第一转发检测报文的报文格式,得到第二转发检测报文,包括:根据所述标签转发表项和所述第一MPLS标签栈的底层标签字段中的标签值,得到与所述标签值对应的段标识;将所述第一转发检测报文的报文格式更改为匹配SRv6网络的传输规则的第一目标报文格式;将所述段标识填充至所述第一目标报文格式,得到第二转发检测报文。
- 根据权利要求3所述的方法,其中,所述第一目标报文格式包括第一外层IPv6报文头和第一报文扩展头,所述第一报文扩展头携带有第一生存时间TTL字段;所述将所述段标识填充至所述第一目标报文格式,得到第二转发检测报文,包括:将所述段标识分别填充至所述第一外层IPv6报文头和所述第一报文扩展头,并将所述底层标签字段中的TTL值减一后填充至所述第一TTL字段,得到第二转发检测报文。
- 根据权利要求2所述的方法,其中,所述第一网络为SRv6网络,所述第二网络为MPLS网络,所述第一转发检测报文包括有第二外层IPv6报文头,所述本地的转发表项为本地段标识转发表项;所述根据所述第一转发检测报文和本地的转发表项,更改所述第一转发检测报文的报文格式,得到第二转发检测报文,包括:根据所述本地段标识转发表项和所述第二外层IPv6报文头中的目的地址信息,得到与所述目的地址信息对应的标签信息;将所述第一转发检测报文的报文格式更改为匹配MPLS网络的传输规则的第二目标报文格式;将所述标签信息填充至所述第二目标报文格式,得到第二转发检测报文。
- 根据权利要求5所述的报文处理方法,其中,所述第一转发检测报文还包括第二报文扩展头,所述第二报文扩展头携带有第二TTL字段,所述第二目标报文格式包括第二MPLS 标签栈;将所述标签信息填充至所述第二目标报文格式,得到第二转发检测报文,包括:将所述标签信息填充至所述第二MPLS标签栈中的目的标签字段,并将所述第二TTL字段的TTL值减一后填充至所述目的标签字段中的TTL字段,得到第二转发检测报文。
- 根据权利要求5所述的方法,其中,在将所述标签信息填充至所述第二目标报文格式之前,所述方法还包括:当确定所述第一转发检测报文包括有用户数据报协议UDP报文头,并且所述UDP报文头中的目的端口号表示所述第一转发检测报文的载荷类型为双向转发检测BFD报文或无缝双向转发检测S-BFD报文,在所述UDP报文头的前面封装内层IPv6报文头。
- 根据权利要求1所述的报文处理方法,其中,所述第一转发检测报文和所述第二转发检测报文均包括有伪线关联通道头PW-ACH,在接收来自第一网络的第一转发检测报文之前,所述方法还包括:获取由第一节点通告的第一路由信息,其中,所述第一节点归属于所述第一网络,所述第一路由信息包括第一标志信息,所述第一标志信息表征所述第一节点支持解析报文中的PW控制字;将所述第一路由信息中的所述第一标志信息填充至与所述第一路由信息对应的第二路由信息,其中,所述第二路由信息包括用于填充所述第一标志信息的标志位;向第二节点通告所述第二路由信息,其中,所述第二节点归属于所述第二网络。
- 根据权利要求8所述的报文处理方法,其中,所述第一网络为SRv6网络,并且所述第一转发检测报文中所述PW-ACH的前一个封装头为第三外层IPv6报文头,所述第三外层IPv6报文头携带有用于指示所述第三外层IPv6报文头的下一个封装头为所述PW-ACH的指示信息;或者,所述第一网络为SRv6网络,并且所述第一转发检测报文中所述PW-ACH的前一个封装头为第三报文扩展头,所述第三报文扩展头携带有用于指示所述第三报文扩展头的下一个封装头为所述PW-ACH的指示信息;或者,所述第二网络为SRv6网络,并且所述第二转发检测报文中所述PW-ACH的前一个封装头为第四外层IPv6报文头,所述第四外层IPv6报文头携带有用于指示所述第四外层IPv6报文头的下一个封装头为所述PW-ACH的指示信息;或者,所述第二网络为SRv6网络,并且所述第二转发检测报文中所述PW-ACH的前一个封装头为第四报文扩展头,所述第四报文扩展头携带有用于指示所述第四报文扩展头的下一个封装头为所述PW-ACH的指示信息。
- 一种节点,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至9中任意一项所述的报文处理方法。
- 一种计算机可读存储介质,存储有计算机可执行指令,其中,所述计算机可执行指令用于执行权利要求1至9中任意一项所述的报文处理方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011494770.8 | 2020-12-17 | ||
CN202011494770.8A CN114650256A (zh) | 2020-12-17 | 2020-12-17 | 报文处理方法、节点及计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022127586A1 true WO2022127586A1 (zh) | 2022-06-23 |
Family
ID=81990116
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/134529 WO2022127586A1 (zh) | 2020-12-17 | 2021-11-30 | 报文处理方法、节点及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114650256A (zh) |
WO (1) | WO2022127586A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242552A (zh) * | 2022-09-21 | 2022-10-25 | 北京中科网威信息技术有限公司 | 基于ipsec的报文转发方法及装置 |
CN115459873A (zh) * | 2022-08-18 | 2022-12-09 | 清华大学 | 一种应用于网络设备的数据传输方法、存储介质和设备 |
WO2024021479A1 (zh) * | 2022-07-27 | 2024-02-01 | 天翼云科技有限公司 | 一种报文检测方法、装置、电子设备及存储介质 |
WO2024125103A1 (zh) * | 2022-12-13 | 2024-06-20 | 中兴通讯股份有限公司 | 报文处理方法及网络侧设备 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115426135B (zh) * | 2022-08-12 | 2023-12-12 | 中国电信股份有限公司 | 流量检测规则的处理、网络流量的检测方法、装置及设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190238448A1 (en) * | 2018-01-26 | 2019-08-01 | Cisco Technology, Inc. | Seamless bidirectional forwarding detection discriminator based return path determination |
CN110266592A (zh) * | 2019-06-21 | 2019-09-20 | Ut斯达康通讯有限公司 | Srv6网络与ip mpls网络的通信方法及装置 |
CN110830352A (zh) * | 2018-08-07 | 2020-02-21 | 中兴通讯股份有限公司 | 一种vpn跨域的实现方法、装置和边界节点 |
CN112019433A (zh) * | 2019-05-29 | 2020-12-01 | 华为技术有限公司 | 一种报文转发方法和装置 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104253745B (zh) * | 2013-06-29 | 2018-05-29 | 华为技术有限公司 | 一种路由撤销方法和网络设备 |
KR101531412B1 (ko) * | 2014-03-10 | 2015-06-24 | (주)에스엔에이치 | 이 기종 네트워크 장치 간의 운용관리 연동방법 및 연동시스템 |
US9445032B2 (en) * | 2014-03-24 | 2016-09-13 | Broadcom Corporation | Auto-pairing control device |
CN106911571B (zh) * | 2017-02-28 | 2019-08-13 | 烽火通信科技股份有限公司 | 一种基于网络处理器的远端pw bfd描述符学习方法及系统 |
CN108696852B (zh) * | 2018-06-26 | 2021-08-20 | 珠海市杰理科技股份有限公司 | 蓝牙设备连接方法、系统、可读存储介质和蓝牙设备 |
US11038790B2 (en) * | 2019-06-05 | 2021-06-15 | Cisco Technology, Inc. | Failure detections in point-to-multipoint packet-forwarding networks |
CN111490933B (zh) * | 2020-03-31 | 2022-05-24 | 新华三信息安全技术有限公司 | 双向转发检测切换方法及边缘设备 |
-
2020
- 2020-12-17 CN CN202011494770.8A patent/CN114650256A/zh active Pending
-
2021
- 2021-11-30 WO PCT/CN2021/134529 patent/WO2022127586A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190238448A1 (en) * | 2018-01-26 | 2019-08-01 | Cisco Technology, Inc. | Seamless bidirectional forwarding detection discriminator based return path determination |
CN110830352A (zh) * | 2018-08-07 | 2020-02-21 | 中兴通讯股份有限公司 | 一种vpn跨域的实现方法、装置和边界节点 |
CN112019433A (zh) * | 2019-05-29 | 2020-12-01 | 华为技术有限公司 | 一种报文转发方法和装置 |
CN110266592A (zh) * | 2019-06-21 | 2019-09-20 | Ut斯达康通讯有限公司 | Srv6网络与ip mpls网络的通信方法及装置 |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024021479A1 (zh) * | 2022-07-27 | 2024-02-01 | 天翼云科技有限公司 | 一种报文检测方法、装置、电子设备及存储介质 |
CN115459873A (zh) * | 2022-08-18 | 2022-12-09 | 清华大学 | 一种应用于网络设备的数据传输方法、存储介质和设备 |
CN115459873B (zh) * | 2022-08-18 | 2023-05-30 | 清华大学 | 一种应用于网络设备的数据传输方法、存储介质和设备 |
CN115242552A (zh) * | 2022-09-21 | 2022-10-25 | 北京中科网威信息技术有限公司 | 基于ipsec的报文转发方法及装置 |
CN115242552B (zh) * | 2022-09-21 | 2022-12-13 | 北京中科网威信息技术有限公司 | 基于ipsec的报文转发方法及装置 |
WO2024125103A1 (zh) * | 2022-12-13 | 2024-06-20 | 中兴通讯股份有限公司 | 报文处理方法及网络侧设备 |
Also Published As
Publication number | Publication date |
---|---|
CN114650256A (zh) | 2022-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110912795B (zh) | 一种传输控制方法、节点、网络系统及存储介质 | |
WO2022127586A1 (zh) | 报文处理方法、节点及计算机可读存储介质 | |
WO2021063232A1 (zh) | 建立bier转发表项的方法、装置和系统 | |
US7693047B2 (en) | System and method for PE-node protection | |
US10003531B2 (en) | Method for establishing tunnel, method for allocating label, device and network system | |
US20230155932A1 (en) | Multicast traffic transmission method and apparatus, communication node, and storage medium | |
US7633859B2 (en) | Loop prevention technique for MPLS using two labels | |
EP1859586B1 (en) | Loop prevention technique for mpls using service labels | |
US7477593B2 (en) | Loop prevention techniques using encapsulation manipulation of IP/MPLS field | |
JP5189512B2 (ja) | パケット転送方法及びノード装置 | |
US11671352B2 (en) | Message sending method, binding relationship advertising method, apparatus, and storage medium | |
WO2021073357A1 (zh) | 报文处理方法、装置、系统、设备及存储介质 | |
US11563697B2 (en) | Multiple label spaces in a label switched router | |
US9521072B2 (en) | Method and network device for distributing multi-protocol label switching labels | |
US11368564B2 (en) | Packet fragmentation and reassembly | |
WO2023016550A1 (zh) | 一种路由发送方法及设备 | |
EP3942748B1 (en) | Seamless multipoint label distribution protocol (mldp) transport over a bit index explicit replication (bier) core | |
CN102340444B (zh) | 一种身份标识与位置分离的报文封装和转发的方法及系统 | |
WO2022042610A1 (zh) | 信息处理方法、网络控制器、节点及计算机可读存储介质 | |
WO2022188488A1 (zh) | 路径建立方法及其装置、节点、计算机可读存储介质 | |
WO2021077972A1 (zh) | 转发报文的方法、装置及存储介质 | |
WO2023173853A1 (zh) | Bgp路由的发送方法、装置、存储介质及电子装置 | |
WO2022237563A1 (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: 21905515 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.10.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21905515 Country of ref document: EP Kind code of ref document: A1 |