CN106921578B - Method and device for generating forwarding table item - Google Patents

Method and device for generating forwarding table item Download PDF

Info

Publication number
CN106921578B
CN106921578B CN201710151340.8A CN201710151340A CN106921578B CN 106921578 B CN106921578 B CN 106921578B CN 201710151340 A CN201710151340 A CN 201710151340A CN 106921578 B CN106921578 B CN 106921578B
Authority
CN
China
Prior art keywords
network segment
segment information
arp
virtual machine
message
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
CN201710151340.8A
Other languages
Chinese (zh)
Other versions
CN106921578A (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.)
New H3C Technologies Co Ltd
Original Assignee
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201710151340.8A priority Critical patent/CN106921578B/en
Publication of CN106921578A publication Critical patent/CN106921578A/en
Application granted granted Critical
Publication of CN106921578B publication Critical patent/CN106921578B/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/74Address processing for routing
    • 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/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • 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 method and a device for generating a forwarding table entry, wherein the method comprises the following steps: receiving a data message from opposite-end equipment, wherein the data message is sent by the opposite-end equipment after receiving an ARP message from a virtual machine, and the data message carries network segment information of the virtual machine; analyzing the network segment information from the data message, constructing an ARP request message matched with the network segment information according to the network segment information, and sending the constructed ARP request message; and receiving an ARP response message returned by the virtual machine, and generating a forwarding table entry by using the ARP response message. According to the technical scheme, a large number of ARP messages do not need to be transmitted on the IPL, so that the bandwidth resources of the IPL between the local terminal equipment and the opposite terminal equipment are saved, and the problem of service interruption caused by loss of the ARP messages is solved.

Description

Method and device for generating forwarding table item
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for generating a forwarding table entry.
Background
VXLAN (Virtual eXtensible Local Area Network) is a two-layer VPN (Virtual Private Network) technology based on IP Network and adopting a "MAC (Media Access Control) in UDP (User datagram protocol)" encapsulation form. VXLAN can provide two-layer interconnection for decentralized sites based on existing service provider or enterprise IP networks and can provide service isolation for different tenants.
In order to improve reliability, a VXLAN networking method of distributed aggregation may be adopted, as shown in fig. 1, physical port 1 and physical port 2 of host a join aggregation port a, and physical port 3 of VTEP1 and physical port 4 of VTEP2 are also joined to aggregation port a between VTEP (VXLAN Tunnel End Point) 1 and VTEP2 through a distributed aggregation protocol. Thus, for the message sent by host a to host E, host a may send through physical port 1 or physical port 2, and VTEP1 or VTEP2 may forward the message after receiving the message. Moreover, when VTEP1 or VTEP2 fails, host a can still send messages to host E, thereby improving reliability.
In the application scenario, the learning process of an Address Resolution Protocol (ARP) entry may include: after host a goes online, it sends an ARP message through physical port 1, and after receiving the ARP message, VTEP1 learns the ARP entry of host a and can send the ARP message to VTEP2 through IPL (Intra-Portal Link). VTEP2 learns the ARP entry for host a after receiving the ARP message over the IPL.
However, in the current networking of distributed aggregation, as shown in fig. 2, a plurality of VMs (Virtual machines) may be created on one physical server, and each VM corresponds to one host. After receiving the ARP packet from each VM, VTEP1 needs to send the ARP packet to VTEP2 through IPL, that is, one ARP packet is sent for each VM. Therefore, when the number of VMs is large, a large number of ARP messages need to be transmitted through the IPL, which wastes bandwidth resources of the IPL, and once the ARP message is lost, VTEP2 cannot learn the ARP entry, resulting in service interruption.
Disclosure of Invention
The application provides a method for generating a forwarding table entry, which is applied to a home terminal device of a distributed aggregation system, wherein the distributed aggregation system further comprises an opposite terminal device and a virtual machine connected with the home terminal device and the opposite terminal device, and the method comprises the following steps:
receiving a data message from the opposite terminal device, wherein the data message is sent by the opposite terminal device after receiving an ARP message from a virtual machine, and the data message carries network segment information of the virtual machine;
analyzing the network segment information from the data message, constructing an ARP request message matched with the network segment information according to the network segment information, and sending the constructed ARP request message to the virtual machine;
and receiving an ARP response message which is returned by the virtual machine and aims at the ARP request message, and generating a forwarding table entry by using the ARP response message.
The application provides a method for generating a forwarding table entry, which is applied to an opposite terminal device of a distributed aggregation system, wherein the distributed aggregation system further comprises a local terminal device and a virtual machine connected with the local terminal device and the opposite terminal device, and the method comprises the following steps:
receiving an ARP message from the virtual machine, and generating a forwarding table entry by using the ARP message;
acquiring network segment information of the virtual machine and generating a data message carrying the network segment information;
and sending the data message to the local terminal equipment so that the local terminal equipment generates a forwarding table item of the virtual machine matched with the network segment information according to the network segment information carried by the data message.
The application provides a generation device of a forwarding table item, the device is applied to a local terminal device of a distributed aggregation system, the distributed aggregation system further includes an opposite terminal device and a virtual machine connected with the local terminal device and the opposite terminal device, the device includes:
the receiving module is used for receiving a data message from opposite-end equipment, wherein the data message is sent by the opposite-end equipment after receiving an ARP message from the virtual machine, and the data message carries network segment information of the virtual machine;
the construction module is used for analyzing the network segment information from the data message and constructing an ARP request message matched with the network segment information according to the network segment information;
a sending module, configured to send the ARP request packet constructed by the construction module to the virtual machine;
the receiving module is further configured to receive an ARP reply message, which is returned by the virtual machine and is directed to the ARP request message;
and the generating module is used for generating a forwarding table entry by using the ARP response message.
The application provides a generation device of a forwarding table item, the device is applied to an opposite terminal device of a distributed aggregation system, the distributed aggregation system further includes a local terminal device and a virtual machine connected with the local terminal device and the opposite terminal device, the device includes:
a receiving module, configured to receive an ARP packet from the virtual machine;
a generating module, configured to generate a forwarding table entry by using the ARP packet;
the acquisition module is used for acquiring network segment information of the virtual machine;
the generating module is further configured to generate a data packet carrying the network segment information;
and the sending module is used for sending the data message to the local terminal equipment so that the local terminal equipment generates a forwarding table item of the virtual machine matched with the network segment information according to the network segment information carried by the data message.
Based on the above technical solution, in the embodiment of the present application, in a distributed aggregated VXLAN networking, in a learning process of forwarding table items (such as ARP table items), by transmitting a data packet carrying network segment information between a local device and an opposite device, the local device can actively construct an ARP request packet for a virtual machine according to the network segment information, and then generate a forwarding table item corresponding to the virtual machine according to an ARP reply packet. Based on the above manner, it is not necessary to send an ARP packet for each virtual machine between the local device and the peer device, and if the multiple virtual machines belong to the same network segment, only one data packet needs to be sent for the multiple virtual machines, and a large amount of ARP packets do not need to be transmitted, thereby saving bandwidth resources between the local device and the peer device. For example, for 10 virtual machines belonging to the same network segment, in a conventional manner, at least 10 ARP packets need to be transmitted between a local device and an opposite device, and in this embodiment of the present application, only 1 data packet needs to be transmitted between the local device and the opposite device. Because the data message is transmitted between the local terminal equipment and the opposite terminal equipment, but not the ARP message, the problem of service interruption caused by the loss of the ARP message can be avoided. Specifically, in the conventional manner, when a large number of ARP messages are transmitted between the local device and the peer device, the loss of the ARP messages is easily caused because the number of the ARP messages is large, in the embodiment of the present application, only 1 data message is transmitted between the local device and the peer device, and the number of the ARP messages is small, so that the loss of the data messages is not easily caused; in addition, in practical application, if it is assumed that a data type packet and a protocol type packet need to be transmitted on a link, the protocol type packet is usually discarded first when the link is congested, and based on this, in a conventional manner, if a large number of data type packets and ARP packets (i.e., protocol type packets) need to be transmitted between a local device and an opposite device, the ARP packet is discarded first when the link is congested.
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 and 2 are schematic diagrams of networking for distributed aggregation;
fig. 3 is a flowchart of a method for generating a forwarding entry according to an embodiment of the present application;
fig. 4 is a hardware configuration diagram of a local device in an embodiment of the present application;
fig. 5 is a block diagram of a forwarding table entry generation apparatus according to an embodiment of the present application;
fig. 6 is a hardware structure diagram of a peer device in an embodiment of the present application;
fig. 7 is a block diagram of a forwarding table entry generation apparatus according to 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 is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such 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 "at … …," or "in response to a determination.
The embodiment of the present application provides a method for generating a forwarding table entry, where the method may be applied to a distributed aggregation system, and the distributed aggregation system may include a local device, an opposite device, and a virtual machine connected to the local device and the opposite device, where the virtual machine is a virtual machine connected to aggregation ports of the local device and the opposite device, and is a virtual machine located on a private network side. In an example, the virtual machine may be a virtual machine deployed on a physical server, that is, the physical server is connected to the local device and the peer device, and a virtual machine (e.g., one or more virtual machines) is configured on the physical server, where the virtual machine connected to the local device and the peer device is one or more virtual machines configured on the physical server. And aiming at the physical server, the physical port of the local terminal device and the physical port of the opposite terminal device form an aggregation port associated with the physical server, namely the physical server is connected to the aggregation port. In practical application, the local device and the peer device may be opposite, for example, the local device may also be the peer device, and the peer device may also be the local device, which is not limited to this. Referring to fig. 3, a flowchart of a method for generating the forwarding table entry is shown, where the method may include:
step 301, the opposite-end device receives an ARP packet (e.g. a free ARP packet or an ARP request packet) from the virtual machine, and generates a forwarding entry (e.g. an ARP entry) by using the ARP packet.
Step 302, the opposite terminal device obtains the network segment information of the virtual machine and generates a data message carrying the network segment information.
In an example, for a process of "an opposite end device obtains network segment information of a virtual machine", when the opposite end device receives an ARP packet from the virtual machine, a receiving port on the opposite end device that receives the ARP packet is determined first, and the network segment information corresponding to the receiving port is the network segment information of the virtual machine.
In one example, for the process of "generating a data message carrying the network segment information", if the data message carrying the network segment information is not sent, the data message carrying the network segment information is generated; if the data message aiming at the network segment information is sent, the process is ended, and the data message is not generated.
Step 303, the opposite end device sends the data packet to the home end device, so that the home end device generates a forwarding table entry of the virtual machine matched with the network segment information according to the network segment information carried in the data packet.
For the process of generating, by the home terminal device, a forwarding table entry of the virtual machine matched with the network segment information according to the network segment information carried in the data packet, refer to steps 304 to 306, which is not described herein again.
In an example, for a data packet generated by an opposite end device, a destination IP address of the data packet may be an IP address of a home end device, and a destination MAC (Media Access Control) address of the data packet may be an MAC address of the home end device. For the process of sending a data packet to the local device by the peer device, the peer device may send the data packet to the local device through the IPL, and certainly, the peer device may also send the data packet to the local device through another link, which is not limited to this.
In one example, after the peer device sends the data packet to the home device, the peer device may further set a preset flag for the network segment information, and set an aging timer for the network segment information; the preset mark is used for indicating that the data message aiming at the network segment information is sent. And after the aging timer is overtime, deleting the preset mark corresponding to the network segment information; before the aging timer is overtime, the preset mark corresponding to the network segment information can be reserved, so that after the ARP message aiming at the network segment information is received again, the data message does not need to be sent to the local terminal equipment, and the sending quantity of the data message is reduced.
Based on the preset mark, after the opposite terminal device receives the ARP packet and acquires the network segment information, it can determine whether the data packet for the network segment information is sent by inquiring whether the network segment information has the preset mark, that is: if the network segment information has a preset mark, the data message aiming at the network segment information is already sent; if the network segment information has no preset mark, the data message aiming at the network segment information is not sent.
In an example, since all the virtual machines corresponding to the same network segment information may not be online at the same time, when the local device generates a forwarding table entry according to the network segment information, if a virtual machine is not online yet, the local device cannot generate the forwarding table entry of the virtual machine which is not online, the opposite device sets an aging timer for the network segment information, and deletes the preset mark corresponding to the network segment information after the aging timer is overtime, so that when a new virtual machine is online, the opposite device can send a data message to the local device again, and the local device can generate the forwarding table entry according to the network segment information, thereby generating the forwarding table entry for the virtual machine which is online newly.
Step 304, the local terminal device receives a data message carrying network segment information from the opposite terminal device.
And 305, the local terminal equipment analyzes network segment information from the data message, constructs an ARP request message matched with the network segment information according to the network segment information, and sends the constructed ARP request message to the virtual machine.
In one example, before the local device parses the network segment information from the data packet, the local device may further parse a destination IP address and/or a destination MAC address of the data packet. If the destination IP address is the IP address of the local terminal equipment and/or the destination MAC address is the MAC address of the local terminal equipment, the local terminal equipment analyzes the network segment information from the data message. If the destination IP address is not the IP address of the local terminal equipment and/or the destination MAC address is not the MAC address of the local terminal equipment, the ARP request message does not need to be constructed according to the network segment information in the data message. .
In one example, the segment information may be a 32-bit masked IP address (e.g., 99.1.1.0, etc.) or may be an N-bit (N is a value less than 32) masked IP segment (e.g., 99.1.1.0/24, etc., which represents a 24-bit masked IP segment). Based on this, if the network segment information is the IP address of the 32-bit mask, the constructed ARP request message is an ARP request message for the IP address 99.1.1.0, and is an ARP request message for one virtual machine; if the network segment information is an IP network segment with N-bit mask, the constructed ARP request message is an ARP request message aiming at the IP network segment 99.1.1.0/24 and is an ARP request message aiming at a plurality of virtual machines.
Step 306, the local device receives an ARP reply message for the ARP request message returned by the virtual machine, and generates a forwarding entry (e.g., ARP entry) by using the ARP reply message.
Based on the above technical solution, in the embodiment of the present application, in a distributed aggregated VXLAN networking, in a learning process of forwarding table items (such as ARP table items), by transmitting a data packet carrying network segment information between a local device and an opposite device, the local device can actively construct an ARP request packet for a virtual machine according to the network segment information, and then generate a forwarding table item corresponding to the virtual machine according to an ARP reply packet. Based on the above manner, when a plurality of virtual machines are created on the physical server, one ARP packet does not need to be sent for each virtual machine for the plurality of virtual machines, and if the plurality of virtual machines belong to the same network segment, only one data packet needs to be sent for the plurality of virtual machines, so that a large number of ARP packets do not need to be transmitted, and bandwidth resources between the local terminal device and the opposite terminal device are saved. For example, 10 virtual machines belonging to the same network segment are created on a physical server, and in a conventional manner, at least 10 ARP packets need to be transmitted between a local device and an opposite device, but in this embodiment of the present application, only 1 data packet needs to be transmitted between the local device and the opposite device. Moreover, because the data message is transmitted between the local terminal device and the opposite terminal device instead of the ARP message, the problem of service interruption caused by the loss of the ARP message can be avoided. Specifically, in the conventional manner, when a large number of ARP packets are transmitted between the local device and the peer device, the loss of the ARP packets is easily caused because the number of the packets is large, whereas in the embodiment of the present application, only 1 data packet needs to be transmitted between the local device and the peer device, and the loss of the data packet is not easily caused because the number of the packets is small; in addition, in practical application, if it is assumed that a data type packet and a protocol type packet need to be transmitted on a link, the protocol type packet is usually discarded first when the link is congested, and based on this, in a conventional manner, if a large number of data type packets and ARP packets (i.e., protocol type packets) need to be transmitted between a local device and an opposite device, the ARP packet is discarded first when the link is congested.
The above-described scheme is described below with reference to the application scenario shown in fig. 2. In a networking scenario of distributed aggregation, a physical port 1 and a physical port 2 of a physical server are added to an aggregation port a, and a physical port 3 of a VTEP1 and a physical port 4 of a VTEP2 are also added to the aggregation port a through a distributed aggregation protocol between a VTEP1 and a VTEP2, which is not described again for the configuration process of the aggregation port a. VTEP1 maps the correspondence between aggregation port a and physical ports 3 and 4, and VTEP2 maps the correspondence between aggregation port a and physical ports 3 and 4. As shown in fig. 2, the local device is VTEP1, and the peer device is VTEP2, or the local device is VTEP2, and the peer device is VTEP 1. Moreover, 9 VMs are configured on the physical server, and 9 VMs are taken as an example in fig. 2, and other numbers may also be used in practical applications.
In the application scenario, the generation process of the forwarding table entry may include the following steps:
in step 1, VM1 sends an ARP packet (e.g., a gratuitous ARP packet or an ARP request packet) through physical port 1 or physical port 2, for convenience of description, the ARP packet sent through physical port 1 is taken as an example.
In one example, after VM1 comes online, a gratuitous ARP message or ARP request message may be sent through physical port 1. The source IP address of the gratuitous ARP message is the IP address of VM1, the destination IP address is the IP address of VM1, the source MAC address is the MAC address of VM1, and the destination MAC address is a broadcast MAC address. In addition, the source IP address of the ARP request message is the IP address of VM1, the destination IP address is the IP address of VTEP1/VTEP2 (the IP addresses of VTEP1 and VTEP2 are the same), the source MAC address is the MAC address of VM1, and the destination MAC address is the broadcast MAC address.
Step 2, the VTEP1 receives the ARP message sent by the VM1 through the aggregation port a.
Step 3, VTEP1 generates a forwarding entry (ARP entry) of VM1 using the ARP packet.
The VTEP1 may parse the IP address 99.1.1.2 of the VM1 and the MAC address 0010-.
TABLE 1
IP address MAC address Outlet interface
99.1.1.2 0010-9400-0001 Polymerization opening A
Step 4, the VTEP1 obtains the network segment information (i.e., network segment addresses, such as 28-bit network segment address, 24-bit network segment address, 16-bit network segment address, etc., taking 24-bit network segment address as an example) of the VM 1. For example, since the IP address of VM1 is 99.1.1.2, the 24-bit network segment address is 99.1.1.0/24.
Step 5, the VTEP1 determines whether a data packet for the network segment information (e.g., 99.1.1.0/24) has been sent. If so, the flow ends, and if not, VTEP1 executes step 6.
In one example, the VTEP1 may determine whether the data packet for the network segment information (e.g., 99.1.1.0/24) has been sent by querying whether the network segment information (e.g., 99.1.1.0/24) has a preset flag (regarding a setting process of the preset flag, which will be described later). Specifically, if the network segment information has a preset mark, it may be determined that a data message for the network segment information has been sent; if the network segment information has no preset mark, it can be determined that the data message aiming at the network segment information is not sent.
And step 6, the VTEP1 generates a data message carrying the network segment information (such as 99.1.1.0/24).
The destination IP address of the data packet may be an IP address of VTEP2, and the destination MAC address may be a MAC address of VTEP 2. In practical applications, in order to implement distributed aggregation, VTEP1 and VTEP2 may configure the same IP address and MAC address, and therefore, when generating a data packet, VTEP1 may use the IP address of VTEP1 as the destination IP address of the data packet, and use the MAC address of VTEP1 as the destination MAC address of the data packet.
Step 7, VTEP1 sends the data message to VTEP2 via IPL.
And 8, setting a preset mark and an aging timer for the network segment information (99.1.1.0/24) by the VTEP1, wherein the preset mark is used for indicating that a data message aiming at the network segment information (99.1.1.0/24) is sent.
In an example, after the VTEP1 sets the aging timer for the segment information, the preset flag corresponding to the segment information may be retained before the aging timer expires, so that after receiving the ARP packet for the segment information again, the VTEP1 does not need to generate a data packet, and does not need to send the data packet to the VTEP2 through an IPL. After the aging timer is overtime, the VTEP1 may delete the preset flag and the aging timer corresponding to the segment information, so that, after receiving the ARP packet for the segment information again, the VTEP1 may generate a data packet, and send the data packet to the VTEP2 through the IPL.
And step 9, receiving the data message carrying the network segment information from the VTEP1 by the VTEP 2.
Step 10, VTEP2 parses the network segment information (99.1.1.0/24) from the data message.
In one example, the destination IP address and destination MAC address of the data packet may also be resolved before VTEP2 resolves the network segment information from the data packet. If the destination IP address is the IP address of VTEP2, the destination MAC address is the MAC address of VTEP2, and the data packet is received through the IPL, then VTEP2 parses the segment information from the data packet.
Step 11, the VTEP2 constructs an ARP request message of the virtual machine matching the network segment information according to the network segment information (99.1.1.0/24), and sends the constructed ARP request message to the virtual machine.
In one example, VTEP2 may construct an ARP request message with a destination IP address of 99.1.1.0/24, where the source IP address of the ARP request message is the IP address of VTEP2, the source MAC address is the MAC address of VTEP2, and the destination MAC address is a broadcast MAC address. VTEP2 then sends the ARP request message in a broadcast fashion, which ARP request message will be sent to each VM on the physical server. Assuming that the IP addresses of the VMs 1 and 9 are 99.1.1.2 to 99.1.1.10, respectively, since the destination IP address of the ARP request message is 99.1.1.0/24, after receiving the ARP request message, the VM1 sends an ARP reply message to the VTEP2 since the IP address 99.1.1.2 of the device belongs to 99.1.1.0/24. Similarly, after receiving the ARP request message, VM2-VM9 also sends an ARP reply message to VTEP 2.
In another example, VTEP2 may construct an ARP request message with a destination IP address of 99.1.1.1, an ARP request message with a destination IP address of 99.1.1.2, an ARP request message with a destination IP address of 99.1.1.3, and so on, up to an ARP request message with a destination IP address of 99.1.1.255. In addition, the source IP address of each ARP request message is the IP address of VTEP2, the source MAC address is the MAC address of VTEP2, and the destination MAC address is a broadcast MAC address. VTEP2 then sends each ARP request message separately in unicast. Since the destination IP address of each ARP request packet is a unicast address, each ARP request packet can be sent to the VM corresponding to the destination IP address. Assuming that the IP addresses of the VMs 1 and 9 are 99.1.1.2 to 99.1.1.10, respectively, the ARP request message with the destination IP address of 99.1.1.2 is sent to the VM1, and so on, the ARP request message with the destination IP address of 99.1.1.10 is sent to the VM9, and after receiving the ARP request message, the VM1 sends an ARP reply message to the VTEP2 because the IP address 99.1.1.2 of the device is the same as the destination IP address 99.1.1.2. Similarly, after receiving the corresponding ARP request message, VM2-VM9 also sends an ARP reply message to VTEP 2.
In the two examples, for the ARP reply message sent by each VM to VTEP2, the source IP address is the IP address of the VM, the destination IP address is the IP address of VTEP2, the source MAC address is the MAC address of the VM, and the destination MAC address is the MAC address of VTEP 2.
Step 12, the VTEP2 receives an ARP reply message for the ARP request message returned by each VM.
And step 13, the VTEP2 generates forwarding table entries of all VMs by using the ARP reply message.
VTEP2 may analyze IP address 99.1.1.2 of VM1 and MAC address 0010-.
TABLE 2
IP address MAC address Outlet interface
99.1.1.2 0010-9400-0001 Polymerization opening A
99.1.1.3 0010-9400-0002 Polymerization opening A
99.1.1.4 0010-9400-0003 Polymerization opening A
...
99.1.1.10 0010-9400-0009 Polymerization opening A
Step 14, sending the ARP message by VM2-VM9 through physical port 1, receiving the ARP message sent by VM2-VM9 by VTEP1 through aggregation port a, and generating a forwarding table entry of VM2-VM9 by using each received ARP message, where the finally maintained forwarding table entry is similar to table 2 on the basis of table 1.
Step 15, the VTEP1 obtains the segment information (99.1.1.0/24) of VM2-VM9, and since the data packet corresponding to the segment information has already been sent, the flow is ended, and the data packet is not sent any more.
Based on the same application concept as the method, the embodiment of the present application further provides a device for generating a forwarding table entry, where the device for generating a forwarding table entry may be applied to a local device. The forwarding table entry generating device may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking a software implementation as an example, as a logical means, the device is formed by reading a corresponding computer program instruction in the nonvolatile memory through a processor of the local device where the device is located. In terms of hardware, as shown in fig. 4, the hardware structure diagram of the local device where the forwarding table entry generating device is located is shown, and besides the processor and the nonvolatile memory shown in fig. 4, the local device may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; in terms of hardware structure, the local device may also be a distributed device, and may include multiple interface cards, so as to perform extension of message processing on a hardware level.
As shown in fig. 5, the apparatus is a structure diagram of a device for generating a forwarding table entry, where the apparatus is applied to a local device of a distributed aggregation system, the distributed aggregation system further includes an opposite device and a virtual machine connected to the local device and the opposite device, and the apparatus includes:
a receiving module 11, configured to receive a data packet from an opposite-end device, where the data packet is sent by the opposite-end device after receiving an ARP packet from a virtual machine, and the data packet carries network segment information of the virtual machine;
a constructing module 12, configured to analyze the network segment information from the data packet, and construct, according to the network segment information, an ARP request packet matching the network segment information;
a sending module 13, configured to send the ARP request packet constructed by the construction module to the virtual machine;
the receiving module 11 is further configured to receive an ARP reply message, which is returned by the virtual machine and is directed to the ARP request message;
and a generating module 14, configured to generate a forwarding table entry by using the ARP reply packet.
The constructing module 12 is further configured to analyze a destination IP address and/or a destination MAC address of the data packet; and if the target IP address is the IP address of the local terminal equipment and/or the target MAC address is the MAC address of the local terminal equipment, analyzing the network segment information from the data message.
Based on the same application concept as the method, the embodiment of the present application further provides a device for generating a forwarding table entry, where the device for generating a forwarding table entry may be applied to an opposite end device. The forwarding table entry generating device may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking a software implementation as an example, as a device in a logical sense, the device is formed by reading a corresponding computer program instruction in a nonvolatile memory through a processor of a peer device where the device is located. From a hardware aspect, as shown in fig. 6, the hardware structure diagram of the peer device where the forwarding table entry generating device is located is shown, and besides the processor and the nonvolatile memory shown in fig. 6, the peer device may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; in terms of hardware structure, the peer device may also be a distributed device, and may include multiple interface cards, so as to perform packet processing extension at a hardware level.
As shown in fig. 7, the apparatus is a structure diagram of a device for generating a forwarding table entry, where the apparatus is applied to an opposite-end device of a distributed aggregation system, the distributed aggregation system further includes a home-end device and a virtual machine connected to the home-end device and the opposite-end device, and the apparatus includes:
a receiving module 21, configured to receive an ARP packet from the virtual machine;
a generating module 22, configured to generate a forwarding table entry by using the ARP packet;
an obtaining module 23, configured to obtain network segment information of the virtual machine;
the generating module 22 is further configured to generate a data packet carrying the network segment information;
and a sending module 24, configured to send the data packet to a home terminal device, so that the home terminal device generates a forwarding table entry of a virtual machine matching the network segment information according to the network segment information carried in the data packet.
The generating module 22 is specifically configured to generate a data packet carrying the network segment information if the data packet for the network segment information is not sent in the process of generating the data packet carrying the network segment information.
In an example, the apparatus for generating a forwarding table entry further includes (not shown in the figure):
a processing module, configured to set a preset flag for the network segment information and set an aging timer for the network segment information after the sending module 24 sends the data packet to the home terminal device; the preset mark is used for indicating that a data message aiming at the network segment information is sent;
and deleting the preset mark corresponding to the network segment information after the aging timer is overtime.
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.
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, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but is not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
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 (10)

1. A method for generating a forwarding table entry is applied to a home terminal device of a distributed aggregation system, where the distributed aggregation system further includes an opposite terminal device and a virtual machine connected to the home terminal device and the opposite terminal device, and the method includes:
receiving a data message from the opposite terminal device, wherein the data message is sent by the opposite terminal device after receiving an ARP message from a virtual machine, and the data message carries network segment information of the virtual machine; the network segment information is an IP address or an IP network segment;
analyzing the network segment information from the data message, constructing an ARP request message matched with the network segment information according to the network segment information, and sending the constructed ARP request message to the virtual machine;
and receiving an ARP response message which is returned by the virtual machine and aims at the ARP request message, and generating a forwarding table entry by using the ARP response message.
2. The method of claim 1,
before parsing the network segment information from the data message, the method further comprises:
analyzing a destination IP address and/or a destination MAC address of the data message;
and if the target IP address is the IP address of the local terminal equipment and/or the target MAC address is the MAC address of the local terminal equipment, executing the process of analyzing the network segment information from the data message.
3. A method for generating a forwarding table entry is applied to an opposite-end device of a distributed aggregation system, where the distributed aggregation system further includes a local-end device and a virtual machine connected to the local-end device and the opposite-end device, and the method includes:
receiving an ARP message from the virtual machine, and generating a forwarding table entry by using the ARP message;
acquiring network segment information of the virtual machine and generating a data message carrying the network segment information; the network segment information is an IP address or an IP network segment;
and sending the data message to the local terminal equipment so that the local terminal equipment generates a forwarding table item of the virtual machine matched with the network segment information according to the network segment information carried by the data message.
4. The method of claim 3,
the process of generating the data packet carrying the network segment information specifically includes: and if the data message aiming at the network segment information is not sent, generating the data message carrying the network segment information.
5. The method according to claim 3 or 4,
after the data packet is sent to the home terminal device, the method further includes:
setting a preset mark for the network segment information, and setting an aging timer for the network segment information; the preset mark is used for indicating that a data message aiming at the network segment information is sent;
and deleting the preset mark corresponding to the network segment information after the aging timer is overtime.
6. A device for generating a forwarding table entry, where the device is applied to a local device of a distributed aggregation system, the distributed aggregation system further includes an opposite device and a virtual machine connected to the local device and the opposite device, and the device includes:
the receiving module is used for receiving a data message from opposite-end equipment, wherein the data message is sent by the opposite-end equipment after receiving an ARP message from the virtual machine, and the data message carries network segment information of the virtual machine; the network segment information is an IP address or an IP network segment;
the construction module is used for analyzing the network segment information from the data message and constructing an ARP request message matched with the network segment information according to the network segment information;
a sending module, configured to send the ARP request packet constructed by the construction module to the virtual machine;
the receiving module is further configured to receive an ARP reply message, which is returned by the virtual machine and is directed to the ARP request message;
and the generating module is used for generating a forwarding table entry by using the ARP response message.
7. The apparatus of claim 6,
the construction module is also used for analyzing a destination IP address and/or a destination MAC address of the data message; and if the target IP address is the IP address of the local terminal equipment and/or the target MAC address is the MAC address of the local terminal equipment, analyzing the network segment information from the data message.
8. A device for generating a forwarding table entry, where the device is applied to an opposite-end device of a distributed aggregation system, the distributed aggregation system further includes a local-end device and a virtual machine connected to the local-end device and the opposite-end device, and the device includes:
a receiving module, configured to receive an ARP packet from the virtual machine;
a generating module, configured to generate a forwarding table entry by using the ARP packet;
the acquisition module is used for acquiring network segment information of the virtual machine; the network segment information is an IP address or an IP network segment;
the generating module is further configured to generate a data packet carrying the network segment information;
and the sending module is used for sending the data message to the local terminal equipment so that the local terminal equipment generates a forwarding table item of the virtual machine matched with the network segment information according to the network segment information carried by the data message.
9. The apparatus of claim 8,
the generating module is specifically configured to generate a data packet carrying the network segment information if the data packet for the network segment information is not sent in a process of generating the data packet carrying the network segment information.
10. The apparatus of claim 8 or 9, further comprising:
the processing module is used for setting a preset mark for the network segment information and setting an aging timer for the network segment information after the sending module sends the data message to the local terminal equipment; the preset mark is used for indicating that a data message aiming at the network segment information is sent;
and deleting the preset mark corresponding to the network segment information after the aging timer is overtime.
CN201710151340.8A 2017-03-14 2017-03-14 Method and device for generating forwarding table item Active CN106921578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710151340.8A CN106921578B (en) 2017-03-14 2017-03-14 Method and device for generating forwarding table item

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710151340.8A CN106921578B (en) 2017-03-14 2017-03-14 Method and device for generating forwarding table item

Publications (2)

Publication Number Publication Date
CN106921578A CN106921578A (en) 2017-07-04
CN106921578B true CN106921578B (en) 2020-01-03

Family

ID=59461076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710151340.8A Active CN106921578B (en) 2017-03-14 2017-03-14 Method and device for generating forwarding table item

Country Status (1)

Country Link
CN (1) CN106921578B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547402B (en) * 2017-07-19 2020-04-03 新华三技术有限公司 Forwarding table generation method and device
CN108259635B (en) * 2017-09-29 2021-05-28 新华三技术有限公司 ARP (Address resolution protocol) table item learning method and DR (digital radiography) equipment
CN110851371B (en) * 2018-08-20 2023-09-26 华为技术有限公司 Message processing method and related equipment
CN109412949B (en) * 2018-09-21 2021-02-26 新华三技术有限公司 Data message transmission method and device
CN111371668B (en) * 2020-02-26 2023-05-30 平安科技(深圳)有限公司 Method, device, equipment and storage medium for periodically sending based on free ARP
CN112468363B (en) * 2020-11-23 2022-05-31 杭州迪普科技股份有限公司 Method and device for detecting link connectivity
CN117459419B (en) * 2023-12-22 2024-03-12 石家庄学院 Network segment visualization method and system with self-adaptive regeneration capability

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378296B (en) * 2013-08-15 2018-04-10 新华三技术有限公司 A kind of message forwarding method and equipment
CN105577417B (en) * 2014-11-06 2019-02-22 新华三技术有限公司 Message forwarding method and device based on VXLAN network
US10116493B2 (en) * 2014-11-21 2018-10-30 Cisco Technology, Inc. Recovering from virtual port channel peer failure
CN106385354B (en) * 2016-08-30 2019-08-20 锐捷网络股份有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN106921578A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
CN106921578B (en) Method and device for generating forwarding table item
US10541913B2 (en) Table entry in software defined network
CN108259347B (en) Message transmission method and device
CN106878199B (en) Configuration method and device of access information
CN106878194B (en) Message processing method and device
CN108600109B (en) Message forwarding method and device
CN107547391B (en) Message transmission method and device
CN109617995B (en) Management system and method for VPC (virtual private network) internal container of tenant cluster and electronic equipment
CN108965092B (en) Data message transmission method and device
CN109714274B (en) Method for acquiring corresponding relation and routing equipment
CN107547346B (en) Message transmission method and device
CN109412949B (en) Data message transmission method and device
CN112583745A (en) Method, equipment and system for forwarding message in SR network
US8472420B2 (en) Gateway device
US20150043578A1 (en) Home Network Packet Delivery
CN106507414B (en) Message forwarding method and device
CN105187311A (en) Message forwarding method and message forwarding device
CN107070719B (en) Equipment management method and device
CN106992918B (en) Message forwarding method and device
US10374899B2 (en) Method and device for reporting OpenFLow switch capability
CN108306825B (en) Equivalent forwarding table item generation method and VTEP device
CN110958124B (en) Multicast group management method, device, readable storage medium and computer
CN112311672B (en) Method, device and equipment for obtaining routing table item
CN108768845B (en) Multi-homing host routing synchronization method and device
CN108632125B (en) Multicast table item management method, device, equipment 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