CN109412949B - Data message transmission method and device - Google Patents

Data message transmission method and device Download PDF

Info

Publication number
CN109412949B
CN109412949B CN201811110400.2A CN201811110400A CN109412949B CN 109412949 B CN109412949 B CN 109412949B CN 201811110400 A CN201811110400 A CN 201811110400A CN 109412949 B CN109412949 B CN 109412949B
Authority
CN
China
Prior art keywords
address
gateway
distributed gateway
host
route
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811110400.2A
Other languages
Chinese (zh)
Other versions
CN109412949A (en
Inventor
唐成
黄李伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201811110400.2A priority Critical patent/CN109412949B/en
Publication of CN109412949A publication Critical patent/CN109412949A/en
Application granted granted Critical
Publication of CN109412949B publication Critical patent/CN109412949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Abstract

The application provides a data message transmission method and a device, wherein the method comprises the following steps: receiving a data message sent by a first host, wherein the destination IP address of the data message is the IP address of a second host; if the local routing table does not have a host route matched with the destination IP address and a network segment route matched with a network segment to which the destination IP address belongs, an ARP request message is sent to the second distributed gateway according to at least one first output interface indicated by the network segment route; if a first routing message which is sent by a second distributed gateway and comprises the destination IP address is received, a host route is generated in a local routing table, and the host route comprises the destination IP address and a second output interface; and sending the data message to the second host through the host route. By the technical scheme, the data message is normally transmitted, and access of the silent host is realized.

Description

Data message transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data packet transmission method and apparatus.
Background
EVPN (Ethernet Virtual Private Network) is a two-layer VPN (Virtual Private Network) technology, where a control plane may use MP-BGP (Multi Protocol Border Gateway Protocol) to advertise routing information, and a data plane may use VXLAN (Virtual eXtensible Local Area Network) to encapsulate data packets. In the EVPN network, when physical sites of tenants are scattered at different locations, two-layer interconnection can be provided for the same network segment of the same tenant and three-layer interconnection can be provided for different network segments of the same tenant based on the existing service provider network or enterprise IP network.
Further, EVPN may have advantages in that: the automatic discovery of VTEP (VXLAN Tunnel End Point ) equipment, the automatic establishment of VXLAN tunnels and the automatic association of the VXLAN tunnels and VXLAN identifications can be realized through MP-BGP, the manual configuration of a user is not needed, and the difficulty of network deployment can be reduced. And moreover, the control plane and the data plane can be separated, the control plane can be responsible for issuing routing information, and the data plane can be responsible for forwarding data messages, so that the labor division is clear, and the management is easy.
In EVPN, in order to implement transmission of a data message, after the host 1 is online, a free Address Resolution Protocol (ARP) message needs to be sent, and after receiving the ARP message, the distributed gateway 1 learns a forwarding table of the host 1, synchronizes the forwarding table to the distributed gateway 2 through an MP-BGP message, and the distributed gateway 2 learns the forwarding table of the host 1. Based on this, when the distributed gateway 2 receives the data packet sent by the host 2 to the host 1, the data packet may be sent to the distributed gateway 1 by using the forwarding table, and the distributed gateway 1 sends the data packet to the host 1 by using the forwarding table.
However, if the host 1 is a silent host, that is, after the host 1 goes online, the gratuitous ARP packet is not sent, the distributed gateway 1 cannot learn the forwarding table entry of the host 1, and the distributed gateway 2 cannot learn the forwarding table entry of the host 1, so that the data packet sent to the host 1 by the host 2 cannot be sent to the host 1, which results in that the data packet cannot be normally transmitted and the flow is interrupted.
Disclosure of Invention
The application provides a data message transmission method and device, which can send a data message to a silent host, so that the data message can be normally transmitted, the interruption of flow is avoided, and the user service experience is improved.
In a first aspect, the present application provides a data packet transmission method, where a first distributed gateway and a second distributed gateway are configured with the same gateway address and belong to the same network segment, and the method is applied to the first distributed gateway, and the method includes:
receiving a data message sent by a first host, wherein the destination IP address of the data message is the IP address of a second host;
if the local routing table does not have a host route matched with the destination IP address and a network segment route matched with a network segment to which the destination IP address belongs, sending an ARP request message to the second distributed gateway according to at least one first output interface indicated by the network segment route, wherein the ARP request message comprises the destination IP address;
if a first routing message which is sent by a second distributed gateway and comprises the destination IP address is received, generating a host route in a local routing table, wherein the host route comprises the destination IP address and a second outgoing interface, and the second outgoing interface is one outgoing interface of the at least one first outgoing interface;
and sending a data message to the second host through the host route.
With reference to the first aspect, in a first possible implementation manner, the method further includes:
receiving a second routing message sent by the second distributed gateway, wherein the second routing message comprises a gateway address of the second distributed gateway;
and generating a network segment route in a local routing table, wherein the network segment route comprises a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, which receives the second routing message.
With reference to the first aspect and the first possible implementation manner, in a second possible implementation manner, the generating a segment route in a local routing table includes:
judging whether the first distributed gateway enables an ARP detection function or not;
and if so, generating the network segment route in a local routing table.
In a second aspect, the present application provides a data packet transmission method, where a first distributed gateway and a second distributed gateway are configured with the same gateway address and belong to the same network segment, and the method is applied to the second distributed gateway, and the method includes:
receiving an ARP request message sent by the first distributed gateway, wherein the destination IP address of the ARP request message is the IP address of the second host;
if the network segment to which the target IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs, broadcasting the ARP request message in a two-layer network;
if an ARP response message returned by a second host aiming at the ARP request message is received, generating a first routing message according to the ARP response message, wherein the first routing message comprises the target IP address;
and sending the first routing message to a first distributed gateway, so that the first distributed gateway generates a host route and forwards a data message to the second host through the host route, wherein the host route comprises the destination IP address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the first distributed gateway, which receives the first routing message.
With reference to the second aspect, in a first possible implementation manner, the method further includes:
generating a second routing message, the second routing message comprising a gateway address of a second distributed gateway;
and sending the second routing message to a first distributed gateway so that the first distributed gateway generates a network segment route, wherein the network segment route comprises a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, which receives the second routing message.
With reference to the second aspect, in a second possible implementation manner, after receiving the ARP request packet sent by the first distributed gateway, the method further includes:
if a network segment route matched with the network segment to which the destination IP address belongs exists in a local routing table, sending the ARP request message according to at least one third output interface indicated by the network segment route;
the network segment route comprises a gateway address of a third distributed gateway and a third outgoing interface, and the third outgoing interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address which belongs to the same network segment.
In a third aspect, the present application provides a data packet transmission apparatus, where a first distributed gateway and a second distributed gateway are configured with the same gateway address and belong to the same network segment, and the apparatus is applied to the first distributed gateway, and the apparatus includes:
the receiving module is used for receiving a data message sent by a first host, and the destination IP address of the data message is the IP address of a second host;
a sending module, configured to send an ARP request packet to the second distributed gateway according to at least one first egress interface indicated by the network segment route when a host route matching the destination IP address does not exist in a local routing table and a network segment route matching a network segment to which the destination IP address belongs exists, where the ARP request packet includes the destination IP address;
a generating module, configured to generate a host route in a local routing table when receiving a first routing message that includes the destination IP address and is sent by a second distributed gateway, where the host route includes the destination IP address and a second egress interface, and the second egress interface is one of the at least one first egress interface;
the sending module is further configured to send a data packet to the second host through the host routing.
With reference to the third aspect, in a first possible implementation manner, the receiving module is further configured to receive a second routing message sent by the second distributed gateway, where the second routing message includes a gateway address of the second distributed gateway;
the generating module is further configured to generate a network segment route in a local routing table, where the network segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
With reference to the third aspect and the first possible implementation manner, in a second possible implementation manner, when the generating module generates the segment route in the local routing table, the generating module is specifically configured to:
judging whether the first distributed gateway enables an ARP detection function or not;
and if so, generating the network segment route in a local routing table.
In a fourth aspect, the present application provides a data packet transmission apparatus, where a first distributed gateway and a second distributed gateway are configured with the same gateway address and belong to the same network segment, the apparatus is applied to the second distributed gateway, and the apparatus includes:
a receiving module, configured to receive an ARP request packet sent by the first distributed gateway, where a destination IP address of the ARP request packet is an IP address of the second host;
a sending module, configured to broadcast the ARP request packet in a two-layer network when the network segment to which the destination IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs;
a generating module, configured to generate a first routing message according to an ARP reply message returned by a second host for the ARP request message, where the first routing message includes the destination IP address;
the sending module is further configured to send the first routing message to a first distributed gateway, so that the first distributed gateway generates a host route, and forwards a data packet to the second host through the host route, where the host route includes the destination IP address and a second egress interface, and the second egress interface is a tunnel identifier of the first distributed gateway, where the first routing message is received by the first distributed gateway.
With reference to the fourth aspect, in a first possible implementation manner, the generating module is further configured to generate a second routing message, where the second routing message includes a gateway address of a second distributed gateway;
the sending module is further configured to send the second routing message to a first distributed gateway, so that the first distributed gateway generates a segment route, where the segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
With reference to the fourth aspect, in a second possible implementation manner, the sending module is further configured to send the ARP request packet according to at least one third egress interface indicated by the network segment route when a network segment route matching the network segment to which the destination IP address belongs exists in a local routing table;
the network segment route comprises a gateway address of a third distributed gateway and a third outgoing interface, and the third outgoing interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address belonging to the same network segment
In a fifth aspect, the present application provides a first distributed gateway comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine-executable instructions to implement the data message transmission method.
In a sixth aspect, the present application provides a second distributed gateway comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine-executable instructions to implement the data message transmission method.
In a seventh aspect, the present application provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, may cause the processor to implement the data messaging method described above.
Based on the technical scheme, in the embodiment of the application, even if the gateway addresses of the plurality of distributed gateways are the same, the network segment route aiming at the gateway address can be generated in the routing table, so that when the data message aiming at the silent host is received, the destination IP address of the data message can be matched with the network segment route, the ARP request message is generated, the network segment route is utilized to send the ARP request message, and therefore the ARP request message is triggered to be sent to the distributed gateways of the neighbors, and ARP learning of the silent host is triggered. After ARP learning of the silent host is completed, each distributed gateway can generate a host route, and sends a data message aiming at the silent host through the host route, and the data message can be sent to the silent host, so that the data message can be normally transmitted, flow interruption is avoided, user service experience is improved, and access of the silent host is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a data packet transmission method according to an embodiment of the present application;
fig. 3 is a flow chart of a data packet transmission method according to another embodiment of the present application;
fig. 4 is a flowchart of a data packet transmission method according to another embodiment of the present application;
fig. 5 is a block diagram of a data packet transmission apparatus according to an embodiment of the present application;
FIG. 6 is a hardware block diagram of a first distributed gateway in one embodiment of the present application;
fig. 7 is a block diagram of a data packet transmission apparatus according to an embodiment of the present application;
fig. 8 is a hardware configuration diagram of a second distributed gateway in an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" may be used is interpreted as "at … …," or "when … …," or "in response to a determination.
The embodiment of the present application provides a data packet transmission method, which can be applied to a network including multiple distributed gateways, such as EVPN, etc., in a networking of the distributed gateways, all the distributed gateways (GW, GateWay, etc.) need to create Virtual Switch Interface (VSI) Virtual interfaces, and configure the same IP address for the same VSI Virtual Interface of different distributed gateways as a GateWay address of a host in the network, that is, the distributed gateways are configured with the same GateWay address belonging to the same network segment, as shown in fig. 1, which is an application scenario schematic diagram of the embodiment of the present application, and VTEP Device 101(VXLAN Tunnel End Point, lan Tunnel End Point), ED Device (Edge Device )102, ED Device 103, and VTEP Device 104 are all distributed gateways, and the distributed gateways are configured with the same GateWay address, such as gateway address 10.1.1.1/24. Alternatively, VTEP device 101 and VTEP device 104 are distributed gateways that are configured with the same gateway address. Of course, fig. 1 is only an example of the present application, and the application scenario is not limited thereto.
The host 105 connected to the VTEP apparatus 101 may be a VM (Virtual Machine), a terminal apparatus, or a PC (Personal Computer), without limitation. Similarly, the host 106 connected to the VTEP device 104 may be a VM, an end device, or a PC, which is not limited thereto.
The IP address of the VTEP device 101 may be 1.1.1.1, the IP address of the ED device 102 may be 2.2.2.2, the IP address of the ED device 103 may be 3.3.3.3, and the IP address of the VTEP device 104 may be 4.4.4.4. VTEP device 101 may create VXLAN tunnel a1 for ED device 102, VXLAN tunnel a1 having a source IP address of 1.1.1.1 and a destination IP address of 2.2.2.2; the ED device 102 may create VXLAN tunnel a2 for VTEP device 101 with a source IP address of 2.2.2.2 and a destination IP address of 1.1.1.1 for VXLAN tunnel a 2. The ED device 102 may create VXLAN tunnel B1 for the ED device 103, VXLAN tunnel B1 having a source IP address of 2.2.2.2 and a destination IP address of 3.3.3.3; the ED device 103 may create VXLAN tunnel B2 for the ED device 102, VXLAN tunnel B2 having a source IP address of 3.3.3.3 and a destination IP address of 2.2.2.2. The ED device 103 may create a VXLAN tunnel C1 for VTEP device 104, VXLAN tunnel C1 having a source IP address of 3.3.3.3 and a destination IP address of 4.4.4.4; VTEP device 104 may create VXLAN tunnel C2 for ED device 103, VXLAN tunnel C2 having a source IP address of 4.4.4.4 and a destination IP address of 3.3.3.3.
Referring to fig. 2, a data packet transmission method provided in the embodiment of the present application may include:
step 201, each distributed gateway generates a network segment route in the local routing table according to the routing message.
In this embodiment, routing messages may be mutually advertised among the distributed gateways, and each distributed gateway may generate a segment route in the local routing table by using the routing messages advertised by other distributed gateways, which is described below with reference to the application scenario shown in fig. 1.
Referring to fig. 1, ED device 102 generates a routing message (e.g., MP-BGP route advertisement message, etc.) that may carry gateway address 10.1.1.1/24 of ED device 102 and sends the routing message to VTEP device 101. After receiving the routing message, VTEP device 101 may parse out gateway address 10.1.1.1/24 of ED device 102 from the routing message, and generate a network segment route in the local routing table, where the network segment route includes gateway address 10.1.1.1/24 of ED device 102 and an egress interface, and the egress interface is a tunnel identifier, such as VXLAN tunnel a1, that receives the routing message.
Of course, the network segment route may also include other contents, such as the next hop may also be the IP address 2.2.2.2 of the ED device 102, and the contents of the network segment route are not limited. Referring to table 1, an example of a local routing table for VTEP device 101, which may include network segment routes for gateway addresses 10.1.1.1/24, is shown.
TABLE 1
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 2.2.2.2 VXLAN tunnel A1
... ... ...
In a conventional manner, after receiving a routing message and analyzing the gateway address 10.1.1.1/24 of the ED device 102 from the routing message, the VTEP device 101 does not generate a segment route of the gateway address 10.1.1.1/24 in a local routing table because the gateway address 10.1.1.1/24 of the ED device 102 is the same as the gateway address 10.1.1.1/24 of the VTEP device 101, and ends processing of the routing message.
Different from the conventional manner, in the embodiment of the present application, after receiving the routing message, and analyzing the gateway address 10.1.1.1/24 of the ED device 102 from the routing message, although the gateway address 10.1.1.1/24 of the ED device 102 is the same as the gateway address 10.1.1.1/24 of the VTEP device 101, the VTEP device 101 still generates the segment route for the gateway address 10.1.1.1/24 in the local routing table, which is shown in table 1 and is an example of the segment route for the gateway address 10.1.1.1/24, and thus, no limitation is made to this.
In one example, in order to be compatible with the conventional manner, in this embodiment of the present application, an ARP detection function may be further configured for the distributed gateway, and the ARP detection function is enabled or disabled. If the VTEP apparatus 101 enables the ARP detection function, the VTEP apparatus 101 performs processing using the scheme of the embodiment of the present application, and if the VTEP apparatus 101 does not enable the ARP detection function, the VTEP apparatus 101 performs processing using a conventional method.
Based on this, in this embodiment of the present application, after receiving the routing message, and analyzing the gateway address 10.1.1.1/24 of the ED device 102 from the routing message, if the gateway address 10.1.1.1/24 of the ED device 102 is the same as the gateway address 10.1.1.1/24 of the VTEP device 101, the VTEP device 101 may further determine whether the VTEP device 101 enables the ARP detection function. If so, VTEP device 101 may generate a segment route for the gateway address 10.1.1.1/24 in a local routing table, see Table 1. If not, VTEP device 101 may refrain from generating a segment route for the gateway address 10.1.1.1/24 in the local routing table, i.e., not generate a segment route for the gateway address 10.1.1.1/24.
In the above embodiment, it is described that the VTEP device 101 generates the segment routes, and similar to the above manner, the VTEP device 101 may also send a routing message to the ED device 102, and the ED device 103 may also send a routing message to the ED device 102, and finally, the ED device 102 may generate the segment routes in the local routing table, as shown in table 2. Similarly, the ED device 103 may generate a segment route in the local routing table, as shown in table 3. VTEP device 104 may generate a segment route in a local routing table, as shown in table 4.
TABLE 2
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 1.1.1.1 VXLAN tunnel A2
10.1.1.1/24 3.3.3.3 VXLAN tunnel B1
... ... ...
TABLE 3
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 2.2.2.2 VXLAN tunnel B2
10.1.1.1/24 4.4.4.4 VXLAN tunnel C1
... ... ...
TABLE 4
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 3.3.3.3 VXLAN tunnel C2
... ... ...
At step 202, the host 105 sends a data packet, which is subsequently referred to as data packet 1, to the VTEP device 101.
When the host 105 needs to execute a certain service, the data packet 1 may be sent to the host 106, and the data packet 1 is sent to the VTEP device 101 by the host 105.
It is assumed that the host 106 is a silent host, that is, after the host 106 is online, the gratuitous ARP packet is not sent, that is, none of the VTEP device 101, the ED device 102, the ED device 103, and the VTEP device 104 learns the forwarding table entry of the host 106, and the data packet 1 cannot be sent to the host 106.
Step 203, the VTEP device 101 receives the data packet 1, where the destination IP address of the data packet 1 is the IP address of the host 106, and the destination IP address is assumed to be 10.1.1.2/32.
Step 204, if the local routing table does not have a host route matching with the destination IP address 10.1.1.2/32 and a segment route matching with the segment to which the destination IP address 10112/32 belongs, the VTEP device 101 generates an ARP request message, and sends the ARP request message according to the egress interface indicated by the segment route, where the ARP request message may include the destination IP address 10.1.1.2/32, that is, the destination IP address of the ARP request message is 10.1.1.2/32, and further details of other contents of the ARP request message are not described herein.
Specifically, after receiving the data packet 1, the VTEP device 101 determines whether a host route (i.e., a route of a 32-bit IP address) matching the destination IP address 10.1.1.2/32 exists in the local routing table, and if so, directly sends the data packet 1 through the host route, which is not described again.
If not, the VTEP device 101 determines whether the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32, and if not, the conventional process may be adopted for processing, which is not described again. Since the network segment 10.1.1.0/24 to which the destination IP address 10.1.1.2/32 belongs is the same as the network segment to which the gateway address 10.1.1.1/24 of the VTEP device 101 belongs, the VTEP device 101 may determine that the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32, and further perform subsequent processing.
When the VTEP device 101 is a distributed gateway, the VTEP device 101 may generate an ARP request packet, where a source IP address of the ARP request packet is an IP address of the VTEP device 101, and a destination IP address of the ARP request packet is 10.1.1.2/32, and broadcast the ARP request packet in a two-layer network (i.e., a two-layer network matching the gateway address 10.1.1.1/24), that is, the VTEP device 101 broadcasts the ARP request packet to each host in the two-layer network, and since the IP addresses of each host in the two-layer network are not 10.1.1.2/32, each host does not return an ARP response packet, that is, the VTEP device 101 does not receive the ARP response packet.
Unlike the conventional method, in the embodiment of the present application, in addition to broadcasting the ARP request packet in the two-layer network, the VTEP device 101 may further perform the following processing: the VTEP apparatus 101 determines whether there is a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs in the local routing table (i.e. a route other than a 32-bit IP address, such as a route of a 24-bit IP address, a route of a 16-bit IP address, etc.). If not, the flow ends. If the network segment route exists, namely the network segment route matching with the network segment to which the destination IP address 10.1.1.2/32 belongs exists, the VTEP device 101 can also send the ARP request message by using the network segment route. For example, referring to the local routing table shown in table 1, since there is a network segment route matching with the network segment (e.g., network segment 10.1.1.0/24) to which the destination IP address 10.1.1.2/32 belongs, that is, the network segment route of the destination network segment 10.1.1.1/24, the ARP request message may be sent through VXLAN tunnel a1, which is not limited to the sending process.
Step 205, after receiving the ARP request message (including the destination IP address 10.1.1.2/32), the ED device 102 sends the ARP request message according to the egress interface indicated by the network segment route if the local routing table has a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs.
Specifically, after receiving the ARP request message, the ED device 102 determines whether a host route matching the destination IP address 10.1.1.2/32 exists in the local routing table, and if so, performs a conventional process. If not, the ED device 102 determines whether the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32, and if not, the conventional flow processing is adopted. Since the network segment 10.1.1.0/24 to which the destination IP address 10.1.1.2/32 belongs is the same as the network segment to which the gateway address 10.1.1.1/24 of the ED device 102 belongs, the ED device 102 may determine that the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32.
Therefore, the ED device 102 may also perform the following: the ED device 102 determines whether a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs exists in the local routing table. If not, the flow ends. If the network segment route exists, that is, the network segment route matching with the network segment to which the destination IP address 10.1.1.2/32 belongs exists, the ED device 102 may also send the ARP request message by using the network segment route. For example, referring to the local routing table shown in table 2, since there is a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs, that is, a network segment route with the destination network segment being 10.1.1.1/24, the ED device 102 may send the ARP request message through the VXLAN tunnel B1, and the sending process is not limited.
In step 206, after the ED device 103 receives the ARP request message (including the destination IP address 10.1.1.2/32), if a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs exists in the local routing table, the ED device 103 sends the ARP request message according to the egress interface indicated by the network segment route.
The processing of the ED device 103 is similar to the processing of the ED device 102, and is not described herein again.
Step 207, after receiving the ARP request message (including the destination IP address 10.1.1.2/32), the VTEP device 104 broadcasts the ARP request message in a two-layer network (i.e., a two-layer network matching the gateway address 10.1.1.1/24) if the network segment 10.1.1.0/24 to which the destination IP address 10.1.1.2/32 of the ARP request message belongs is the same as the network segment to which the gateway address 10.1.1.1/24 of the VTEP device 104 belongs.
Specifically, after receiving the ARP request message, VTEP device 104 determines whether the local routing table has a host route matching destination IP address 10.1.1.2/32, and if so, performs a conventional process. If not, the VTEP device 104 determines whether the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32, and if not, the conventional flow processing is adopted. Since the network segment 10.1.1.0/24 to which the destination IP address 10.1.1.2/32 belongs is the same as the network segment to which the gateway address 10.1.1.1/24 of the VTEP device 104 belongs, the VTEP device 104 determines that the device is a distributed gateway corresponding to the destination IP address 10.1.1.2/32.
When VTEP device 104 is a distributed gateway, VTEP device 104 may broadcast the ARP request message in a layer two network (i.e., a layer two network matching gateway address 10.1.1.1/24), that is, VTEP device 104 broadcasts the ARP request message to each host in the layer two network, and since the IP address of host 106 in the layer two network is 10.1.1.2/32, host 106 may return an ARP response message.
In addition to broadcasting the ARP request message in the two-layer network, VTEP device 104 may also perform the following: and judging whether the local routing table has a network segment route matched with the destination IP address of 10.1.1.2/32. If not, the flow ends. If so, the ARP request message can be sent by utilizing the network segment route.
In step 208, after receiving the ARP reply message returned by the host 106 for the ARP request message, the VTEP device 104 generates a host route of the host 106 according to the ARP reply message.
Specifically, after the VTEP device 104 broadcasts the ARP request packet in the two-layer network, the host 106 may return an ARP reply packet because the IP address 10.1.1.2/32 of the host 106 is the same as the destination IP address 10.1.1.2/32 of the ARP request packet. Upon receiving the ARP reply message, VTEP device 104 may generate a host route for host 106, as shown in table 5, which is an example of a learned local routing table. In the local routing table, the routing table entry corresponding to 10.1.1.2/32 is for the host route of 10.1.1.2/32.
TABLE 5
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 3.3.3.3 VXLAN tunnel C2
10.1.1.2/32 Interface 1041
... ... ...
It is understood that the ARP reply message returned by the host 106 also includes the MAC address of the host 106.
In step 209, the VTEP device 104 generates a routing message (e.g., MP-BGP route advertisement message, etc.) according to the ARP reply message, and sends the routing message to the ED device 103. The routing message carries the source IP address of the ARP response message, namely the destination IP address of the ARP request message is 10.1.1.2/32.
The routing message may carry the MAC address of the host 106 (known from the ARP reply message) or may not carry the MAC address of the host 106, in addition to the destination IP address 10.1.1.2/32. For example, the routing message may be an EVPN class two route (carrying the MAC address of host 106) or a newly defined EVPN class nine route (not carrying the MAC address of host 106).
In step 210, the ED device 103 generates a host route after receiving a routing message including the destination IP address 10.1.1.2/32, and sends the routing message to the ED device 102.
See table 6 for an example of a learned local routing table for the ED device 103. In the local routing table, the routing table entry corresponding to 10.1.1.2/32 is the host route for the destination IP address 10.1.1.2/32. The outgoing interface of the host route may be a tunnel identifier of the ED device 103 receiving the routing message.
TABLE 6
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 2.2.2.2 VXLAN tunnel B2
10.1.1.1/24 4.4.4.4 VXLAN tunnel C1
10.1.1.2/32 4.4.4.4 VXLAN tunnel C1
... ... ...
In step 211, ED device 102 generates a host route after receiving a routing message including destination IP address 10.1.1.2/32, and sends the routing message to VTEP device 101.
See table 7 for an example of a learned local routing table for the ED device 102. In the local routing table, the routing table entry corresponding to 10.1.1.2/32 is the host route for the destination IP address 10.1.1.2/32. The outgoing interface of the host route may be a tunnel identifier of the ED device 102 that received the routing message.
TABLE 7
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 1.1.1.1 VXLAN tunnel A2
10.1.1.1/24 3.3.3.3 VXLAN tunnel B1
10.1.1.2/32 3.3.3.3 VXLAN tunnel B1
... ... ...
In step 212, after receiving the routing message including the destination IP address 10.1.1.2/32, the VTEP device 101 generates a host route, thereby completing the generation process of the host route.
See table 8 for an example of a learned local routing table for VTEP device 101. In the local routing table, the routing table entry corresponding to 10.1.1.2/32 is the host route for the destination IP address 10.1.1.2/32. The outgoing interface of the host route may be a tunnel identifier of the VTEP device 101 that receives the route message.
TABLE 8
Destination IP address/destination network segment Next hop Outlet interface
10.1.1.1/24 2.2.2.2 VXLAN tunnel A1
10.1.1.2/32 2.2.2.2 VXLAN tunnel A1
... ... ...
Step 213, after receiving the data packet 1, the VTEP device 101 queries the local routing table shown in table 8 through the destination IP address 10.1.1.2/32 of the data packet 1 to obtain a host route, and sends the data packet 1 through the host route, that is, sends the data packet 1 to the ED device 102 through the VXLAN tunnel a 1.
In step 214, after receiving the data packet 1, the ED device 102 queries the local routing table shown in table 7 through the destination IP address 10.1.1.2/32 of the data packet 1 to obtain a host route, and sends the data packet 1 through the host route, that is, sends the data packet 1 to the ED device 103 through the VXLAN tunnel B1.
Step 215, after receiving the data packet 1, the ED device 103 queries the local routing table shown in table 6 through the destination IP address 10.1.1.2/32 of the data packet 1 to obtain a host route, and sends the data packet 1 through the host route, that is, sends the data packet 1 to the VTEP device 104 through the VXLAN tunnel C1.
In step 216, after receiving the data packet 1, the VTEP device 104 queries the local routing table shown in table 5 through the destination IP address 10.1.1.2/32 of the data packet 1 to obtain a host route, and sends the data packet 1 through the host route, that is, sends the data packet 1 to the host 106 through the interface 1041.
At this point, the transmission process of the data packet 1 is completed, and the data packet 1 is successfully sent to the host 106.
Based on the technical scheme, in the embodiment of the application, even if the gateway addresses of the plurality of distributed gateways are the same, the network segment route aiming at the gateway address can be generated in the routing table, so that when the data message aiming at the silent host is received, the destination IP address of the data message can be matched with the network segment route, the ARP request message is generated, the network segment route is utilized to send the ARP request message, and therefore the ARP request message is triggered to be sent to the distributed gateways of the neighbors, and ARP learning of the silent host is triggered. After ARP learning of the silent host is completed, each distributed gateway can generate a host route, and sends a data message aiming at the silent host through the host route, and the data message can be sent to the silent host, so that the data message can be normally transmitted, flow interruption is avoided, user service experience is improved, and access of the silent host is realized.
Based on the same application concept as the method, an embodiment of the present application provides a data packet transmission method, which may be applied to a network including a first distributed gateway and a second distributed gateway, where the first distributed gateway and the second distributed gateway are configured with the same gateway address and belong to the same network segment. Wherein the first distributed gateway and the second distributed gateway may be two connected distributed gateways.
Referring to fig. 1, if the VTEP device 101, the ED device 102, the ED device 103, and the VTEP device 104 are distributed gateways, and the first distributed gateway is the VTEP device 101, the second distributed gateway is the ED device 102; if the first distributed gateway is an ED device 102, the second distributed gateway is an ED device 103 or a VTEP device 101, and so on. If VTEP device 101 and VTEP device 104 are both distributed gateways, and the first distributed gateway is VTEP device 101, the second distributed gateway is VTEP device 104, and the first distributed gateway is VTEP device 104, the second distributed gateway is VTEP device 101.
In one example, the second distributed gateway may generate a second routing message, which may carry a gateway address of the second distributed gateway, and send the second routing message to the first distributed gateway. And the first distributed gateway generates a network segment route in the local routing table after receiving the second routing message. The network segment route may include a gateway address of the second distributed gateway and a first outgoing interface, where the first outgoing interface may be a tunnel identifier of the first distributed gateway that receives the second routing message, that is, a tunnel identifier of a VXLAN tunnel between the first distributed gateway and the second distributed gateway.
Specifically, when the first distributed gateway generates the segment route in the local routing table, the method may include: judging whether the first distributed gateway enables an ARP detection function or not; if so, a segment route may be generated in the local routing table. And if the judgment result is negative, forbidding the generation of the network segment route in the local routing table.
Referring to step 201 of the above embodiment, assuming that the first distributed gateway is the VTEP device 101 and the second distributed gateway is the ED device 102, the ED device 102 may generate a routing message and send the routing message to the VTEP device 101, where the routing message may include the gateway address 10.1.1.1/24 of the ED device 102.
After receiving the routing message, VTEP device 101 may parse out gateway address 10.1.1.1/24 of ED device 102 from the routing message, and generate a segment route in the local routing table, where the segment route includes gateway address 10.1.1.1/24 and an egress interface, such as VXLAN tunnel a1, as shown in table 1.
In the above application scenario, referring to fig. 3, a flowchart of a data packet transmission method in the embodiment of the present application is shown, where the method may be applied to a first distributed gateway, and the method may include:
step 301, receiving a data packet sent by a first host, where a destination IP address of the data packet is an IP address of a second host, for example, the destination IP address of the data packet 1 is 10.1.1.2/32.
Step 302, if the local routing table does not have a host route matching the destination IP address and a network segment route matching the network segment to which the destination IP address belongs, sending an ARP request message to the second distributed gateway according to at least one first output interface indicated by the network segment route, where the ARP request message includes the destination IP address.
Assuming that the first distributed gateway is the VTEP device 101, referring to step 203 and step 204 of the above embodiment, after the VTEP device 101 receives the data message 1, if the local routing table does not have a host route matching the destination IP address 10.1.1.2/32 and a network segment route matching the network segment to which the destination IP address 10.1.1.2/32 belongs, the VTEP device 101 generates an ARP request message and sends the ARP request message by using the network segment route, which is shown in table 1 and can be sent through the VXLAN tunnel a 1.
Step 303, if a first routing message including the destination IP address and sent by the second distributed gateway is received, generating a host route in the local routing table, where the host route includes the destination IP address and a second egress interface, the second egress interface is one of the at least one first egress interface, and the second egress interface may be a tunnel identifier between the first distributed gateway and the second distributed gateway.
Step 304, sending the data message to the second host through the host route.
Assuming that the first distributed gateway is the VTEP device 101 and the second distributed gateway is the ED device 102, referring to steps 211 to 213 of the above embodiments, the ED device 102 may send a routing message to the VTEP device 101, and the VTEP device 101 receives the routing message and generates the host route shown in table 8. After receiving the data packet 1, the VTEP device 101 queries the local routing table shown in table 8 through the destination IP address 10.1.1.2/32 of the data packet 1 to obtain a host route, and sends the data packet 1 through the host route, that is, sends the data packet 1 to the ED device 102 through the VXLAN tunnel a 1.
In the above application scenario, referring to fig. 4, it is another flowchart of a data packet transmission method in this embodiment of the present application, where the method may be applied to a second distributed gateway, and the method may include:
step 401, receiving an ARP request message sent by a first distributed gateway, where a destination IP address of the ARP request message is an IP address of a second host.
And step 402, if the network segment to which the destination IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs, broadcasting the ARP request message on the two-layer network.
In addition, after receiving the ARP request message, if a network segment route matched with a network segment to which the target IP address belongs exists in a local routing table, sending the ARP request message according to at least one third output interface indicated by the network segment route; the network segment route comprises a gateway address of a third distributed gateway and a third output interface, and the third output interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address which belongs to the same network segment.
Step 403, if an ARP reply message returned by the second host for the ARP request message is received, generating a first routing message according to the ARP reply message, where the first routing message includes the destination IP address.
Step 404, sending the first routing message to the first distributed gateway, so that the first distributed gateway generates a host route, and forwards the data packet to the second host through the host route.
Assuming that the first distributed gateway is the VTEP device 101 and the second distributed gateway is the ED device 102, referring to step 205 of the foregoing embodiment, after receiving the ARP request message, the ED device 102 broadcasts the ARP request message in the two-layer network because the network segment to which the destination IP address of the ARP request message belongs is the same as the network segment to which the gateway address of the ED device 102 belongs. Since a network segment route matching the network segment to which the destination IP address belongs exists in the local routing table (i.e., the network segment route of the ED device 103, that is, the ED device 103 is a third distribution gateway), the ED device 102 sends the ARP request message to the ED device 103 by using the third outgoing interface indicated by the network segment route.
Assuming that the first distributed gateway is the ED device 103 and the second distributed gateway is the VTEP device 104, referring to steps 207 to 209 of the above embodiment, after the VTEP device 104 receives the ARP request message, since the network segment to which the destination IP address of the ARP request message belongs is the same as the network segment to which the gateway address of the VTEP device 104 belongs, the VTEP device 104 may broadcast the ARP request message in the two-layer network. After receiving the ARP reply message returned by the host 106, the VTEP device 104 generates a routing message according to the ARP reply message, and sends the routing message to the ED device 103, so that the ED device 103 can generate a host route according to the routing message.
Based on the technical scheme, in the embodiment of the application, even if the gateway addresses of the plurality of distributed gateways are the same, the network segment route aiming at the gateway address can be generated in the routing table, so that when the data message aiming at the silent host is received, the destination IP address of the data message can be matched with the network segment route, the ARP request message is generated, the network segment route is utilized to send the ARP request message, and therefore the ARP request message is triggered to be sent to the distributed gateways of the neighbors, and ARP learning of the silent host is triggered. After ARP learning of the silent host is completed, each distributed gateway can generate a host route, and sends a data message aiming at the silent host through the host route, and the data message can be sent to the silent host, so that the data message can be normally transmitted, flow interruption is avoided, user service experience is improved, and access of the silent host is realized.
Based on the same concept as the method, the embodiment of the present application further provides a data packet transmission device, where the first distributed gateway and the second distributed gateway are configured with the same gateway address and belong to the same network segment, and the device may be applied to the first distributed gateway. As shown in fig. 5, is a structural diagram of the apparatus:
a receiving module 51, configured to receive a data packet sent by a first host, where a destination IP address of the data packet is an IP address of a second host;
a sending module 52, configured to send an ARP request packet to the second distributed gateway according to at least one first egress interface indicated by the network segment route when a host route matching the destination IP address does not exist in the local routing table and a network segment route matching the network segment to which the destination IP address belongs exists, where the ARP request packet includes the destination IP address;
a generating module 53, configured to generate a host route in a local routing table when receiving a first routing message that includes the destination IP address and is sent by a second distributed gateway, where the host route includes the destination IP address and a second egress interface, and the second egress interface is one of the at least one first egress interface;
the sending module 52 is further configured to send the data packet to the second host through the host routing.
The receiving module 51 is further configured to receive a second routing message sent by the second distributed gateway, where the second routing message includes a gateway address of the second distributed gateway;
the generating module 53 is further configured to generate a segment route in a local routing table, where the segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
The generating module 53 is specifically configured to, when generating a segment route in the local routing table:
judging whether the first distributed gateway enables an ARP detection function or not;
and if so, generating the network segment route in a local routing table.
In terms of hardware, a schematic diagram of a hardware architecture of the first distributed gateway provided in the embodiment of the present application may specifically refer to fig. 6. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method is used for communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium, and realizing the data message transmission operation of the above-mentioned example application of the present application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same concept as the method, the embodiment of the present application further provides a data packet transmission device, where the first distributed gateway and the second distributed gateway are configured with the same gateway address and belong to the same network segment, and the device may be applied to the second distributed gateway. As shown in fig. 7, the structure of the apparatus is:
a receiving module 71, configured to receive an ARP request packet sent by the first distributed gateway, where a destination IP address of the ARP request packet is an IP address of the second host;
a sending module 72, configured to broadcast the ARP request packet in a two-layer network when the network segment to which the destination IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs;
a generating module 73, configured to generate a first routing message according to an ARP reply message returned by a second host for the ARP request message, where the first routing message includes the destination IP address;
the sending module 72 is further configured to send the first routing message to a first distributed gateway, so that the first distributed gateway generates a host route, and forwards a data packet to the second host through the host route, where the host route includes the destination IP address and a second egress interface, and the second egress interface is a tunnel identifier of the first distributed gateway, where the first routing message is received by the first distributed gateway.
The generating module 73 is further configured to generate a second routing message, where the second routing message includes a gateway address of a second distributed gateway; the sending module 72 is further configured to send the second routing message to a first distributed gateway, so that the first distributed gateway generates a segment route, where the segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
The sending module 72 is further configured to send the ARP request packet according to at least one third egress interface indicated by the network segment route when a network segment route matching the network segment to which the destination IP address belongs exists in the local routing table; the network segment route comprises a gateway address of a third distributed gateway and a third output interface, and the third output interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address which belongs to the same network segment.
In terms of hardware, a schematic diagram of a hardware architecture of the second distributed gateway provided in the embodiment of the present application may specifically refer to fig. 8. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method is used for communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium, and realizing the data message transmission operation of the above-mentioned example application of the present application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A data message transmission method is characterized in that the same gateway address belonging to the same network segment is configured in a first distributed gateway and a second distributed gateway, and the method is applied to the first distributed gateway, and the method comprises the following steps:
receiving a data message sent by a first host, wherein the destination IP address of the data message is the IP address of a second host;
if the local routing table does not have a host route matched with the destination IP address and a network segment route matched with a network segment to which the destination IP address belongs, sending an ARP request message to the second distributed gateway according to at least one first output interface indicated by the network segment route, wherein the ARP request message comprises the destination IP address; wherein the network segment route is a route for a gateway address of a second distributed gateway;
if a first routing message which is sent by a second distributed gateway and comprises the destination IP address is received, generating a host route in a local routing table, wherein the host route comprises the destination IP address and a second outgoing interface, and the second outgoing interface is one outgoing interface of the at least one first outgoing interface;
and sending a data message to the second host through the host route.
2. The method of claim 1, further comprising:
receiving a second routing message sent by the second distributed gateway, wherein the second routing message comprises a gateway address of the second distributed gateway;
and generating a network segment route in a local routing table, wherein the network segment route comprises a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, which receives the second routing message.
3. The method of claim 2, wherein generating the segment route in the local routing table comprises:
judging whether the first distributed gateway enables an ARP detection function or not;
and if so, generating the network segment route in a local routing table.
4. A data message transmission method is characterized in that a first distributed gateway and a second distributed gateway are configured with the same gateway address belonging to the same network segment, and the method is applied to the second distributed gateway, and the method comprises the following steps:
receiving an ARP request message sent by the first distributed gateway, wherein the destination IP address of the ARP request message is the IP address of the second host;
if the network segment to which the target IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs, broadcasting the ARP request message in a two-layer network;
if an ARP response message returned by a second host aiming at the ARP request message is received, generating a first routing message according to the ARP response message, wherein the first routing message comprises the target IP address;
and sending the first routing message to a first distributed gateway, so that the first distributed gateway generates a host route and forwards a data message to the second host through the host route, wherein the host route comprises the destination IP address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the first distributed gateway, which receives the first routing message.
5. The method of claim 4, further comprising:
generating a second routing message, the second routing message comprising a gateway address of a second distributed gateway;
and sending the second routing message to a first distributed gateway so that the first distributed gateway generates a network segment route, wherein the network segment route comprises a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, which receives the second routing message.
6. The method of claim 4,
after receiving the ARP request packet sent by the first distributed gateway, the method further includes:
if a network segment route matched with the network segment to which the destination IP address belongs exists in a local routing table, sending the ARP request message according to at least one third output interface indicated by the network segment route;
the network segment route comprises a gateway address of a third distributed gateway and a third outgoing interface, and the third outgoing interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address which belongs to the same network segment.
7. A data message transmission apparatus, wherein a first distributed gateway and a second distributed gateway are configured with the same gateway address belonging to the same network segment, the apparatus is applied to the first distributed gateway, and the apparatus comprises:
the receiving module is used for receiving a data message sent by a first host, and the destination IP address of the data message is the IP address of a second host;
a sending module, configured to send an ARP request packet to the second distributed gateway according to at least one first egress interface indicated by the network segment route when a host route matching the destination IP address does not exist in a local routing table and a network segment route matching a network segment to which the destination IP address belongs exists, where the ARP request packet includes the destination IP address; wherein the network segment route is a route for a gateway address of a second distributed gateway;
a generating module, configured to generate a host route in a local routing table when receiving a first routing message that includes the destination IP address and is sent by a second distributed gateway, where the host route includes the destination IP address and a second egress interface, and the second egress interface is one of the at least one first egress interface;
the sending module is further configured to send a data packet to the second host through the host routing.
8. The apparatus of claim 7,
the receiving module is further configured to receive a second routing message sent by the second distributed gateway, where the second routing message includes a gateway address of the second distributed gateway;
the generating module is further configured to generate a network segment route in a local routing table, where the network segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
9. The apparatus of claim 8,
the generating module is specifically configured to, when generating a segment route in the local routing table:
judging whether the first distributed gateway enables an ARP detection function or not;
and if so, generating the network segment route in a local routing table.
10. A data message transmission apparatus, wherein a first distributed gateway and a second distributed gateway are configured with the same gateway address belonging to the same network segment, and the apparatus is applied to the second distributed gateway, the apparatus comprises:
a receiving module, configured to receive an ARP request packet sent by the first distributed gateway, where a destination IP address of the ARP request packet is an IP address of the second host;
a sending module, configured to broadcast the ARP request packet in a two-layer network when the network segment to which the destination IP address belongs is the same as the network segment to which the gateway address of the second distributed gateway belongs;
a generating module, configured to generate a first routing message according to an ARP reply message returned by a second host for the ARP request message, where the first routing message includes the destination IP address;
the sending module is further configured to send the first routing message to a first distributed gateway, so that the first distributed gateway generates a host route, and forwards a data packet to the second host through the host route, where the host route includes the destination IP address and a second egress interface, and the second egress interface is a tunnel identifier of the first distributed gateway, where the first routing message is received by the first distributed gateway.
11. The apparatus of claim 10, wherein the generating module is further configured to generate a second routing message, and wherein the second routing message comprises a gateway address of a second distributed gateway;
the sending module is further configured to send the second routing message to a first distributed gateway, so that the first distributed gateway generates a segment route, where the segment route includes a gateway address of the second distributed gateway and a first outgoing interface, and the first outgoing interface is a tunnel identifier of the first distributed gateway, where the tunnel identifier receives the second routing message.
12. The apparatus according to claim 10, wherein the sending module is further configured to send the ARP request packet according to at least one third egress interface indicated by the segment route when the segment route matching the segment to which the destination IP address belongs exists in a local routing table;
the network segment route comprises a gateway address of a third distributed gateway and a third outgoing interface, and the third outgoing interface is a tunnel identifier between the second distributed gateway and the third distributed gateway; the third distributed gateway and the second distributed gateway are configured with the same gateway address which belongs to the same network segment.
CN201811110400.2A 2018-09-21 2018-09-21 Data message transmission method and device Active CN109412949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811110400.2A CN109412949B (en) 2018-09-21 2018-09-21 Data message transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811110400.2A CN109412949B (en) 2018-09-21 2018-09-21 Data message transmission method and device

Publications (2)

Publication Number Publication Date
CN109412949A CN109412949A (en) 2019-03-01
CN109412949B true CN109412949B (en) 2021-02-26

Family

ID=65465069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811110400.2A Active CN109412949B (en) 2018-09-21 2018-09-21 Data message transmission method and device

Country Status (1)

Country Link
CN (1) CN109412949B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988221B (en) * 2020-08-31 2022-09-13 网易(杭州)网络有限公司 Data transmission method, data transmission device, storage medium and electronic equipment
CN112866119B (en) * 2020-12-30 2022-04-08 迈普通信技术股份有限公司 Virtual extensible local area network communication method and device, electronic equipment and storage medium
CN114221834B (en) * 2021-11-24 2024-03-12 新华三技术有限公司合肥分公司 Message forwarding method and device
CN115865801A (en) * 2022-12-01 2023-03-28 中兴通讯股份有限公司 Message transmission method, electronic device and storage medium
CN116915777B (en) * 2023-09-13 2023-12-05 杭州立方控股股份有限公司 Intelligent parking management system and method for seat personnel cooperation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016055027A1 (en) * 2014-10-10 2016-04-14 Hangzhou H3C Technologies Co., Ltd. Table entry in software defined network
CN106878168A (en) * 2017-03-20 2017-06-20 新华三技术有限公司 A kind of message forwarding method and device
CN106921578A (en) * 2017-03-14 2017-07-04 新华三技术有限公司 The generation method and device of a kind of forwarding-table item
CN107070790A (en) * 2016-12-16 2017-08-18 浙江宇视科技有限公司 A kind of route learning method and routing device
CN108259347A (en) * 2017-05-19 2018-07-06 新华三技术有限公司 A kind of message transmitting method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137024B (en) * 2011-04-19 2013-11-20 福建星网锐捷网络有限公司 Message processing method, exit routing device and border routing device
FR3001849B1 (en) * 2013-02-05 2016-06-24 Byo Networks METHOD FOR ROUTING DATA, COMPUTER PROGRAM, NETWORK CONTROLLER AND ASSOCIATED NETWORKS
CN105704033B (en) * 2016-01-08 2019-01-15 烽火通信科技股份有限公司 A kind of implementation method of PON equipment route forwarding table management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016055027A1 (en) * 2014-10-10 2016-04-14 Hangzhou H3C Technologies Co., Ltd. Table entry in software defined network
CN107070790A (en) * 2016-12-16 2017-08-18 浙江宇视科技有限公司 A kind of route learning method and routing device
CN106921578A (en) * 2017-03-14 2017-07-04 新华三技术有限公司 The generation method and device of a kind of forwarding-table item
CN106878168A (en) * 2017-03-20 2017-06-20 新华三技术有限公司 A kind of message forwarding method and device
CN108259347A (en) * 2017-05-19 2018-07-06 新华三技术有限公司 A kind of message transmitting method and device

Also Published As

Publication number Publication date
CN109412949A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109412949B (en) Data message transmission method and device
CN108718278B (en) Message transmission method and device
CN109729012B (en) Unicast message transmission method and device
CN108259347B (en) Message transmission method and device
CN109104364B (en) Designated forwarder election method and device
CN110430076B (en) Route management method and device
CN113132229B (en) Segment identifier determination method and device
CN107547391B (en) Message transmission method and device
CN108600109B (en) Message forwarding method and device
CN109412926B (en) Tunnel establishment method and device
CN106921578B (en) Method and device for generating forwarding table item
CN106878288B (en) message forwarding method and device
EP3337093B1 (en) Optimizing information related to a route and/or a next hop for multicase traffic
CN108600074B (en) Method and device for forwarding multicast data message
CN108494701B (en) Load sharing method and device
CN111010329B (en) Message transmission method and device
CN107547346B (en) Message transmission method and device
CN105681198A (en) Business chain processing method, device and system
CN107872389B (en) Method, apparatus and computer-readable storage medium for traffic load balancing
JP2019521619A (en) Packet forwarding
CN114143257B (en) Method for generating table entry, method for sending message, equipment and system
CN108718276B (en) Message forwarding method and device
CN110300057B (en) Method, computer readable medium and provider edge device for agent advertisement
CN108540386B (en) Method and device for preventing service flow interruption
CN108322376B (en) Route synchronization method, device and machine-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant