WO2022033034A1 - Oam detection method, device, and system - Google Patents
Oam detection method, device, and system Download PDFInfo
- Publication number
- WO2022033034A1 WO2022033034A1 PCT/CN2021/082058 CN2021082058W WO2022033034A1 WO 2022033034 A1 WO2022033034 A1 WO 2022033034A1 CN 2021082058 W CN2021082058 W CN 2021082058W WO 2022033034 A1 WO2022033034 A1 WO 2022033034A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- packet
- oam
- header
- network device
- detection
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- 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/02—Capturing of monitoring data
- H04L43/028—Capturing of monitoring data by filtering
-
- 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/10—Active monitoring, e.g. heartbeat, ping or trace-route
Definitions
- the present application relates to the field of network communication, and more particularly, to a method for OAM detection, a first network device, a second network device, and a system.
- IP Internet Protocol
- OAM operation, administration and maintenance
- the egress device of the tunnel After receiving an OAM detection packet, the egress device of the tunnel needs to perform corresponding processing according to the type of OAM detection. Therefore, the OAM detection packet sent by the ingress device of the tunnel to the egress device of the tunnel needs to instruct the egress device of the tunnel to perform OAM detection, and the specific type of OAM detection, so that the egress device of the tunnel can forward the relevant OAM detection according to the instruction. action.
- the tunnel header of the OAM detection packet includes OAM detection indication information, where the OAM detection indication information is used to instruct the device to perform OAM detection and a specific type of OAM detection.
- OAM detection indication information is used to instruct the device to perform OAM detection and a specific type of OAM detection.
- the present application provides an OAM detection method, device, and system, which can make the processing of OAM detection packets consistent with the processing of data packets by each device on the packet transmission path except the tunnel egress device.
- a method for OAM detection comprising: a first network device receiving a first packet sent by a second network device via a tunnel, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header and operation management and maintenance OAM message, the second network device is the ingress device of the tunnel, and the first network device is the egress device of the tunnel; the first network device is based on the first The destination address DA of the IPv6 header determines the type of OAM detection; the first network device performs detection according to the type of OAM detection.
- the destination address of the first IPv6 header instructs the egress device (eg, the first network device) of the tunnel to perform OAM detection.
- the tunnel header part, the first IPv6 header and the OAM packet part of the first packet are separated by means of "encapsulation".
- each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the first packet (also called the OAM detection packet), and does not need to process the first IPv6 header and the first IPv6 header after the tunnel header.
- OAM packet so that the processing of the first packet (also referred to as the OAM detection packet) by each device on the packet transmission path except the tunnel egress device is consistent with the processing process of the data packet.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- tunnel header itself may contain an IPv6 header, that is, a tunnel header based on IPv6, but the first IPv6 header described in this document is not an IPv6 header in the tunnel header, but an IPv6 header located between the tunnel header and the OAM packet. head.
- the first packet further includes a User Datagram Protocol UDP header
- the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet
- the method further includes: determining, by the first network device, that the first packet includes the OAM packet according to the destination port number in the UDP header.
- the UDP header and the OAM packet may also be collectively referred to as an OAM packet encapsulated by UDP.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet, and the method further includes: the first network device according to The value of the Next Header field determines that the first packet includes the OAM packet.
- the first packet further includes a third IPv6 header, and the Next Header field of the third IPv6 header is used to indicate that the first packet includes the OAM packet.
- the first packet further includes a third IPv6 header and a UDP header
- the third IPv6 header, the UDP header and the OAM packet may also be collectively referred to as an IP-encapsulated OAM packet.
- the first network device determines that the DA of the first IPv6 header is the unicast IPv6 address of the first network device; the first network device determines according to the first IPv6
- the DA of the header and the forwarding information base FIB determine the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the first network device determines that the DA of the first IPv6 header is a loopback unicast IPv6 address; the first network device determines according to the DA and the first IPv6 header of the first IPv6 header.
- the forwarding information base FIB determines the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the first network device determines that the DA of the first IPv6 header is a multicast IPv6 address; the first network device determines the DA of the first IPv6 header and multicast forwarding according to the DA of the first IPv6 header
- the information base MFIB determines the type of the OAM detection, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the first network device decapsulates the first packet to obtain the OAM packet; the first network device determines the second packet according to the OAM packet message; the first network device sends the second message to the second network device.
- the second packet includes a second IPv6 header
- the destination address DA of the second IPv6 header is the IPv6 address of the second network device
- the second IPv6 header The DA indicates that the second message is an OAM detection response message.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
- a method for OAM detection including: obtaining a first packet by a second network device, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, the destination address DA of the first IPv6 header is used to indicate the type of OAM detection;
- the second network device sends the first packet to the first network device via the tunnel, the second network device is an ingress device of the tunnel, and the first network device is an egress device of the tunnel.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
- the method further includes: receiving, by the second network device, a second packet, where the second packet includes a second IPv6 header, and a destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the DA of the second IPv6 header indicates that the second message is an OAM detection response message; The second packet is processed.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
- a first network device where the first network device is an egress device of a tunnel, and the first network device includes:
- a receiving module configured to receive a first message sent by a second network device via the tunnel, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, so
- the second network device is an ingress device of the tunnel;
- a processing module configured to determine the type of OAM detection according to the destination address DA of the first IPv6 header
- the processing module is further configured to perform detection according to the type of the OAM detection.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet,
- the processing module is further configured to: determine that the first packet includes the OAM packet according to the destination port number in the UDP header.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet
- the processing module is further configured to: determine that the first message includes the OAM message according to the value of the Next Header field.
- the processing module is specifically configured to: determine that the DA of the first IPv6 header is the unicast IPv6 address of the first network device;
- the forwarding information base FIB determines the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the processing module is specifically configured to: determine that the DA of the first IPv6 header is a multicast IPv6 address; determine according to the DA of the first IPv6 header and the multicast forwarding information base MFIB The type of the OAM detection, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the processing module is specifically configured to: decapsulate the first packet to obtain the OAM packet; determine a second packet according to the OAM packet; The second network device sends the second message.
- the second packet includes a second IPv6 header
- the destination address DA of the second IPv6 header is the IPv6 address of the second network device
- the second IPv6 header The DA indicates that the second message is an OAM detection response message.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
- a first network device in a fourth aspect, has a function of implementing the behavior of the first network device in the above method.
- the functions can be implemented based on hardware, and can also be implemented based on hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- the structure of the first network device includes a processor and an interface, and the processor is configured to support the first network device to perform corresponding functions in the above method.
- the interface is used to support the first network device to receive the first packet.
- the first network device may also include a memory for coupling with the processor and storing necessary program instructions and data for the first network device.
- the first network device includes: a processor, a transmitter, a receiver, a random access memory, a read only memory, and a bus.
- the processor is respectively coupled to the transmitter, the receiver, the random access memory and the read only memory through the bus.
- the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the first network device is guided to enter a normal operation state. After the first network device enters the normal operation state, the application program and the operating system are run in the random access memory, so that the processor executes the method in the first aspect or any possible implementation manner of the first aspect.
- a first network device in a fifth aspect, includes: a main control board and an interface board, and may further include a switching network board.
- the first network device is configured to execute the method in the first aspect or any possible implementation manner of the first aspect.
- the first network device includes a module for executing the third aspect or the method in any possible implementation manner of the third aspect.
- a first network device in a sixth aspect, includes a control module and a first forwarding sub-device.
- the first forwarding sub-device includes: an interface board, and further, may also include a switching network board.
- the first forwarding sub-device is configured to perform the function of the interface board in the fifth aspect, and further, may also perform the function of the switching network board in the fifth aspect.
- the control module includes a receiver, a processor, a transmitter, a random access memory, a read-only memory and a bus. Wherein, the processor is respectively coupled to the receiver, the transmitter, the random access memory and the read only memory through the bus.
- the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the control module is guided to enter a normal operation state.
- the application program and the operating system are run in the random access memory, so that the processor performs the function of the main control board in the fifth aspect.
- the first network device may include any number of interfaces, processors or memories.
- a second network device is provided, where the second network device is an ingress device of a tunnel, and the second network device includes:
- the processing module is configured to obtain a first message, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, and the destination address DA of the first IPv6 header is to indicate the type of OAM detection;
- a sending module configured to send the first packet to a first network device via the tunnel, where the first network device is an egress device of the tunnel.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
- the second network device further includes:
- a receiving module configured to receive a second packet, where the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header
- the DA indicates that the second message is an OAM detection response message
- the processing module is further configured to process the second packet according to the DA of the second IPv6 header.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
- a second network device has a function of implementing the behavior of the second network device in the above method.
- the functions can be implemented based on hardware, and can also be implemented based on hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- the structure of the second network device includes a processor and an interface, and the processor is configured to support the second network device to perform the corresponding functions in the above method.
- the interface is used to support the second network device to obtain the first packet.
- the second network device may also include a memory for coupling with the processor that stores necessary program instructions and data for the second network device.
- the second network device includes: a processor, a transmitter, a receiver, a random access memory, a read only memory, and a bus.
- the processor is respectively coupled to the transmitter, the receiver, the random access memory and the read only memory through the bus.
- the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the second network device is guided to enter a normal operation state. After the second network device enters the normal operating state, the application program and the operating system are run in the random access memory, so that the processor executes the method of the second aspect or any possible implementation manner of the second aspect.
- a second network device in a ninth aspect, includes: a main control board and an interface board, and further, may also include a switching network board.
- the second network device is configured to perform the method in the second aspect or any possible implementation manner of the second aspect.
- the second network device includes a module for performing the method in the seventh aspect or any possible implementation manner of the seventh aspect.
- a tenth aspect provides a second network device, where the second network device includes a control module and a first forwarding sub-device.
- the first forwarding sub-device includes: an interface board, and further, may also include a switching network board.
- the first forwarding sub-device is configured to perform the function of the interface board in the ninth aspect, and further, can also perform the function of the switching network board in the ninth aspect.
- the control module includes a receiver, a processor, a transmitter, a random access memory, a read-only memory and a bus. Wherein, the processor is respectively coupled to the receiver, the transmitter, the random access memory and the read only memory through the bus.
- the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the control module is guided to enter a normal operation state.
- the application program and the operating system are run in the random access memory, so that the processor performs the function of the main control board in the ninth aspect.
- the second network device may include any number of interfaces, processors or memories.
- a computer program product comprising: computer program code, when the computer program code is run on a computer, the computer can execute the first aspect or any one of the first aspects. method of execution.
- a twelfth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer program code enables the computer to execute the second aspect or any one of the possibilities of the second aspect method of execution.
- a computer-readable medium stores program codes, which, when the computer program codes are run on a computer, cause the computer to execute the first aspect or any one of the first aspects. possible methods.
- These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
- a computer-readable medium stores program codes, and when the computer program codes are executed on a computer, causes the computer to execute any one of the second aspect or the second aspect above possible methods.
- These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
- a fifteenth aspect provides a chip, the chip includes a processor and a data interface, wherein the processor reads an instruction stored in a memory through the data interface to execute the first aspect or any possible implementation of the first aspect method in method.
- the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
- CPU central processing unit
- MCU microcontroller
- MPU microprocessor
- DSP digital signal processor
- system on chip system on chip
- SoC system on chip
- application-specific integrated circuit application-specific integrated circuit
- FPGA field programmable gate array
- PLD programmable logic device
- a sixteenth aspect provides a chip, which includes a processor and a data interface, wherein the processor reads an instruction stored in a memory through the data interface to execute the second aspect or any possible implementation of the second aspect method in method.
- the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
- CPU central processing unit
- MCU microcontroller
- MPU microprocessor
- DSP digital signal processor
- system on chip system on chip
- SoC system on chip
- application-specific integrated circuit application-specific integrated circuit
- FPGA field programmable gate array
- PLD programmable logic device
- a system for OAM detection includes the above-mentioned first network device and second network device.
- FIG. 1 is a schematic diagram of an application scenario applicable to the embodiment of the present application.
- FIG. 2 is a schematic diagram of a possible scenario provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
- FIG. 4 is a schematic flowchart of an OAM detection method provided by an embodiment of the present application.
- FIG. 5 is a schematic flowchart of another OAM detection method provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of a scenario of STAMP detection provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
- FIG. 8 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
- FIG. 9 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
- FIG. 10 is a schematic diagram of another STAMP detection scenario provided by an embodiment of the present application.
- FIG. 11 is a schematic diagram of a scenario of S-BFD detection provided by an embodiment of the present application.
- FIG. 12 is a schematic diagram of a scenario of Ping detection provided by an embodiment of the present application.
- FIG. 13 is a schematic diagram of a scenario of BFD detection provided by an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a first network device 1400 provided by an embodiment of the present application.
- FIG. 15 is a schematic diagram of a hardware structure of a first network device 2000 according to an embodiment of the present application.
- FIG. 16 is a schematic diagram of a hardware structure of another first network device 2100 according to an embodiment of the present application.
- FIG. 17 is a schematic structural diagram of a second network device 1700 provided by an embodiment of the present application.
- FIG. 18 is a schematic diagram of a hardware structure of a second network device 2200 according to an embodiment of the present application.
- FIG. 19 is a schematic diagram of a hardware structure of another second network device 2400 according to an embodiment of the present application.
- the network architecture and service 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 the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
- references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
- appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
- the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
- At least one means one or more, and “plurality” means two or more.
- “And/or”, which describes the relationship of the associated objects, means that there can be three relationships, for example, A and/or B, which can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural.
- the character “/” generally indicates that the associated objects are an “or” relationship.
- “At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c may represent: a, b, c, ab, ac, bc, or abc, where a, b, and c may be single or multiple .
- OAM Internet Protocol
- OAM operation, administration and maintenance
- the OAM detection may be an internet packet groper (Ping).
- the above OAM detection may be a one-way active measurement, or may also be a two-way active measurement, for example, one-way active measurement protocol (one-way active measurement protocol, OWAMP), two-way active measurement protocol (two-way active measurement protocol, TWAMP) , Simple two-way active measurement protocol (simple two-way active measurement protocol, STAMP).
- the above OAM detection may also be bidirectional forwarding detection (BFD), or seamless bidirectional forwarding detection (S-BFD).
- STAMP may also be referred to as TWAMP Light.
- S-BFD can also be called simple BFD.
- FIG. 1 is a schematic diagram of an application scenario applicable to the embodiment of the present application. As shown in FIG. 1 , the scenario includes: device A, device B, device R1, device R2, and device R3.
- device A serves as the ingress device of the tunnel
- device B serves as the egress device of the tunnel
- Device R1, device R2, and device R3 are devices that forward packets in the tunnel.
- device R1, device R2, and device R3 are used as examples for description in FIG. 1 .
- Device A can send an OAM detection packet to device B along the tunnel (tunnel between device A and device B), where the OAM detection packet is used to detect the connectivity and performance of the tunnel between device A and device B.
- the tunnel is a multi-protocol label switching (MPLS) tunnel, such as an MPLS point-to-point (MPLS P2P) tunnel, or an MPLS point-to-multipoint (MPLS) tunnel.
- MPLS P2P MPLS point-to-point
- MPLS MPLS point-to-multipoint
- MPLS segment routing segment routing, SR-MPLS
- the tunnel is an IP tunnel, such as an internet protocol version 6 (IPv6) tunnel, or a segment routing using ipv6 data plane (SRv6) tunnel, or an IPv6 Segment routing using ipv6 data plane traffic engineering (SRv6-TE) tunnels on the data plane.
- IPv6 internet protocol version 6
- SRv6-TE IPv6 Segment routing using ipv6 data plane traffic engineering
- IP tunnels, IPv6 tunnels, SRv6 tunnels, and SRv6-TE tunnels may generally be point-to-point (P2P) tunnels.
- P2P tunnels for IP/IPv6/SRv6/SRv6-TE may generally be point-to-point (P2P) tunnels.
- the tunnel may also be a point-to-point (P2MP) tunnel, for example, the P2MP tunnel may be a bit indexed explicit replication (BIER) P2MP tunnel, or P2MP tunnel for BIERv6.
- P2MP point-to-point
- BIER bit indexed explicit replication
- the OAM detection packet sent by device A to device B may include: an OAM packet part and a part before the OAM packet.
- the part before the OAM packet in this embodiment of the present application may be referred to as a tunnel header, or an outer layer header, or an outer layer tunnel header, and the part of the OAM packet is referred to as an inner layer OAM packet.
- the OAM message may be an original OAM message, or may be an OAM message encapsulated by the user datagram protocol (UDP), or may be an OAM message encapsulated by IP, which is not covered by this application. Make specific restrictions.
- the OAM packet encapsulated by UDP may include: UDP header and original OAM packet, and the OAM packet encapsulated by IP may include IP header, UDP header and original OAM packet.
- the OAM packet may further include: an IPv6 extension header.
- the IPv6 extension header may be a destination option header (destination option header, DOH), and for another example, the IPv6 extension header may also be a routing header (routing header, RH).
- DOH destination option header
- RH routing header
- the format of the tunnel header is determined according to different tunnel types.
- the tunnel header is the MPLS label stack.
- the tunnel header is an IP/IPv6 header, or an IP/IPv6 header+UDP header, or an IP/IPv6 header+GRE header.
- the tunnel header is an IP/IPv6 header + a segment routing header (segment routing header, SRH).
- the tunnel header is a BIER header.
- the tunnel header is a BIERv6 header.
- the OAM detection packet sent by device A to device B can be expressed in any of the following formats:
- the tunnel type between device A and device B is MPLS P2P tunnel or MPLS P2MP tunnel
- the OAM detection packet includes: ⁇ label stack, OAM packet ⁇ ;
- the tunnel type between device A and device B is an IP/IPv6 tunnel
- the OAM detection packet includes: ⁇ outer IP/IPv6 header, OAM packet ⁇ ;
- the tunnel type between device A and device B is an IP/IPv6 UDP tunnel, and the OAM detection message includes: ⁇ outer IP/IPv6 header, outer UDP header, OAM message ⁇ ;
- the tunnel type between device A and device B is an IP/IPv6 GRE tunnel, and the OAM detection packet includes ⁇ outer IP/IPv6 header, outer GRE header, OAM packet ⁇ ;
- the tunnel type between device A and device B is an SRv6 tunnel, and the OAM detection packet includes ⁇ outer IP/IPv6 header, optional RH header, OAM packet ⁇ ;
- the tunnel type between device A and device B is a BIER tunnel, and the OAM detection packet includes ⁇ BIER header, OAM packet ⁇ ;
- the tunnel type between device A and device B is a BIERv6 tunnel, and the OAM detection packet includes ⁇ BIERv6 header, OAM packet ⁇ .
- device B After receiving the OAM detection packet, device B needs to perform corresponding processing according to the type of OAM detection. Therefore, the OAM detection packet sent by device A to device B needs to instruct device B to perform OAM detection and a specific type of OAM detection, so that device B can perform related forwarding actions of OAM detection according to the instruction.
- the tunnel header of the OAM detection packet includes OAM detection indication information, and the OAM detection indication information is used to instruct device B to perform OAM detection and a specific type of OAM detection.
- OAM detection indication information is used to instruct device B to perform OAM detection and a specific type of OAM detection.
- an additional network function indication needs to be added to the tunnel header of the OAM detection packet. For example, add an endpoint timestamp and SRv6 SID of endpoint timestamp and forward (End.TSF) to the SRH header of the tunnel header of the OAM detection packet as a network function indication to instruct the corresponding device (for example, device B) to perform Relevant forwarding actions detected by OAM.
- End.TSF endpoint timestamp and SRv6 SID of endpoint timestamp and forward
- the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in the outer IPv6 in the destination address field of the header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
- the tunnel header of the OAM detection packet sent by device A to device B needs to include an SRH header, and the SRH header contains both the address of device B and the address of an End.TSF of device B. Address (the address of End.TSF is used as a network function indication to instruct device B to perform the relevant forwarding action of OAM detection).
- device B which is the tunnel egress, needs to process the SRH header in the tunnel header of the OAM detection packets. If device B cannot process the SRH header, device B cannot determine that the received packet is an OAM detection packet, and therefore cannot perform OAM detection.
- the tunnel header of the data packet sent by device A to device B may include an SRH header, and the SRH header includes two SRv6 SIDs, one is The destination address of device B, and the other is the destination address of device R2.
- device R2 will perform the penultimate segment pop (PSP) process, pop the SRH header in the data packet, and pop the SRH header in the data packet according to the destination address of the outer IPv6 header.
- PSP penultimate segment pop
- the tunnel header does not contain the SRH header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
- the tunnel header of the OAM detection packet sent by device A to device B needs to include an SRH header, and the SRH header needs to contain three SRv6 SIDs, which are the destination address of device R2 and device B.
- the destination address the address of an End.TSF of device B.
- the PSP processing cannot be performed before the OAM detection packet reaches device B. Therefore, the tunnel header of the OAM detection packet received by device B also contains an SRH header and the SRH header contains three SRv6 SIDs.
- device B which is the tunnel egress, needs to process the SRH header in the tunnel header of the OAM detection packets. If device B cannot process the SRH header, device B cannot determine that the received packet is an OAM detection packet, and therefore cannot perform OAM detection.
- the tunnel header of the OAM detection packet includes OAM detection indication information, so that in some scenarios, OAM detection occurs on each device except the tunnel egress device on the packet transmission path.
- the embodiment of the present application provides an OAM detection method, which uses the destination address in the IPv6 header after the tunnel header of the OAM detection packet to instruct the egress device (eg, device B) of the tunnel to perform OAM detection.
- the egress device eg, device B
- each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the OAM detection packet, so that each device on the packet transmission path except the tunnel egress device has no effect on the OAM detection packet.
- the processing is the same as the processing of data packets.
- FIG. 4 is a schematic flowchart of an OAM detection method provided by an embodiment of the present application. As shown in FIG. 4, the method may include steps 410-430, and the steps 410-430 will be described in detail below respectively.
- Step 410 The first network device receives, via the tunnel, a first packet sent by the second network device, where the first packet includes a tunnel header, a first IPv6 header, and an OAM packet.
- the second network device is the ingress device of the tunnel, corresponding to the device A above.
- the first network device is the egress device of the tunnel, corresponding to the device B above.
- tunnels between the second network device and the first network device There may be multiple types of tunnels between the second network device and the first network device, which are not limited in this embodiment of the present application. For details, please refer to the description of the tunnel type between the device A and the device B above, which will not be repeated here.
- the first packet sent by the second network device to the first network device via the tunnel may be the above OAM detection packet.
- the first packet may include: a tunnel header, a first IPv6 header, and an OAM packet.
- the format of the tunnel header is determined according to different tunnel types.
- the tunnel header is an MPLS label stack.
- the tunnel header is an IP/IPv6 header, or an IP/IPv6 header+UDP header, or an IP/IPv6 header+GRE header.
- the tunnel header is an IP/IPv6 header + a segment routing header (segment routing header, SRH).
- the tunnel header is a BIER header.
- the tunnel header is a BIERv6 header.
- the tunnel header is a BIERv6 header.
- the first IPv6 header is not the IPv6 header in the tunnel header, but the IPv6 header after the tunnel header.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the OAM packet may be an original OAM packet, or may be an OAM packet encapsulated by UDP, or may be an OAM packet encapsulated by IP.
- the first packet further includes a UDP header.
- the OAM packet as an IP-encapsulated OAM packet as an example, the first packet further includes an IP header.
- the OAM packet please refer to the description of the OAM packet above, which will not be repeated here.
- Step 420 The first network device determines the type of OAM detection according to the destination address DA of the first IPv6 header.
- different destination addresses DA in the first IPv6 header are used to indicate different types of OAM detection.
- the first network device may determine the type of OAM detection according to the destination address DA of the first IPv6 header.
- the first network device may, according to the DA of the first IPv6 header and the forwarding information base (FIB) Determines the type of OAM detection.
- the FIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
- the first network device determines that the DA of the first IPv6 header is a loopback unicast IPv6 address; the first network device determines the DA according to the first IPv6 header and the forwarding information base FIB.
- the type of the OAM detection wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- any address in 0:0:0:0:0:0:FFFF:7F00:0/104 belongs to the "loopback unicast IPv6 address".
- the first network device may determine according to the DA of the first IPv6 header and the multicast forwarding information base (multicast forwarding information base, MFIB) Type of OAM detection.
- MFIB multicast forwarding information base
- the MFIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
- the first network device may further determine that the first packet includes an OAM packet.
- the first network device may first determine that the first packet includes an OAM packet, and then determine the type of OAM detection according to the destination address DA of the first IPv6 header.
- the first network device may first determine the type of OAM detection according to the destination address DA of the first IPv6 header, and then perform verification to determine whether the first packet includes an OAM packet. Detection can be performed according to the type of OAM detection.
- the first network device determines that the first packet includes the OAM packet, which is not specifically limited in this application.
- the first packet includes a UDP header
- the destination port number of the UDP header is used to indicate whether the first packet includes the OAM packet.
- the first network device may determine the first packet according to the destination port number of the UDP header. Whether the message includes the OAM message.
- Multiple different types of OAM detection packets can use the same UDP port number, that is, the UDP port number indicates that there is one of these types of OAM detection packets.
- the specific one is indicated by the destination address DA in the first IPv6 header, and different destination addresses DA are used to indicate different types of OAM detection. This can also reduce the number of UDP ports in the presence of multiple OAM detection types, thereby reducing the attack surface of the system and reducing the risk of being attacked.
- the first IPv6 header of the first packet includes a next header (Next Header) field.
- the Next Header field can also be called the protocol (protocol, proto) field, and is used to indicate the type of payload behind the IPv6 header.
- the Next Header field is used to indicate whether the first packet includes the OAM packet, and the first network device may determine whether the OAM packet is included in the first packet according to the value of the Next Header field of the first IPv6 header message.
- Next Header value can be used for a variety of different types of OAM detection packets, that is, the Next Header port number indicates that there is one of these types of OAM detection packets.
- the specific one is indicated by the destination address DA in the first IPv6 header, and different destination addresses DA are used to indicate different types of OAM detection.
- Step 430 The first network device performs detection according to the type of OAM detection.
- the first network device After the first network device receives the first packet, as an egress device of the tunnel, it decapsulates the first packet, obtains the OAM packet in the first packet, and determines the OAM packet in the first packet according to the first IPv6 header in step 420.
- the type of OAM detection indicated by the destination address DA, and the corresponding processing of the OAM detection is performed.
- the destination address of the first IPv6 header indicates "TWAMP" processing
- the first network device performs TWAMP processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment;
- the destination address of the first IPv6 header indicates "STAMP" processing.
- the first network device performs STAMP processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment;
- the destination address of the first IPv6 header indicates "S-BFD" processing, the first network device performs S-BFD processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network device;
- the destination address of the first IPv6 header indicates "Ping" processing
- the first network device performs Ping processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment.
- the second packet may include a second IPv6 header, and the destination address DA of the second IPv6 header is the IPv6 address of the second network device.
- the second packet may be a packet obtained by processing the OAM packet, for example, adding a timestamp to the OAM packet to obtain the second packet.
- the second packet may also be a packet obtained by reconstructing the OAM packet. This application does not specifically limit this.
- the DA of the second IPv6 header may further indicate that the second packet is an OAM detection response packet. So that after receiving the second packet, the second network device can determine that the second packet is an OAM detection response packet according to the DA of the second IPv6 header, and perform corresponding processing.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the DA of the second IPv6 header is the destination address DA of the first IPv6 header.
- the destination address in the first IPv6 header after the tunnel header of the OAM detection packet instructs the egress device of the tunnel to perform OAM detection. Since the tunnel header of the OAM detection packet does not contain OAM detection indication information, the tunnel header of the OAM detection packet is the same as the tunnel header of the data packet. Each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the OAM detection packet, so that the forwarding of the OAM detection packet and the forwarding of the data packet are processed on each device on the packet transmission path. the same.
- OAM detection takes OAM detection as STAMP as an example, and with reference to FIG. 5 , the specific implementation of OAM detection is performed on the ingress device (for example, device A) of the tunnel instructing the egress device (for example, device B) of the tunnel through the destination address of the first IPv6 header.
- the ingress device for example, device A
- the egress device for example, device B
- FIG. 5 is a schematic flowchart of another OAM detection method provided by an embodiment of the present application. As shown in FIG. 5, the method may include steps 510-520, and the steps 510-520 will be described in detail below respectively.
- Step 510 An ingress device (eg, device A) of the tunnel sends an OAM detection packet to an egress device (eg, device B) of the tunnel.
- an ingress device eg, device A
- an egress device eg, device B
- the STAMP detection in this embodiment of the present application can be understood as detecting the connectivity and performance of the tunnel between the device A and the device B by popping the loopback mode.
- FIG. 6 shows the OAM detection packet obtained by device A.
- the OAM detection packet includes: tunnel header+first IPv6 header+OAM packet encapsulated by IP (IPv6 header+UDP header+OAM packet).
- tunnel headers There may be multiple tunnel headers, which are determined according to the tunnel type between device A and device B. This embodiment of the present application does not specifically limit the type of the tunnel between the device A and the device B. For details, please refer to the description of the tunnel and the tunnel header in the foregoing, which will not be repeated here.
- the source address (source address, SA) A2 of the first IPv6 header is the address of device A, and the destination address (DA) A1 of the first IPv6 header indicates "STAMP detection” .
- the address A1 corresponds to the semantics of "OAM packet processing - OAM Pop and Loopback".
- an address A1 with this semantics can be identified with End.OPL.
- OAM packet processing - popping a loopback packet means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops the tunnel header and obtains the first IPv6 header, and performs Check the form and forward. It is equivalent to popping the first IPv6 header, and processing the packet after the first IPv6 header (the result of the processing is to send the packet to device A, which is equivalent to looping back the packet).
- the device A when device A constructs an OAM packet encapsulated by IP, in order to realize that device B directly looks up and forwards the packet after the first IPv6 header, device A is opposite to the device.
- the packets after the first IPv6 header sent by B are "forged".
- a "forged" packet means that the source address A4 of the IPv6 header is the address of device B, and the destination address A3 is the address of device A.
- device B loops back the packets, it is not necessary to reconstruct the source address and destination address of the OAM packet, that is, it does not need to modify the source address and destination address in the IPv6 header of the IP-encapsulated OAM packet. It directly uses the source address and destination address of the "forged" packet to directly look up the "forged” packet and forward it.
- device B may also need to modify the content of the OAM packet, and perform table lookup and forwarding on the modified packet.
- device B may stamp the content of the OAM packet with a time stamp.
- Step 520 The egress device (eg, device B) of the tunnel receives the OAM detection packet, and sends the OAM response packet to the ingress device (eg, device A) of the tunnel.
- the egress device of the tunnel After receiving the OAM detection packet (for example, device B), the egress device of the tunnel (for example, device B) decapsulates the OAM detection packet, and obtains the part after the tunnel header of the OAM detection packet (including the first IPv6 header and the IP-encapsulated OAM packet). message section).
- the device B looks up the table and obtains that the semantics corresponding to the address A1 is "OAM packet processing - pop-up loopback packet".
- Device B obtains the IP-encapsulated OAM packet after the first IPv6 header according to the instruction of "OAM packet processing - popup loopback packet", and directly sends the OAM packet to device A.
- device B looks up the table to obtain the next hop and outgoing interface of destination address A3. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
- the correspondence between the destination address A1 of the above-mentioned first IPv6 header and the semantics of "OAM packet processing-OAM Pop and Loopback" indicated by this address can be determined by The implementation is configured on B and configured on Device A to use this address. There are various specific implementation manners, and several possible implementation manners are described in detail below.
- a correspondence between a unicast IPv6 address and OAM detection may be configured on device B.
- it can be configured on device B: Ipv6 address 2001:db1::1234 function oam-pop-loopback.
- Device A is configured to use the address "IPv6 address 2001:db1::1234" on device B when device B is required to perform STAMP detection and use the corresponding encapsulation.
- IPv6 address 2001:db1::1234" is a unicast IPv6 address A1 on device B.
- function oam-pop-loopback means "OAM packet processing - pop-up loopback packet” function.
- a loopback IPv6 address may also be configured on device B, for example, the loopback IPv6 address may be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, this address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is the same as that in device B.
- the configuration above is similar.
- the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-pop-loopback. At the same time, you can also configure STAMP detection on device A to use this address.
- FIB forwarding information base
- device B After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. If the destination address A1 of the first IPv6 header is a unicast address, device B searches the FIB accordingly, obtains the destination address A1 indicating "OAM packet processing - popup loopback packet", and performs corresponding processing of OAM detection according to the instruction.
- a multicast address may also be configured on device B, that is, the address in the FFxx::/8 address segment identifies the above function.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address FF03::1234 function oam-pop-loopback. At the same time, you can also configure STAMP detection on A to use this address.
- the above-mentioned address is a multicast IPv6 address
- the semantics of the address and its instruction information can be stored in a multicast forwarding information base (MFIB), that is, a multicast address and its corresponding instruction information.
- MFIB multicast forwarding information base
- device B After receiving the OAM detection packet, decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. If the destination address A1 of the first IPv6 header is a multicast address, device B searches the MFIB accordingly, obtains the destination address A1 indicating "OAM packet processing - popup loopback packet", and performs corresponding processing of OAM detection according to the instruction.
- the egress device of the tunnel may check the OAM detection packet after receiving the OAM detection packet.
- device B may further indicate that the packet received by device A is an OAM response packet, so that device A can perform corresponding processing on the OAM response packet.
- the destination address DA in the IPv6 header of the response packet may be used to instruct device A to process the OAM response packet.
- device A when device A sends an OAM detection packet to device B, it may carry the backhaul address in the backhaul address field.
- the address of the destination address of the OAM response packet used for the backhaul carried in the OAM detection packet is referred to herein as the "return address”
- the field carrying the "return address” in the OAM detection packet is referred to as Return address field.
- the address is carried in the destination address field of the IPv6 header of the forged message. If the packet sent by device A to device B is an ordinary packet, the return address may be carried in the source address field of the IPv6 header.
- Ipv6 address 2001:db2::1234 function oam-reply-process.
- 2001:db2::1234" is the backhaul address
- "oam-reply-process" identifies the semantics corresponding to the backhaul address to process the OAM response message.
- the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in the destination address of the outer IPv6 header. in the field. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
- the tunnel header of the OAM detection packet sent by device A to device B may not include the SRH header, and the address of an End.OPL of device B (the address of End.OPL is used as a network function indicator) , to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header.
- the OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
- the tunnel header of the data packet sent by device A to device B may include an SRH header.
- device R2 will perform PSP processing, pop out the SRH header in the data packet, and according to the destination address of the outer IPv6 header is device B, the data that does not contain the SRH header will be removed.
- the packet is forwarded from device R2 to device B.
- the tunnel header does not contain the SRH header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
- the OAM detection packet sent by device A to device B also contains an SRH header, which contains two SRv6 SIDs, one is the destination address of device B, and the other is the destination of device R2 address.
- the address of an End.OPL of device B (the address of End.OPL is used as a network function indication to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header.
- device R2 will perform PSP processing, pop out the SRH header in the OAM detection packet, and according to the destination address of the outer IPv6 header as device B, send the data packet that does not contain the SRH header from device R2 Forward to device B.
- the OAM detection packet reaches device B, the tunnel header does not contain the SRH header.
- the OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
- the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in in the destination address field of the outer IPv6 header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
- the tunnel header of the OAM detection packet sent by device A to device B may not include the SRH header, and the address of an End.OPL of device B (the address of End.OPL is used as a network function indicator) , to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header.
- the destination address in the tunnel header of the OAM detection packet sent by device A is device R1 (as a segment in the entire P2MP path).
- Device R1 copies the OAM detection packet and sends it to device R2 and device B.
- the destination addresses in the tunnel header of the copied and sent message are R2 and B respectively, and none of these processes involve the processing of the End.OPL address and the first IPv6 header where it is located.
- the OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
- IPv6 header in the OAM packet encapsulated by IP is the first IPv6 header as an example, and in conjunction with FIG.
- OAM detection performed by the exit device (for example, device B) of the device B will be described in detail.
- the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet).
- IPv6 header+UDP header+OAM packet IP-encapsulated OAM packet
- the source address A6 of the IPv6 header (also referred to as the first IPv6 header) of the OAM packet encapsulated by IP is the address of device A
- the destination address A5 is an address on device B
- the address A5 indicates "STAMP detection" ". It can also be understood that address A5 corresponds to the semantics of "STAMP detection".
- STAMP detection means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops up the tunnel header to obtain the OAM packet encapsulated by IP, and obtains the STAMP bounce packet according to the OAM packet encapsulated by IP. and sent to device A.
- the source address and the destination address in the IPv6 header of the IP-encapsulated OAM packet may be modified to obtain the STAMP bounce packet.
- STAMP bounce message is equivalent to modifying the IPv6 header of the IP-encapsulated OAM message obtained after decapsulation, and finally sending the message to device A, which is equivalent to modifying the message. and loopback.
- Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 10.
- Device B obtains the semantics corresponding to the destination address A5 in the IPv6 header.
- Device B decapsulates the OAM detection packet, and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A5 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantics corresponding to the address A5 as "STAMP detection". That is, device B can determine that the OAM packet is a STAMP detection packet according to the address A5.
- the IPv6 header is followed by a UDP header, and the UDP header is followed by the STAMP detection packet.
- the port number in the UDP header identifies an "OAM packet” or "Opaque packet”
- the destination address in the IPv6 header identifies the "UDP-STAMP" detection packet.
- the STAMP detection packet may be directly followed by the IPv6 header.
- the Next Header value of the IPv6 header can use 59 to identify an "Opaque message", and the destination address of the IPv6 header identifies the "NH59-STAMP" detection message.
- the correspondence between the address A5 and the "STAMP" indication information may be implemented by configuring on the device B. Different implementation manners are described in detail below.
- IPv6 address 2001:db1::1234 function oam-stamp.
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- function oam-stamp means "STAMP" indicates the function, which can be followed by UDP+STAMP or NH59+STAMP.
- IPv6 address 2001:db1::1234 function oam-udp-stamp can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-stamp".
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-udp-stamp” indicates the "UDP-STAMP" indication function
- the address is followed by UDP+STAMP.
- IPv6 address 2001:db1::1234 function oam-nh59-stamp
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-nh59-stamp” indicates the "NH59-STAMP” indication function, and the address is followed by NH59+STAMP.
- a loopback IPv6 address can also be configured on device B.
- the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-stamp.
- the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information.
- the received tunnel packet after device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header is a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "STAMP detection packet". Arts".
- a multicast address that is, the address of the FFxx::/8 address segment
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address FF03::1234 function oam-stamp.
- the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information.
- device B After receiving the OAM detection packet, decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "STAMP detection message".
- Device B performs corresponding processing of STAMP detection.
- Device B determines that the IP-encapsulated OAM packet is a STAMP detection packet according to the destination address A5 of the IP-encapsulated IPv6 header. Therefore, Device B needs to perform STAMP detection on the IP-encapsulated OAM packet. Specifically, device B needs to modify and loopback the IP-encapsulated OAM packet, and construct a STAMP bounce packet.
- device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A7), and modifies the source address to the address of device B (for example, address A8), thereby constructing a STAMP Bounce message.
- device B looks up the table to obtain the next hop and outgoing interface of destination address A7. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
- the source address A6 may also be a semantic IPv6 address, which is used to instruct device A to process the OAM response packet.
- the destination address A7 of the packet sent by device B to device A can be the same as address A6.
- Ipv6 address 2001:db3::1234 function oam-reply-process.
- the address 2001:db3::1234 corresponds to the addresses of A7 and A6, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message.
- device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
- OAM-reply-process indication or End.ORP
- the specific implementation manner of instructing the egress device (eg, device B) of the tunnel to perform OAM detection will be described in detail.
- FIG. 11 is only for helping those skilled in the art to understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 11 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
- the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet).
- IPv6 header+UDP header+OAM packet IP-encapsulated OAM packet
- the source address A26 of the IPv6 header (also referred to as the first IPv6 header) of the OAM packet encapsulated by IP is the address of device A
- the destination address A25 is an address on device B
- the address A25 indicates "S- BFD Detection". It can also be understood that the address A25 corresponds to the semantics of "S-BFD detection".
- the "S-BFD detection” here means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops out the tunnel header to obtain the OAM packet encapsulated by IP.
- the BFD response packet is sent to device A.
- the S-BFD response message may be obtained by modifying the source address and the destination address in the IPv6 header of the IP-encapsulated OAM message.
- Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 11.
- Device B obtains the semantics corresponding to the destination address A25 in the inner IPv6 header.
- Device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet (the part of the OAM packet encapsulated by IP). According to the destination address A25 of the IPv6 header of the IP-encapsulated OAM packet, this machine address, look up the table to obtain the semantics corresponding to the address A25 as "S-BFD detection". That is, device B can determine that the packet is an S-BFD detection packet according to the address A5.
- the IPv6 header is followed by a UDP header
- the S-BFD detection packet is followed by the UDP header.
- the port number in the UDP header identifies an "OAM packet” or "Opaque packet”
- the destination address in the IPv6 header identifies the "UDP-SBFD" detection packet.
- an S-BFD detection packet may be directly followed by the IPv6 header.
- the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-SBFD" detection packet.
- the correspondence between the address A25 and the "S-BFD" indication information can be implemented by configuring on the device B. Different implementation manners are described in detail below.
- IPv6 address 2001:db1::1234 function oam-sbfd.
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-sbfd” indicates the "S-BFD” indication function, and the address can be followed by UDP+SBFD, or NH59+ SBFD.
- IPv6 address 2001:db1::1234 function oam-udp-sbfd is a unicast IPv6 address on device B
- function oam-udp-sbfd indicates the "UDP-SBFD” indication function
- the address is followed by UDP+SBFD.
- IPv6 address 2001:db1::1234 function oam-nh59-sbfd is a unicast IPv6 address on device B
- function oam-nh59-sbfd indicates the "NH59-SBFD” indication function, and the address is followed by NH59+SBFD.
- a loopback IPv6 address can also be configured on device B.
- the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-sbfd.
- the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information.
- Device B For the received tunnel packet, after decapsulating the tunnel header and obtaining the IPv6 header, Device B searches the FIB table according to the destination address of the IPv6 header as a unicast address and obtains the corresponding indication information as "S-BFD". detection message".
- a multicast address that is, the address of the FFxx::/8 address segment
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address FF03::1234 function oam-sbfd.
- the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information.
- device B After receiving the OAM detection packet, decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, device B searches the MFIB table to obtain the indication information corresponding to the address as "S-BFD detection packet".
- Device B performs corresponding processing of S-BFD detection.
- Device B determines that the IP-encapsulated OAM packet is an S-BFD detection packet according to the indication of the destination address A25 in the IPv6 header of the IP-encapsulated OAM packet. Therefore, device B needs to detect the IP-encapsulated OAM packet. Corresponding processing for S-BFD detection is performed. Specifically, device B needs to modify and loop back the IP-encapsulated OAM packet, and construct an S-BFD response packet.
- device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A27), and modifies the source address to the address of device B (for example, address A28), thereby constructing an S -BFD response message.
- the source address A26 may also be a semantic IPv6 address, which is used to instruct the device A to process the OAM response packet.
- the destination address A27 of the packet sent by device B to device A can be the same as address A26.
- Ipv6 address 2001:db3::1234 function oam-reply-process.
- the address 2001:db3::1234 corresponds to the addresses of A27 and A26, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message.
- device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
- OAM-reply-process indication or End.ORP
- the OAM detection is used as Ping, and the IPv6 header in the OAM packet encapsulated by IP is the first IPv6 header as an example.
- the ingress device (for example, device A) of the tunnel indicates the tunnel through the destination address of the first IPv6 header.
- the exit device for example, device B
- FIG. 12 is only for helping those skilled in the art to understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 12 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
- the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet).
- IPv6 header+UDP header+OAM packet IP-encapsulated OAM packet
- the source address A12 of the inner IPv6 header (also referred to as the first IPv6 header) of the IP-encapsulated OAM packet is the address of device A
- the destination address A11 is an address on device B, which corresponds to a Semantics of "Ping detection”.
- Ping detection here means that device B can determine that the OAM packet encapsulated by IP is a ping detection packet based on this address.
- Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 12.
- Device B obtains the semantics corresponding to the destination address A11 in the IPv6 header.
- Device B decapsulates the OAM detection packet and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A11 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantic corresponding to the address A11 is "Ping detection". That is, device B can determine that the packet is a Ping detection packet according to the address A11.
- the IPv6 header is followed by a UDP header, and the UDP header is followed by the Ping detection packet.
- the port number in the UDP header identifies an "OAM packet" or "Opaque packet”
- the destination address in the IPv6 header identifies the "UDP-Ping" detection packet.
- a Ping detection packet may be directly followed by the IPv6 header.
- the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-Ping" detection packet.
- the correspondence between the address A11 and the "Ping detection" indication information can be implemented by configuring on the device B. Different implementation manners are described in detail below.
- IPv6 address 2001:db1::1234 function oam-Ping.
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-Ping" indicates the "Ping detection” indication function, and the address can be followed by UDP+Ping, or NH59+Ping .
- IPv6 address 2001:db1::1234 function oam-udp-Ping can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-Ping".
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-udp-Ping" indicates the "UDP-Ping" indication function, and the address is followed by UDP+Ping.
- IPv6 address 2001:db1::1234 function oam-nh59-Ping can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-Ping".
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-nh59-Ping” indicates the "NH59-Ping" indication function, and the address is followed by NH59+Ping.
- a loopback IPv6 address can also be configured on device B.
- the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-Ping.
- the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information.
- device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header as a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "Ping detection packet". Arts".
- a multicast address that is, the address of the FFxx::/8 address segment
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address FF03::1234 function oam-Ping.
- the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information.
- device B After receiving the OAM detection packet, decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "Ping detection packet".
- Device B constructs an Echo Reply message and sends it to device A.
- Device B determines that the OAM packet encapsulated by IP is an Echo Request packet according to the "Ping detection" instruction, and constructs an Echo Reply packet. For example, device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A13), and modifies the source address to the address of device B (for example, address A14), thereby constructing an Echo Reply reply message.
- Echo Reply response message is equivalent to modifying the IPv6 header of the IP-encapsulated OAM message obtained after decapsulation, and finally sending the message to device A, which is equivalent to doing Modification and loopback.
- the device B looks up the table to obtain the next hop and outgoing interface of the destination address A13. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
- the source address A12 may also be a semantic IPv6 address, which is used to instruct the device A to process the OAM response packet.
- the destination address A13 of the packet sent by device B to device A can be the same as address A12.
- Ipv6 address 2001:db3::1234 function oam-reply-process.
- the address 2001:db3::1234 corresponds to the addresses of A12 and A13, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message.
- device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
- OAM-reply-process indication or End.ORP
- OAM detection takes OAM detection as BFD
- IPv6 header in the IP-encapsulated OAM packet is the first IPv6 header as an example, and in conjunction with FIG.
- OAM detection performed by the exit device (for example, device B) of the device B will be described in detail.
- FIG. 13 is only for helping those skilled in the art to understand the embodiments of the present application, but is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 13 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
- the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet).
- IPv6 header+UDP header+OAM packet IP-encapsulated OAM packet
- the source address A16 of the IPv6 header of the IP-encapsulated OAM packet is the address of device A
- the destination address A15 is an address on device B
- the address A15 indicates "BFD detection", which can also be understood as the address A15 corresponds to " BFD detection" semantics.
- the "BFD detection” here means that device B can determine that the OAM packet encapsulated by IP is a BFD detection packet based on this address.
- Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 13.
- Device B obtains the semantics corresponding to the destination address A15 in the IPv6 header.
- Device B decapsulates the OAM detection packet and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A15 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantic corresponding to the address A15 is "BFD detection message". That is, device B can determine that the packet is a BFD detection packet based on the address A15.
- the IPv6 header is followed by a UDP header
- the BFD detection packet is followed by the UDP header.
- the port number in the UDP header identifies an "OAM packet” or "Opaque packet”
- the destination address in the IPv6 header identifies the "UDP-BFD" detection packet.
- the IPv6 header may be directly followed by a BFD detection packet.
- the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-BFD" detection packet.
- the correspondence between the address A15 and the "BFD" indication information may be implemented by configuring on the device B. Different implementation manners are described in detail below.
- IPv6 address 2001:db1::1234 function oam-bfd.
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, and "function oam-bfd” indicates the "BFD” indication function, which can be followed by UDP+BFD or NH59+BFD.
- IPv6 address 2001:db1::1234 function oam-udp-bfd can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-bfd".
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-udp-bfd” indicates the "UDP-BFD” indication function
- the address is followed by UDP+BFD.
- IPv6 address 2001:db1::1234 function oam-nh59-bfd can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-bfd".
- IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B
- "function oam-nh59-bfd” indicates the "NH59-BFD” indication function, and the address is followed by NH59+BFD.
- a loopback IPv6 address can also be configured on device B.
- the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment.
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-bfd.
- the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information.
- device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header as a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "BFD detection packet". Arts".
- a multicast address that is, the address of the FFxx::/8 address segment
- the address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B.
- the configuration on device B is as follows: Ipv6 address FF03::1234 function oam-bfd.
- the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information.
- device B After receiving the OAM detection packet, decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "BFD detection packet".
- Device B performs corresponding processing of BFD detection.
- Device B processes the OAM packet according to the destination address A15 in the inner IPv6 header indicating "BFD detection". Specifically, device B may determine that the packet is a BFD session established, and detect the status (eg, DOWN/UP) of the BFD session.
- the status eg, DOWN/UP
- FIG. 14 is a schematic structural diagram of a first network device 1400 provided by an embodiment of the present application.
- the first network device 1400 shown in FIG. 14 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments.
- the first network device 1400 includes: a receiving module 1410, a processing module 1420,
- a receiving module 1410 configured to receive, via the tunnel, a first packet sent by a second network device, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM packet,
- the second network device is an ingress device of the tunnel;
- a processing module 1420 configured to determine the type of OAM detection according to the destination address DA of the first IPv6 header
- the processing module 1420 is further configured to perform detection according to the type of the OAM detection.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet,
- the processing module 1420 is further configured to: determine that the first packet includes the OAM packet according to the destination port number in the UDP header.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
- the processing module 1420 is further configured to: determine that the first packet includes the OAM packet according to the value of the Next Header field.
- the processing module 1420 is specifically configured to: determine that the DA of the first IPv6 header is the unicast IPv6 address of the first network device; determine according to the DA of the first IPv6 header and the forwarding information base FIB The type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- the processing module 1420 is specifically configured to: determine that the DA of the first IPv6 header is a multicast IPv6 address; determine the DA detected by the OAM according to the DA of the first IPv6 header and the multicast forwarding information base MFIB. type, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
- the processing module 1420 is specifically configured to: decapsulate the first packet to obtain the OAM packet; determine a second packet according to the OAM packet; Send the second message.
- the second packet includes a second IPv6 header
- the destination address DA of the second IPv6 header is the IPv6 address of the second network device
- the DA of the second IPv6 header indicates the second IPv6 address.
- the packet is an OAM detection response packet.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: Simple Bidirectional Active Measurement Protocol STAMP Detection, Bidirectional Active Measurement Protocol TWAMP Detection, Bidirectional Forwarding Detection BFD, Seamless Bidirectional Forwarding Detection S-BFD, Internet Packet Detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label-switched MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, an explicit replication BIER tunnel based on a bit index, the Internet Bit-indexed explicit replication of BIERv6 tunnels for version 6 of the protocol.
- FIG. 15 is a schematic diagram of a hardware structure of a first network device 2000 according to an embodiment of the present application.
- the first network device 2000 shown in FIG. 15 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments.
- the first network device 2000 includes a processor 2001, a memory 2002, an interface 2003 and a bus 2004.
- the interface 2003 may be implemented in a wireless or wired manner, and may specifically be a network card.
- the above-mentioned processor 2001 , memory 2002 and interface 2003 are connected through a bus 2004 .
- the interface 2003 may specifically include a transmitter and a receiver, which are used by the first network device to implement the above-mentioned transceiving.
- the interface 2003 is configured to receive the first packet sent by the second network device through the tunnel.
- the processor 2001 is configured to execute the processing performed by the first network device in the foregoing embodiment. For example, for determining the type of OAM detection based on the destination address DA of the first IPv6 header; detecting based on the type of OAM detection; and/or for other processes of the techniques described herein.
- the memory 2002 includes an operating system 20021 and an application program 20022 for storing programs, codes or instructions. When the processor or hardware device executes these programs, codes or instructions, the processing process involving the first network device in the method embodiment can be completed.
- the memory 2002 may include read-only memory (ROM) and random access memory (RAM).
- the ROM includes a basic input/output system (basic input/output system, BIOS) or an embedded system;
- the RAM includes an application program and an operating system.
- BIOS basic input/output system
- the system is booted through the BIOS solidified in the ROM or the bootloader in the embedded system, and the first network device 2000 is guided into a normal operation state.
- the application program and the operating system running in the RAM thus, the processing process involving the first network device 2000 in the method embodiment is completed.
- FIG. 15 only shows a simplified design of the first network device 2000 .
- the first network device may contain any number of interfaces, processors or memories.
- FIG. 16 is a schematic diagram of a hardware structure of another first network device 2100 according to an embodiment of the present application.
- the first network device 2100 shown in FIG. 16 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments.
- the first network device 2100 includes: a main control board 2110 , an interface board 2130 , a switching network board 2120 and an interface board 2140 .
- the main control board 2110, the interface boards 2130 and 2140, and the switching network board 2120 are connected to the system backplane through the system bus to realize intercommunication.
- the main control board 2110 is used to complete functions such as system management, equipment maintenance, and protocol processing.
- the switch fabric board 2120 is used to complete data exchange between interface boards (interface boards are also called line cards or service boards).
- the interface boards 2130 and 2140 are used to provide various service interfaces (eg, POS interface, GE interface, ATM interface, etc.), and realize data packet forwarding.
- the interface board 2130 may include a central processing unit 2131 , a forwarding table entry memory 2134 , a physical interface card 2133 and a network processor 2132 .
- the central processing unit 2131 is used to control and manage the interface board and communicate with the central processing unit on the main control board.
- the forwarding entry storage 2134 is used to store entries.
- the physical interface card 2133 is used to receive and transmit traffic.
- first network device 2100 in this embodiment may correspond to the functions and/or various steps performed by the foregoing method embodiments, and details are not described herein again.
- main control boards there may be one or more main control boards, and when there are multiple main control boards, they may include an active main control board and a backup main control board.
- the first network device may not need to switch the network board, and the interface board undertakes the processing function of the service data of the entire system.
- the first network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the first network device in the distributed architecture are greater than those in the centralized architecture.
- the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
- FIG. 17 is a schematic structural diagram of a second network device 1700 provided by an embodiment of the present application.
- the second network device 1700 shown in FIG. 17 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments.
- the second network device 1700 includes: a processing module 1710, a sending module 1720,
- the processing module 1710 is configured to obtain a first packet, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header and an operation management and maintenance OAM packet, and the destination address DA of the first IPv6 header Used to indicate the type of OAM detection;
- the sending module 1720 is configured to send the first packet to a first network device via the tunnel, where the first network device is an egress device of the tunnel.
- the first IPv6 header is located between the tunnel header and the OAM packet.
- the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
- the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
- the second network device 1700 further includes:
- a receiving module 1730 configured to receive a second packet, where the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header
- the DA of the header indicates that the second message is an OAM detection response message
- the processing module 1710 is further configured to process the second packet according to the DA of the second IPv6 header.
- the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- the type of the OAM detection includes any one of the following: Simple Bidirectional Active Measurement Protocol STAMP Detection, Bidirectional Active Measurement Protocol TWAMP Detection, Bidirectional Forwarding Detection BFD, Seamless Bidirectional Forwarding Detection S-BFD, Internet Packet Detector PING detection.
- the tunnel includes any one of the following: a multi-protocol label-switched MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, an explicit replication BIER tunnel based on a bit index, the Internet Bit-indexed explicit replication of BIERv6 tunnels for version 6 of the protocol.
- FIG. 18 is a schematic diagram of a hardware structure of a second network device 2200 according to an embodiment of the present application.
- the second network device 2200 shown in FIG. 18 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments.
- the second network device 2200 includes a processor 2201 , a memory 2202 , an interface 2203 and a bus 2204 .
- the interface 2203 may be implemented in a wireless or wired manner, and may specifically be a network card.
- the above-mentioned processor 2201 , memory 2202 and interface 2203 are connected through a bus 2204 .
- the interface 2203 may specifically include a transmitter and a receiver, which are used by the second network device to implement the above-mentioned transceiving.
- the interface is used to support sending the first packet to the first network device via the tunnel.
- the processor 2201 is configured to perform the processing performed by the second network device in the foregoing embodiment. For example, for obtaining the first message; and/or for other processes of the techniques described herein.
- the memory 2202 includes an operating system 22021 and an application program 22022, which are used to store programs, codes or instructions. When the processor or the hardware device executes these programs, codes or instructions, the processing process involving the second network device in the method embodiment can be completed.
- the memory 2202 may include read-only memory (ROM) and random access memory (RAM).
- the ROM includes a basic input/output system (basic input/output system, BIOS) or an embedded system
- the RAM includes an application program and an operating system.
- the system is booted through the BIOS solidified in the ROM or the bootloader in the embedded system, and the second network device 2200 is guided to enter a normal operation state.
- the application program and the operating system running in the RAM thus, the processing process involving the second network device 2200 in the method embodiment is completed.
- FIG. 18 only shows a simplified design of the second network device 2200 .
- the second network device may contain any number of interfaces, processors or memories.
- FIG. 19 is a schematic diagram of a hardware structure of another second network device 2400 according to an embodiment of the present application.
- the second network device 2400 shown in FIG. 19 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments.
- the second network device 2400 includes: a main control board 2410 , an interface board 2430 , a switching network board 2420 and an interface board 2440 .
- the main control board 2410, the interface boards 2430 and 2440, and the switching network board 2420 are connected to the system backplane through the system bus to realize intercommunication.
- the main control board 2410 is used to complete functions such as system management, equipment maintenance, and protocol processing.
- the switch fabric board 2420 is used to complete data exchange between interface boards (interface boards are also called line cards or service boards).
- the interface boards 2430 and 2440 are used to provide various service interfaces (eg, POS interface, GE interface, ATM interface, etc.), and realize data packet forwarding.
- the interface board 2430 may include a central processing unit 2431 , a forwarding table entry memory 2434 , a physical interface card 2433 and a network processor 2432 .
- the central processing unit 2431 is used to control and manage the interface board and communicate with the central processing unit on the main control board.
- the forwarding entry storage 2434 is used to store entries.
- the physical interface card 2433 is used to complete the reception and transmission of traffic.
- the operations on the interface board 2440 in the embodiment of the present application are the same as the operations on the interface board 2430, and for brevity, details are not repeated here.
- the second network device 2400 in this embodiment may correspond to the functions and/or various steps performed by the foregoing method embodiments, and details are not described herein again.
- main control boards there may be one or more main control boards, and when there are multiple main control boards, they may include an active main control board and a backup main control board.
- the second network device may not need a switching network board, and the interface board undertakes the processing function of the service data of the entire system.
- the second network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the second network device in the distributed architecture are greater than those in the centralized architecture.
- the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
- Embodiments of the present application further provide a computer-readable medium, where program codes are stored in the computer-readable medium, and when the computer program codes are run on a computer, the computer executes the method performed by the first network device.
- These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
- Embodiments of the present application further provide a computer-readable medium, where program codes are stored in the computer-readable medium, and when the computer program codes are run on a computer, the computer executes the method performed by the second network device.
- These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
- An embodiment of the present application further provides a chip system, which is applied to the first network device, the chip system includes: at least one processor, at least one memory, and an interface circuit, where the interface circuit is responsible for information between the chip system and the outside world interaction, the at least one memory, the interface circuit and the at least one processor are interconnected by a wire, and the at least one memory stores instructions; the instructions are executed by the at least one processor to perform the above aspects The operation of the first network device in the method.
- the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
- CPU central processing unit
- MCU microcontroller
- MPU microprocessor
- DSP digital signal processor
- SoC system on chip
- ASIC application-specific integrated circuit
- FPGA field programmable gate array
- PLD programmable logic device
- the embodiment of the present application further provides another chip system, which is applied to a second network device, the chip system includes: at least one processor, at least one memory, and an interface circuit, where the interface circuit is responsible for the communication between the chip system and the outside world.
- Information exchange, the at least one memory, the interface circuit and the at least one processor are interconnected by lines, and the at least one memory stores instructions; the instructions are executed by the at least one processor to perform the above Operations of the second network device in the method of the aspect.
- the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
- CPU central processing unit
- MCU microcontroller
- MPU microprocessor
- DSP digital signal processor
- SoC system on chip
- ASIC application-specific integrated circuit
- FPGA field programmable gate array
- PLD programmable logic device
- Embodiments of the present application further provide a computer program product, which is applied to a first network device, where the computer program product includes a series of instructions, when the instructions are executed, to perform the methods described in the above aspects. Operation of the first network device.
- Embodiments of the present application further provide a computer program product, which is applied to a second network device, where the computer program product includes a series of instructions, when the instructions are executed, to perform the methods described in the above aspects. Operation of the second network device.
- the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
- the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
- the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present application provides an operations, administration and maintenance (OAM) detection method, device, and system. The method comprises: a first network device receives a first packet from a second network device via a tunnel, the first packet comprising a tunnel header, a first Internet Protocol version 6 (IPv6) header, and an OAM packet, the second network device is an ingress device of the tunnel, and the first network device is an egress device of the tunnel; the first network device determines the type of OAM detection according to a destination address (DA) of the first IPv6 header; the first network device performs detection according to the type of the OAM detection. The technical solution provided by the present application causes the processing of an OAM detection packet (for example, the first packet) and the processing of a data packet by devices, other than a tunnel egress device, on a packet transmission path to be consistent.
Description
本申请要求于2020年8月14日提交国家知识产权局、申请号为202010820465.7、发明名称为“一种OAM检测的方法、设备及系统”的中国专利申请的优先权,以及于2020年10月16日提交国家知识产权局、申请号为202011109212.5、发明名称为“一种OAM检测的方法、设备以及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010820465.7 and the invention titled "A method, equipment and system for OAM detection" filed with the State Intellectual Property Office on August 14, 2020, and filed on October 20, 2020 The priority of the Chinese patent application filed with the State Intellectual Property Office on the 16th with the application number of 202011109212.5 and the invention titled "A method, device and system for OAM detection", the entire contents of which are incorporated into this application by reference.
本申请涉及网络通信领域,并且更具体地,涉及一种OAM检测的方法、第一网络设备、第二网络设备以及系统。The present application relates to the field of network communication, and more particularly, to a method for OAM detection, a first network device, a second network device, and a system.
在互联网协议(Internet Protocol,IP)承载网络中,对IP业务进行操作、管理和维护(operation,administration and maintenance,OAM)检测是一种常见的技术。In an Internet Protocol (IP) bearer network, operation, administration and maintenance (OAM) detection of IP services is a common technology.
以对两个设备之间的隧道进行OAM检测为例,隧道的出口设备接收到OAM检测报文后,需要根据OAM检测的类型进行相应的处理。因此,隧道的入口设备向隧道的出口设备发送的OAM检测报文需要指示隧道的出口设备进行OAM检测,以及具体的OAM检测的类型,以便于隧道的出口设备根据该指示进行OAM检测的相关转发动作。Take OAM detection on a tunnel between two devices as an example. After receiving an OAM detection packet, the egress device of the tunnel needs to perform corresponding processing according to the type of OAM detection. Therefore, the OAM detection packet sent by the ingress device of the tunnel to the egress device of the tunnel needs to instruct the egress device of the tunnel to perform OAM detection, and the specific type of OAM detection, so that the egress device of the tunnel can forward the relevant OAM detection according to the instruction. action.
相关的技术方案中,OAM检测报文的隧道头中包含OAM检测指示信息,该OAM检测指示信息用于指示设备进行OAM检测,以及具体的OAM检测的类型。在一些场景中,通过上述技术方案会出现OAM检测报文与数据报文在处理上不一致的问题。In a related technical solution, the tunnel header of the OAM detection packet includes OAM detection indication information, where the OAM detection indication information is used to instruct the device to perform OAM detection and a specific type of OAM detection. In some scenarios, through the above technical solutions, there may be a problem that the processing of OAM detection packets and data packets is inconsistent.
发明内容SUMMARY OF THE INVENTION
本申请提供一种OAM检测的方法、设备以及系统,可以使得报文传输路径上除隧道出口设备之外的各个设备对OAM检测报文的处理和数据报文的处理过程一致。The present application provides an OAM detection method, device, and system, which can make the processing of OAM detection packets consistent with the processing of data packets by each device on the packet transmission path except the tunnel egress device.
第一方面,提供了一种OAM检测的方法,包括:第一网络设备经由隧道接收第二网络设备发送的第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第二网络设备为所述隧道的入口设备,所述第一网络设备为所述隧道的出口设备;所述第一网络设备根据所述第一IPv6头的目的地址DA确定OAM检测的类型;所述第一网络设备根据所述OAM检测的类型进行检测。In a first aspect, a method for OAM detection is provided, comprising: a first network device receiving a first packet sent by a second network device via a tunnel, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header and operation management and maintenance OAM message, the second network device is the ingress device of the tunnel, and the first network device is the egress device of the tunnel; the first network device is based on the first The destination address DA of the IPv6 header determines the type of OAM detection; the first network device performs detection according to the type of OAM detection.
上述技术方案中,通过第一IPv6头的目的地址指示隧道的出口设备(例如,第一网络设备)进行OAM检测。通过“封装”的方式将第一报文的隧道头部分、第一IPv6头和OAM报文部分分离。这样,报文传输路径上除隧道出口设备外的各个设备只需要处理第一报文(也可以称为OAM检测报文)的隧道头部分,而不需要处理隧道头之后的第一IPv6头和OAM报文,从而使得报文传输路径上除隧道出口设备之外的各个设备对第一报文(也 可以称为OAM检测报文)的处理和数据报文的处理过程一致。In the above technical solution, the destination address of the first IPv6 header instructs the egress device (eg, the first network device) of the tunnel to perform OAM detection. The tunnel header part, the first IPv6 header and the OAM packet part of the first packet are separated by means of "encapsulation". In this way, each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the first packet (also called the OAM detection packet), and does not need to process the first IPv6 header and the first IPv6 header after the tunnel header. OAM packet, so that the processing of the first packet (also referred to as the OAM detection packet) by each device on the packet transmission path except the tunnel egress device is consistent with the processing process of the data packet.
在一种可能的实现方式中,所述第一IPv6头位于所述隧道头和所述OAM报文之间。In a possible implementation manner, the first IPv6 header is located between the tunnel header and the OAM packet.
应理解,隧道头本身可以包含IPv6头,即以IPv6为基础的隧道头,但本文所述的第一IPv6头不是隧道头中的IPv6头,而是位于隧道头和OAM报文之间的IPv6头。It should be understood that the tunnel header itself may contain an IPv6 header, that is, a tunnel header based on IPv6, but the first IPv6 header described in this document is not an IPv6 header in the tunnel header, but an IPv6 header located between the tunnel header and the OAM packet. head.
在另一种可能的实现方式中,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文,所述方法还包括:所述第一网络设备根据所述UDP头的所述目的端口号确定所述第一报文中包括所述OAM报文。In another possible implementation manner, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet, The method further includes: determining, by the first network device, that the first packet includes the OAM packet according to the destination port number in the UDP header.
应理解,如果第一报文中还包括UDP头,UDP头和OAM报文也可以合起来称为被UDP封装的OAM报文。It should be understood that if the first packet further includes a UDP header, the UDP header and the OAM packet may also be collectively referred to as an OAM packet encapsulated by UDP.
在另一种可能的实现方式中,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文,所述方法还包括:所述第一网络设备根据所述Next Header字段的值确定所述第一报文中包括所述OAM报文。In another possible implementation manner, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet, and the method further includes: the first network device according to The value of the Next Header field determines that the first packet includes the OAM packet.
在另一种可能的实现方式中,所述第一报文还包括第三IPv6头,所述第三IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文。In another possible implementation manner, the first packet further includes a third IPv6 header, and the Next Header field of the third IPv6 header is used to indicate that the first packet includes the OAM packet.
应理解,如果第一报文中还包括第三IPv6头、UDP头,第三IPv6头、UDP头和OAM报文也可以合起来称为被IP封装的OAM报文。It should be understood that if the first packet further includes a third IPv6 header and a UDP header, the third IPv6 header, the UDP header and the OAM packet may also be collectively referred to as an IP-encapsulated OAM packet.
在另一种可能的实现方式中,所述第一网络设备确定所述第一IPv6头的DA为所述第一网络设备的单播IPv6地址;所述第一网络设备根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another possible implementation manner, the first network device determines that the DA of the first IPv6 header is the unicast IPv6 address of the first network device; the first network device determines according to the first IPv6 The DA of the header and the forwarding information base FIB determine the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
在另一种可能的实现方式中,所述第一网络设备确定所述第一IPv6头的DA为一个环回单播IPv6地址;所述第一网络设备根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another possible implementation manner, the first network device determines that the DA of the first IPv6 header is a loopback unicast IPv6 address; the first network device determines according to the DA and the first IPv6 header of the first IPv6 header. The forwarding information base FIB determines the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
在另一种可能的实现方式中,所述第一网络设备确定所述第一IPv6头的DA为组播IPv6地址;所述第一网络设备根据所述第一IPv6头的DA和组播转发信息库MFIB确定所述OAM检测的类型,其中,所述MFIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another possible implementation manner, the first network device determines that the DA of the first IPv6 header is a multicast IPv6 address; the first network device determines the DA of the first IPv6 header and multicast forwarding according to the DA of the first IPv6 header The information base MFIB determines the type of the OAM detection, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
在另一种可能的实现方式中,所述第一网络设备对所述第一报文进行解封装,得到所述OAM报文;所述第一网络设备根据所述OAM报文确定第二报文;所述第一网络设备向所述第二网络设备发送所述第二报文。In another possible implementation manner, the first network device decapsulates the first packet to obtain the OAM packet; the first network device determines the second packet according to the OAM packet message; the first network device sends the second message to the second network device.
在另一种可能的实现方式中,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文。In another possible implementation manner, the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA indicates that the second message is an OAM detection response message.
在另一种可能的实现方式中,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。In another possible implementation manner, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
在另一种可能的实现方式中,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。In another possible implementation manner, the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
在另一种可能的实现方式中,所述隧道包括以下中的任意一种:多协议标签交换MPLS 隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。In another possible implementation manner, the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
第二方面,提供了一种OAM检测的方法,包括:第二网络设备获取第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第一IPv6头的目的地址DA用于指示OAM检测的类型;In a second aspect, a method for OAM detection is provided, including: obtaining a first packet by a second network device, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, the destination address DA of the first IPv6 header is used to indicate the type of OAM detection;
所述的第二网络设备经由隧道向第一网络设备发送所述第一报文,所述第二网络设备为所述隧道的入口设备,所述第一网络设备为所述隧道的出口设备。The second network device sends the first packet to the first network device via the tunnel, the second network device is an ingress device of the tunnel, and the first network device is an egress device of the tunnel.
在一种可能的实现方式中,所述第一IPv6头位于所述隧道头和所述OAM报文之间。In a possible implementation manner, the first IPv6 header is located between the tunnel header and the OAM packet.
在另一种可能的实现方式中,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文。In another possible implementation manner, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
在另一种可能的实现方式中,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文。In another possible implementation manner, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
在另一种可能的实现方式中,所述方法还包括:所述第二网络设备接收第二报文,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文;所述第二网络设备根据所述第二IPv6头的DA对所述第二报文进行处理。In another possible implementation manner, the method further includes: receiving, by the second network device, a second packet, where the second packet includes a second IPv6 header, and a destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the DA of the second IPv6 header indicates that the second message is an OAM detection response message; The second packet is processed.
在另一种可能的实现方式中,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。In another possible implementation manner, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
在另一种可能的实现方式中,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。In another possible implementation manner, the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
在另一种可能的实现方式中,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。In another possible implementation manner, the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
第二方面和第二方面的任意一个可能的实现方式的有益效果和第一方面以及第一方面的任意一个可能的实现方式的有益效果是对应的,对此,不再赘述。The beneficial effects of the second aspect and any possible implementation manner of the second aspect correspond to the beneficial effects of the first aspect and any possible implementation manner of the first aspect, which will not be repeated here.
第三方面,提供了一种第一网络设备,所述第一网络设备为隧道的出口设备,所述第一网络设备包括:In a third aspect, a first network device is provided, where the first network device is an egress device of a tunnel, and the first network device includes:
接收模块,用于经由所述隧道接收第二网络设备发送的第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第二网络设备为所述隧道的入口设备;A receiving module, configured to receive a first message sent by a second network device via the tunnel, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, so The second network device is an ingress device of the tunnel;
处理模块,用于根据所述第一IPv6头的目的地址DA确定OAM检测的类型;a processing module, configured to determine the type of OAM detection according to the destination address DA of the first IPv6 header;
所述处理模块,还用于根据所述OAM检测的类型进行检测。The processing module is further configured to perform detection according to the type of the OAM detection.
在一种可能的实现方式中,所述第一IPv6头位于所述隧道头和所述OAM报文之间。In a possible implementation manner, the first IPv6 header is located between the tunnel header and the OAM packet.
在另一种可能的实现方式中,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文,In another possible implementation manner, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet,
所述处理模块,还用于:根据所述UDP头的所述目的端口号确定所述第一报文中包括所述OAM报文。The processing module is further configured to: determine that the first packet includes the OAM packet according to the destination port number in the UDP header.
在另一种可能的实现方式中,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文,In another possible implementation manner, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet,
所述处理模块,还用于:根据所述Next Header字段的值确定所述第一报文中包括所述OAM报文。The processing module is further configured to: determine that the first message includes the OAM message according to the value of the Next Header field.
在另一种可能的实现方式中,所述处理模块具体用于:确定所述第一IPv6头的DA为所述第一网络设备的单播IPv6地址;根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another possible implementation manner, the processing module is specifically configured to: determine that the DA of the first IPv6 header is the unicast IPv6 address of the first network device; The forwarding information base FIB determines the type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
在另一种可能的实现方式中,所述处理模块具体用于:确定所述第一IPv6头的DA为组播IPv6地址;根据所述第一IPv6头的DA和组播转发信息库MFIB确定所述OAM检测的类型,其中,所述MFIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another possible implementation manner, the processing module is specifically configured to: determine that the DA of the first IPv6 header is a multicast IPv6 address; determine according to the DA of the first IPv6 header and the multicast forwarding information base MFIB The type of the OAM detection, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
在另一种可能的实现方式中,所述处理模块具体用于:对所述第一报文进行解封装,得到所述OAM报文;根据所述OAM报文确定第二报文;向所述第二网络设备发送所述第二报文。In another possible implementation manner, the processing module is specifically configured to: decapsulate the first packet to obtain the OAM packet; determine a second packet according to the OAM packet; The second network device sends the second message.
在另一种可能的实现方式中,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文。In another possible implementation manner, the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA indicates that the second message is an OAM detection response message.
在另一种可能的实现方式中,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。In another possible implementation manner, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
在另一种可能的实现方式中,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。In another possible implementation manner, the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
在另一种可能的实现方式中,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。In another possible implementation manner, the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
第四方面,提供了一种第一网络设备,所述第一网络设备具有实现上述方法中第一网络设备行为的功能。所述功能可以基于硬件实现,也可以基于硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a fourth aspect, a first network device is provided, and the first network device has a function of implementing the behavior of the first network device in the above method. The functions can be implemented based on hardware, and can also be implemented based on hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第一网络设备的结构中包括处理器和接口,所述处理器被配置为支持第一网络设备执行上述方法中相应的功能。所述接口用于支持第一网络设备接收第一报文。In a possible design, the structure of the first network device includes a processor and an interface, and the processor is configured to support the first network device to perform corresponding functions in the above method. The interface is used to support the first network device to receive the first packet.
所述第一网络设备还可以包括存储器,所述存储器用于与处理器耦合,其保存第一网络设备必要的程序指令和数据。The first network device may also include a memory for coupling with the processor and storing necessary program instructions and data for the first network device.
在另一个可能的设计中,所述第一网络设备包括:处理器、发送器、接收器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接发送器、接收器、随机存取存储器以及只读存储器。其中,当需要运行第一网络设备时,通过固化在只读存储器中的基本输入/输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导第一网络设备进入正常运行状态。在第一网络设备进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第一方面或第一方面的任意可能的实现方式中的方法。In another possible design, the first network device includes: a processor, a transmitter, a receiver, a random access memory, a read only memory, and a bus. Wherein, the processor is respectively coupled to the transmitter, the receiver, the random access memory and the read only memory through the bus. Wherein, when the first network device needs to be run, the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the first network device is guided to enter a normal operation state. After the first network device enters the normal operation state, the application program and the operating system are run in the random access memory, so that the processor executes the method in the first aspect or any possible implementation manner of the first aspect.
第五方面,提供一种第一网络设备,所述第一网络设备包括:主控板和接口板,进一 步,还可以包括交换网板。所述第一网络设备用于执行第一方面或第一方面的任意可能的实现方式中的方法。具体地,所述第一网络设备包括用于执行第三方面或第三方面的任意可能的实现方式中的方法的模块。In a fifth aspect, a first network device is provided, the first network device includes: a main control board and an interface board, and may further include a switching network board. The first network device is configured to execute the method in the first aspect or any possible implementation manner of the first aspect. Specifically, the first network device includes a module for executing the third aspect or the method in any possible implementation manner of the third aspect.
第六方面,提供一种第一网络设备,所述第一网络设备包括控制模块和第一转发子设备。所述第一转发子设备包括:接口板,进一步,还可以包括交换网板。所述第一转发子设备用于执行第五方面中的接口板的功能,进一步,还可以执行第五方面中交换网板的功能。所述控制模块中包括接收器、处理器、发送器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接接收器、发送器、随机存取存储器以及只读存储器。其中,当需要运行控制模块时,通过固化在只读存储器中的基本输入/输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导控制模块进入正常运行状态。在控制模块进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第五方面中主控板的功能。In a sixth aspect, a first network device is provided, where the first network device includes a control module and a first forwarding sub-device. The first forwarding sub-device includes: an interface board, and further, may also include a switching network board. The first forwarding sub-device is configured to perform the function of the interface board in the fifth aspect, and further, may also perform the function of the switching network board in the fifth aspect. The control module includes a receiver, a processor, a transmitter, a random access memory, a read-only memory and a bus. Wherein, the processor is respectively coupled to the receiver, the transmitter, the random access memory and the read only memory through the bus. Wherein, when the control module needs to be run, the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the control module is guided to enter a normal operation state. After the control module enters the normal operation state, the application program and the operating system are run in the random access memory, so that the processor performs the function of the main control board in the fifth aspect.
可以理解的是,在实际应用中,第一网络设备可以包含任意数量的接口,处理器或者存储器。It can be understood that, in practical applications, the first network device may include any number of interfaces, processors or memories.
第七方面,提供了一种第二网络设备,所述第二网络设备为隧道的入口设备,所述第二网络设备包括:In a seventh aspect, a second network device is provided, where the second network device is an ingress device of a tunnel, and the second network device includes:
处理模块,用于获取第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第一IPv6头的目的地址DA用于指示OAM检测的类型;The processing module is configured to obtain a first message, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, and the destination address DA of the first IPv6 header is to indicate the type of OAM detection;
发送模块,用于经由所述隧道向第一网络设备发送所述第一报文,所述第一网络设备为所述隧道的出口设备。A sending module, configured to send the first packet to a first network device via the tunnel, where the first network device is an egress device of the tunnel.
在一种可能的实现方式中,所述第一IPv6头位于所述隧道头和所述OAM报文之间。In a possible implementation manner, the first IPv6 header is located between the tunnel header and the OAM packet.
在另一种可能的实现方式中,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文。In another possible implementation manner, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
在另一种可能的实现方式中,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文。In another possible implementation manner, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
在另一种可能的实现方式中,所述第二网络设备还包括:In another possible implementation manner, the second network device further includes:
接收模块,用于接收第二报文,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文;A receiving module, configured to receive a second packet, where the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA indicates that the second message is an OAM detection response message;
所述处理模块,还用于根据所述第二IPv6头的DA对所述第二报文进行处理。The processing module is further configured to process the second packet according to the DA of the second IPv6 header.
在另一种可能的实现方式中,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。In another possible implementation manner, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
在另一种可能的实现方式中,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。In another possible implementation manner, the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
在另一种可能的实现方式中,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。In another possible implementation manner, the tunnel includes any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, a bit index-based display Explicitly replicated BIER tunnels, Bit-Indexed Explicitly replicated BIERv6 tunnels for Internet Protocol version 6.
第八方面,提供了一种第二网络设备,所述第二网络设备具有实现上述方法中第二网 络设备行为的功能。所述功能可以基于硬件实现,也可以基于硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In an eighth aspect, a second network device is provided, and the second network device has a function of implementing the behavior of the second network device in the above method. The functions can be implemented based on hardware, and can also be implemented based on hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第二网络设备的结构中包括处理器和接口,所述处理器被配置为支持第二网络设备执行上述方法中相应的功能。所述接口用于支持第二网络设备获取第一报文。In a possible design, the structure of the second network device includes a processor and an interface, and the processor is configured to support the second network device to perform the corresponding functions in the above method. The interface is used to support the second network device to obtain the first packet.
所述第二网络设备还可以包括存储器,所述存储器用于与处理器耦合,其保存第二网络设备必要的程序指令和数据。The second network device may also include a memory for coupling with the processor that stores necessary program instructions and data for the second network device.
在另一个可能的设计中,所述第二网络设备包括:处理器、发送器、接收器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接发送器、接收器、随机存取存储器以及只读存储器。其中,当需要运行第二网络设备时,通过固化在只读存储器中的基本输入/输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导第二网络设备进入正常运行状态。在第二网络设备进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第二方面或第二方面的任意可能的实现方式中的方法。In another possible design, the second network device includes: a processor, a transmitter, a receiver, a random access memory, a read only memory, and a bus. Wherein, the processor is respectively coupled to the transmitter, the receiver, the random access memory and the read only memory through the bus. Wherein, when the second network device needs to be operated, the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the second network device is guided to enter a normal operation state. After the second network device enters the normal operating state, the application program and the operating system are run in the random access memory, so that the processor executes the method of the second aspect or any possible implementation manner of the second aspect.
第九方面,提供一种第二网络设备,所述第二网络设备包括:主控板和接口板,进一步,还可以包括交换网板。所述第二网络设备用于执行第二方面或第二方面的任意可能的实现方式中的方法。具体地,所述第二网络设备包括用于执行第七方面或第七方面的任意可能的实现方式中的方法的模块。In a ninth aspect, a second network device is provided, where the second network device includes: a main control board and an interface board, and further, may also include a switching network board. The second network device is configured to perform the method in the second aspect or any possible implementation manner of the second aspect. Specifically, the second network device includes a module for performing the method in the seventh aspect or any possible implementation manner of the seventh aspect.
第十方面,提供一种第二网络设备,所述第二网络设备包括控制模块和第一转发子设备。所述第一转发子设备包括:接口板,进一步,还可以包括交换网板。所述第一转发子设备用于执行第九方面中的接口板的功能,进一步,还可以执行第九方面中交换网板的功能。所述控制模块中包括接收器、处理器、发送器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接接收器、发送器、随机存取存储器以及只读存储器。其中,当需要运行控制模块时,通过固化在只读存储器中的基本输入/输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导控制模块进入正常运行状态。在控制模块进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第九方面中主控板的功能。A tenth aspect provides a second network device, where the second network device includes a control module and a first forwarding sub-device. The first forwarding sub-device includes: an interface board, and further, may also include a switching network board. The first forwarding sub-device is configured to perform the function of the interface board in the ninth aspect, and further, can also perform the function of the switching network board in the ninth aspect. The control module includes a receiver, a processor, a transmitter, a random access memory, a read-only memory and a bus. Wherein, the processor is respectively coupled to the receiver, the transmitter, the random access memory and the read only memory through the bus. Wherein, when the control module needs to be run, the basic input/output system solidified in the read-only memory or the bootloader in the embedded system is used to boot the system to start, and the control module is guided to enter a normal operation state. After the control module enters the normal operation state, the application program and the operating system are run in the random access memory, so that the processor performs the function of the main control board in the ninth aspect.
可以理解的是,在实际应用中,第二网络设备可以包含任意数量的接口,处理器或者存储器。It can be understood that, in practical applications, the second network device may include any number of interfaces, processors or memories.
第十一方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第一方面或第一方面的任一种可能执行的方法。In an eleventh aspect, a computer program product is provided, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer can execute the first aspect or any one of the first aspects. method of execution.
第十二方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第二方面或第二方面的任一种可能执行的方法。A twelfth aspect provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer program code enables the computer to execute the second aspect or any one of the possibilities of the second aspect method of execution.
第十三方面,提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第一方面或第一方面的任一种可能执行的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的 PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器(hard drive)。In a thirteenth aspect, a computer-readable medium is provided, and the computer-readable medium stores program codes, which, when the computer program codes are run on a computer, cause the computer to execute the first aspect or any one of the first aspects. possible methods. These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
第十四方面,提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第二方面或第二方面的任一种可能执行的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器(hard drive)。In a fourteenth aspect, a computer-readable medium is provided, the computer-readable medium stores program codes, and when the computer program codes are executed on a computer, causes the computer to execute any one of the second aspect or the second aspect above possible methods. These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
第十五方面,提供一种芯片,该芯片包括处理器与数据接口,其中,处理器通过该数据接口读取存储器上存储的指令,以执行第一方面或第一方面任意一种可能的实现方式中的方法。在具体实现过程中,该芯片可以以中央处理器(central processing unit,CPU)、微控制器(micro controller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。A fifteenth aspect provides a chip, the chip includes a processor and a data interface, wherein the processor reads an instruction stored in a memory through the data interface to execute the first aspect or any possible implementation of the first aspect method in method. In the specific implementation process, the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
第十六方面,提供一种芯片,该芯片包括处理器与数据接口,其中,处理器通过该数据接口读取存储器上存储的指令,以执行第二方面或第二方面任意一种可能的实现方式中的方法。在具体实现过程中,该芯片可以以中央处理器(central processing unit,CPU)、微控制器(micro controller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。A sixteenth aspect provides a chip, which includes a processor and a data interface, wherein the processor reads an instruction stored in a memory through the data interface to execute the second aspect or any possible implementation of the second aspect method in method. In the specific implementation process, the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
第十七方面,提供了一种OAM检测的系统,该系统包括上述第一网络设备和第二网络设备。In a seventeenth aspect, a system for OAM detection is provided, and the system includes the above-mentioned first network device and second network device.
图1是适用于本申请实施例的一种应用场景示意图。FIG. 1 is a schematic diagram of an application scenario applicable to the embodiment of the present application.
图2是本申请实施例提供的一种可能的场景示意图。FIG. 2 is a schematic diagram of a possible scenario provided by an embodiment of the present application.
图3是本申请实施例提供的另一种可能的场景示意图。FIG. 3 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
图4是本申请实施例提供的一种OAM检测的方法的示意性流程图。FIG. 4 is a schematic flowchart of an OAM detection method provided by an embodiment of the present application.
图5是本申请实施例提供的另一种OAM检测的方法的示意性流程图。FIG. 5 is a schematic flowchart of another OAM detection method provided by an embodiment of the present application.
图6是本申请实施例提供的一种STAMP检测的场景示意图。FIG. 6 is a schematic diagram of a scenario of STAMP detection provided by an embodiment of the present application.
图7是本申请实施例提供的另一种可能的场景示意图。FIG. 7 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
图8是本申请实施例提供的另一种可能的场景示意图。FIG. 8 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
图9是本申请实施例提供的另一种可能的场景示意图。FIG. 9 is a schematic diagram of another possible scenario provided by an embodiment of the present application.
图10是本申请实施例提供的另一种STAMP检测的场景示意图。FIG. 10 is a schematic diagram of another STAMP detection scenario provided by an embodiment of the present application.
图11是本申请实施例提供的一种S-BFD检测的场景示意图。FIG. 11 is a schematic diagram of a scenario of S-BFD detection provided by an embodiment of the present application.
图12是本申请实施例提供的一种Ping检测的场景示意图。FIG. 12 is a schematic diagram of a scenario of Ping detection provided by an embodiment of the present application.
图13是本申请实施例提供的一种BFD检测的场景示意图。FIG. 13 is a schematic diagram of a scenario of BFD detection provided by an embodiment of the present application.
图14是本申请实施例提供的一种第一网络设备1400的示意性结构图。FIG. 14 is a schematic structural diagram of a first network device 1400 provided by an embodiment of the present application.
图15是本申请实施例的第一网络设备2000的硬件结构示意图。FIG. 15 is a schematic diagram of a hardware structure of a first network device 2000 according to an embodiment of the present application.
图16为本申请实施例的另一种第一网络设备2100的硬件结构示意图。FIG. 16 is a schematic diagram of a hardware structure of another first network device 2100 according to an embodiment of the present application.
图17是本申请实施例提供的一种第二网络设备1700的示意性结构图。FIG. 17 is a schematic structural diagram of a second network device 1700 provided by an embodiment of the present application.
图18是本申请实施例的第二网络设备2200的硬件结构示意图。FIG. 18 is a schematic diagram of a hardware structure of a second network device 2200 according to an embodiment of the present application.
图19为本申请实施例的另一种第二网络设备2400的硬件结构示意图。FIG. 19 is a schematic diagram of a hardware structure of another second network device 2400 according to an embodiment of the present application.
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
本申请将围绕包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。This application will present various aspects, embodiments or features in the context of a system comprising a plurality of devices, components, modules, and the like. It is to be understood and appreciated that the various systems may include additional devices, components, modules, etc., and/or may not include all of the devices, components, modules, etc. discussed in connection with the figures. In addition, combinations of these schemes can also be used.
另外,在本申请实施例中,“示例的”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In addition, in the embodiments of the present application, words such as "exemplary" and "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word example is intended to present a concept in a concrete way.
本申请实施例中,“相应的(corresponding,relevant)”和“对应的(corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。In the embodiments of the present application, "corresponding (corresponding, relevant)" and "corresponding (corresponding)" may sometimes be used interchangeably. It should be noted that, when the difference is not emphasized, the meanings to be expressed are the same.
本申请实施例描述的网络架构以及业务场景是为了更加清楚地说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and service 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 the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:包括单独存在A,同时存在A和B,以及单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "And/or", which describes the relationship of the associated objects, means that there can be three relationships, for example, A and/or B, which can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c may represent: a, b, c, ab, ac, bc, or abc, where a, b, and c may be single or multiple .
在互联网协议(Internet Protocol,IP)承载网络中,对IP业务进行操作、管理和维护(operation,administration and maintenance,OAM)检测是一种常见的技术。应理解,OAM检测是指根据运营商网络运营的实际需要,通常将网络的管理工作划分为3大类:操作 (operation)、管理(administration)、维护(maintenance)。操作主要完成日常网络和业务进行的分析、预测、规划和配置工作;维护主要是对网络及其业务的测试和故障管理等进行的日常操作活动。In an Internet Protocol (IP) bearer network, operation, administration and maintenance (OAM) detection of IP services is a common technology. It should be understood that the OAM detection refers to that, according to the actual needs of the operator's network operation, the network management work is usually divided into three categories: operation, administration, and maintenance. Operation mainly completes the analysis, prediction, planning and configuration of the daily network and services; maintenance is mainly the daily operation activities such as testing and fault management of the network and its services.
OAM检测的类型有多种,本申请实施例对不做具体限定。一个示例,该OAM检测可以是网际包探测器(packet internet groper,Ping)。上述OAM检测可以是单向主动测量,或者也可以是双向主动测量,例如,单向主动测量协议(one-way active measurement protocol,OWAMP)、双向主动测量协议(two-way active measurement protocol,TWAMP)、简单双向主动测量协议(simple two-way active measurement protocol,STAMP)。上述OAM检测也可以是双向转发检测(bidirectional forwarding detection,BFD),或者无缝的双向转发检测(seamless bidirectional forwarding detection,S-BFD)。There are various types of OAM detection, which are not specifically limited in this embodiment of the present application. As an example, the OAM detection may be an internet packet groper (Ping). The above OAM detection may be a one-way active measurement, or may also be a two-way active measurement, for example, one-way active measurement protocol (one-way active measurement protocol, OWAMP), two-way active measurement protocol (two-way active measurement protocol, TWAMP) , Simple two-way active measurement protocol (simple two-way active measurement protocol, STAMP). The above OAM detection may also be bidirectional forwarding detection (BFD), or seamless bidirectional forwarding detection (S-BFD).
应理解,STAMP也可以被称为TWAMP Light。S-BFD也可以称为简单BFD。It should be understood that STAMP may also be referred to as TWAMP Light. S-BFD can also be called simple BFD.
下面结合图1,对适用于本申请实施例的一种应用场景进行描述。An application scenario applicable to the embodiment of the present application is described below with reference to FIG. 1 .
图1是适用于本申请实施例的一种应用场景示意图。如图1所示,该场景中包括:设备A、设备B、设备R1、设备R2、设备R3。FIG. 1 is a schematic diagram of an application scenario applicable to the embodiment of the present application. As shown in FIG. 1 , the scenario includes: device A, device B, device R1, device R2, and device R3.
其中,设备A作为隧道的入口设备,设备B作为隧道的出口设备。设备R1、设备R2、设备R3为该隧道中对报文进行转发的设备。Among them, device A serves as the ingress device of the tunnel, and device B serves as the egress device of the tunnel. Device R1, device R2, and device R3 are devices that forward packets in the tunnel.
应理解,本申请实施例对隧道中对报文进行转发的设备的数量不做具体限定,为了便于描述,图1中以设备R1、设备R2、设备R3为例进行说明。It should be understood that the embodiments of the present application do not specifically limit the number of devices that forward packets in the tunnel. For ease of description, device R1, device R2, and device R3 are used as examples for description in FIG. 1 .
设备A可以沿着隧道(设备A和设备B之间的隧道)向设备B发送OAM检测报文,该OAM检测报文用于检测设备A和设备B之间的隧道的连通性和性能。Device A can send an OAM detection packet to device B along the tunnel (tunnel between device A and device B), where the OAM detection packet is used to detect the connectivity and performance of the tunnel between device A and device B.
设备A和设备B之间的隧道类型可以有多种,本申请对此不做具体限定,下面介绍几种可能的隧道类型。There may be multiple types of tunnels between device A and device B, which are not specifically limited in this application, and several possible tunnel types are introduced below.
一个示例,该隧道为多协议标签交换(multi-protocol label switching,MPLS)隧道,例如,MPLS的点到点(MPLS point-to-point,MPLS P2P)隧道、或MPLS的点到多点(MPLS point-to-multipoint,MPLS P2MP)隧道、或MPLS的分段路由(segment routing,SR-MPLS)隧道。As an example, the tunnel is a multi-protocol label switching (MPLS) tunnel, such as an MPLS point-to-point (MPLS P2P) tunnel, or an MPLS point-to-multipoint (MPLS) tunnel. point-to-multipoint, MPLS P2MP) tunnel, or MPLS segment routing (segment routing, SR-MPLS) tunnel.
另一个示例,该隧道为IP隧道,例如,互联网协议第六版(internet protocol version 6,IPv6)隧道、或使用Ipv6数据面的段路由(segment routing using ipv6 data plane,SRv6)隧道、或使用Ipv6数据面的段路由业务工程(segment routing using ipv6 data plane traffic engineering,SRv6-TE)隧道。As another example, the tunnel is an IP tunnel, such as an internet protocol version 6 (IPv6) tunnel, or a segment routing using ipv6 data plane (SRv6) tunnel, or an IPv6 Segment routing using ipv6 data plane traffic engineering (SRv6-TE) tunnels on the data plane.
应理解,IP隧道、IPv6隧道、SRv6隧道、SRv6-TE隧道通常可以是点到点(point to point,P2P)的隧道。例如,IP/IPv6/SRv6/SRv6-TE的P2P隧道。It should be understood that IP tunnels, IPv6 tunnels, SRv6 tunnels, and SRv6-TE tunnels may generally be point-to-point (P2P) tunnels. For example, P2P tunnels for IP/IPv6/SRv6/SRv6-TE.
另一个示例,该隧道还可以是点到多点(point to point,P2MP)的隧道,例如,该P2MP的隧道可以是位索引的显式复制(bit indexed explicit replication,BIER)的P2MP隧道、或BIERv6的P2MP隧道。As another example, the tunnel may also be a point-to-point (P2MP) tunnel, for example, the P2MP tunnel may be a bit indexed explicit replication (BIER) P2MP tunnel, or P2MP tunnel for BIERv6.
设备A向设备B发送的OAM检测报文可以包括:OAM报文部分和OAM报文之前的部分。OAM报文之前的部分本申请实施例可以称为隧道头,或外层头,或外层隧道头,将OAM报文部分称内层OAM报文。The OAM detection packet sent by device A to device B may include: an OAM packet part and a part before the OAM packet. The part before the OAM packet in this embodiment of the present application may be referred to as a tunnel header, or an outer layer header, or an outer layer tunnel header, and the part of the OAM packet is referred to as an inner layer OAM packet.
OAM报文可以是原始的OAM报文,或者也可以是被用户数据报协议(user datagram protocol,UDP)封装的OAM报文,或者还可以是被IP封装的OAM报文,本申请对此不做具体限定。其中,被UDP封装的OAM报文可以包括:UDP头和原始的OAM报文,被IP封装的OAM报文可以包括:IP头、UDP头和原始的OAM报文。The OAM message may be an original OAM message, or may be an OAM message encapsulated by the user datagram protocol (UDP), or may be an OAM message encapsulated by IP, which is not covered by this application. Make specific restrictions. The OAM packet encapsulated by UDP may include: UDP header and original OAM packet, and the OAM packet encapsulated by IP may include IP header, UDP header and original OAM packet.
可选地,以被IPv6封装的OAM报文为例,OAM报文还可以包括:IPv6扩展头。Optionally, taking the OAM packet encapsulated by IPv6 as an example, the OAM packet may further include: an IPv6 extension header.
本申请实施例对IPv6扩展头做具体限定。例如,该IPv6扩展头可以是目的选项头(destination option header,DOH),又如,该IPv6扩展头还可以是路由头(routing header,RH)。The embodiments of the present application specifically limit the IPv6 extension header. For example, the IPv6 extension header may be a destination option header (destination option header, DOH), and for another example, the IPv6 extension header may also be a routing header (routing header, RH).
隧道头的格式是根据不同的隧道类型确定的。例如,对于MPLS隧道而言,该隧道头为MPLS标签栈。又如,对于IP隧道而言,该隧道头为IP/IPv6头、或IP/IPv6头+UDP头、或IP/IPv6头+GRE头。又如,对于SRv6-TE的隧道而言,该隧道头为IP/IPv6头+段路由头(segment routing header,SRH)。又如,对于BIER的隧道而言,该隧道头为BIER头。又如,对于BIERv6的隧道而言,该隧道头为BIERv6头。The format of the tunnel header is determined according to different tunnel types. For example, for an MPLS tunnel, the tunnel header is the MPLS label stack. For another example, for an IP tunnel, the tunnel header is an IP/IPv6 header, or an IP/IPv6 header+UDP header, or an IP/IPv6 header+GRE header. For another example, for an SRv6-TE tunnel, the tunnel header is an IP/IPv6 header + a segment routing header (segment routing header, SRH). For another example, for a BIER tunnel, the tunnel header is a BIER header. For another example, for a BIERv6 tunnel, the tunnel header is a BIERv6 header.
作为示例,设备A向设备B发送的OAM检测报文可以表示为以下的任意一种格式:As an example, the OAM detection packet sent by device A to device B can be expressed in any of the following formats:
1、设备A和设备B之间的隧道类型为MPLS P2P隧道或MPLS P2MP隧道,OAM检测报文包括:{标签栈,OAM报文};1. The tunnel type between device A and device B is MPLS P2P tunnel or MPLS P2MP tunnel, and the OAM detection packet includes: {label stack, OAM packet};
2、设备A和设备B之间的隧道类型为IP/IPv6的隧道,OAM检测报文包括:{外层IP/IPv6头,OAM报文};2. The tunnel type between device A and device B is an IP/IPv6 tunnel, and the OAM detection packet includes: {outer IP/IPv6 header, OAM packet};
3、设备A和设备B之间的隧道类型为IP/IPv6的UDP隧道,OAM检测报文包括:{外层IP/IPv6头,外层UDP头,OAM报文};3. The tunnel type between device A and device B is an IP/IPv6 UDP tunnel, and the OAM detection message includes: {outer IP/IPv6 header, outer UDP header, OAM message};
4、设备A和设备B之间的隧道类型为IP/IPv6的GRE隧道,OAM检测报文包括{外层IP/IPv6头,外层GRE头,OAM报文};4. The tunnel type between device A and device B is an IP/IPv6 GRE tunnel, and the OAM detection packet includes {outer IP/IPv6 header, outer GRE header, OAM packet};
5、设备A和设备B之间的隧道类型为SRv6的隧道,OAM检测报文包括{外层IP/IPv6头,可选RH头,OAM报文};5. The tunnel type between device A and device B is an SRv6 tunnel, and the OAM detection packet includes {outer IP/IPv6 header, optional RH header, OAM packet};
6、设备A和设备B之间的隧道类型为BIER的隧道,OAM检测报文包括{BIER头,OAM报文};6. The tunnel type between device A and device B is a BIER tunnel, and the OAM detection packet includes {BIER header, OAM packet};
7、设备A和设备B之间的隧道类型为BIERv6的隧道,OAM检测报文包括{BIERv6头,OAM报文}。7. The tunnel type between device A and device B is a BIERv6 tunnel, and the OAM detection packet includes {BIERv6 header, OAM packet}.
设备B接收到OAM检测报文后,需要根据OAM检测的类型进行相应的处理。因此,设备A向设备B发送的OAM检测报文需要指示设备B进行OAM检测,以及具体的OAM检测的类型,以便于设备B根据该指示进行OAM检测的相关转发动作。After receiving the OAM detection packet, device B needs to perform corresponding processing according to the type of OAM detection. Therefore, the OAM detection packet sent by device A to device B needs to instruct device B to perform OAM detection and a specific type of OAM detection, so that device B can perform related forwarding actions of OAM detection according to the instruction.
相关的技术方案中,OAM检测报文的隧道头中包含OAM检测指示信息,该OAM检测指示信息用于指示设备B进行OAM检测,以及具体的OAM检测的类型。在一些场景中,通过上述技术方案会出现OAM检测报文与数据报文在处理上不一致的问题。In a related technical solution, the tunnel header of the OAM detection packet includes OAM detection indication information, and the OAM detection indication information is used to instruct device B to perform OAM detection and a specific type of OAM detection. In some scenarios, through the above technical solutions, there may be a problem that the processing of OAM detection packets and data packets is inconsistent.
作为一个示例,在IPv6的网络中,对SRv6隧道进行OAM检测时,需要在OAM检测报文的隧道头中增加一个额外的网络功能指示。例如,在OAM检测报文的隧道头的SRH头中增加一个端点时间戳和转发(endpoint timestamp and forward,End.TSF)的SRv6 SID作为网络功能指示,以指示相应设备(例如,设备B)进行OAM检测的相关转发动作。As an example, in an IPv6 network, when OAM detection is performed on an SRv6 tunnel, an additional network function indication needs to be added to the tunnel header of the OAM detection packet. For example, add an endpoint timestamp and SRv6 SID of endpoint timestamp and forward (End.TSF) to the SRH header of the tunnel header of the OAM detection packet as a network function indication to instruct the corresponding device (for example, device B) to perform Relevant forwarding actions detected by OAM.
例如,在图2所示的场景中,对于数据报文而言,设备A向设备B发送的数据报文的隧道头中可以不包括SRH头,只需要将设备B的目的地址填写在外层IPv6头的目的地 址字段中。这样,对于数据报文来说,作为隧道出口的设备B不需要处理数据报文隧道头中的SRH头。For example, in the scenario shown in Figure 2, for a data packet, the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in the outer IPv6 in the destination address field of the header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
而对于OAM检测报文,设备A向设备B发送的OAM检测报文的隧道头中需要包括一个SRH头,且该SRH头中既包含设备B的地址,还包含设备B的一个End.TSF的地址(End.TSF的地址作为网络功能指示,以指示设备B进行OAM检测的相关转发动作)。对于OAM检测报文来说,作为隧道出口的设备B需要处理OAM检测报文隧道头中的SRH头。如果设备B不能处理SRH头,那么设备B无法确定接收到的报文是OAM检测报文,也就将无法进行OAM检测。For the OAM detection packet, the tunnel header of the OAM detection packet sent by device A to device B needs to include an SRH header, and the SRH header contains both the address of device B and the address of an End.TSF of device B. Address (the address of End.TSF is used as a network function indication to instruct device B to perform the relevant forwarding action of OAM detection). For OAM detection packets, device B, which is the tunnel egress, needs to process the SRH header in the tunnel header of the OAM detection packets. If device B cannot process the SRH header, device B cannot determine that the received packet is an OAM detection packet, and therefore cannot perform OAM detection.
又如,在图3所示的场景中,对于数据报文而言,设备A向设备B发送的数据报文的隧道头中可以包括SRH头,该SRH头中包含2个SRv6 SID,一个是设备B的目的地址,另外一个是设备R2的目的地址。当数据报文从设备A转发至设备R2时,设备R2会进行倒数第二段弹出(penultimate segment pop,PSP)处理,将数据报文中的SRH头弹出,并根据外层IPv6头的目的地址为设备B,将不包含SRH头的数据报文从设备R2转发至设备B。数据报文到达设备B时隧道头中已经不包含SRH头。这样,对于数据报文来说,作为隧道出口的设备B不需要处理数据报文隧道头中的SRH头。For another example, in the scenario shown in Figure 3, for a data packet, the tunnel header of the data packet sent by device A to device B may include an SRH header, and the SRH header includes two SRv6 SIDs, one is The destination address of device B, and the other is the destination address of device R2. When a data packet is forwarded from device A to device R2, device R2 will perform the penultimate segment pop (PSP) process, pop the SRH header in the data packet, and pop the SRH header in the data packet according to the destination address of the outer IPv6 header. For device B, forward the data packet without the SRH header from device R2 to device B. When the data packet reaches device B, the tunnel header does not contain the SRH header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
而对于OAM检测报文,设备A向设备B发送的OAM检测报文的隧道头中需要包括一个SRH头,且该SRH头中需要包含3个SRv6 SID,分别为设备R2的目的地址、设备B的目的地址、设备B的一个End.TSF的地址。在OAM检测报文到达设备B之前无法进行PSP处理,因此,设备B收到的OAM检测报文的隧道头中还会存在SRH头且该SRH头中包含3个SRv6 SID。对于OAM检测报文来说,作为隧道出口的设备B需要处理OAM检测报文隧道头中的SRH头。如果设备B不能处理SRH头,那么设备B无法确定接收到的报文是OAM检测报文,也就将无法进行OAM检测。For the OAM detection packet, the tunnel header of the OAM detection packet sent by device A to device B needs to include an SRH header, and the SRH header needs to contain three SRv6 SIDs, which are the destination address of device R2 and device B. The destination address, the address of an End.TSF of device B. The PSP processing cannot be performed before the OAM detection packet reaches device B. Therefore, the tunnel header of the OAM detection packet received by device B also contains an SRH header and the SRH header contains three SRv6 SIDs. For OAM detection packets, device B, which is the tunnel egress, needs to process the SRH header in the tunnel header of the OAM detection packets. If device B cannot process the SRH header, device B cannot determine that the received packet is an OAM detection packet, and therefore cannot perform OAM detection.
因此,在上述相关的技术方案中,OAM检测报文的隧道头中包含OAM检测的指示信息,使得在一些场景中,报文传输路径上除隧道出口设备之外的各个设备上会出现OAM检测报文与数据报文在处理上不一致的问题。Therefore, in the above-mentioned related technical solutions, the tunnel header of the OAM detection packet includes OAM detection indication information, so that in some scenarios, OAM detection occurs on each device except the tunnel egress device on the packet transmission path. The problem of inconsistent processing of packets and data packets.
有鉴于此,本申请实施例提供了一种OAM检测的方法,利用OAM检测报文的隧道头之后的IPv6头中的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测。这样,报文传输路径上除隧道出口设备之外的各个设备只需要处理OAM检测报文的隧道头部分,从而使得报文传输路径上除隧道出口设备之外的各个设备对OAM检测报文的处理和数据报文的处理过程一致。In view of this, the embodiment of the present application provides an OAM detection method, which uses the destination address in the IPv6 header after the tunnel header of the OAM detection packet to instruct the egress device (eg, device B) of the tunnel to perform OAM detection. In this way, each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the OAM detection packet, so that each device on the packet transmission path except the tunnel egress device has no effect on the OAM detection packet. The processing is the same as the processing of data packets.
下面结合图4,对本申请实施例提供的一种OAM检测的方法进行详细描述。The following describes in detail an OAM detection method provided by an embodiment of the present application with reference to FIG. 4 .
图4是本申请实施例提供的一种OAM检测的方法的示意性流程图。如图4所示,该方法可以包括步骤410-430,下面分别对步骤410-430进行详细描述。FIG. 4 is a schematic flowchart of an OAM detection method provided by an embodiment of the present application. As shown in FIG. 4, the method may include steps 410-430, and the steps 410-430 will be described in detail below respectively.
步骤410:第一网络设备经由隧道接收第二网络设备发送的第一报文,第一报文包括隧道头、第一IPv6头以及OAM报文。Step 410: The first network device receives, via the tunnel, a first packet sent by the second network device, where the first packet includes a tunnel header, a first IPv6 header, and an OAM packet.
第二网络设备为隧道的入口设备,对应于上文中的设备A。第一网络设备为隧道的出口设备,对应于上文中的设备B。The second network device is the ingress device of the tunnel, corresponding to the device A above. The first network device is the egress device of the tunnel, corresponding to the device B above.
第二网络设备和第一网络设备之间的隧道的类型可以有多种,本申请实施例对此不做限定。具体的请参考上文中对设备A和设备B之间的隧道类型的描述,此处不再赘述。There may be multiple types of tunnels between the second network device and the first network device, which are not limited in this embodiment of the present application. For details, please refer to the description of the tunnel type between the device A and the device B above, which will not be repeated here.
第二网络设备经由隧道向第一网络设备发送的第一报文可以是上文中的OAM检测报文。第一报文中可以包括:隧道头、第一IPv6头以及OAM报文。The first packet sent by the second network device to the first network device via the tunnel may be the above OAM detection packet. The first packet may include: a tunnel header, a first IPv6 header, and an OAM packet.
其中,隧道头的格式是根据不同的隧道类型确定的例如,对于MPLS隧道而言,该隧道头为MPLS标签栈。又如,对于IP隧道而言,该隧道头为IP/IPv6头、或IP/IPv6头+UDP头、或IP/IPv6头+GRE头。又如,对于SRv6-TE的隧道而言,该隧道头为IP/IPv6头+段路由头(segment routing header,SRH)。又如,对于BIER的隧道而言,该隧道头为BIER头。又如,对于BIERv6的隧道而言,该隧道头为BIERv6头。具体的请参考上文中对隧道头的描述,此处不再赘述。The format of the tunnel header is determined according to different tunnel types. For example, for an MPLS tunnel, the tunnel header is an MPLS label stack. For another example, for an IP tunnel, the tunnel header is an IP/IPv6 header, or an IP/IPv6 header+UDP header, or an IP/IPv6 header+GRE header. For another example, for an SRv6-TE tunnel, the tunnel header is an IP/IPv6 header + a segment routing header (segment routing header, SRH). For another example, for a BIER tunnel, the tunnel header is a BIER header. For another example, for a BIERv6 tunnel, the tunnel header is a BIERv6 header. For details, please refer to the description of the tunnel header above, which will not be repeated here.
本申请实施例中第一IPv6头不是隧道头中的IPv6头,而是隧道头之后的IPv6头。一个示例,第一IPv6头位于隧道头和OAM报文之间。In the embodiment of the present application, the first IPv6 header is not the IPv6 header in the tunnel header, but the IPv6 header after the tunnel header. In one example, the first IPv6 header is located between the tunnel header and the OAM packet.
OAM报文可以是原始的OAM报文,或者也可以是被UDP封装的OAM报文,或者还可以是被IP封装的OAM报文。以OAM报文为被UDP封装的OAM报文为例,第一报文中还包括UDP头。以OAM报文为被IP封装的OAM报文为例,第一报文中还包括IP头。具体的请参考上文中对OAM报文的描述,此处不再赘述。The OAM packet may be an original OAM packet, or may be an OAM packet encapsulated by UDP, or may be an OAM packet encapsulated by IP. Taking the OAM packet as an OAM packet encapsulated by UDP as an example, the first packet further includes a UDP header. Taking the OAM packet as an IP-encapsulated OAM packet as an example, the first packet further includes an IP header. For details, please refer to the description of the OAM packet above, which will not be repeated here.
步骤420:第一网络设备根据第一IPv6头的目的地址DA确定OAM检测的类型。Step 420: The first network device determines the type of OAM detection according to the destination address DA of the first IPv6 header.
本申请实施例中第一IPv6头中不同的目的地址DA用于指示不同的OAM检测的类型。第一网络设备可以根据第一IPv6头的目的地址DA确定OAM检测的类型。In this embodiment of the present application, different destination addresses DA in the first IPv6 header are used to indicate different types of OAM detection. The first network device may determine the type of OAM detection according to the destination address DA of the first IPv6 header.
一个示例,如果第一网络设备确定第一IPv6头的DA为第一网络设备的单播IPv6地址,该第一网络设备可以根据第一IPv6头的DA和转发信息库(forwarding information base,FIB)确定OAM检测的类型。其中,FIB包括第一IPv6头的DA和OAM检测的类型之间的对应关系。An example, if the first network device determines that the DA of the first IPv6 header is the unicast IPv6 address of the first network device, the first network device may, according to the DA of the first IPv6 header and the forwarding information base (FIB) Determines the type of OAM detection. The FIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
另一个示例,所述第一网络设备确定所述第一IPv6头的DA为一个环回单播IPv6地址;所述第一网络设备根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。In another example, the first network device determines that the DA of the first IPv6 header is a loopback unicast IPv6 address; the first network device determines the DA according to the first IPv6 header and the forwarding information base FIB. The type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
应理解,例如0:0:0:0:0:FFFF:7F00:0/104中的任意一个地址都属于“环回单播IPv6地址”。It should be understood that, for example, any address in 0:0:0:0:0:FFFF:7F00:0/104 belongs to the "loopback unicast IPv6 address".
另一个示例,如果第一网络设备确定第一IPv6头的DA为组播IPv6地址,该第一网络设备可以根据第一IPv6头的DA和组播转发信息库(multicast forwarding information base,MFIB)确定OAM检测的类型。其中,MFIB包括第一IPv6头的DA和OAM检测的类型之间的对应关系。Another example, if the first network device determines that the DA of the first IPv6 header is a multicast IPv6 address, the first network device may determine according to the DA of the first IPv6 header and the multicast forwarding information base (multicast forwarding information base, MFIB) Type of OAM detection. The MFIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
可选地,在一些实施例中,第一网络设备还可以确定第一报文中包括OAM报文。一个示例,第一网络设备可以先确定第一报文中包括OAM报文,再根据第一IPv6头的目的地址DA确定OAM检测的类型。另一个示例,第一网络设备还可以先根据第一IPv6头的目的地址DA确定OAM检测的类型,再进行校验,确定第一报文中是否包括OAM报文,如果包括OAM报文,则可以根据OAM检测的类型进行检测。Optionally, in some embodiments, the first network device may further determine that the first packet includes an OAM packet. In an example, the first network device may first determine that the first packet includes an OAM packet, and then determine the type of OAM detection according to the destination address DA of the first IPv6 header. In another example, the first network device may first determine the type of OAM detection according to the destination address DA of the first IPv6 header, and then perform verification to determine whether the first packet includes an OAM packet. Detection can be performed according to the type of OAM detection.
第一网络设备确定第一报文中包括OAM报文的具体实现方式有多种,本申请对此不做具体限定。There are various specific implementation manners for the first network device to determine that the first packet includes the OAM packet, which is not specifically limited in this application.
例如,第一报文中包括UDP头,UDP头的目的端口号用于指示所述第一报文中是否 包括所述OAM报文,第一网络设备可以根据UDP头的目的端口号确定第一报文中是否包括所述OAM报文。多种不同类型的OAM检测报文,可以使用相同的UDP端口号,即UDP端口号指示存在这些类型的OAM检测报文中的一种。具体是哪一种则由第一IPv6头中目的地址DA指示,不同的目的地址DA用于指示不同的OAM检测的类型。这样也可以在存在多种OAM检测类型的情况下、减少UDP端口的个数从而减小系统的攻击面、降低被攻击的风险。For example, the first packet includes a UDP header, and the destination port number of the UDP header is used to indicate whether the first packet includes the OAM packet. The first network device may determine the first packet according to the destination port number of the UDP header. Whether the message includes the OAM message. Multiple different types of OAM detection packets can use the same UDP port number, that is, the UDP port number indicates that there is one of these types of OAM detection packets. The specific one is indicated by the destination address DA in the first IPv6 header, and different destination addresses DA are used to indicate different types of OAM detection. This can also reduce the number of UDP ports in the presence of multiple OAM detection types, thereby reducing the attack surface of the system and reducing the risk of being attacked.
又如,第一报文的第一IPv6头中包括下一个头(Next Header)字段。Next Header字段也可以称为协议(protocol,proto)字段,用于指示IPv6头后面的负载类型。例如,Next Header字段用于指示所述第一报文中是否包括所述OAM报文,第一网络设备可以根据第一IPv6头的Next Header字段的值确定第一报文中是否包括所述OAM报文。For another example, the first IPv6 header of the first packet includes a next header (Next Header) field. The Next Header field can also be called the protocol (protocol, proto) field, and is used to indicate the type of payload behind the IPv6 header. For example, the Next Header field is used to indicate whether the first packet includes the OAM packet, and the first network device may determine whether the OAM packet is included in the first packet according to the value of the Next Header field of the first IPv6 header message.
应理解,多种不同类型的OAM检测报文,可以使用相同的Next Header值,即Next Header端口号指示存在这些类型的OAM检测报文中的一种。具体是哪一种则由第一IPv6头中目的地地址DA指示,不同的目的地址DA用于指示不同的OAM检测的类型。It should be understood that the same Next Header value can be used for a variety of different types of OAM detection packets, that is, the Next Header port number indicates that there is one of these types of OAM detection packets. The specific one is indicated by the destination address DA in the first IPv6 header, and different destination addresses DA are used to indicate different types of OAM detection.
步骤430:第一网络设备根据OAM检测的类型进行检测。Step 430: The first network device performs detection according to the type of OAM detection.
第一网络设备收到第一报文后,其作为隧道的出口设备,会对第一报文进行解封装,获得第一报文中的OAM报文,并根据步骤420的第一IPv6头中的目的地址DA指示的OAM检测的类型,进行OAM检测的相应处理。After the first network device receives the first packet, as an egress device of the tunnel, it decapsulates the first packet, obtains the OAM packet in the first packet, and determines the OAM packet in the first packet according to the first IPv6 header in step 420. The type of OAM detection indicated by the destination address DA, and the corresponding processing of the OAM detection is performed.
下面列举第一IPv6的目的地址指示的几种可能的OAM检测的类型。Several possible types of OAM detection indicated by the destination address of the first IPv6 are listed below.
(1)、第一IPv6头的目的地址指示“TWAMP”处理,第一网络设备根据该指示信息进行TWAMP的处理,根据OAM报文确定第二报文,并发送第二报文给第二网络设备;(1) The destination address of the first IPv6 header indicates "TWAMP" processing, the first network device performs TWAMP processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment;
(2)、第一IPv6头的目的地址指示“STAMP”处理,第一网络设备根据该指示信息进行STAMP的处理,根据OAM报文确定第二报文,并发送第二报文给第二网络设备;(2) The destination address of the first IPv6 header indicates "STAMP" processing. The first network device performs STAMP processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment;
(3)、第一IPv6头的目的地址指示“S-BFD”处理,第一网络设备根据该指示信息进行S-BFD的处理,根据OAM报文确定第二报文,并发送第二报文给第二网络设备;(3) The destination address of the first IPv6 header indicates "S-BFD" processing, the first network device performs S-BFD processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network device;
(4)、第一IPv6头的目的地址指示“Ping”处理,第一网络设备根据该指示信息进行Ping的处理,根据OAM报文确定第二报文,并发送第二报文给第二网络设备。(4) The destination address of the first IPv6 header indicates "Ping" processing, the first network device performs Ping processing according to the indication information, determines the second packet according to the OAM packet, and sends the second packet to the second network. equipment.
其中,第二报文中可以包括第二IPv6头,所述第二IPv6头的目的地址DA为第二网络设备的IPv6地址。The second packet may include a second IPv6 header, and the destination address DA of the second IPv6 header is the IPv6 address of the second network device.
应理解,第二报文可以是对OAM报文进行加工后得到的报文,例如,对OAM报文加上时间戳得到所述第二报文。或者,第二报文还可以是对OAM报文进行重构后得到的报文。本申请对此不做具体限定。It should be understood that the second packet may be a packet obtained by processing the OAM packet, for example, adding a timestamp to the OAM packet to obtain the second packet. Alternatively, the second packet may also be a packet obtained by reconstructing the OAM packet. This application does not specifically limit this.
可选地,在一些实施例中,第二IPv6头的DA还可以指示所述第二报文为OAM检测响应报文。以便于第二网络设备接收到第二报文后,可以根据第二IPv6头的DA确定第二报文为OAM检测响应报文,并进行相应的处理。Optionally, in some embodiments, the DA of the second IPv6 header may further indicate that the second packet is an OAM detection response packet. So that after receiving the second packet, the second network device can determine that the second packet is an OAM detection response packet according to the DA of the second IPv6 header, and perform corresponding processing.
可选地,在一些实施例中,第二IPv6头的DA为第一IPv6头的源地址SA。Optionally, in some embodiments, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
可选地,在一些实施例中,第二IPv6头的DA为第一IPv6头的目的地址DA。Optionally, in some embodiments, the DA of the second IPv6 header is the destination address DA of the first IPv6 header.
上述技术方案中,通过OAM检测报文(第一报文)的隧道头之后的第一IPv6头中的目的地址指示隧道的出口设备进行OAM检测。由于OAM检测报文的隧道头中不包含OAM检测的指示信息,因此,OAM检测报文的隧道头和数据报文的隧道头一样。报文传 输路径上除隧道出口设备之外的各个设备只需要处理OAM检测报文的隧道头部分,使得OAM检测报文的转发和数据报文的转发在报文传输路径各个设备上的处理是一样的。In the above technical solution, the destination address in the first IPv6 header after the tunnel header of the OAM detection packet (the first packet) instructs the egress device of the tunnel to perform OAM detection. Since the tunnel header of the OAM detection packet does not contain OAM detection indication information, the tunnel header of the OAM detection packet is the same as the tunnel header of the data packet. Each device on the packet transmission path except the tunnel egress device only needs to process the tunnel header part of the OAM detection packet, so that the forwarding of the OAM detection packet and the forwarding of the data packet are processed on each device on the packet transmission path. the same.
下面以OAM检测为STAMP作为示例,结合图5对隧道的入口设备(例如,设备A)通过第一IPv6头的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测的具体实现方式进行详细描述。The following takes OAM detection as STAMP as an example, and with reference to FIG. 5 , the specific implementation of OAM detection is performed on the ingress device (for example, device A) of the tunnel instructing the egress device (for example, device B) of the tunnel through the destination address of the first IPv6 header. A detailed description.
应理解,图5的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据下面所给出的图5的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。It should be understood that the example in FIG. 5 is only for helping those skilled in the art to understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. Those skilled in the art can obviously make various equivalent modifications or changes according to the example of FIG. 5 given below, and such modifications and changes also fall within the scope of the embodiments of the present application.
图5是本申请实施例提供的另一种OAM检测的方法的示意性流程图。如图5所示,该方法可以包括步骤510-520,下面分别对步骤510-520进行详细描述。FIG. 5 is a schematic flowchart of another OAM detection method provided by an embodiment of the present application. As shown in FIG. 5, the method may include steps 510-520, and the steps 510-520 will be described in detail below respectively.
步骤510:隧道的入口设备(例如,设备A)向隧道的出口设备(例如,设备B)发送OAM检测报文。Step 510: An ingress device (eg, device A) of the tunnel sends an OAM detection packet to an egress device (eg, device B) of the tunnel.
本申请实施例中的STAMP检测可以理解为通过弹出环回模式对设备A和设备B之间的隧道的连通性和性能进行检测。The STAMP detection in this embodiment of the present application can be understood as detecting the connectivity and performance of the tunnel between the device A and the device B by popping the loopback mode.
设备A获取的OAM检测报文如图6所示。参见图6,该OAM检测报文中包括:隧道头+第一IPv6头+被IP封装的OAM报文(IPv6头+UDP头+OAM报文)。Figure 6 shows the OAM detection packet obtained by device A. Referring to FIG. 6 , the OAM detection packet includes: tunnel header+first IPv6 header+OAM packet encapsulated by IP (IPv6 header+UDP header+OAM packet).
其中,隧道头可以有多种,是根据设备A和设备B之间的隧道类型确定的。本申请实施例对设备A和设备B之间的隧道的类型不做具体限定,具体的请参见前文中对隧道和隧道头的描述,此处不再赘述。There may be multiple tunnel headers, which are determined according to the tunnel type between device A and device B. This embodiment of the present application does not specifically limit the type of the tunnel between the device A and the device B. For details, please refer to the description of the tunnel and the tunnel header in the foregoing, which will not be repeated here.
图6所示的OAM检测报文中,第一IPv6头的源地址(source address,SA)A2为设备A的地址,第一IPv6头的目的地址(destination address,DA)A1指示“STAMP检测”。也可以理解为地址A1对应“OAM报文处理-弹出环回报文(OAM Pop and Loopback)”的语义。作为示例,具有该语义的地址A1可以用End.OPL标识。In the OAM detection message shown in Figure 6, the source address (source address, SA) A2 of the first IPv6 header is the address of device A, and the destination address (DA) A1 of the first IPv6 header indicates "STAMP detection" . It can also be understood that the address A1 corresponds to the semantics of "OAM packet processing - OAM Pop and Loopback". As an example, an address A1 with this semantics can be identified with End.OPL.
“OAM报文处理-弹出环回报文”指的是,设备B作为隧道出口设备,在收到OAM检测报文后,弹出隧道头并获取第一IPv6头,对第一IPv6头的目的地址进行查表并转发。相当于把第一IPv6头弹出,并取第一IPv6头之后的报文进行处理(处理的结果是把报文发送给设备A,相当于对报文做了一次环回)。"OAM packet processing - popping a loopback packet" means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops the tunnel header and obtains the first IPv6 header, and performs Check the form and forward. It is equivalent to popping the first IPv6 header, and processing the packet after the first IPv6 header (the result of the processing is to send the packet to device A, which is equivalent to looping back the packet).
如图6所示,本申请实施例中,设备A在构造被IP封装的OAM报文时,为了实现设备B直接对第一IPv6头之后的报文直接进行查表转发,设备A对向设备B发送的第一IPv6头之后的报文进行了“伪造”。“伪造”的报文指IPv6头的源地址A4为设备B的地址,目的地址A3为设备A的地址。这样,设备B对报文进行环回的时候不必要重新构造OAM报文的源地址和目的地址,也就是不需要修改被IP封装的OAM报文的IPv6头中的源地址和目的地址,而是直接用这个“伪造”的报文的源地址和目的地址,将“伪造”的报文直接进行查表转发。As shown in FIG. 6 , in this embodiment of the present application, when device A constructs an OAM packet encapsulated by IP, in order to realize that device B directly looks up and forwards the packet after the first IPv6 header, device A is opposite to the device. The packets after the first IPv6 header sent by B are "forged". A "forged" packet means that the source address A4 of the IPv6 header is the address of device B, and the destination address A3 is the address of device A. In this way, when device B loops back the packets, it is not necessary to reconstruct the source address and destination address of the OAM packet, that is, it does not need to modify the source address and destination address in the IPv6 header of the IP-encapsulated OAM packet. It directly uses the source address and destination address of the "forged" packet to directly look up the "forged" packet and forward it.
可选地,在一些实施例中,设备B可能还需要更改OAM报文的内容,并对更改后的报文进行查表转发。一个示例,设备B可以在OAM报文的内容中打上时间戳。Optionally, in some embodiments, device B may also need to modify the content of the OAM packet, and perform table lookup and forwarding on the modified packet. As an example, device B may stamp the content of the OAM packet with a time stamp.
步骤520:隧道的出口设备(例如,设备B)接收OAM检测报文,并向隧道的入口设备(例如,设备A)发送OAM应答报文。Step 520: The egress device (eg, device B) of the tunnel receives the OAM detection packet, and sends the OAM response packet to the ingress device (eg, device A) of the tunnel.
隧道的出口设备(例如,设备B)接收到OAM检测报文后,对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分(包括第一IPv6头和被IP封装的OAM报文部分)。设备B根据第一IPv6头中的目的地址A1是本机地址,查表获得该地址A1对应的语义为“OAM报文处理-弹出环回报文”。设备B根据“OAM报文处理—弹出环回报文”的指示,取第一IPv6头之后的被IP封装的OAM报文,并直接将该OAM报文发送给设备A。After receiving the OAM detection packet (for example, device B), the egress device of the tunnel (for example, device B) decapsulates the OAM detection packet, and obtains the part after the tunnel header of the OAM detection packet (including the first IPv6 header and the IP-encapsulated OAM packet). message section). According to the destination address A1 in the first IPv6 header is the local address, the device B looks up the table and obtains that the semantics corresponding to the address A1 is "OAM packet processing - pop-up loopback packet". Device B obtains the IP-encapsulated OAM packet after the first IPv6 header according to the instruction of "OAM packet processing - popup loopback packet", and directly sends the OAM packet to device A.
具体的,设备B根据被IP封装的OAM报文的IPv6头中DA=A3(目的地址A3为设备A的一个地址),查表获取目的地址A3的下一跳和出接口。并根据该下一跳和出接口将报文沿着相应的出接口发送,最终到达设备A。Specifically, according to DA=A3 in the IPv6 header of the OAM packet encapsulated by IP (destination address A3 is an address of device A), device B looks up the table to obtain the next hop and outgoing interface of destination address A3. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
本申请实施例中,上述第一IPv6头的目的地址A1和该地址所指示的“OAM报文处理-弹出环回报文(OAM Pop and Loopback)”的语义之间的对应关系,可以通过在设备B上配置实现,并在设备A上配置使用该地址。具体的实现方式有多种,下面分别对几种可能的实现方式进行详细说明。In the embodiment of the present application, the correspondence between the destination address A1 of the above-mentioned first IPv6 header and the semantics of "OAM packet processing-OAM Pop and Loopback" indicated by this address can be determined by The implementation is configured on B and configured on Device A to use this address. There are various specific implementation manners, and several possible implementation manners are described in detail below.
一个示例,可以在设备B上配置一个单播IPv6地址和OAM检测之间的对应关系。例如,可以在设备B上配置:Ipv6 address 2001:db1::1234 function oam-pop-loopback。设备A上配置在需要设备B进行STAMP检测时使用设备B上的地址“IPv6 address 2001:db1::1234”并使用相应的封装。As an example, a correspondence between a unicast IPv6 address and OAM detection may be configured on device B. For example, it can be configured on device B: Ipv6 address 2001:db1::1234 function oam-pop-loopback. Device A is configured to use the address "IPv6 address 2001:db1::1234" on device B when device B is required to perform STAMP detection and use the corresponding encapsulation.
其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址A1。“function oam-pop-loopback”表示“OAM报文处理-弹出环回报文”功能。Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address A1 on device B. "function oam-pop-loopback" means "OAM packet processing - pop-up loopback packet" function.
另一个示例,还可以在设备B上配置使用一个环回IPv6地址,例如这个环回IPv6地址可以是位于0:0:0:0:0:FFFF:7F00:0/104地址段的一个地址。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址,因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。例如,设备B上的配置如下:Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-pop-loopback。同时,还可以在设备A上配置STAMP检测使用该地址。For another example, a loopback IPv6 address may also be configured on device B, for example, the loopback IPv6 address may be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, this address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is the same as that in device B. The configuration above is similar. For example, the configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-pop-loopback. At the same time, you can also configure STAMP detection on device A to use this address.
应理解,上述两种地址均为单播IPv6地址,可以将地址和其指示信息的语义保存在转发信息库(forwarding information base,FIB)中,即单播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分。如果第一IPv6头的目的地址A1为单播地址,设备B相应的查找FIB,获得该目的地址A1指示“OAM报文处理-弹出环回报文”,并根据该指示进行OAM检测的相应处理。It should be understood that the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in a forwarding information base (FIB), that is, a unicast address and its corresponding indication information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. If the destination address A1 of the first IPv6 header is a unicast address, device B searches the FIB accordingly, obtains the destination address A1 indicating "OAM packet processing - popup loopback packet", and performs corresponding processing of OAM detection according to the instruction.
另一个示例,本申请实施例中还可以在设备B上配置一个组播地址,即FFxx::/8地址段的地址标识上述功能。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。设备B上的配置如下:Ipv6 address FF03::1234 function oam-pop-loopback。同时,还可以在A上配置STAMP检测使用该地址。As another example, in this embodiment of the present application, a multicast address may also be configured on device B, that is, the address in the FFxx::/8 address segment identifies the above function. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address FF03::1234 function oam-pop-loopback. At the same time, you can also configure STAMP detection on A to use this address.
应理解,上述地址为组播IPv6地址,可以将地址和其指示信息的语义保存在组播转发信息库(multicast forwarding information base,MFIB)中,即组播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文进行解封装,获得OAM检测报 文的隧道头之后的部分。如果第一IPv6头的目的地址A1为组播地址,设备B相应的查找MFIB,获得该目的地址A1指示“OAM报文处理-弹出环回报文”,并根据该指示进行OAM检测的相应处理。It should be understood that the above-mentioned address is a multicast IPv6 address, and the semantics of the address and its instruction information can be stored in a multicast forwarding information base (MFIB), that is, a multicast address and its corresponding instruction information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. If the destination address A1 of the first IPv6 header is a multicast address, device B searches the MFIB accordingly, obtains the destination address A1 indicating "OAM packet processing - popup loopback packet", and performs corresponding processing of OAM detection according to the instruction.
可选地,为了防止网络报文攻击,隧道的出口设备(例如,设备B)在接收到OAM检测报文后,可以对OAM检测报文进行校验。作为一个示例,隧道的出口设备(例如,设备B)可以对OAM报文的IPv6头中的源地址SA进行校验,确定IPv6头中的SA是否为自己的IP地址。如果设备B确定IPv6头中的SA为自己的IP地址(例如,图6所示的OAM报文的IPv6头中的源地址SA=A4,A4为设备B的一个地址),设备B才会进行OAM检测的相应处理,例如,直接将该OAM报文发送给设备A。Optionally, in order to prevent network packet attacks, the egress device of the tunnel (for example, device B) may check the OAM detection packet after receiving the OAM detection packet. As an example, the egress device (eg, device B) of the tunnel may check the source address SA in the IPv6 header of the OAM packet to determine whether the SA in the IPv6 header is its own IP address. If device B determines that SA in the IPv6 header is its own IP address (for example, the source address SA=A4 in the IPv6 header of the OAM packet shown in Figure 6, A4 is an address of device B), device B will Corresponding processing of OAM detection, for example, directly sending the OAM packet to device A.
可选地,在一些实施例中,设备B还可以指示设备A接收到的报文为OAM响应报文,以便于设备A对OAM响应报文进行相应的处理。例如,可以利用应答报文的IPv6头中的目的地址DA指示设备A对OAM响应报文进行处理。Optionally, in some embodiments, device B may further indicate that the packet received by device A is an OAM response packet, so that device A can perform corresponding processing on the OAM response packet. For example, the destination address DA in the IPv6 header of the response packet may be used to instruct device A to process the OAM response packet.
作为示例,设备A向设备B发送OAM检测报文时,可以在回程地址字段携带回程地址。应理解,这种在OAM检测报文中携带的,用于回程的OAM响应报文的目的地址的地址本文称为“回程地址”,OAM检测报文中携带“回程地址”的字段则称为回程地址字段。As an example, when device A sends an OAM detection packet to device B, it may carry the backhaul address in the backhaul address field. It should be understood that the address of the destination address of the OAM response packet used for the backhaul carried in the OAM detection packet is referred to herein as the "return address", and the field carrying the "return address" in the OAM detection packet is referred to as Return address field.
如果设备A向设备B发送的报文是如上所示的“伪造”的报文,则该地址携带在所伪造的报文的IPv6头的目的地址字段中。如果设备A向设备B发送的报文是普通的报文,则该回程地址可以是携带在IPv6头的源地址字段中。If the message sent by device A to device B is a "forged" message as shown above, the address is carried in the destination address field of the IPv6 header of the forged message. If the packet sent by device A to device B is an ordinary packet, the return address may be carried in the source address field of the IPv6 header.
例如,设备A上配置如下地址并在OAM检测报文中携带作为回程地址:Ipv6 address 2001:db2::1234 function oam-reply-process。其中,2001:db2::1234”为回程地址,“oam-reply-process”标识回程地址对应的语义为对OAM响应报文进行处理。For example, configure the following address on device A and carry it in the OAM detection packet as the return address: Ipv6 address 2001:db2::1234 function oam-reply-process. Among them, 2001:db2::1234" is the backhaul address, and "oam-reply-process" identifies the semantics corresponding to the backhaul address to process the OAM response message.
下面以图5所示的方法为例,结合图7-图9中不同的场景,对本申请实施例构造的OAM检测报文的格式进行详细描述。Taking the method shown in FIG. 5 as an example, the format of the OAM detection packet constructed in the embodiment of the present application will be described in detail in combination with different scenarios in FIGS. 7 to 9 .
一个示例,参见图7,对于数据报文而言,设备A向设备B发送的数据报文的隧道头中可以不包括SRH头,只需要将设备B的目的地址填写在外层IPv6头的目的地址字段中。这样,对于数据报文来说,作为隧道出口的设备B不需要处理数据报文隧道头中的SRH头。An example, referring to Figure 7, for a data packet, the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in the destination address of the outer IPv6 header. in the field. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
而对于OAM检测报文而言,设备A向设备B发送的OAM检测报文的隧道头中也可以不包括SRH头,设备B的一个End.OPL的地址(End.OPL的地址作为网络功能指示,以指示设备B进行OAM检测的相关转发动作)是封装在第一IPv6头中。对于OAM检测报文来说,其和数据报文的隧道头相同,因此,报文传输路径上的各个设备对OAM检测报文的处理和数据报文的处理过程一致。For the OAM detection packet, the tunnel header of the OAM detection packet sent by device A to device B may not include the SRH header, and the address of an End.OPL of device B (the address of End.OPL is used as a network function indicator) , to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header. The OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
另一个示例,参见图8,对于数据报文而言,设备A向设备B发送的数据报文的隧道头中可以包括SRH头。当数据报文从设备A转发至设备R2时,设备R2会进行PSP处理,将数据报文中的SRH头弹出,并根据外层IPv6头的目的地址为设备B,将不包含SRH头的数据报文从设备R2转发至设备B。数据报文到达设备B时隧道头中已经不包含SRH头。这样,对于数据报文来说,作为隧道出口的设备B不需要处理数据报文隧道头中的SRH头。For another example, referring to FIG. 8 , for a data packet, the tunnel header of the data packet sent by device A to device B may include an SRH header. When the data packet is forwarded from device A to device R2, device R2 will perform PSP processing, pop out the SRH header in the data packet, and according to the destination address of the outer IPv6 header is device B, the data that does not contain the SRH header will be removed. The packet is forwarded from device R2 to device B. When the data packet reaches device B, the tunnel header does not contain the SRH header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
而对于OAM检测报文而言,设备A向设备B发送的OAM检测报文也包含SRH头,该SRH头中包含2个SRv6 SID,一个是设备B的目的地址,另外一个是设备R2的目的地址。设备B的一个End.OPL的地址(End.OPL的地址作为网络功能指示,以指示设备B进行OAM检测的相关转发动作)是封装在第一IPv6头中,因此,当OAM检测报文从设备A转发至设备R2时,设备R2会进行PSP处理,将OAM检测报文中的SRH头弹出,并根据外层IPv6头的目的地址为设备B,将不包含SRH头的数据报文从设备R2转发至设备B。OAM检测报文到达设备B时隧道头中已经不包含SRH头。对于OAM检测报文来说,其和数据报文的隧道头相同,因此,报文传输路径上的各个设备对OAM检测报文的处理和数据报文的处理过程一致。For the OAM detection packet, the OAM detection packet sent by device A to device B also contains an SRH header, which contains two SRv6 SIDs, one is the destination address of device B, and the other is the destination of device R2 address. The address of an End.OPL of device B (the address of End.OPL is used as a network function indication to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header. Therefore, when the OAM detection packet is sent from the device When A forwards it to device R2, device R2 will perform PSP processing, pop out the SRH header in the OAM detection packet, and according to the destination address of the outer IPv6 header as device B, send the data packet that does not contain the SRH header from device R2 Forward to device B. When the OAM detection packet reaches device B, the tunnel header does not contain the SRH header. The OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
另一个示例,参见图9,在P2MP的检测中,对于数据报文而言,设备A向设备B发送的数据报文的隧道头中可以不包括SRH头,只需要将设备B的目的地址填写在外层IPv6头的目的地址字段中。这样,对于数据报文来说,作为隧道出口的设备B不需要处理数据报文隧道头中的SRH头。For another example, see Figure 9, in the P2MP detection, for data packets, the tunnel header of the data packet sent by device A to device B may not include the SRH header, and only the destination address of device B needs to be filled in in the destination address field of the outer IPv6 header. In this way, for the data packet, the device B serving as the tunnel exit does not need to process the SRH header in the tunnel header of the data packet.
而对于OAM检测报文而言,设备A向设备B发送的OAM检测报文的隧道头中也可以不包括SRH头,设备B的一个End.OPL的地址(End.OPL的地址作为网络功能指示,以指示设备B进行OAM检测的相关转发动作)是封装在第一IPv6头中。设备A发送的OAM检测报文的隧道头中的目的地址是设备R1(作为整个P2MP路径中的一段),设备R1对OAM检测报文进行复制发送给设备R2和设备B。复制发送出的报文的隧道头中的目的地址分别是R2和B,这些过程都不会涉及到End.OPL的地址及其所在的第一Ipv6头的处理。对于OAM检测报文来说,其和数据报文的隧道头相同,因此,报文传输路径上的各个设备对OAM检测报文的处理和数据报文的处理过程一致。For the OAM detection packet, the tunnel header of the OAM detection packet sent by device A to device B may not include the SRH header, and the address of an End.OPL of device B (the address of End.OPL is used as a network function indicator) , to instruct device B to perform the relevant forwarding action of OAM detection) is encapsulated in the first IPv6 header. The destination address in the tunnel header of the OAM detection packet sent by device A is device R1 (as a segment in the entire P2MP path). Device R1 copies the OAM detection packet and sends it to device R2 and device B. The destination addresses in the tunnel header of the copied and sent message are R2 and B respectively, and none of these processes involve the processing of the End.OPL address and the first IPv6 header where it is located. The OAM detection packet has the same tunnel header as the data packet. Therefore, the processing of the OAM detection packet by each device on the packet transmission path is the same as that of the data packet.
下面以OAM检测为STAMP,被IP封装的OAM报文中的IPv6头为第一IPv6头作为示例,结合图10对隧道的入口设备(例如,设备A)通过第一IPv6头的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测的具体实现方式进行详细描述。The following takes OAM detection as STAMP, and the IPv6 header in the OAM packet encapsulated by IP is the first IPv6 header as an example, and in conjunction with FIG. The specific implementation of OAM detection performed by the exit device (for example, device B) of the device B will be described in detail.
应理解,图10的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据下面所给出的图10的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。It should be understood that the example in FIG. 10 is only for helping those skilled in the art to understand the embodiments of the present application, rather than limiting the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 10 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
如图10所示,设备A向设备B发送的OAM检测报文包括隧道头和被IP封装的OAM报文(IPv6头+UDP头+OAM报文)。其中,被IP封装的OAM报文的IPv6头(也可以称为第一IPv6头)的源地址A6为设备A的地址,目的地址A5为设备B上的一个地址且该地址A5指示“STAMP检测”。也可以理解为地址A5对应“STAMP检测”的语义。As shown in Figure 10, the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet). The source address A6 of the IPv6 header (also referred to as the first IPv6 header) of the OAM packet encapsulated by IP is the address of device A, the destination address A5 is an address on device B and the address A5 indicates "STAMP detection" ". It can also be understood that address A5 corresponds to the semantics of "STAMP detection".
“STAMP检测”指的是,设备B作为隧道出口设备,在收到OAM检测报文后,弹出隧道头获取被IP封装的OAM报文,根据被IP封装的OAM报文获取STAMP反弹报文,并发送给设备A。作为示例,可以对被IP封装的OAM报文的IPv6头中的源地址和目的地址进行修改后得到STAMP反弹报文。"STAMP detection" means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops up the tunnel header to obtain the OAM packet encapsulated by IP, and obtains the STAMP bounce packet according to the OAM packet encapsulated by IP. and sent to device A. As an example, the source address and the destination address in the IPv6 header of the IP-encapsulated OAM packet may be modified to obtain the STAMP bounce packet.
应理解,上述STAMP反弹报文相当于是对解封装后得到的被IP封装的OAM报文的IPv6头进行了修改得到的,并最终把报文发送给设备A,相当于对报文做了修改和环回。It should be understood that the above STAMP bounce message is equivalent to modifying the IPv6 header of the IP-encapsulated OAM message obtained after decapsulation, and finally sending the message to device A, which is equivalent to modifying the message. and loopback.
下面对设备B进行STAMP检测的过程进行详细描述。The process of performing STAMP detection on device B will be described in detail below.
1、设备B为隧道的出口设备,解封装接收到的图10所示的OAM检测报文。1. Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 10.
2、设备B获得IPv6头中的目的地址A5对应的语义。2. Device B obtains the semantics corresponding to the destination address A5 in the IPv6 header.
设备B对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分(被IP封装的OAM报文),根据被IP封装的OAM报文的IPv6头的目的地址A5是本机地址,查表获得该地址A5对应的语义为“STAMP检测”。也就是说,设备B根据地址A5即可确定OAM报文是STAMP检测报文。Device B decapsulates the OAM detection packet, and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A5 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantics corresponding to the address A5 as "STAMP detection". That is, device B can determine that the OAM packet is a STAMP detection packet according to the address A5.
图10所示的OAM检测报文中,IPv6头后面还有UDP头,UDP头后面才是STAMP的检测报文。此时,UDP头的端口号标识一个“OAM报文”或者“Opaque报文”,而由IPv6头的目的地址标识“UDP-STAMP”检测报文。In the OAM detection packet shown in Figure 10, the IPv6 header is followed by a UDP header, and the UDP header is followed by the STAMP detection packet. In this case, the port number in the UDP header identifies an "OAM packet" or "Opaque packet", and the destination address in the IPv6 header identifies the "UDP-STAMP" detection packet.
可选地,在一些实施例中,IPv6头后面可以直接接STAMP检测报文。此时,IPv6头的Next Header值可以用59来标识一个“Opaque报文”,而由IPv6头的目的地址标识“NH59-STAMP”检测报文。Optionally, in some embodiments, the STAMP detection packet may be directly followed by the IPv6 header. At this time, the Next Header value of the IPv6 header can use 59 to identify an "Opaque message", and the destination address of the IPv6 header identifies the "NH59-STAMP" detection message.
本申请实施例中,地址A5和“STAMP”指示信息的对应关系,可以通过在设备B上配置实现。下面分别对不同的实现方式进行详细描述。In this embodiment of the present application, the correspondence between the address A5 and the "STAMP" indication information may be implemented by configuring on the device B. Different implementation manners are described in detail below.
一个示例,可以在设备B上配置:Ipv6 address 2001:db1::1234 function oam-stamp。其中“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-stamp”表示“STAMP”指示功能,该地址后面可以是UDP+STAMP,或者是NH59+STAMP。An example, which can be configured on device B: Ipv6 address 2001:db1::1234 function oam-stamp. "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, and "function oam-stamp" means "STAMP" indicates the function, which can be followed by UDP+STAMP or NH59+STAMP.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-udp-stamp”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-udp-stamp”表示“UDP-STAMP”指示功能,该地址后面是UDP+STAMP。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-stamp". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-udp-stamp" indicates the "UDP-STAMP" indication function, and the address is followed by UDP+STAMP.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-nh59-stamp”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-nh59-stamp”表示“NH59-STAMP”指示功能,该地址后面是NH59+STAMP。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-stamp". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-nh59-stamp" indicates the "NH59-STAMP" indication function, and the address is followed by NH59+STAMP.
另一个示例,也可以在设备B上配置使用一个环回IPv6地址,例如这个环回IPv6地址可以是位于0:0:0:0:0:FFFF:7F00:0/104地址段的一个地址。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在B上配置类似。设备B上的配置如下:Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-stamp。As another example, a loopback IPv6 address can also be configured on device B. For example, the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-stamp.
应理解,上述两种地址均为单播IPv6地址,可以将地址和其指示信息的语义保存在FIB中,即单播地址和其对应的指示信息。对于收到的隧道报文,设备B在解封装隧道头并获取到IPv6头之后,根据IPv6头的目的地址为单播地址而相应的查FIB表获得该地址对应的指示信息为“STAMP检测报文”。It should be understood that the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information. For the received tunnel packet, after device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header is a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "STAMP detection packet". Arts".
另一个示例,本申请实施例中还可以在设备B上配置一个组播地址即FFxx::/8地址段的地址标识上述功能。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。设备B上的配置如下:Ipv6 address FF03::1234 function oam-stamp。As another example, in this embodiment of the present application, a multicast address, that is, the address of the FFxx::/8 address segment, may be configured on the device B to identify the above function. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address FF03::1234 function oam-stamp.
应理解,上述地址均为组播IPv6地址,可以将地址和其指示信息的语义保存在MFIB中,即组播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文 进行解封装,获得OAM检测报文的隧道头之后的部分。设备B根据IPv6头的目的地址为组播地址而相应的查MFIB表获得该地址对应的指示信息为“STAMP检测报文”。It should be understood that the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "STAMP detection message".
3、设备B进行STAMP检测的相应处理。3. Device B performs corresponding processing of STAMP detection.
设备B根据被IP封装的IPv6头的目的地址A5的指示确定被IP封装的OAM报文是一个STAMP检测报文,因此,设备B需要对被IP封装的OAM报文进行STAMP检测的相应处理。具体的,设备B需要对被IP封装的OAM报文进行修改环回处理,并构造一个STAMP反弹报文。Device B determines that the IP-encapsulated OAM packet is a STAMP detection packet according to the destination address A5 of the IP-encapsulated IPv6 header. Therefore, Device B needs to perform STAMP detection on the IP-encapsulated OAM packet. Specifically, device B needs to modify and loopback the IP-encapsulated OAM packet, and construct a STAMP bounce packet.
例如,设备B将被IP封装的OAM报文的IPv6头的目的地址修改为A的地址(例如,地址A7),将源地址修改为设备B的地址(例如,地址A8),从而构造一个STAMP反弹报文。For example, device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A7), and modifies the source address to the address of device B (for example, address A8), thereby constructing a STAMP Bounce message.
设备B还可以将STAMP反弹报文发送给设备A。具体的,设备B根据STAMP反弹报文的IPv6头中DA=A7(目的地址A7为设备A的一个地址),查表获取目的地址A7的下一跳和出接口。并根据该下一跳和出接口将报文沿着相应的出接口发送,最终到达设备A。Device B can also send STAMP bounce packets to device A. Specifically, according to DA=A7 in the IPv6 header of the STAMP bounce packet (destination address A7 is an address of device A), device B looks up the table to obtain the next hop and outgoing interface of destination address A7. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
可选地,在一些实施例中,源地址A6也可以是一个有语义的IPv6地址,其用于指示设备A对OAM响应报文进行处理。设备B发送给设备A的报文目的地址A7地址可以和地址A6相同。Optionally, in some embodiments, the source address A6 may also be a semantic IPv6 address, which is used to instruct device A to process the OAM response packet. The destination address A7 of the packet sent by device B to device A can be the same as address A6.
例如,设备A上配置如下地址并在检测报文中携带作为回程地址:Ipv6 address 2001:db3::1234 function oam-reply-process。其中,地址2001:db3::1234对应于A7和A6地址,OAM-reply-process标识该地址是一个指示对OAM响应报文进行处理。当设备A收到IPv6报文,且报文目的地址是一个有OAM-reply-process指示(或End.ORP)信息的地址时确定报文是OAM响应报文,并进行相应的处理。For example, configure the following address on device A and carry it in the detection packet as the return address: Ipv6 address 2001:db3::1234 function oam-reply-process. The address 2001:db3::1234 corresponds to the addresses of A7 and A6, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message. When device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
下面以OAM检测为S-BFD,被IP封装的OAM报文中的IPv6头为第一IPv6头作为示例,结合图11对隧道的入口设备(例如,设备A)通过第一IPv6头的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测的具体实现方式进行详细描述。The following takes OAM detection as S-BFD, and the IPv6 header in the IP-encapsulated OAM packet is the first IPv6 header as an example, and in conjunction with FIG. The specific implementation manner of instructing the egress device (eg, device B) of the tunnel to perform OAM detection will be described in detail.
应理解,图11的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据下面所给出的图11的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。It should be understood that the example in FIG. 11 is only for helping those skilled in the art to understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 11 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
如图11所示,设备A向设备B发送的OAM检测报文包括隧道头和被IP封装的OAM报文(IPv6头+UDP头+OAM报文)。其中,被IP封装的OAM报文的IPv6头(也可以称为第一IPv6头)的源地址A26为设备A的地址,目的地址A25为设备B上的一个地址且该地址A25指示“S-BFD检测”。也可以理解为地址A25对应“S-BFD检测”的语义。As shown in Figure 11, the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet). Wherein, the source address A26 of the IPv6 header (also referred to as the first IPv6 header) of the OAM packet encapsulated by IP is the address of device A, the destination address A25 is an address on device B and the address A25 indicates "S- BFD Detection". It can also be understood that the address A25 corresponds to the semantics of "S-BFD detection".
这里的“S-BFD检测”指的是,设备B作为隧道出口设备,在收到OAM检测报文后,弹出隧道头获取被IP封装的OAM报文,根据被IP封装的OAM报文S-BFD响应报文,并发送给设备A。作为示例,可以对被IP封装的OAM报文的IPv6头中的源地址和目的地址进行修改后得到S-BFD响应报文。The "S-BFD detection" here means that device B, as the tunnel egress device, after receiving the OAM detection packet, pops out the tunnel header to obtain the OAM packet encapsulated by IP. According to the OAM packet encapsulated by IP S-BFD The BFD response packet is sent to device A. As an example, the S-BFD response message may be obtained by modifying the source address and the destination address in the IPv6 header of the IP-encapsulated OAM message.
应理解,上述S-BFD响应报文相当于是对解封装后得到的被IP封装的OAM报文的IPv6头进行了修改得到的,并最终把报文发送给设备A,相当于对报文做了修改和环回。It should be understood that the above S-BFD response message is equivalent to modifying the IPv6 header of the IP-encapsulated OAM message obtained after decapsulation, and finally sending the message to device A, which is equivalent to doing Modification and loopback.
下面对设备B上处理OAM检测报文的过程进行详细描述。The process of processing OAM detection packets on device B is described in detail below.
1、设备B为隧道的出口设备,解封装接收到的图11所示的OAM检测报文。1. Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 11.
2、设备B获得内层IPv6头中的目的地址A25对应的语义。2. Device B obtains the semantics corresponding to the destination address A25 in the inner IPv6 header.
设备B对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分(被IP封装的OAM报文部分),根据被IP封装的OAM报文的IPv6头的目的地址A25是本机地址,查表获得该地址A25对应的语义为“S-BFD检测”。也就是说,设备B根据地址A5即可确定报文是S-BFD检测报文。Device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet (the part of the OAM packet encapsulated by IP). According to the destination address A25 of the IPv6 header of the IP-encapsulated OAM packet, this machine address, look up the table to obtain the semantics corresponding to the address A25 as "S-BFD detection". That is, device B can determine that the packet is an S-BFD detection packet according to the address A5.
图11所示的OAM检测报文中,IPv6头后面还有UDP头,UDP头后面才是S-BFD的检测报文。此时,UDP头的端口号标识一个“OAM报文”或者“Opaque报文”,而由IPv6头的目的地址标识“UDP-SBFD”检测报文。In the OAM detection packet shown in Figure 11, the IPv6 header is followed by a UDP header, and the S-BFD detection packet is followed by the UDP header. In this case, the port number in the UDP header identifies an "OAM packet" or "Opaque packet", and the destination address in the IPv6 header identifies the "UDP-SBFD" detection packet.
可选地,在一些实施例中,IPv6头后面可以直接接S-BFD检测报文。此时,IPv6头的Next Header值可以用59来标识一个“Opaque报文”,而由IPv6头的目的地址标识“NH59-SBFD”检测报文。Optionally, in some embodiments, an S-BFD detection packet may be directly followed by the IPv6 header. At this time, the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-SBFD" detection packet.
本申请实施例中,地址A25和“S-BFD”指示信息的对应关系,可以通过在设备B上配置实现。下面分别对不同的实现方式进行详细描述。In this embodiment of the present application, the correspondence between the address A25 and the "S-BFD" indication information can be implemented by configuring on the device B. Different implementation manners are described in detail below.
一个示例,可以在设备B上配置:Ipv6 address 2001:db1::1234 function oam-sbfd。其中“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-sbfd”表示“S-BFD”指示功能,该地址后面可以是UDP+SBFD,或者是NH59+SBFD。An example, can be configured on device B: Ipv6 address 2001:db1::1234 function oam-sbfd. "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-sbfd" indicates the "S-BFD" indication function, and the address can be followed by UDP+SBFD, or NH59+ SBFD.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-udp-sbfd”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-udp-sbfd”表示“UDP-SBFD”指示功能,该地址后面是UDP+SBFD。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-sbfd". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-udp-sbfd" indicates the "UDP-SBFD" indication function, and the address is followed by UDP+SBFD.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-nh59-sbfd”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-nh59-sbfd”表示“NH59-SBFD”指示功能,该地址后面是NH59+SBFD。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-sbfd". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-nh59-sbfd" indicates the "NH59-SBFD" indication function, and the address is followed by NH59+SBFD.
另一个示例,也可以在设备B上配置使用一个环回IPv6地址,例如这个环回IPv6地址可以是位于0:0:0:0:0:FFFF:7F00:0/104地址段的一个地址。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在B上配置类似。设备B上的配置如下:Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-sbfd。As another example, a loopback IPv6 address can also be configured on device B. For example, the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-sbfd.
应理解,上述两种地址均为单播IPv6地址,可以将地址和其指示信息的语义保存在FIB中,即单播地址和其对应的指示信息。对于收到的隧道报文,设备B在解封装隧道头并获取到IPv6头之后,根据IPv6头的目的地址为单播地址而相应的查FIB表获得该地址对应的指示信息为“S-BFD检测报文”。It should be understood that the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information. For the received tunnel packet, after decapsulating the tunnel header and obtaining the IPv6 header, Device B searches the FIB table according to the destination address of the IPv6 header as a unicast address and obtains the corresponding indication information as "S-BFD". detection message".
另一个示例,本申请实施例中还可以在设备B上配置一个组播地址即FFxx::/8地址段的地址标识上述功能。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。设备B上的配置如下:Ipv6 address FF03::1234 function oam-sbfd。As another example, in this embodiment of the present application, a multicast address, that is, the address of the FFxx::/8 address segment, may be configured on the device B to identify the above function. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address FF03::1234 function oam-sbfd.
应理解,上述地址均为组播IPv6地址,可以将地址和其指示信息的语义保存在MFIB中,即组播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文 进行解封装,获得OAM检测报文的隧道头之后的部分。设备B根据IPv6头的目的地址为组播地址而相应的查MFIB表获得该地址对应的指示信息为“S-BFD检测报文”。It should be understood that the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, device B searches the MFIB table to obtain the indication information corresponding to the address as "S-BFD detection packet".
3、设备B进行S-BFD检测的相应处理。3. Device B performs corresponding processing of S-BFD detection.
设备B根据被IP封装的OAM报文的IPv6头的目的地址A25的指示确定该被IP封装的OAM报文是一个S-BFD检测报文,因此,设备B需要对被IP封装的OAM报文进行S-BFD检测的相应处理。具体的,设备B需要对被IP封装的OAM报文进行修改环回处理,并构造一个S-BFD响应报文。Device B determines that the IP-encapsulated OAM packet is an S-BFD detection packet according to the indication of the destination address A25 in the IPv6 header of the IP-encapsulated OAM packet. Therefore, device B needs to detect the IP-encapsulated OAM packet. Corresponding processing for S-BFD detection is performed. Specifically, device B needs to modify and loop back the IP-encapsulated OAM packet, and construct an S-BFD response packet.
例如,设备B将被IP封装的OAM报文的IPv6头的目的地址修改为A的地址(例如,地址A27),将源地址修改为设备B的地址(例如,地址A28),从而构造一个S-BFD响应报文。For example, device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A27), and modifies the source address to the address of device B (for example, address A28), thereby constructing an S -BFD response message.
设备B还可以将S-BFD响应报文发送给设备A。具体的,设备B根据S-BFD响应报文的IPv6头中DA=A27(目的地址A27为设备A的一个地址),查表获取目的地址A27的下一跳和出接口。并根据该下一跳和出接口将报文沿着相应的出接口发送,最终到达设备A。Device B can also send an S-BFD response packet to device A. Specifically, according to DA=A27 in the IPv6 header of the S-BFD response packet (destination address A27 is an address of device A), device B looks up the table to obtain the next hop and outgoing interface of destination address A27. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
可选地,在一些实施例中,源地址A26也可以是一个有语义的IPv6地址,其用于指示设备A对OAM响应报文进行处理。设备B发送给设备A的报文目的地址A27地址可以和地址A26相同。Optionally, in some embodiments, the source address A26 may also be a semantic IPv6 address, which is used to instruct the device A to process the OAM response packet. The destination address A27 of the packet sent by device B to device A can be the same as address A26.
例如,设备A上配置如下地址并在检测报文中携带作为回程地址:Ipv6 address 2001:db3::1234 function oam-reply-process。其中,地址2001:db3::1234对应于A27和A26地址,OAM-reply-process标识该地址是一个指示对OAM响应报文进行处理。当设备A收到IPv6报文,且报文目的地址是一个有OAM-reply-process指示(或End.ORP)信息的地址时确定报文是OAM响应报文,并进行相应的处理。For example, configure the following address on device A and carry it in the detection packet as the return address: Ipv6 address 2001:db3::1234 function oam-reply-process. The address 2001:db3::1234 corresponds to the addresses of A27 and A26, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message. When device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
下面以OAM检测为Ping,被IP封装的OAM报文中的IPv6头为第一IPv6头作为示例,结合图12对隧道的入口设备(例如,设备A)通过第一IPv6头的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测的具体实现方式进行详细描述。In the following, the OAM detection is used as Ping, and the IPv6 header in the OAM packet encapsulated by IP is the first IPv6 header as an example. In conjunction with FIG. 12 , the ingress device (for example, device A) of the tunnel indicates the tunnel through the destination address of the first IPv6 header. The specific implementation of OAM detection performed by the exit device (for example, device B) of the device B will be described in detail.
应理解,图12的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据下面所给出的图12的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。It should be understood that the example in FIG. 12 is only for helping those skilled in the art to understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 12 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
如图12所示,设备A向设备B发送的OAM检测报文包括隧道头和被IP封装的OAM报文(IPv6头+UDP头+OAM报文)。其中,被IP封装的OAM报文的内层IPv6头(也可以称为第一IPv6头)的源地址A12为设备A的地址,目的地址A11为设备B上的一个地址且该地址会对应一个“Ping检测”的语义。As shown in Figure 12, the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet). Among them, the source address A12 of the inner IPv6 header (also referred to as the first IPv6 header) of the IP-encapsulated OAM packet is the address of device A, and the destination address A11 is an address on device B, which corresponds to a Semantics of "Ping detection".
这里的“Ping检测”指的是,设备B根据这个地址即可以确定被IP封装的OAM报文为Ping检测报文。"Ping detection" here means that device B can determine that the OAM packet encapsulated by IP is a ping detection packet based on this address.
下面对设备B上处理OAM检测报文的过程进行详细描述。The process of processing OAM detection packets on device B is described in detail below.
1、设备B为隧道的出口设备,解封装接收到的图12所示的OAM检测报文。1. Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 12.
2、设备B获得IPv6头中的目的地址A11对应的语义。2. Device B obtains the semantics corresponding to the destination address A11 in the IPv6 header.
设备B对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分(被 IP封装的OAM报文),根据被IP封装的OAM报文的IPv6头的目的地址A11是本机地址,查表获得该地址A11对应的语义为“Ping检测”。也就是说,设备B根据地址A11即可确定报文是Ping检测报文。Device B decapsulates the OAM detection packet and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A11 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantic corresponding to the address A11 is "Ping detection". That is, device B can determine that the packet is a Ping detection packet according to the address A11.
图12所示的OAM检测报文中,IPv6头后面还有UDP头,UDP头后面才是Ping的检测报文。此时,UDP头的端口号标识一个“OAM报文”或者“Opaque报文”,而由IPv6头的目的地址标识“UDP-Ping”检测报文。In the OAM detection packet shown in Figure 12, the IPv6 header is followed by a UDP header, and the UDP header is followed by the Ping detection packet. At this time, the port number in the UDP header identifies an "OAM packet" or "Opaque packet", and the destination address in the IPv6 header identifies the "UDP-Ping" detection packet.
可选地,在一些实施例中,IPv6头后面可以直接接Ping检测报文。此时,IPv6头的Next Header值可以用59来标识一个“Opaque报文”,而由IPv6头的目的地址标识“NH59-Ping”检测报文。Optionally, in some embodiments, a Ping detection packet may be directly followed by the IPv6 header. At this time, the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-Ping" detection packet.
本申请实施例中,地址A11和“Ping检测”指示信息的对应关系,可以通过在设备B上配置实现。下面分别对不同的实现方式进行详细描述。In this embodiment of the present application, the correspondence between the address A11 and the "Ping detection" indication information can be implemented by configuring on the device B. Different implementation manners are described in detail below.
一个示例,可以在设备B上配置:Ipv6 address 2001:db1::1234 function oam-Ping。其中“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-Ping”表示“Ping检测”指示功能,该地址后面可以是UDP+Ping,或者是NH59+Ping。An example, which can be configured on device B: Ipv6 address 2001:db1::1234 function oam-Ping. "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-Ping" indicates the "Ping detection" indication function, and the address can be followed by UDP+Ping, or NH59+Ping .
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-udp-Ping”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-udp-Ping”表示“UDP-Ping”指示功能,该地址后面是UDP+Ping。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-Ping". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-udp-Ping" indicates the "UDP-Ping" indication function, and the address is followed by UDP+Ping.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-nh59-Ping”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-nh59-Ping”表示“NH59-Ping”指示功能,该地址后面是NH59+Ping。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-Ping". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-nh59-Ping" indicates the "NH59-Ping" indication function, and the address is followed by NH59+Ping.
另一个示例,也可以在设备B上配置使用一个环回IPv6地址,例如这个环回IPv6地址可以是位于0:0:0:0:0:FFFF:7F00:0/104地址段的一个地址。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在B上配置类似。设备B上的配置如下:Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-Ping。As another example, a loopback IPv6 address can also be configured on device B. For example, the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-Ping.
应理解,上述两种地址均为单播IPv6地址,可以将地址和其指示信息的语义保存在FIB中,即单播地址和其对应的指示信息。对于收到的隧道报文,设备B在解封装隧道头并获取到IPv6头之后,根据IPv6头的目的地址为单播地址而相应的查FIB表获得该地址对应的指示信息为“Ping检测报文”。It should be understood that the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information. For the received tunnel packet, after device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header as a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "Ping detection packet". Arts".
另一个示例,本申请实施例中还可以在设备B上配置一个组播地址即FFxx::/8地址段的地址标识上述功能。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。设备B上的配置如下:Ipv6 address FF03::1234 function oam-Ping。As another example, in this embodiment of the present application, a multicast address, that is, the address of the FFxx::/8 address segment, may be configured on the device B to identify the above function. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address FF03::1234 function oam-Ping.
应理解,上述地址均为组播IPv6地址,可以将地址和其指示信息的语义保存在MFIB中,即组播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分。设备B根据IPv6头的目的地址为组播地址而相应的查MFIB表获得该地址对应的指示信息为“Ping检测报文”。It should be understood that the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "Ping detection packet".
3、设备B构造Echo Reply应答报文,并发送给设备A。3. Device B constructs an Echo Reply message and sends it to device A.
设备B根据“Ping检测”的指示,确定被IP封装的OAM报文是一个Echo Request 报文,并构造Echo Reply应答报文。例如,设备B将被IP封装的OAM报文的IPv6头的目的地址修改为A的地址(例如,地址A13),将源地址修改为设备B的地址(例如,地址A14),从而构造一个Echo Reply应答报文。Device B determines that the OAM packet encapsulated by IP is an Echo Request packet according to the "Ping detection" instruction, and constructs an Echo Reply packet. For example, device B modifies the destination address of the IPv6 header of the IP-encapsulated OAM packet to the address of A (for example, address A13), and modifies the source address to the address of device B (for example, address A14), thereby constructing an Echo Reply reply message.
应理解,上述Echo Reply应答报文相当于是对解封装后得到的被IP封装的OAM报文的IPv6头进行了修改得到的,并最终把报文发送给设备A,相当于对报文做了修改和环回。It should be understood that the above Echo Reply response message is equivalent to modifying the IPv6 header of the IP-encapsulated OAM message obtained after decapsulation, and finally sending the message to device A, which is equivalent to doing Modification and loopback.
具体的,设备B根据Echo Reply应答报文的IPv6头中DA=A13(目的地址A13为设备A的一个地址),查表获取目的地址A13的下一跳和出接口。并根据该下一跳和出接口将报文沿着相应的出接口发送,最终到达设备A。Specifically, according to the DA=A13 in the IPv6 header of the Echo Reply reply packet (the destination address A13 is an address of the device A), the device B looks up the table to obtain the next hop and outgoing interface of the destination address A13. And according to the next hop and outgoing interface, the packet is sent along the corresponding outgoing interface, and finally reaches device A.
可选地,在一些实施例中,源地址A12也可以是一个有语义的IPv6地址,其用于指示设备A对OAM响应报文进行处理。设备B发送给设备A的报文目的地址A13地址可以和地址A12相同。Optionally, in some embodiments, the source address A12 may also be a semantic IPv6 address, which is used to instruct the device A to process the OAM response packet. The destination address A13 of the packet sent by device B to device A can be the same as address A12.
例如,设备A上配置如下地址并在检测报文中携带作为回程地址:Ipv6 address 2001:db3::1234 function oam-reply-process。其中,地址2001:db3::1234对应于A12和A13地址,OAM-reply-process标识该地址是一个指示对OAM响应报文进行处理。当设备A收到IPv6报文,且报文目的地址是一个有OAM-reply-process指示(或End.ORP)信息的地址时确定报文是OAM响应报文,并进行相应的处理。For example, configure the following address on device A and carry it in the detection packet as the return address: Ipv6 address 2001:db3::1234 function oam-reply-process. The address 2001:db3::1234 corresponds to the addresses of A12 and A13, and the OAM-reply-process identifies that the address is an instruction to process the OAM response message. When device A receives an IPv6 packet, and the destination address of the packet is an address with OAM-reply-process indication (or End.ORP) information, it determines that the packet is an OAM response packet, and performs corresponding processing.
下面以OAM检测为BFD,被IP封装的OAM报文中的IPv6头为第一IPv6头作为示例,结合图13对隧道的入口设备(例如,设备A)通过第一IPv6头的目的地址指示隧道的出口设备(例如,设备B)进行OAM检测的具体实现方式进行详细描述。The following takes OAM detection as BFD, and the IPv6 header in the IP-encapsulated OAM packet is the first IPv6 header as an example, and in conjunction with FIG. The specific implementation of OAM detection performed by the exit device (for example, device B) of the device B will be described in detail.
应理解,图13的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据下面所给出的图13的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。It should be understood that the example in FIG. 13 is only for helping those skilled in the art to understand the embodiments of the present application, but is not intended to limit the embodiments of the present application to specific numerical values or specific scenarios exemplified. According to the example of FIG. 13 given below, those skilled in the art can obviously make various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.
如图13所示,设备A向设备B发送的OAM检测报文包括隧道头和被IP封装的OAM报文(IPv6头+UDP头+OAM报文)。其中,被IP封装的OAM报文的IPv6头的源地址A16为设备A的地址,目的地址A15为设备B上的一个地址且该地址A15指示“BFD检测”,也可以理解为地址A15对应“BFD检测”的语义。As shown in Figure 13, the OAM detection packet sent by device A to device B includes a tunnel header and an IP-encapsulated OAM packet (IPv6 header+UDP header+OAM packet). Among them, the source address A16 of the IPv6 header of the IP-encapsulated OAM packet is the address of device A, the destination address A15 is an address on device B and the address A15 indicates "BFD detection", which can also be understood as the address A15 corresponds to " BFD detection" semantics.
这里的“BFD检测”指的是,设备B根据这个地址即可以确定被IP封装的OAM报文为BFD检测报文。The "BFD detection" here means that device B can determine that the OAM packet encapsulated by IP is a BFD detection packet based on this address.
下面对设备B上处理OAM检测报文的过程进行详细描述。The process of processing OAM detection packets on device B is described in detail below.
1、设备B为隧道的出口设备,解封装接收到的图13所示的OAM检测报文。1. Device B is the egress device of the tunnel, and decapsulates the received OAM detection packet shown in Figure 13.
2、设备B获得IPv6头中的目的地址A15对应的语义。2. Device B obtains the semantics corresponding to the destination address A15 in the IPv6 header.
设备B对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分(被IP封装的OAM报文),根据被IP封装的OAM报文的IPv6头的目的地址A15是本机地址,查表获得该地址A15对应的语义为“BFD检测报文”。也就是说,设备B根据地址A15即可确定报文是BFD检测报文。Device B decapsulates the OAM detection packet and obtains the part after the tunnel header of the OAM detection packet (the OAM packet encapsulated by IP). According to the destination address A15 of the IPv6 header of the OAM packet encapsulated by IP, it is the local device. Address, look up the table to obtain the semantic corresponding to the address A15 is "BFD detection message". That is, device B can determine that the packet is a BFD detection packet based on the address A15.
图13所示的OAM检测报文中,IPv6头后面还有UDP头,UDP头后面才是BFD的检测报文。此时,UDP头的端口号标识一个“OAM报文”或者“Opaque报文”,而由 IPv6头的目的地址标识“UDP-BFD”检测报文。In the OAM detection packet shown in Figure 13, the IPv6 header is followed by a UDP header, and the BFD detection packet is followed by the UDP header. In this case, the port number in the UDP header identifies an "OAM packet" or "Opaque packet", and the destination address in the IPv6 header identifies the "UDP-BFD" detection packet.
可选地,在一些实施例中,IPv6头后面可以直接接BFD检测报文。此时,IPv6头的Next Header值可以用59来标识一个“Opaque报文”,而由IPv6头的目的地址标识“NH59-BFD”检测报文。Optionally, in some embodiments, the IPv6 header may be directly followed by a BFD detection packet. At this time, the Next Header value of the IPv6 header can use 59 to identify an "Opaque packet", and the destination address of the IPv6 header identifies the "NH59-BFD" detection packet.
本申请实施例中,地址A15和“BFD”指示信息的对应关系,可以通过在设备B上配置实现。下面分别对不同的实现方式进行详细描述。In this embodiment of the present application, the correspondence between the address A15 and the "BFD" indication information may be implemented by configuring on the device B. Different implementation manners are described in detail below.
一个示例,可以在设备B上配置:Ipv6 address 2001:db1::1234 function oam-bfd。其中“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-bfd”表示“BFD”指示功能,该地址后面可以是UDP+BFD,或者是NH59+BFD。An example, can be configured on device B: Ipv6 address 2001:db1::1234 function oam-bfd. "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, and "function oam-bfd" indicates the "BFD" indication function, which can be followed by UDP+BFD or NH59+BFD.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-udp-bfd”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-udp-bfd”表示“UDP-BFD”指示功能,该地址后面是UDP+BFD。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-udp-bfd". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-udp-bfd" indicates the "UDP-BFD" indication function, and the address is followed by UDP+BFD.
另一个示例,还可以在设备B上配置:“Ipv6 address 2001:db1::1234 function oam-nh59-bfd”。其中,“IPv6 address 2001:db1::1234”是设备B上的一个单播IPv6地址,“function oam-nh59-bfd”表示“NH59-BFD”指示功能,该地址后面是NH59+BFD。Another example, can also be configured on device B: "Ipv6 address 2001:db1::1234 function oam-nh59-bfd". Among them, "IPv6 address 2001:db1::1234" is a unicast IPv6 address on device B, "function oam-nh59-bfd" indicates the "NH59-BFD" indication function, and the address is followed by NH59+BFD.
另一个示例,也可以在设备B上配置使用一个环回IPv6地址,例如这个环回IPv6地址可以是位于0:0:0:0:0:FFFF:7F00:0/104地址段的一个地址。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在B上配置类似。设备B上的配置如下:Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-bfd。As another example, a loopback IPv6 address can also be configured on device B. For example, the loopback IPv6 address can be an address located in the 0:0:0:0:0:FFFF:7F00:0/104 address segment. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address 0:0:0:0:0:FFFF:7F00:1234 function oam-bfd.
应理解,上述两种地址均为单播IPv6地址,可以将地址和其指示信息的语义保存在FIB中,即单播地址和其对应的指示信息。对于收到的隧道报文,设备B在解封装隧道头并获取到IPv6头之后,根据IPv6头的目的地址为单播地址而相应的查FIB表获得该地址对应的指示信息为“BFD检测报文”。It should be understood that the above two addresses are both unicast IPv6 addresses, and the semantics of the addresses and their indication information can be stored in the FIB, that is, the unicast addresses and their corresponding indication information. For the received tunnel packet, after device B decapsulates the tunnel header and obtains the IPv6 header, according to the destination address of the IPv6 header as a unicast address, it searches the FIB table accordingly to obtain the indication information corresponding to the address as "BFD detection packet". Arts".
另一个示例,本申请实施例中还可以在设备B上配置一个组播地址即FFxx::/8地址段的地址标识上述功能。该地址段的地址并不是设备B所独有的,而是各设备都可以使用的地址。因此该地址通常不需要在设备B上配置,而是由协议进行规定,但其含义和在设备B上配置类似。设备B上的配置如下:Ipv6 address FF03::1234 function oam-bfd。As another example, in this embodiment of the present application, a multicast address, that is, the address of the FFxx::/8 address segment, may be configured on the device B to identify the above function. The address of this address segment is not unique to device B, but an address that can be used by all devices. Therefore, the address usually does not need to be configured on device B, but is specified by the protocol, but its meaning is similar to that configured on device B. The configuration on device B is as follows: Ipv6 address FF03::1234 function oam-bfd.
应理解,上述地址均为组播IPv6地址,可以将地址和其指示信息的语义保存在MFIB中,即组播地址和其对应的指示信息。设备B收到OAM检测报文后,对OAM检测报文进行解封装,获得OAM检测报文的隧道头之后的部分。设备B根据IPv6头的目的地址为组播地址而相应的查MFIB表获得该地址对应的指示信息为“BFD检测报文”。It should be understood that the above addresses are all multicast IPv6 addresses, and the semantics of the address and its indication information can be stored in the MFIB, that is, the multicast address and its corresponding indication information. After receiving the OAM detection packet, device B decapsulates the OAM detection packet to obtain the part after the tunnel header of the OAM detection packet. According to the destination address of the IPv6 header as the multicast address, the device B searches the MFIB table accordingly to obtain the indication information corresponding to the address as "BFD detection packet".
3、设备B进行BFD检测的相应处理。3. Device B performs corresponding processing of BFD detection.
设备B根据内层IPv6头的目的地址A15指示“BFD检测”,对OAM报文进行处理。具体的,设备B可以确定报文是一个建立BFD会话,并检测BFD会话的状态(例如,DOWN/UP)。Device B processes the OAM packet according to the destination address A15 in the inner IPv6 header indicating "BFD detection". Specifically, device B may determine that the packet is a BFD session established, and detect the status (eg, DOWN/UP) of the BFD session.
上文结合图1至图13,详细描述了本申请实施例提供的一种OAM检测的方法,下面将结合图14至图19,详细描述本申请的装置的实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。An OAM detection method provided by an embodiment of the present application is described in detail above with reference to FIGS. 1 to 13 , and an embodiment of the apparatus of the present application will be described in detail below with reference to FIGS. 14 to 19 . It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments. Therefore, for the parts not described in detail, reference may be made to the foregoing method embodiments.
图14是本申请实施例提供的一种第一网络设备1400的示意性结构图。图14所示的该第一网络设备1400可以执行上述实施例的方法中第一网络设备执行的相应步骤。如图14所示,所述第一网络设备1400包括:接收模块1410、处理模块1420,FIG. 14 is a schematic structural diagram of a first network device 1400 provided by an embodiment of the present application. The first network device 1400 shown in FIG. 14 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments. As shown in FIG. 14 , the first network device 1400 includes: a receiving module 1410, a processing module 1420,
接收模块1410,用于经由所述隧道接收第二网络设备发送的第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第二网络设备为所述隧道的入口设备;a receiving module 1410, configured to receive, via the tunnel, a first packet sent by a second network device, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM packet, The second network device is an ingress device of the tunnel;
处理模块1420,用于根据所述第一IPv6头的目的地址DA确定OAM检测的类型;a processing module 1420, configured to determine the type of OAM detection according to the destination address DA of the first IPv6 header;
所述处理模块1420,还用于根据所述OAM检测的类型进行检测。The processing module 1420 is further configured to perform detection according to the type of the OAM detection.
可选地,所述第一IPv6头位于所述隧道头和所述OAM报文之间。Optionally, the first IPv6 header is located between the tunnel header and the OAM packet.
可选地,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文,Optionally, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet,
所述处理模块1420,还用于:根据所述UDP头的所述目的端口号确定所述第一报文中包括所述OAM报文。The processing module 1420 is further configured to: determine that the first packet includes the OAM packet according to the destination port number in the UDP header.
可选地,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文。Optionally, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
所述处理模块1420,还用于:根据所述Next Header字段的值确定所述第一报文中包括所述OAM报文。The processing module 1420 is further configured to: determine that the first packet includes the OAM packet according to the value of the Next Header field.
可选地,所述处理模块1420具体用于:确定所述第一IPv6头的DA为所述第一网络设备的单播IPv6地址;根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。Optionally, the processing module 1420 is specifically configured to: determine that the DA of the first IPv6 header is the unicast IPv6 address of the first network device; determine according to the DA of the first IPv6 header and the forwarding information base FIB The type of the OAM detection, wherein the FIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection.
可选地,所述处理模块1420具体用于:确定所述第一IPv6头的DA为组播IPv6地址;根据所述第一IPv6头的DA和组播转发信息库MFIB确定所述OAM检测的类型,其中,所述MFIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。Optionally, the processing module 1420 is specifically configured to: determine that the DA of the first IPv6 header is a multicast IPv6 address; determine the DA detected by the OAM according to the DA of the first IPv6 header and the multicast forwarding information base MFIB. type, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type detected by the OAM.
可选地,所述处理模块1420具体用于:对所述第一报文进行解封装,得到所述OAM报文;根据所述OAM报文确定第二报文;向所述第二网络设备发送所述第二报文。Optionally, the processing module 1420 is specifically configured to: decapsulate the first packet to obtain the OAM packet; determine a second packet according to the OAM packet; Send the second message.
可选地,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文。Optionally, the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the DA of the second IPv6 header indicates the second IPv6 address. The packet is an OAM detection response packet.
可选地,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。Optionally, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
可选地,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。Optionally, the type of the OAM detection includes any one of the following: Simple Bidirectional Active Measurement Protocol STAMP Detection, Bidirectional Active Measurement Protocol TWAMP Detection, Bidirectional Forwarding Detection BFD, Seamless Bidirectional Forwarding Detection S-BFD, Internet Packet Detector PING detection.
可选地,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。Optionally, the tunnel includes any one of the following: a multi-protocol label-switched MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, an explicit replication BIER tunnel based on a bit index, the Internet Bit-indexed explicit replication of BIERv6 tunnels for version 6 of the protocol.
图15是本申请实施例的第一网络设备2000的硬件结构示意图。图15所示第一网络设备2000可以执行上述实施例的方法中第一网络设备执行的相应步骤。FIG. 15 is a schematic diagram of a hardware structure of a first network device 2000 according to an embodiment of the present application. The first network device 2000 shown in FIG. 15 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments.
如图15所示,所述第一网络设备2000包括处理器2001、存储器2002、接口2003和 总线2004。其中接口2003可以通过无线或有线的方式实现,具体来讲可以是网卡。上述处理器2001、存储器2002和接口2003通过总线2004连接。As shown in FIG. 15 , the first network device 2000 includes a processor 2001, a memory 2002, an interface 2003 and a bus 2004. The interface 2003 may be implemented in a wireless or wired manner, and may specifically be a network card. The above-mentioned processor 2001 , memory 2002 and interface 2003 are connected through a bus 2004 .
所述接口2003具体可以包括发送器和接收器,用于第一网络设备实现上述收发。例如,所述接口2003用于经由所述隧道接收第二网络设备发送的第一报文。The interface 2003 may specifically include a transmitter and a receiver, which are used by the first network device to implement the above-mentioned transceiving. For example, the interface 2003 is configured to receive the first packet sent by the second network device through the tunnel.
所述处理器2001用于执行上述实施例中由第一网络设备进行的处理。例如,用于根据所述第一IPv6头的目的地址DA确定OAM检测的类型;根据所述OAM检测的类型进行检测;和/或用于本文所描述的技术的其他过程。存储器2002包括操作系统20021和应用程序20022,用于存储程序、代码或指令,当处理器或硬件设备执行这些程序、代码或指令时可以完成方法实施例中涉及第一网络设备的处理过程。可选的,所述存储器2002可以包括只读存储器(read-only memory,ROM)和随机存取存储器(random access memory,RAM)。其中,所述ROM包括基本输入/输出系统(basic input/output system,BIOS)或嵌入式系统;所述RAM包括应用程序和操作系统。当需要运行第一网络设备2000时,通过固化在ROM中的BIOS或者嵌入式系统中的bootloader引导系统进行启动,引导第一网络设备2000进入正常运行状态。在第一网络设备2000进入正常运行状态后,运行在RAM中的应用程序和操作系统,从而,完成方法实施例中涉及第一网络设备2000的处理过程。The processor 2001 is configured to execute the processing performed by the first network device in the foregoing embodiment. For example, for determining the type of OAM detection based on the destination address DA of the first IPv6 header; detecting based on the type of OAM detection; and/or for other processes of the techniques described herein. The memory 2002 includes an operating system 20021 and an application program 20022 for storing programs, codes or instructions. When the processor or hardware device executes these programs, codes or instructions, the processing process involving the first network device in the method embodiment can be completed. Optionally, the memory 2002 may include read-only memory (ROM) and random access memory (RAM). Wherein, the ROM includes a basic input/output system (basic input/output system, BIOS) or an embedded system; the RAM includes an application program and an operating system. When the first network device 2000 needs to be run, the system is booted through the BIOS solidified in the ROM or the bootloader in the embedded system, and the first network device 2000 is guided into a normal operation state. After the first network device 2000 enters the normal running state, the application program and the operating system running in the RAM, thus, the processing process involving the first network device 2000 in the method embodiment is completed.
可以理解的是,图15仅仅示出了第一网络设备2000的简化设计。在实际应用中,第一网络设备可以包含任意数量的接口,处理器或者存储器。It can be understood that FIG. 15 only shows a simplified design of the first network device 2000 . In practical applications, the first network device may contain any number of interfaces, processors or memories.
图16为本申请实施例的另一种第一网络设备2100的硬件结构示意图。图16所示的第一网络设备2100可以执行上述实施例的方法中第一网络设备执行的相应步骤。FIG. 16 is a schematic diagram of a hardware structure of another first network device 2100 according to an embodiment of the present application. The first network device 2100 shown in FIG. 16 may perform the corresponding steps performed by the first network device in the methods of the foregoing embodiments.
如图16所述,第一网络设备2100包括:主控板2110、接口板2130、交换网板2120和接口板2140。主控板2110、接口板2130和2140,以及交换网板2120之间通过系统总线与系统背板相连实现互通。其中,主控板2110用于完成系统管理、设备维护、协议处理等功能。交换网板2120用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板2130和2140用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现数据包的转发。As shown in FIG. 16 , the first network device 2100 includes: a main control board 2110 , an interface board 2130 , a switching network board 2120 and an interface board 2140 . The main control board 2110, the interface boards 2130 and 2140, and the switching network board 2120 are connected to the system backplane through the system bus to realize intercommunication. Among them, the main control board 2110 is used to complete functions such as system management, equipment maintenance, and protocol processing. The switch fabric board 2120 is used to complete data exchange between interface boards (interface boards are also called line cards or service boards). The interface boards 2130 and 2140 are used to provide various service interfaces (eg, POS interface, GE interface, ATM interface, etc.), and realize data packet forwarding.
接口板2130可以包括中央处理器2131、转发表项存储器2134、物理接口卡2133和网络处理器2132。其中,中央处理器2131用于对接口板进行控制管理并与主控板上的中央处理器进行通信。转发表项存储器2134用于保存表项。物理接口卡2133用于完成流量的接收和发送。The interface board 2130 may include a central processing unit 2131 , a forwarding table entry memory 2134 , a physical interface card 2133 and a network processor 2132 . Among them, the central processing unit 2131 is used to control and manage the interface board and communicate with the central processing unit on the main control board. The forwarding entry storage 2134 is used to store entries. The physical interface card 2133 is used to receive and transmit traffic.
应理解,本申请实施例中接口板2140上的操作与所述接口板2130的操作一致,为了简洁,不再赘述。It should be understood that the operations on the interface board 2140 in the embodiment of the present application are consistent with the operations on the interface board 2130, and for brevity, details are not repeated here.
应理解,本实施例的第一网络设备2100可对应于上述方法实施例所具有的功能和/或所实施的各种步骤,在此不再赘述。It should be understood that the first network device 2100 in this embodiment may correspond to the functions and/or various steps performed by the foregoing method embodiments, and details are not described herein again.
此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,第一网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,第一网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发 架构下,第一网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的第一网络设备的数据接入和处理能力要大于集中式架构的设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, they may include an active main control board and a backup main control board. There may be one or more interface boards, and the stronger the data processing capability of the first network device, the more interface boards provided. There can also be one or more physical interface cards on the interface board. There may be no switch fabric boards, or there may be one or more boards. When there are multiple boards, load sharing and redundancy backup can be implemented together. Under the centralized forwarding architecture, the first network device may not need to switch the network board, and the interface board undertakes the processing function of the service data of the entire system. Under the distributed forwarding architecture, the first network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the first network device in the distributed architecture are greater than those in the centralized architecture. The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
图17是本申请实施例提供的一种第二网络设备1700的示意性结构图。图17所示的该第二网络设备1700可以执行上述实施例的方法中第二网络设备执行的相应步骤。如图17所示,所述第二网络设备1700包括:处理模块1710,发送模块1720,FIG. 17 is a schematic structural diagram of a second network device 1700 provided by an embodiment of the present application. The second network device 1700 shown in FIG. 17 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments. As shown in FIG. 17 , the second network device 1700 includes: a processing module 1710, a sending module 1720,
处理模块1710,用于获取第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第一IPv6头的目的地址DA用于指示OAM检测的类型;The processing module 1710 is configured to obtain a first packet, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header and an operation management and maintenance OAM packet, and the destination address DA of the first IPv6 header Used to indicate the type of OAM detection;
发送模块1720,用于经由所述隧道向第一网络设备发送所述第一报文,所述第一网络设备为所述隧道的出口设备。The sending module 1720 is configured to send the first packet to a first network device via the tunnel, where the first network device is an egress device of the tunnel.
可选地,所述第一IPv6头位于所述隧道头和所述OAM报文之间。Optionally, the first IPv6 header is located between the tunnel header and the OAM packet.
可选地,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文。Optionally, the first packet further includes a User Datagram Protocol UDP header, and the destination port number of the UDP header is used to indicate that the first packet includes the OAM packet.
可选地,所述第一IPv6头的Next Header字段用于指示所述第一报文中包括所述OAM报文。Optionally, the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
可选地,所述第二网络设备1700还包括:Optionally, the second network device 1700 further includes:
接收模块1730,用于接收第二报文,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文;A receiving module 1730, configured to receive a second packet, where the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA of the header indicates that the second message is an OAM detection response message;
所述处理模块1710,还用于根据所述第二IPv6头的DA对所述第二报文进行处理。The processing module 1710 is further configured to process the second packet according to the DA of the second IPv6 header.
可选地,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。Optionally, the DA of the second IPv6 header is the source address SA of the first IPv6 header.
可选地,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。Optionally, the type of the OAM detection includes any one of the following: Simple Bidirectional Active Measurement Protocol STAMP Detection, Bidirectional Active Measurement Protocol TWAMP Detection, Bidirectional Forwarding Detection BFD, Seamless Bidirectional Forwarding Detection S-BFD, Internet Packet Detector PING detection.
可选地,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。Optionally, the tunnel includes any one of the following: a multi-protocol label-switched MPLS tunnel, an Internet Protocol IP tunnel, a segment routing SRv6 tunnel using Internet Protocol version 6, an explicit replication BIER tunnel based on a bit index, the Internet Bit-indexed explicit replication of BIERv6 tunnels for version 6 of the protocol.
图18是本申请实施例的第二网络设备2200的硬件结构示意图。图18所示第二网络设备2200可以执行上述实施例的方法中第二网络设备执行的相应步骤。FIG. 18 is a schematic diagram of a hardware structure of a second network device 2200 according to an embodiment of the present application. The second network device 2200 shown in FIG. 18 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments.
如图18所示,所述第二网络设备2200包括处理器2201、存储器2202、接口2203和总线2204。其中接口2203可以通过无线或有线的方式实现,具体来讲可以是网卡。上述处理器2201、存储器2202和接口2203通过总线2204连接。As shown in FIG. 18 , the second network device 2200 includes a processor 2201 , a memory 2202 , an interface 2203 and a bus 2204 . The interface 2203 may be implemented in a wireless or wired manner, and may specifically be a network card. The above-mentioned processor 2201 , memory 2202 and interface 2203 are connected through a bus 2204 .
所述接口2203具体可以包括发送器和接收器,用于第二网络设备实现上述收发。例如,该接口用于支持经由所述隧道向第一网络设备发送所述第一报文。The interface 2203 may specifically include a transmitter and a receiver, which are used by the second network device to implement the above-mentioned transceiving. For example, the interface is used to support sending the first packet to the first network device via the tunnel.
所述处理器2201用于执行上述实施例中由第二网络设备进行的处理。例如,用于获取第一报文;和/或用于本文所描述的技术的其他过程。存储器2202包括操作系统22021和应用程序22022,用于存储程序、代码或指令,当处理器或硬件设备执行这些程序、代 码或指令时可以完成方法实施例中涉及第二网络设备的处理过程。可选的,所述存储器2202可以包括只读存储器(read-only memory,ROM)和随机存取存储器(random access memory,RAM)。其中,所述ROM包括基本输入/输出系统(basic input/output system,BIOS)或嵌入式系统;所述RAM包括应用程序和操作系统。当需要运行第二网络设备2200时,通过固化在ROM中的BIOS或者嵌入式系统中的bootloader引导系统进行启动,引导第二网络设备2200进入正常运行状态。在第二网络设备2200进入正常运行状态后,运行在RAM中的应用程序和操作系统,从而,完成方法实施例中涉及第二网络设备2200的处理过程。The processor 2201 is configured to perform the processing performed by the second network device in the foregoing embodiment. For example, for obtaining the first message; and/or for other processes of the techniques described herein. The memory 2202 includes an operating system 22021 and an application program 22022, which are used to store programs, codes or instructions. When the processor or the hardware device executes these programs, codes or instructions, the processing process involving the second network device in the method embodiment can be completed. Optionally, the memory 2202 may include read-only memory (ROM) and random access memory (RAM). Wherein, the ROM includes a basic input/output system (basic input/output system, BIOS) or an embedded system; the RAM includes an application program and an operating system. When the second network device 2200 needs to be run, the system is booted through the BIOS solidified in the ROM or the bootloader in the embedded system, and the second network device 2200 is guided to enter a normal operation state. After the second network device 2200 enters the normal running state, the application program and the operating system running in the RAM, thus, the processing process involving the second network device 2200 in the method embodiment is completed.
可以理解的是,图18仅仅示出了第二网络设备2200的简化设计。在实际应用中,第二网络设备可以包含任意数量的接口,处理器或者存储器。It can be understood that FIG. 18 only shows a simplified design of the second network device 2200 . In practical applications, the second network device may contain any number of interfaces, processors or memories.
图19为本申请实施例的另一种第二网络设备2400的硬件结构示意图。图19所示的第二网络设备2400可以执行上述实施例的方法中第二网络设备执行的相应步骤。FIG. 19 is a schematic diagram of a hardware structure of another second network device 2400 according to an embodiment of the present application. The second network device 2400 shown in FIG. 19 may perform the corresponding steps performed by the second network device in the methods of the foregoing embodiments.
如图19所述,第二网络设备2400包括:主控板2410、接口板2430、交换网板2420和接口板2440。主控板2410、接口板2430和2440,以及交换网板2420之间通过系统总线与系统背板相连实现互通。其中,主控板2410用于完成系统管理、设备维护、协议处理等功能。交换网板2420用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板2430和2440用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现数据包的转发。As shown in FIG. 19 , the second network device 2400 includes: a main control board 2410 , an interface board 2430 , a switching network board 2420 and an interface board 2440 . The main control board 2410, the interface boards 2430 and 2440, and the switching network board 2420 are connected to the system backplane through the system bus to realize intercommunication. Among them, the main control board 2410 is used to complete functions such as system management, equipment maintenance, and protocol processing. The switch fabric board 2420 is used to complete data exchange between interface boards (interface boards are also called line cards or service boards). The interface boards 2430 and 2440 are used to provide various service interfaces (eg, POS interface, GE interface, ATM interface, etc.), and realize data packet forwarding.
接口板2430可以包括中央处理器2431、转发表项存储器2434、物理接口卡2433和网络处理器2432。其中,中央处理器2431用于对接口板进行控制管理并与主控板上的中央处理器进行通信。转发表项存储器2434用于保存表项。物理接口卡2433用于完成流量的接收和发送。The interface board 2430 may include a central processing unit 2431 , a forwarding table entry memory 2434 , a physical interface card 2433 and a network processor 2432 . Among them, the central processing unit 2431 is used to control and manage the interface board and communicate with the central processing unit on the main control board. The forwarding entry storage 2434 is used to store entries. The physical interface card 2433 is used to complete the reception and transmission of traffic.
应理解,本申请实施例中接口板2440上的操作与所述接口板2430的操作一致,为了简洁,不再赘述。应理解,本实施例的第二网络设备2400可对应于上述方法实施例所具有的功能和/或所实施的各种步骤,在此不再赘述。It should be understood that the operations on the interface board 2440 in the embodiment of the present application are the same as the operations on the interface board 2430, and for brevity, details are not repeated here. It should be understood that the second network device 2400 in this embodiment may correspond to the functions and/or various steps performed by the foregoing method embodiments, and details are not described herein again.
此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,第二网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,第二网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,第二网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的第二网络设备的数据接入和处理能力要大于集中式架构的设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, they may include an active main control board and a backup main control board. There may be one or more interface boards, and the stronger the data processing capability of the second network device, the more interface boards provided. There can also be one or more physical interface cards on the interface board. There may be no switch fabric boards, or there may be one or more boards. When there are multiple boards, load sharing and redundancy backup can be implemented together. Under the centralized forwarding architecture, the second network device may not need a switching network board, and the interface board undertakes the processing function of the service data of the entire system. Under the distributed forwarding architecture, the second network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the second network device in the distributed architecture are greater than those in the centralized architecture. The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第一网络设备执行的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器 (hard drive)。Embodiments of the present application further provide a computer-readable medium, where program codes are stored in the computer-readable medium, and when the computer program codes are run on a computer, the computer executes the method performed by the first network device. These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述第二网络设备执行的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器(hard drive)。Embodiments of the present application further provide a computer-readable medium, where program codes are stored in the computer-readable medium, and when the computer program codes are run on a computer, the computer executes the method performed by the second network device. These computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrical EPROM (electrically EPROM, EEPROM) and hard drive (hard drive).
本申请实施例还提供了一种芯片系统,应用于第一网络设备中,该芯片系统包括:至少一个处理器、至少一个存储器和接口电路,所述接口电路负责所述芯片系统与外界的信息交互,所述至少一个存储器、所述接口电路和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述至少一个处理器执行,以进行上述各个方面的所述的方法中所述第一网络设备的操作。An embodiment of the present application further provides a chip system, which is applied to the first network device, the chip system includes: at least one processor, at least one memory, and an interface circuit, where the interface circuit is responsible for information between the chip system and the outside world interaction, the at least one memory, the interface circuit and the at least one processor are interconnected by a wire, and the at least one memory stores instructions; the instructions are executed by the at least one processor to perform the above aspects The operation of the first network device in the method.
在具体实现过程中,该芯片可以以中央处理器(central processing unit,CPU)、微控制器(micro controller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。In the specific implementation process, the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
本申请实施例还提供了另一种芯片系统,应用于第二网络设备中,该芯片系统包括:至少一个处理器、至少一个存储器和接口电路,所述接口电路负责所述芯片系统与外界的信息交互,所述至少一个存储器、所述接口电路和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述至少一个处理器执行,以进行上述各个方面的所述的方法中所述第二网络设备的操作。The embodiment of the present application further provides another chip system, which is applied to a second network device, the chip system includes: at least one processor, at least one memory, and an interface circuit, where the interface circuit is responsible for the communication between the chip system and the outside world. Information exchange, the at least one memory, the interface circuit and the at least one processor are interconnected by lines, and the at least one memory stores instructions; the instructions are executed by the at least one processor to perform the above Operations of the second network device in the method of the aspect.
在具体实现过程中,该芯片可以以中央处理器(central processing unit,CPU)、微控制器(micro controller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。In the specific implementation process, the chip can be a central processing unit (CPU), a microcontroller (MCU), a microprocessor (microprocessing unit, MPU), a digital signal processor (digital signal processor) processing, DSP), system on chip (system on chip, SoC), application-specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device) , PLD).
本申请实施例还提供了一种计算机程序产品,应用于第一网络设备中,所述计算机程序产品包括一系列指令,当所述指令被运行时,以进行上述各个方面的所述的方法中所述第一网络设备的操作。Embodiments of the present application further provide a computer program product, which is applied to a first network device, where the computer program product includes a series of instructions, when the instructions are executed, to perform the methods described in the above aspects. Operation of the first network device.
本申请实施例还提供了一种计算机程序产品,应用于第二网络设备中,所述计算机程序产品包括一系列指令,当所述指令被运行时,以进行上述各个方面的所述的方法中所述第二网络设备的操作。Embodiments of the present application further provide a computer program product, which is applied to a second network device, where the computer program product includes a series of instructions, when the instructions are executed, to perform the methods described in the above aspects. Operation of the second network device.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可 以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (41)
- 一种OAM检测的方法,其特征在于,所述方法包括:A method for OAM detection, characterized in that the method comprises:第一网络设备经由隧道接收第二网络设备发送的第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第二网络设备为所述隧道的入口设备,所述第一网络设备为所述隧道的出口设备;The first network device receives, via the tunnel, a first packet sent by the second network device, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation, management and maintenance OAM packet, and the second The network device is an ingress device of the tunnel, and the first network device is an egress device of the tunnel;所述第一网络设备根据所述第一IPv6头的目的地址DA确定OAM检测的类型;The first network device determines the type of OAM detection according to the destination address DA of the first IPv6 header;所述第一网络设备根据所述OAM检测的类型进行检测。The first network device performs detection according to the type of the OAM detection.
- 根据权利要求1所述的方法,其特征在于,所述第一IPv6头位于所述隧道头和所述OAM报文之间。The method according to claim 1, wherein the first IPv6 header is located between the tunnel header and the OAM packet.
- 根据权利要求1或2所述的方法,其特征在于,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文,The method according to claim 1 or 2, wherein the first packet further includes a User Datagram Protocol UDP header, and a destination port number of the UDP header is used to indicate that the first packet includes the Describe the OAM message,所述方法还包括:The method also includes:所述第一网络设备根据所述UDP头的所述目的端口号确定所述第一报文中包括所述OAM报文。The first network device determines that the first packet includes the OAM packet according to the destination port number in the UDP header.
- 根据权利要求1或2所述的方法,其特征在于,所述第一IPv6头的下一个头Next Header字段用于指示所述第一报文中包括所述OAM报文,The method according to claim 1 or 2, wherein a Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet,所述方法还包括:The method also includes:所述第一网络设备根据所述Next Header字段的值确定所述第一报文中包括所述OAM报文。The first network device determines that the first packet includes the OAM packet according to the value of the Next Header field.
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一网络设备根据所述第一IPv6头的目的地址DA确定OAM检测的类型,包括:The method according to any one of claims 1 to 4, wherein the first network device determines the type of OAM detection according to the destination address DA of the first IPv6 header, comprising:所述第一网络设备确定所述第一IPv6头的DA为所述第一网络设备的单播IPv6地址;The first network device determines that the DA of the first IPv6 header is the unicast IPv6 address of the first network device;所述第一网络设备根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。The first network device determines the type of the OAM detection according to the DA of the first IPv6 header and the forwarding information base FIB, wherein the FIB includes the DA of the first IPv6 header and the type of the OAM detection. Correspondence between.
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一网络设备根据所述第一IPv6头的目的地址DA确定OAM检测的类型,包括:The method according to any one of claims 1 to 4, wherein the first network device determines the type of OAM detection according to the destination address DA of the first IPv6 header, comprising:所述第一网络设备确定所述第一IPv6头的DA为组播IPv6地址;The first network device determines that the DA of the first IPv6 header is a multicast IPv6 address;所述第一网络设备根据所述第一IPv6头的DA和组播转发信息库MFIB确定所述OAM检测的类型,其中,所述MFIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。The first network device determines the type of the OAM detection according to the DA of the first IPv6 header and the multicast forwarding information base MFIB, wherein the MFIB includes the DA of the first IPv6 header and the DA of the OAM detection. Correspondence between types.
- 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一网络设备根据所述OAM检测的类型进行检测,包括:The method according to any one of claims 1 to 6, wherein the first network device performs detection according to the type of the OAM detection, comprising:所述第一网络设备对所述第一报文进行解封装,得到所述OAM报文;The first network device decapsulates the first packet to obtain the OAM packet;所述第一网络设备根据所述OAM报文确定第二报文;determining, by the first network device, a second packet according to the OAM packet;所述第一网络设备向所述第二网络设备发送所述第二报文。The first network device sends the second packet to the second network device.
- 根据权利要求7所述的方法,其特征在于,所述第二报文包括第二IPv6头,所述 第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文。The method according to claim 7, wherein the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header is the IPv6 address of the second network device. The DA in the IPv6 header indicates that the second message is an OAM detection response message.
- 根据权利要求8所述的方法,其特征在于,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。The method according to claim 8, wherein the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- 根据权利要求1至9中任一项所述的方法,其特征在于,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。The method according to any one of claims 1 to 9, wherein the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding Detection of BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- 根据权利要求1至10中任一项所述的方法,其特征在于,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。The method according to any one of claims 1 to 10, wherein the tunnel comprises any one of the following: a multi-protocol label switched MPLS tunnel, an Internet Protocol IP tunnel, a segment using Internet Protocol version 6 Routed SRv6 Tunnels, Bit-Indexed-Based Explicit Replication BIER Tunnels, Bit-Indexed-Based Explicit Replication BIERv6 Tunnels for Internet Protocol Version 6.
- 一种OAM检测的方法,其特征在于,所述方法包括:A method for OAM detection, characterized in that the method comprises:第二网络设备获取第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第一IPv6头的目的地址DA用于指示OAM检测的类型;The second network device obtains a first packet, where the first packet includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM packet, and the destination address DA of the first IPv6 header is used for Indicates the type of OAM detection;所述的第二网络设备经由隧道向第一网络设备发送所述第一报文,所述第二网络设备为所述隧道的入口设备,所述第一网络设备为所述隧道的出口设备。The second network device sends the first packet to the first network device via the tunnel, the second network device is an ingress device of the tunnel, and the first network device is an egress device of the tunnel.
- 根据权利要求12所述的方法,其特征在于,所述第一IPv6头位于所述隧道头和所述OAM报文之间。The method according to claim 12, wherein the first IPv6 header is located between the tunnel header and the OAM packet.
- 根据权利要求12或13所述的方法,其特征在于,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文。The method according to claim 12 or 13, wherein the first packet further includes a User Datagram Protocol UDP header, and a destination port number of the UDP header is used to indicate that the first packet includes the Describe the OAM message.
- 根据权利要求12至14中任一项所述的方法,其特征在于,所述第一IPv6头的下一个头Next Header字段用于指示所述第一报文中包括所述OAM报文。The method according to any one of claims 12 to 14, wherein the Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet.
- 根据权利要求12至15中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 12 to 15, wherein the method further comprises:所述第二网络设备接收第二报文,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文;The second network device receives a second packet, the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA of the header indicates that the second message is an OAM detection response message;所述第二网络设备根据所述第二IPv6头的DA对所述第二报文进行处理。The second network device processes the second packet according to the DA of the second IPv6 header.
- 根据权利要求16所述的方法,其特征在于,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。The method according to claim 16, wherein the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- 根据权利要求12至17中任一项所述的方法,其特征在于,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。The method according to any one of claims 12 to 17, wherein the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection, bidirectional forwarding Detection of BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- 根据权利要求12至18中任一项所述的方法,其特征在于,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。The method according to any one of claims 12 to 18, wherein the tunnel comprises any one of the following: a multi-protocol label switching MPLS tunnel, an Internet Protocol IP tunnel, a segment using Internet Protocol version 6 Routed SRv6 Tunnels, Bit-Indexed-Based Explicit Replication BIER Tunnels, Bit-Indexed-Based Explicit Replication BIERv6 Tunnels for Internet Protocol Version 6.
- 一种第一网络设备,其特征在于,所述第一网络设备为隧道的出口设备,所述第 一网络设备包括:A first network device, wherein the first network device is an egress device of a tunnel, and the first network device includes:接收模块,用于经由所述隧道接收第二网络设备发送的第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第二网络设备为所述隧道的入口设备;A receiving module, configured to receive a first message sent by a second network device via the tunnel, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, so The second network device is an ingress device of the tunnel;处理模块,用于根据所述第一IPv6头的目的地址DA确定OAM检测的类型;a processing module, configured to determine the type of OAM detection according to the destination address DA of the first IPv6 header;所述处理模块,还用于根据所述OAM检测的类型进行检测。The processing module is further configured to perform detection according to the type of the OAM detection.
- 根据权利要求20所述的第一网络设备,其特征在于,所述第一IPv6头位于所述隧道头和所述OAM报文之间。The first network device according to claim 20, wherein the first IPv6 header is located between the tunnel header and the OAM packet.
- 根据权利要求20或21所述的第一网络设备,其特征在于,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文,The first network device according to claim 20 or 21, wherein the first packet further includes a User Datagram Protocol (UDP) header, and a destination port number of the UDP header is used to indicate the first packet including the OAM message,所述处理模块,还用于:根据所述UDP头的所述目的端口号确定所述第一报文中包括所述OAM报文。The processing module is further configured to: determine that the first packet includes the OAM packet according to the destination port number in the UDP header.
- 根据权利要求20或21所述的第一网络设备,其特征在于,所述第一IPv6头的下一个头Next Header字段用于指示所述第一报文中包括所述OAM报文,The first network device according to claim 20 or 21, wherein a Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet,所述处理模块,还用于:根据所述Next Header字段的值确定所述第一报文中包括所述OAM报文。The processing module is further configured to: determine that the first message includes the OAM message according to the value of the Next Header field.
- 根据权利要求20至23中任一项所述的第一网络设备,其特征在于,所述处理模块具体用于:The first network device according to any one of claims 20 to 23, wherein the processing module is specifically configured to:确定所述第一IPv6头的DA为所述第一网络设备的单播IPv6地址;Determine that the DA of the first IPv6 header is the unicast IPv6 address of the first network device;根据所述第一IPv6头的DA和转发信息库FIB确定所述OAM检测的类型,其中,所述FIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。The type of the OAM detection is determined according to the DA of the first IPv6 header and the forwarding information base FIB, wherein the FIB includes a correspondence between the DA of the first IPv6 header and the type of the OAM detection.
- 根据权利要求20至23中任一项所述的第一网络设备,其特征在于,所述处理模块具体用于:The first network device according to any one of claims 20 to 23, wherein the processing module is specifically configured to:确定所述第一IPv6头的DA为组播IPv6地址;Determine that the DA of the first IPv6 header is a multicast IPv6 address;根据所述第一IPv6头的DA和组播转发信息库MFIB确定所述OAM检测的类型,其中,所述MFIB包括所述第一IPv6头的DA和所述OAM检测的类型之间的对应关系。The type of the OAM detection is determined according to the DA of the first IPv6 header and the multicast forwarding information base MFIB, wherein the MFIB includes the correspondence between the DA of the first IPv6 header and the type of the OAM detection .
- 根据权利要求20至25中任一项所述的第一网络设备,其特征在于,所述处理模块具体用于:The first network device according to any one of claims 20 to 25, wherein the processing module is specifically configured to:对所述第一报文进行解封装,得到所述OAM报文;decapsulating the first message to obtain the OAM message;根据所述OAM报文确定第二报文;determining the second message according to the OAM message;向所述第二网络设备发送所述第二报文。Send the second packet to the second network device.
- 根据权利要求26所述的第一网络设备,其特征在于,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文。The first network device according to claim 26, wherein the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the The DA of the second IPv6 header indicates that the second message is an OAM detection response message.
- 根据权利要求27所述的第一网络设备,其特征在于,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。The first network device according to claim 27, wherein the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- 根据权利要求20至28中任一项所述的第一网络设备,其特征在于,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量 协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。The first network device according to any one of claims 20 to 28, wherein the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection , Bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- 根据权利要求20至29中任一项所述的第一网络设备,其特征在于,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。The first network device according to any one of claims 20 to 29, wherein the tunnel comprises any one of the following: a multi-protocol label switching (MPLS) tunnel, an Internet Protocol (IP) tunnel, a Version 6 of the segment routing SRv6 tunnel, bit-index-based explicit replication BIER tunnel, Internet Protocol version 6 bit-index-based explicit replication BIERv6 tunnel.
- 一种第二网络设备,其特征在于,所述第二网络设备为隧道的入口设备,所述第二网络设备包括:A second network device, characterized in that the second network device is an ingress device of a tunnel, and the second network device includes:处理模块,用于获取第一报文,所述第一报文包括隧道头,第一互联网协议第六版IPv6头以及操作管理和维护OAM报文,所述第一IPv6头的目的地址DA用于指示OAM检测的类型;The processing module is configured to obtain a first message, where the first message includes a tunnel header, a first Internet Protocol version 6 IPv6 header, and an operation management and maintenance OAM message, and the destination address DA of the first IPv6 header is to indicate the type of OAM detection;发送模块,用于经由所述隧道向第一网络设备发送所述第一报文,所述第一网络设备为所述隧道的出口设备。A sending module, configured to send the first packet to a first network device via the tunnel, where the first network device is an egress device of the tunnel.
- 根据权利要求31所述的第二网络设备,其特征在于,所述第一IPv6头位于所述隧道头和所述OAM报文之间。The second network device according to claim 31, wherein the first IPv6 header is located between the tunnel header and the OAM packet.
- 根据权利要求31或32所述的第二网络设备,其特征在于,所述第一报文还包括用户数据报协议UDP头,所述UDP头的目的端口号用于指示所述第一报文中包括所述OAM报文。The second network device according to claim 31 or 32, wherein the first packet further includes a User Datagram Protocol (UDP) header, and a destination port number of the UDP header is used to indicate the first packet including the OAM message.
- 根据权利要求31至33中任一项所述的第二网络设备,其特征在于,所述第一IPv6头的下一个头Next Header字段用于指示所述第一报文中包括所述OAM报文。The second network device according to any one of claims 31 to 33, wherein a Next Header field of the first IPv6 header is used to indicate that the first packet includes the OAM packet Arts.
- 根据权利要求31至34中任一项所述的第二网络设备,其特征在于,所述第二网络设备还包括:The second network device according to any one of claims 31 to 34, wherein the second network device further comprises:接收模块,用于接收第二报文,所述第二报文包括第二IPv6头,所述第二IPv6头的目的地址DA为所述第二网络设备的IPv6地址,所述第二IPv6头的DA指示所述第二报文为OAM检测响应报文;A receiving module, configured to receive a second packet, where the second packet includes a second IPv6 header, the destination address DA of the second IPv6 header is the IPv6 address of the second network device, and the second IPv6 header The DA indicates that the second message is an OAM detection response message;所述处理模块,还用于根据所述第二IPv6头的DA对所述第二报文进行处理。The processing module is further configured to process the second packet according to the DA of the second IPv6 header.
- 根据权利要求35所述的第二网络设备,其特征在于,所述第二IPv6头的DA为所述第一IPv6头的源地址SA。The second network device according to claim 35, wherein the DA of the second IPv6 header is the source address SA of the first IPv6 header.
- 根据权利要求31至36中任一项所述的第二网络设备,其特征在于,所述OAM检测的类型包括以下中的任意一种:简单双向主动测量协议STAMP检测、双向主动测量协议TWAMP检测、双向转发检测BFD、无缝的双向转发检测S-BFD、因特网包探测器PING检测。The second network device according to any one of claims 31 to 36, wherein the type of the OAM detection includes any one of the following: simple bidirectional active measurement protocol STAMP detection, bidirectional active measurement protocol TWAMP detection , Bidirectional forwarding detection BFD, seamless bidirectional forwarding detection S-BFD, Internet packet detector PING detection.
- 根据权利要求31至37中任一项所述的第二网络设备,其特征在于,所述隧道包括以下中的任意一种:多协议标签交换MPLS隧道、互联网协议IP隧道、使用互联网协议第6版的段路由SRv6隧道、基于位索引的显式复制BIER隧道、互联网协议第6版的基于位索引的显式复制BIERv6隧道。The second network device according to any one of claims 31 to 37, wherein the tunnel comprises any one of the following: a multi-protocol label switching (MPLS) tunnel, an Internet Protocol (IP) tunnel, a Version 6 of the segment routing SRv6 tunnel, bit-index-based explicit replication BIER tunnel, Internet Protocol version 6 bit-index-based explicit replication BIERv6 tunnel.
- 一种第一网络设备,其特征在于,包括:处理器和存储器,所述存储器用于存储程序,所述处理器用于从存储器中调用并运行所述程序以执行权利要求1至11中任一项所述的方法。A first network device, comprising: a processor and a memory, the memory is used to store a program, and the processor is used to call and run the program from the memory to execute any one of claims 1 to 11 method described in item.
- 一种第二网络设备,其特征在于,包括:处理器和存储器,所述存储器用于存储程序,所述处理器用于从存储器中调用并运行所述程序以执行权利要求12至19中任一项所述的方法。A second network device, comprising: a processor and a memory, wherein the memory is used to store a program, and the processor is used to call and run the program from the memory to execute any one of claims 12 to 19 method described in item.
- 一种OAM检测的系统,其特征在于,包括如权利要求20至30中任一项所述的第一网络设备和如权利要求31至38中任一项所述的第二网络设备。A system for OAM detection, comprising the first network device according to any one of claims 20 to 30 and the second network device according to any one of claims 31 to 38.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010820465.7 | 2020-08-14 | ||
CN202010820465 | 2020-08-14 | ||
CN202011109212.5 | 2020-10-16 | ||
CN202011109212.5A CN114079621B (en) | 2020-08-14 | 2020-10-16 | OAM detection method, equipment and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022033034A1 true WO2022033034A1 (en) | 2022-02-17 |
Family
ID=80246888
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/082058 WO2022033034A1 (en) | 2020-08-14 | 2021-03-22 | Oam detection method, device, and system |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2022033034A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116137585A (en) * | 2023-04-20 | 2023-05-19 | 武汉绿色网络信息服务有限责任公司 | Message forwarding method, device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040184407A1 (en) * | 2003-03-21 | 2004-09-23 | Sbc Knowledge Ventures, L.P. | Operations, administration, and maintenance data packet and related testing methods |
CN101772918A (en) * | 2007-08-03 | 2010-07-07 | 思科技术公司 | The Operations, Administration and Maintenance of service chaining (OAM) |
CN105308904A (en) * | 2014-04-04 | 2016-02-03 | 华为技术有限公司 | Oam packet processing method, network device and network system |
CN105812197A (en) * | 2014-12-30 | 2016-07-27 | 华为技术有限公司 | Bit-forwarding ingress router, bit-forwarding router and operation administration maintenance detection method |
US20180026884A1 (en) * | 2016-07-21 | 2018-01-25 | Cisco Technology, Inc. | Cloud overlay for operations administration and management |
-
2021
- 2021-03-22 WO PCT/CN2021/082058 patent/WO2022033034A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040184407A1 (en) * | 2003-03-21 | 2004-09-23 | Sbc Knowledge Ventures, L.P. | Operations, administration, and maintenance data packet and related testing methods |
CN101772918A (en) * | 2007-08-03 | 2010-07-07 | 思科技术公司 | The Operations, Administration and Maintenance of service chaining (OAM) |
CN105308904A (en) * | 2014-04-04 | 2016-02-03 | 华为技术有限公司 | Oam packet processing method, network device and network system |
CN105812197A (en) * | 2014-12-30 | 2016-07-27 | 华为技术有限公司 | Bit-forwarding ingress router, bit-forwarding router and operation administration maintenance detection method |
US20180026884A1 (en) * | 2016-07-21 | 2018-01-25 | Cisco Technology, Inc. | Cloud overlay for operations administration and management |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116137585A (en) * | 2023-04-20 | 2023-05-19 | 武汉绿色网络信息服务有限责任公司 | Message forwarding method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018120798A1 (en) | Vxlan packet processing method, device and system | |
US10938627B2 (en) | Packet processing method, device, and network system | |
US11582141B2 (en) | Traffic forwarding method and traffic forwarding apparatus | |
CN108781185B (en) | System and method for providing a programmable packet classification framework for network devices | |
CN104704778B (en) | Method and system for virtual and physical network integration | |
US11165693B2 (en) | Packet forwarding | |
WO2022042503A1 (en) | Message transmission method, apparatus, and system | |
CN113132202A (en) | Message transmission method and related equipment | |
WO2019238002A1 (en) | Message transmitting method, network edge device, and message transmission system | |
WO2022116895A1 (en) | Bier packet forwarding method, device, and system | |
WO2020173424A1 (en) | Message processing method, and gateway device | |
WO2022033034A1 (en) | Oam detection method, device, and system | |
JP4778594B2 (en) | Packet relay device, packet relay method and program | |
JP7448597B2 (en) | Message generation method and device and message processing method and device | |
EP4117242A1 (en) | Message detection method, device and system | |
CN114079621B (en) | OAM detection method, equipment and system | |
CN113285878B (en) | Load sharing method and first network equipment | |
US12120023B2 (en) | BIER OAM detection method, device, and system | |
WO2022206405A1 (en) | Bierv6 message processing method, and device and system | |
WO2009012697A1 (en) | Method and apparatus for inspecting the configuration information | |
WO2022012073A1 (en) | Message forwarding method, device and system | |
WO2022048466A1 (en) | Operation administration and maintenance (oam) packet processing method and device | |
WO2022218095A1 (en) | Message processing method and related device | |
WO2022171014A1 (en) | Message transmission method and apparatus | |
KR100377864B1 (en) | System and method of communication for multiple server system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21855090 Country of ref document: EP Kind code of ref document: A1 |