Route tracking method and equipment
阅读说明:本技术 一种路由追踪方法以及设备 (Route tracking method and equipment ) 是由 陈焕银 赵海峰 于 2019-10-25 设计创作,主要内容包括:本发明提供了一种路由追踪方法和设备,该设备确定对收到的ICMP回应请求报文进行三层转发;将收到的ICMP回应请求报文的生存时间减1;当收到的第二收到的ICMP回应请求报文修改后的生存时间不等于0,为第一收到的ICMP回应请求报文重新封装以太网以及VXLAN封装;收到的ICMP回应请求报文修改后的生存时间复制到其VXLAN封装的生存时间用以指示通过VXLAN隧道转发ICMP回应请求报文的路由转发跳数。(The invention provides a route tracking method and a device, wherein the device determines to carry out three-layer forwarding on a received ICMP response request message; subtracting 1 from the survival time of the received ICMP response request message; when the modified survival time of the second received ICMP response request message is not equal to 0, the Ethernet and VXLAN encapsulation is encapsulated again for the first received ICMP response request message; the modified survival time of the received ICMP echo request message is copied to the survival time encapsulated by the VXLAN so as to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel.)
1. A method for route tracing, the method comprising:
determining to carry out three-layer forwarding on a first received ICMP response request message;
subtracting 1 from the survival time of the first received ICMP response request message;
when the survival time of the first received ICMP response request message after modification is equal to 0, generating a first ICMP overtime message, wherein the source IP address is a gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message; forwarding through an output port corresponding to the destination MAC address of the first generated ICMP overtime message;
when the modified survival time of the first received ICMP response request message is not equal to 0, repackaging an Ethernet head for the first received ICMP response request message; wherein, the source MAC address and the destination MAC address of the repackaged ethernet header of the first received ICMP echo request message are the local MAC address and the destination gateway MAC address in the public switch instance, respectively; performing first VXLAN encapsulation on the first received ICMP response request message by taking a local IP address and the IP address of the destination end gateway as repackaging; wherein the outer source IP in the first VXLAN encapsulation is a local IP address; the outer layer destination IP address is the destination end gateway IP address; copying the modified survival time of the first received ICMP echo request message to the survival time of the first VXLAN package to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel; and forwarding through a tunnel outlet port of the ICMP response request message encapsulated by the first VXLAN.
2. The method of claim 1, further comprising:
determining to carry out three-layer forwarding on the first received ICMP overtime message;
determining that the destination IP address of the first received ICMP overtime message is a local IP address;
determining that the IP load part of the first received ICMP overtime message is the ICMP echo request message encapsulated by the first VXLAN;
generating an agent ICMP overtime message; wherein, the source IP address of the proxy ICMP overtime message is the source IP address of the first received ICMP overtime message; the destination IP address of the proxy ICMP overtime message is the inner layer source IP address of the ICMP response request message encapsulated by the first VXLAN; the source MAC address of the proxy ICMP overtime message is a gateway MAC address; the destination MAC address of the agent ICMP overtime message is an MAC address corresponding to the destination IP address of the agent ICMP overtime message;
and forwarding through an exit port corresponding to the destination MAC address of the proxy ICMP overtime message.
3. The method according to claim 1, characterized in that it comprises:
receiving an ICMP overtime message encapsulated by VXLAN;
executing VXLAN decapsulation on the received ICMP overtime message encapsulated by VXLAN;
determining to carry out three-layer forwarding on the ICMP overtime message after the VXLAN is unpacked;
repackaging an Ethernet header for the ICMP overtime message after the VXLAN decapsulation; wherein, the source MAC address and the destination MAC address of the repackaged Ethernet head of the ICMP overtime message after the VXLAN decapsulation are respectively the MAC addresses corresponding to the gateway MAC address and the destination IP address of the ICMP overtime message after the VXLAN encapsulation;
and forwarding the output port corresponding to the destination MAC address of the repackaged Ethernet head of the ICMP overtime message after the VXLAN decapsulation.
4. The method according to claim 1, characterized in that it comprises:
determining to execute three-layer forwarding on the received ICMP response request message encapsulated by the second VXLAN;
determining that the outer layer destination IP address of the received ICMP echo request message encapsulated by the second VXLAN is the local IP address, and subtracting 1 from the outer layer survival time of the received ICMP echo request message encapsulated by the first VXLAN;
when the outer layer survival time of the received ICMP response request message encapsulated by the first VXLAN is equal to 0, generating a second ICMP overtime message; wherein, the source IP and the destination IP address of the second generated ICMP timeout message are the outer source address and the local IP address of the received second VXLAN encapsulated ICMP echo request, respectively; the load of the second generated ICMP overtime message encapsulates the received ICMP echo request encapsulated by the second VXLAN; encapsulating an Ethernet header by using the MAC address of the next hop of the destination IP address of the second generated ICMP overtime message as the destination MAC address;
and forwarding through an exit port of the next hop MAC address of the destination IP address of the second generated ICMP timeout message.
5. The method of claim 1,
determining to execute three-layer forwarding on the received ICMP response request message encapsulated by the third VXLAN;
determining that the received outer layer destination IP address encapsulated by the second VXLAN is a local IP address, and subtracting 1 from the outer layer survival time of the received ICMP response request message encapsulated by the second VXLAN;
when the outer layer survival time is equal to 0 after the received ICMP response request message encapsulated by the second VXLAN is modified, generating a third ICMP overtime message; wherein, the source IP and the destination IP address of the third generated ICMP timeout message are the local IP address and the inner source address of the received third VXLAN encapsulated ICMP echo request, respectively; carrying out VXLAN encapsulation on the third generated ICMP overtime message, wherein the outer layer source IP address and the outer layer destination IP address of the VXLAN encapsulation of the third generated ICMP overtime message are the local IP address and the outer layer source IP address of the received third VXLAN encapsulated ICMP response request message respectively; encapsulating and forwarding an outer Ethernet header according to the MAC address of the next hop of the outer layer destination IP address encapsulated by the VXLAN of the third generated ICMP overtime message;
when the modified outer layer survival time of the received ICMP response request message encapsulated by the third VXLAN is not equal to 0, the ICMP overtime message encapsulated by the third VXLAN is de-encapsulated; determining to perform three-layer forwarding on the third decapsulated ICMP timeout message; repackaging an Ethernet header for the ICMP overtime message after the third decapsulation; wherein, the source MAC address and the destination MAC address of the repackaged ethernet header of the third decapsulated ICMP timeout message are the MAC addresses corresponding to the gateway MAC address and the received inner layer destination IP address of the third VXLAN encapsulated ICMP echo request message, respectively;
and forwarding through an output port corresponding to the destination MAC address of the repackaged ICMP overtime message after the third decapsulation.
6. A traceroute device comprising a switch chip, a processor, a memory storing computer instructions, and a plurality of interfaces,
the switching chip determines to carry out three-layer forwarding on a first received ICMP echo request message and sends the first received ICMP echo request message to the processor;
the processor executes the computer instructions stored in the memory and subtracts 1 from the lifetime of the first received ICMP echo request message; when the survival time of the first received ICMP response request message after modification is equal to 0, generating a first ICMP overtime message, wherein the source IP address is a gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message; sending the first generated ICMP overtime message to the exchange chip; when the modified survival time of the first received ICMP response request message is not equal to 0, repackaging an Ethernet head for the first received ICMP response request message; wherein, the source MAC address and the destination MAC address of the repackaged ethernet header of the first received ICMP echo request message are the local MAC address and the destination gateway MAC address in the public switch instance, respectively; performing first VXLAN encapsulation on the first received ICMP response request message by taking a local IP address and the IP address of the destination end gateway as repackaging; wherein the outer source IP in the first VXLAN encapsulation is a local IP address; the outer layer destination IP address is the destination end gateway IP address; copying the modified survival time of the first received ICMP echo request message to the survival time of the first VXLAN package to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel; sending the ICMP response request message encapsulated by the first VXLAN to a switching chip;
and the switching chip forwards the message through an output port corresponding to the destination MAC address of the first generated ICMP overtime message and forwards the message through a tunnel output port of the ICMP response request message encapsulated by the first VXLAN.
7. The apparatus of claim 6,
the switching chip determines to carry out three-layer forwarding on a first received ICMP overtime message and sends the first received ICMP overtime message to the processor;
the processor executing computer instructions stored in the memory determining that a destination IP address of the first received ICMP timeout message is a local IP address; determining that the IP load part of the first received ICMP overtime message is the ICMP echo request message encapsulated by the first VXLAN; generating an agent ICMP overtime message; wherein, the source IP address of the proxy ICMP overtime message is the source IP address of the first received ICMP overtime message; the destination IP address of the proxy ICMP overtime message is the inner layer source IP address of the ICMP response request message encapsulated by the first VXLAN; the source MAC address of the proxy ICMP overtime message is a gateway MAC address; the destination MAC address of the agent ICMP overtime message is an MAC address corresponding to the destination IP address of the agent ICMP overtime message; sending the proxy ICMP overtime message to a switching chip;
and the switching chip forwards the message through an output port corresponding to the destination MAC address of the proxy ICMP overtime message.
8. The apparatus of claim 6,
the exchange chip receives an ICMP overtime message encapsulated by VXLAN; executing VXLAN decapsulation on the received ICMP overtime message encapsulated by VXLAN; determining to carry out three-layer forwarding on the ICMP overtime message after the VXLAN is unpacked; sending the ICMP overtime message after the VXLAN decapsulation to the processor;
the processor executes the computer instruction stored in the memory, repackages the Ethernet header for the ICMP overtime message after the VXLAN decapsulation, and sends the Ethernet header to the switching chip; wherein, the source MAC address and the destination MAC address of the repackaged Ethernet head of the ICMP overtime message after the VXLAN decapsulation are respectively the MAC addresses corresponding to the gateway MAC address and the destination IP address of the ICMP overtime message after the VXLAN encapsulation;
and the switching chip forwards the packet through an output port corresponding to the destination MAC address of the repackaged Ethernet header of the ICMP overtime message after the VXLAN decapsulation.
9. The method of claim 5,
the exchange chip receives and determines to execute three-layer forwarding on the received ICMP echo request message encapsulated by the second VXLAN, and sends the received ICMP echo request encapsulated by the second VXLAN to the processor;
the processor executes the computer instructions stored in the memory, determines that the outer layer destination IP address of the received ICMP echo request message encapsulated by the second VXLAN is not the local IP address, and subtracts 1 from the outer layer survival time of the received ICMP echo request message encapsulated by the first VXLAN; when the outer layer survival time is equal to 0 after the received ICMP response request message encapsulated by the first VXLAN is modified, generating a second ICMP overtime message; wherein, the source IP and the destination IP address of the second generated ICMP timeout message are the outer source address and the local IP address of the received second VXLAN encapsulated ICMP echo request, respectively; the load of the second generated ICMP overtime message encapsulates the received ICMP echo request encapsulated by the second VXLAN; encapsulating an Ethernet header by using the MAC address of the next hop of the destination IP address of the second generated ICMP overtime message as the destination MAC address and sending the Ethernet header to the switching chip;
and the switching chip forwards the message through an output port of the MAC address of the next hop of the destination IP address of the second generated ICMP overtime message.
10. The apparatus of claim 6,
the switching chip receives and determines to execute three-layer forwarding on the received ICMP echo request message encapsulated by the third VXLAN, and sends the received ICMP echo request message encapsulated by the third VXLAN to the processor;
the processor executes the computer instructions stored in the memory, determines that the outer layer destination IP address of the received ICMP echo request message encapsulated by the second VXLAN is a local IP address, and subtracts 1 from the modified outer layer survival time of the received ICMP echo request message encapsulated by the second VXLAN; when the outer layer survival time is equal to 0 after the received ICMP response request message encapsulated by the second VXLAN is modified, generating a third ICMP overtime message; wherein, the source IP and the destination IP address of the third generated ICMP timeout message are the local IP address and the inner source address of the received third VXLAN encapsulated ICMP echo request, respectively; carrying out VXLAN encapsulation on the third generated ICMP overtime message, wherein the outer layer source IP address and the outer layer destination IP address of the VXLAN encapsulation of the third generated ICMP overtime message are the local IP address and the outer layer source IP address of the received third VXLAN encapsulated ICMP response request message respectively; encapsulating an outer Ethernet header according to the MAC address of the next hop of the outer layer destination IP address encapsulated by the VXLAN of the third generated ICMP overtime message and transmitting the encapsulated outer Ethernet header to the switching chip;
when the modified outer layer survival time of the received ICMP response request message encapsulated by the third VXLAN is not equal to 0, the ICMP overtime message encapsulated by the third VXLAN is de-encapsulated; determining to perform three-layer forwarding on the third decapsulated ICMP timeout message; repackaging an Ethernet header for the ICMP overtime message after the third decapsulation and sending the Ethernet header to the switching chip; wherein, the source MAC address and the destination MAC address of the ethernet repackaged by the third decapsulated ICMP timeout message are the MAC addresses corresponding to the gateway MAC address and the received inner layer destination IP address of the third VXLAN encapsulated ICMP echo request message, respectively;
the switching chip forwards the message according to the output port corresponding to the MAC address of the next hop of the outer layer destination IP address of the VXLAN encapsulation of the third generated ICMP overtime message; and forwarding through an output port corresponding to the destination MAC address of the repackaged ICMP overtime message after the third decapsulation.
Technical Field
The invention relates to the technology, in particular to a route tracking method and equipment.
Background
VXLAN (Virtual Extensible Local Area Network) technology uses an existing three-layer physical Network as an Underlay Network, and a Virtual two-layer Network, i.e., an Overlay Network, is constructed on the Underlay Network. The Overlay network realizes the transfer of the second-layer message of the tenant between different sites across a three-layer network by using a three-layer forwarding path provided by the Underlay network through a packaging technology. The Underlay network is transparent to the tenants, and different sites of the same tenant behave as if they are operating in one local area network.
In a VXLAN EVPN (Ethernet Virtual Private Network) distributed Gateway networking, a VTEP (Virtual Tunnel End Point) of each site is used as a Gateway (GW) and a VSI (Virtual Switch Instance) Virtual interface is configured; the IP address and MAC address of each VSI virtual interface are the IP address and MAC address of the gateway for that VSI. In VXLAN EVPN, the same VSI virtual interface on different gateways must be configured with the same IP address and MAC address. In the distributed gateway architecture of VXLAN EVPN, when a user terminal needs to detect the same VSI arriving at different stations for the same VSI.
Currently, no effective mechanism is provided in VXLAN EVPN to enable a source user terminal to detect a routing path to a destination user terminal through route tracing. The reason is that the gateway receives an icmp (internet control Message protocol) Echo Request Message of the local source user terminal, encapsulates the Message according to the VXLAN tunnel of the public VSI, and then sends the encapsulated Message to the gateway of the destination user terminal. However, the intermediate device on the VXLAN tunnel, according to the VXLAN protocol, looks for the next hop to reach the outer destination IP address to modify the outer ethernet header outside the VXLAN header without parsing the inner icmpcho Request. Thus, the intermediate device on the VXLAN tunnel and the gateway of the user terminal can not obtain TTL (time to live) of the inner ICMP echo request message and can not feed back the ICMP overtime message for route tracking; and the TTL of the ICMP Echo Request message after the gateway of the user terminal releases the VXLAN encapsulation is not modified, so that the destination terminal can not feed back the ICMP Echo Reply (response) to execute the route tracking.
Disclosure of Invention
The invention aims to provide a route tracing method and equipment, which are used for indicating the route hop number of a route tracing protocol message forwarded on a virtual extensible local area network VXLAN tunnel so as to realize route tracing between user terminals at two ends of the VXLAN tunnel.
In order to achieve the above object, the present invention provides a route tracking method, which includes:
determining to carry out three-layer forwarding on a first received ICMP response request message;
subtracting 1 from the survival time of the first received ICMP response request message;
when the survival time of the first received ICMP response request message after modification is equal to 0, generating a first ICMP overtime message, wherein the source IP address is a gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message; forwarding through an output port corresponding to a destination MAC address of the first generated ICMP overtime message;
when the survival time of the modified first received ICMP response request message is not equal to 0, repackaging the Ethernet head for the first received ICMP response request message; wherein, the source MAC address and the destination MAC address of the repackaging Ethernet head of the first received ICMP response request message are a local MAC address and a destination gateway MAC address in a public switching example respectively; performing first VXLAN encapsulation on a first received ICMP response request message by taking the local IP address and the IP address of the destination end gateway as repackaging; wherein the outer source IP in the first VXLAN encapsulation is a local IP address; the outer layer destination IP address is a destination end gateway IP address; copying the modified survival time of the first received ICMP echo request message to the survival time of the first VXLAN package to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel; and forwarding the ICMP response request message through a tunnel outlet port of the first VXLAN.
In order to achieve the above object, the present invention further provides a route tracing device, including a switch chip, a processor, a memory storing computer instructions, and a plurality of interfaces, where the switch chip determines to perform three-layer forwarding on a first received ICMP echo request message, and sends the first received ICMP echo request message to the processor;
the processor executes the computer instruction stored in the memory, and subtracts 1 from the survival time of the first received ICMP echo request message; when the survival time of the first received ICMP response request message after modification is equal to 0, generating a first ICMP overtime message, wherein the source IP address is a gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message; sending the first generated ICMP overtime message to a switching chip; when the modified survival time of the first received ICMP response request message is not equal to 0, repackaging the Ethernet head for the first received ICMP response request message; wherein, the source MAC address and the destination MAC address of the repackaging Ethernet head of the first received ICMP response request message are a local MAC address and a destination gateway MAC address in a public switching example respectively; performing first VXLAN encapsulation on a first received ICMP response request message by taking the local IP address and the IP address of the destination end gateway as repackaging; wherein the outer source IP in the first VXLAN encapsulation is a local IP address; the outer layer destination IP address is a destination end gateway IP address; copying the modified survival time of the first received ICMP echo request message to the survival time of the first VXLAN package to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel; sending an ICMP response request message encapsulated by the first VXLAN to a switching chip;
and the switching chip forwards the message through an output port corresponding to the destination MAC address of the first generated ICMP overtime message and forwards the message through a tunnel output port of an ICMP response request message encapsulated by the first VXLAN.
The invention has the advantages that the intermediate device and the destination end gateway on the VXLAN tunnel can acquire and modify the forwarding hop count of the ICMP echo request message on the VXLAN tunnel, thereby enabling the intermediate device and the destination end gateway to feed back the ICMP echo response message at the correct routing hop count of the ICMP echo request message on the VXLAN tunnel, and enabling the destination end gateway to correct the survival time of the ICMP echo request message sent to the destination user terminal according to the correct routing hop count of the ICMP echo request message forwarded on the VXLAN tunnel, thereby realizing the routing tracking between the user terminals at both ends of the VXLAN tunnel.
Drawings
Fig. 1 is a schematic flow chart of a route tracing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a network architecture for implementing the present invention;
fig. 3A-3B are first schematic diagrams illustrating routing-tracked packet forwarding according to an embodiment of the present invention;
fig. 4A-4B are second schematic diagrams illustrating forwarding of a route-traced packet according to an embodiment of the present invention;
fig. 5 is a third schematic diagram of forwarding a route-traced packet according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a traceroute device according to an embodiment.
Detailed Description
A detailed description will be given of a number of examples shown in a number of figures. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the examples.
The term "including" as that term is used is meant to include, but is not limited to; the term "comprising" means including but not limited to; the terms "above," "within," and "below" include the instant numbers; the terms "greater than" and "less than" mean that the number is not included. The term "based on" means based on at least a portion thereof.
As shown in fig. 1, the route tracing method provided by the present invention includes the following steps:
102, subtracting 1 from the survival time of the received ICMP response request message;
103, judging whether the survival time modified by the received ICMP response request message is equal to 0, if yes, executing
and
In the generated ICMP timeout message, the source IP address is the gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message;
105, forwarding through an exit port corresponding to a destination MAC address of the ICMP overtime message;
The source MAC address and the destination MAC address of the repackaging Ethernet head of the ICMP response request message are a local MAC address and a destination end gateway MAC address in a public switching example respectively;
step 107, performing VXLAN encapsulation for the re-encapsulated ICMP echo request message.
Wherein, in VXLAN encapsulation of the repackaged ICMP response request message, the outer layer source IP is a local IP address; the outer layer destination IP address is a destination end gateway IP address; the VNI identification is an identification of a public switching instance.
And
The method of fig. 1 has the advantages that the intermediate device and the destination gateway on the VXLAN tunnel can acquire and modify the forwarding hop count of the ICMP echo request message on the VXLAN tunnel, so that the intermediate device and the destination gateway can feed back the ICMP echo response message at the correct routing hop count of the ICMP echo request message on the VXLAN tunnel, and the destination gateway can correct the survival time of the ICMP echo request message sent to the destination user terminal according to the correct routing hop count of the ICMP echo request message forwarded on the VXLAN tunnel, thereby realizing the routing tracking between the user terminals at both ends of the VXLAN tunnel.
Fig. 2 is a schematic diagram of EVPN network architecture of VXLAN applied in the present invention, and
VTEP21 and VETP23 are switches or routers capable of performing three-tier forwarding, and are configured with IP addresses of 1.1.1.1 and 3.3.3.3, respectively, and
The distributed gateway of the EVPN network shown in fig. 2 usually enables an ARP (address resolution Protocol) proxy mechanism, and even if a user terminal requests an address of a same segment terminal of the same VSI, the gateway responds the MAC address of the VSI virtual interface to the user. Therefore, when the user terminal passes through other terminals in the same or different network segments in the VSI, the Ethernet message is sent to the gateway for three-layer forwarding, and then is sent to the destination terminal gateway through the public VSI between the gateways.
When the user terminal T1 needs to detect a path between the user terminals T2, an ICMP echo request message with TTL ═ 1 is generated; the source IP and the destination IP addresses of the ICMP echo request message are IP1 and IP2 respectively; the source MAC address and the destination MAC address are MAC1 and MAC11, respectively. The user terminal T1 sends an ICMP response request message with TTL of 1 to VTEP 21.
VTEP21 determines to perform three-layer forwarding on the received ICMP echo request message with TTL being 1, and subtracts 1 from the lifetime of the received ICMP echo request message with TTL being 1.
The VTEP21 determines that the modified TTL of the received ICMP response request message is 0, and generates an ICMP overtime message, wherein the source IP address is a gateway IP address IP11, and the destination IP address is a source IP address IP1 of the received ICMP response request message; the source MAC address is a gateway MAC address MAC11, and the destination MAC address is a MAC address MAC1 corresponding to a destination IP address IP1 of the ICMP overtime message; and the output port corresponding to the destination MAC address MAC11 is forwarded to the user terminal T1.
The user terminal T1 prints the source IP address IP11 on the received ICMP timeout message.
As shown in fig. 3A, the user terminal T1 generates an ICMP
VTEP21 determines to perform three-layer forwarding on the received ICMP
The VTEP21 performs VXLAN encapsulation on the ICMP
As shown in fig. 3B, the
As shown in fig. 3B, the
The
For purposes of simplicity in describing embodiments of the solution,
The VTEP21 receives the
The proxy
As shown in fig. 4A, the user terminal T1 generates an ICMP
VTEP21 determines to perform three-layer forwarding on the received ICMP
The VTEP21 performs VXLAN encapsulation on the ICMP
The
The
VETP23 determines to perform three-layer forwarding on the ICMP
As shown in fig. 4B, VETP23 determines that the outer TTL of the ICMP
VTEP23 encapsulates the outer ethernet header with the MAC address of the next hop of the destination IP address 1.1.1.1 of
In fig. 4B, VTEP3 is directly connected to
The VTEP21 receives an
VTEP21 determines that the destination MAC of the
The VTEP21 repackages the ethernet header for the
As shown in fig. 5, the user terminal T1 generates an ICMP
VTEP21 determines to perform three-layer forwarding on the received ICMP
The VTEP21 performs VXLAN encapsulation on the ICMP
The
The
VETP23 determines ICMP
The VTEP23 determines that the outer layer destination IP address of the VXLAN encapsulated ICMP
VETP23 determines that the outer TTL of ICMP
VTEP23 determines to perform three-layer forwarding based on destination MAC address 122 of decapsulated
VTEP23 sends ICMP
When receiving the ICMP
VTEP23 determines to perform three-tier forwarding, repackaging the ethernet header; where the source MAC address and destination MAC address are MAC122 and MAC121, respectively. VTEP23 encapsulates VNI12 VXLAN with IP1.1.1.1 as the destination IP address and IP3.3.3.3 as the source IP address.
VTEP23 encapsulates the foreign city ethernet header according to the MAC address of the
The
The VTEP21 receives an ICMP echo response message for receiving VXLAN encapsulation from the
VTEP21 determines to perform three-layer forwarding according to the destination MAC address MAC121 of the ICMP echo response message.
VTEP21 repackages the Ethernet header for ICMP echo response message; the source MAC address is the gateway MAC address MAC11 of the VSI11, and the destination MAC address is the MAC address MAC1 corresponding to the destination IP address IP1 of the ICMP echo response message. The VTEP21 sends the repackaged ICMP response request message to the user terminal T1 through the egress port corresponding to the
The ICMP response message received by the user terminal T1 prints the IP address IP2 of the source.
Thus, the subscriber terminal T1 arrives at the IP address of each hop of the subscriber terminal T2, and the route tracing of the routing device between T1 and T2 is completed.
When the user terminal T2 requires route tracing to reach the routing device between the user terminals T1, the VTEP23 performs according to the scheme of VTEP21 in fig. 3A-3B, 4A-4B, 5; VTEP21 is then executed according to the scheme of VTEP23 in FIGS. 3A-3B, 4A-4B, and 5. When VTEPs 21 and 23 are acting as intermediate devices for other VXLAN tunnels, it may be performed according to the scheme of
Fig. 6 shows a
The switch chip 610 is connected to an
The switch chip 610 determines to perform three-layer forwarding on a first received ICMP echo request message, and sends the first received ICMP echo request message to the processor 620;
processor 620 executes computer instructions stored in memory 630 to subtract 1 from the time-to-live of the first received ICMP echo request message; when the survival time of the first received ICMP response request message after modification is equal to 0, generating a first ICMP overtime message, wherein the source IP address is a gateway IP address, and the destination IP address is the source IP address of the ICMP response request message; the source MAC address is a gateway MAC address, and the destination MAC address is an MAC address corresponding to a destination IP address of the ICMP overtime message; sending the first generated ICMP timeout message to the switch chip 610; when the modified survival time of the first received ICMP response request message is not equal to 0, repackaging an Ethernet head for the first received ICMP response request message; wherein, the source MAC address and the destination MAC address of the repackaged ethernet header of the first received ICMP echo request message are the local MAC address and the destination gateway MAC address in the public switch instance, respectively; performing first VXLAN encapsulation on the first received ICMP response request message by taking a local IP address and the IP address of the destination end gateway as repackaging; wherein the outer source IP in the first VXLAN encapsulation is a local IP address; the outer layer destination IP address is the destination end gateway IP address; copying the modified survival time of the first received ICMP echo request message to the survival time of the first VXLAN package to indicate the route forwarding hop number for forwarding the ICMP echo request message through the VXLAN tunnel; sending the ICMP response request message encapsulated by the first VXLAN to a switching chip;
the switching chip 610 forwards the message through an egress port corresponding to the destination MAC address of the first generated ICMP timeout message and forwards the message through a tunnel egress port of the ICMP echo request message encapsulated by the first VXLAN.
The switching chip 610 determines to perform three-layer forwarding on a first received ICMP timeout message, and sends the first received ICMP timeout message to the processor 620;
processor 620 executes computer instructions stored in memory 630 to determine that the destination IP address of the first received ICMP timeout message is a local IP address; determining that the IP load part of the first received ICMP overtime message is the ICMP echo request message encapsulated by the first VXLAN; generating an agent ICMP overtime message; wherein, the source IP address of the proxy ICMP overtime message is the source IP address of the first received ICMP overtime message; the destination IP address of the proxy ICMP overtime message is the inner layer source IP address of the ICMP response request message encapsulated by the first VXLAN; the source MAC address of the proxy ICMP overtime message is a gateway MAC address; the destination MAC address of the agent ICMP overtime message is an MAC address corresponding to the destination IP address of the agent ICMP overtime message; sending the proxy ICMP overtime message to a switching chip;
and the switching chip 610 forwards the message through an egress port corresponding to the destination MAC address of the proxy ICMP timeout message.
The switching chip 610 receives an ICMP timeout message encapsulated by VXLAN; executing VXLAN decapsulation on the received ICMP overtime message encapsulated by VXLAN; determining to carry out three-layer forwarding on the ICMP overtime message after the VXLAN is unpacked; sending the ICMP overtime message after the VXLAN decapsulation to the processor 620;
processor 620 executes the computer instructions stored in memory 630 to repackage the ethernet header for the ICMP timeout message decapsulated by VXLAN and send it to switch chip 610; wherein, the source MAC address and the destination MAC address of the repackaged Ethernet head of the ICMP overtime message after the VXLAN decapsulation are respectively the MAC addresses corresponding to the gateway MAC address and the destination IP address of the ICMP overtime message after the VXLAN encapsulation;
and the switching chip 610 forwards the decapsulated ICMP timeout message through an egress port corresponding to the destination MAC address of the repackaged ethernet header of the VXLAN.
The switch chip 610 receives and determines to perform three-layer forwarding on the received ICMP echo request message encapsulated by the second VXLAN, and sends the received ICMP echo request encapsulated by the second VXLAN to the processor 620;
processor 620 executes the computer instructions stored in memory 630 to determine that the outer layer destination IP address of the received ICMP echo request message encapsulated by the second VXLAN is not the local IP address, and subtract 1 from the outer layer lifetime of the received ICMP echo request message encapsulated by the first VXLAN; when the outer layer survival time is equal to 0 after the received ICMP response request message encapsulated by the first VXLAN is modified, generating a second ICMP overtime message; wherein, the source IP and the destination IP address of the second generated ICMP timeout message are the outer source address and the local IP address of the received second VXLAN encapsulated ICMP echo request, respectively; the load of the second generated ICMP overtime message encapsulates the received ICMP echo request encapsulated by the second VXLAN; encapsulating an ethernet header with the MAC address of the next hop of the destination IP address of the second generated ICMP timeout message as the destination MAC address and sending the ethernet header to the switch chip 610;
and the switching chip 610 forwards the message through an exit port of the MAC address of the next hop of the destination IP address of the second generated ICMP timeout message.
The switch chip 610 receives and determines to perform three-layer forwarding on the received ICMP echo request message encapsulated by the third VXLAN, and sends the received ICMP echo request message encapsulated by the third VXLAN to the processor 620;
processor 620 executes the computer instructions stored in memory 630 to determine that the outer layer destination IP address of the received ICMP echo request message encapsulated by the second VXLAN is a local IP address, and decreases the modified outer layer lifetime of the received ICMP echo request message encapsulated by the second VXLAN by 1; when the outer layer survival time is equal to 0 after the received ICMP response request message encapsulated by the second VXLAN is modified, generating a third ICMP overtime message; wherein, the source IP and the destination IP address of the third generated ICMP timeout message are the local IP address and the inner source address of the received third VXLAN encapsulated ICMP echo request, respectively; carrying out VXLAN encapsulation on the third generated ICMP overtime message, wherein the outer layer source IP address and the outer layer destination IP address of the VXLAN encapsulation of the third generated ICMP overtime message are the local IP address and the outer layer source IP address of the received third VXLAN encapsulated ICMP response request message respectively; encapsulating an outer-layer Ethernet header according to the MAC address of the next hop of the outer-layer destination IP address encapsulated by the VXLAN of the third generated ICMP overtime message and forwarding the outer-layer Ethernet header to the switching chip 610;
when the modified outer layer survival time of the received ICMP response request message encapsulated by the third VXLAN is not equal to 0, the ICMP overtime message encapsulated by the third VXLAN is de-encapsulated; determining to perform three-layer forwarding on the third decapsulated ICMP timeout message; repackage the ethernet header for the third decapsulated ICMP timeout message and send it to the switch chip 610; wherein, the source MAC address and the destination MAC address of the ethernet repackaged by the third decapsulated ICMP timeout message are the MAC addresses corresponding to the gateway MAC address and the received inner layer destination IP address of the third VXLAN encapsulated ICMP echo request message, respectively;
the switching chip 610 forwards the packet according to the output port corresponding to the MAC address of the next hop of the outer layer destination IP address encapsulated by the VXLAN of the third generated ICMP timeout message; and forwarding through an output port corresponding to the destination MAC address of the repackaged ICMP overtime message after the third decapsulation.
The invention has the advantages that the intermediate device and the destination end gateway on the VXLAN tunnel can acquire and modify the forwarding hop count of the ICMP echo request message on the VXLAN tunnel, thereby enabling the intermediate device and the destination end gateway to feed back the ICMP echo response message at the correct routing hop count of the ICMP echo request message on the VXLAN tunnel, and enabling the destination end gateway to correct the survival time of the ICMP echo request message sent to the destination user terminal according to the correct routing hop count of the ICMP echo request message forwarded on the VXLAN tunnel, thereby realizing the routing tracking between the user terminals at both ends of the VXLAN tunnel.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种面向SDN网络基于Q学习的节能路由方法