CN113472916A - MAC address aging processing method and equipment - Google Patents
MAC address aging processing method and equipment Download PDFInfo
- Publication number
- CN113472916A CN113472916A CN202110788323.1A CN202110788323A CN113472916A CN 113472916 A CN113472916 A CN 113472916A CN 202110788323 A CN202110788323 A CN 202110788323A CN 113472916 A CN113472916 A CN 113472916A
- Authority
- CN
- China
- Prior art keywords
- vtep
- mac address
- address table
- local
- preset
- 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.)
- Pending
Links
- 230000032683 aging Effects 0.000 title claims abstract description 81
- 238000003672 processing method Methods 0.000 title claims description 15
- 230000004044 response Effects 0.000 claims abstract description 75
- 238000000034 method Methods 0.000 claims abstract description 25
- 230000002431 foraging effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- GNFTZDOKVXKIBK-UHFFFAOYSA-N 3-(2-methoxyethoxy)benzohydrazide Chemical compound COCCOC1=CC=CC(C(=O)NN)=C1 GNFTZDOKVXKIBK-UHFFFAOYSA-N 0.000 description 1
- FGUUSXIOTUKUDN-IBGZPJMESA-N C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 Chemical compound C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 FGUUSXIOTUKUDN-IBGZPJMESA-N 0.000 description 1
- YTAHJIFKAKIKAV-XNMGPUDCSA-N [(1R)-3-morpholin-4-yl-1-phenylpropyl] N-[(3S)-2-oxo-5-phenyl-1,3-dihydro-1,4-benzodiazepin-3-yl]carbamate Chemical compound O=C1[C@H](N=C(C2=C(N1)C=CC=C2)C1=CC=CC=C1)NC(O[C@H](CCN1CCOCC1)C1=CC=CC=C1)=O YTAHJIFKAKIKAV-XNMGPUDCSA-N 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5053—Lease time; Renewal aspects
Abstract
The invention discloses a method and a device for aging MAC addresses, wherein the method comprises the following steps: under the condition that an MAC address table item of a first virtual machine device VM which is connected to a virtual extended local area network (VTEP) tunnel endpoint device in a local Media Access Control (MAC) address table meets a preset condition, broadcasting an ARP (Address resolution protocol) request packet carrying a first preset operation code (OP) indication value in a two-layer network segment connected under the VTEP; and in response to receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, re-timing the aging time of the MAC address table entry of the VM which is connected to the VTEP in a random manner. The broadcast flow condition of the VTEP in the lower two-layer domain can be effectively reduced, and therefore network resources are saved.
Description
Technical Field
The invention relates to the technical field of virtual extended local area networks, in particular to an MAC address aging processing method, virtual extended local area network tunnel endpoint equipment and virtual machine equipment.
Background
In a VXLAN (Virtual eXtensible Local Area Network) Network, a VM (Virtual Machine) is connected to a VTEP (VXLAN Tunnel End Point), and if the VM does not send or receive traffic before the aging time of the MAC (Media Access Control) address is over, the VTEP deletes the MAC address entry of the VM. When the traffic sent to the VM reaches the VTEP, the VTEP cannot find the MAC Address of the VM in the local MAC Address table, and broadcasts an ARP (Address Resolution Protocol) request within a VNI (VXLAN Network Identifier, virtual extensible local area Network Identifier) range of the downstream, which causes waste of Network resources.
Disclosure of Invention
Therefore, the invention provides an MAC address aging processing method, virtual expansion local area network tunnel endpoint equipment and virtual machine equipment, so as to solve the technical problems.
In order to achieve the above object, a first aspect of the present invention provides a MAC address aging method, including:
under the condition that an MAC address table item of a first virtual machine device VM which is connected to a virtual extended local area network (VTEP) tunnel endpoint device in a local Media Access Control (MAC) address table meets a preset condition, broadcasting an ARP (Address resolution protocol) request packet carrying a first preset operation code (OP) indication value in a two-layer network segment connected under the VTEP;
and in response to receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, re-timing the aging time of the MAC address table entry of the VM which is connected to the VTEP in a random manner.
In some embodiments, the MAC address table entry of the first VM linked to the local VTEP in the local MAC address table satisfies a preset condition, including:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the number of times of inquiring the MAC address table item of the first VM in the aging time is smaller than a preset threshold value.
In some embodiments, after broadcasting the ARP request packet carrying the first preset OP indication value in the two-layer network segment connected under the VTEP, the method further includes:
and in response to the fact that an ARP response packet sent by a second VM which is connected to the VTEP in an up-link mode is not received within a preset time length, deleting the MAC address table entry of the second VM from a local MAC address table.
In some embodiments, after re-timing the aging time of the MAC address table entry of any VM that is linked up to the present VTEP, the method further comprises:
and in response to receiving a data packet of which the destination IP address is the IP address of any VM which is linked up to the local VTEP, forwarding the data packet to the any VTEPVM which is linked up to the local VTEPVM according to the MAC address table entry of the any VTEPVM which is linked up to the local VTEPVM.
In order to achieve the above object, a second aspect of the present invention provides a MAC address aging method, including:
responding to an ARP request packet broadcasted by a virtual extensible local area network (VTEP) tunnel endpoint device (VTEP) which is connected to a Virtual Machine (VM) in an uplink and acquiring a first preset operation code (OP) indicated value from the ARP request packet, and sending an ARP response packet carrying a second preset OP indicated value to the VTEP so as to enable the VTEP to count the aging time of an MAC address table item of the VM in a local Media Access Control (MAC) address table again.
In order to achieve the above object, a third aspect of the present invention provides a virtual extended local area network tunnel endpoint device, including:
the broadcast module is used for broadcasting an ARP request packet carrying a first preset operation code OP indication value in a second-layer VNI connected under a local virtual local area network (VTEP) under the condition that an MAC address table item of a first virtual machine device VM connected to the VTEP in a local Media Access Control (MAC) address table meets a preset condition;
the receiving module is used for receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP;
and the processing module is used for responding to the ARP response packet sent by any VM (virtual machine) which is connected to the VTEP and received by the receiving module in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, and retiming the aging time of the MAC address table entry of the VM which is connected to the VTEP.
In some embodiments, the MAC address table entry of the first VM linked to the local VTEP in the local MAC address table satisfies a preset condition, including:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the number of times of inquiring the MAC address table item of the first VM in the aging time is smaller than a preset threshold value.
In some embodiments, the processing module is further configured to, in response to the receiving module not receiving an ARP response packet sent by a second VM that is linked to the VTEP within a preset time period, delete a MAC address table entry of the second VM from a local MAC address table.
In some embodiments, the receiving module is further configured to receive a data packet with a destination IP address being the IP address of the VM that is arbitrarily linked to the VTEP;
the sending module is further configured to, in response to the receiving module receiving a data packet whose destination IP address is the IP address of the VM that is arbitrarily linked to the local VTEP, forward the data packet to the VM that is arbitrarily linked to the local VTEP according to the MAC address table entry of the VM that is arbitrarily linked to the local VTEP.
In order to achieve the above object, a fourth aspect of the present invention provides a virtual machine device, including:
the virtual machine equipment VM uplink virtual expansion local area network tunnel endpoint equipment VTEP broadcast address resolution protocol ARP request packets are received, and a first preset operation code OP indicated value is obtained from the ARP request packets;
and the sending module is used for responding to an ARP request packet which is received by the receiving module and sent by a VTEP which is connected with the VM and acquiring a first preset OP indicating value from the ARP request packet, and sending an ARP response packet carrying a second preset OP indicating value to the VTEP so as to enable the VTEP to count the aging time of the MAC address table item of the VM in a local media access control MAC address table again.
The invention has the following advantages:
in the MAC address aging method provided in the embodiment of the present invention, when the MAC address table entry of the first VM that is linked to the local VTEP in the local MAC address table meets the preset condition, the VTEP broadcasts an ARP request packet carrying a first preset OP indication value in the lower two-layer network segment, and when the ARP response packet sent by any VM that is linked to the local VTEP is received within the preset time and the second preset OP indication value is obtained from the ARP response packet, the VTEP does not need to delete the MAC address table entry of the first VM from the local MAC address table, that is, does not need to broadcast an ARP request to the second layer domain of the lower VNI after deleting the MAC address table entry of the first VM from the local MAC address table to reacquire the MAC address of the first VM, so the MAC address aging method provided in the embodiment of the present invention can effectively reduce the broadcast traffic of the VTEP in the lower two-layer domain, thereby realizing saving of network resources.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a first flowchart of a method for processing MAC address aging on a VTEP side of a virtual extensible local area network tunnel endpoint device according to embodiment 1 of the present invention;
fig. 2 is a flowchart illustrating a second method for processing MAC address aging on a VTEP side of a virtual extensible local area network tunnel endpoint device according to embodiment 2 of the present invention;
fig. 3 is a third schematic flowchart of a method for processing MAC address aging on the VTEP side of a virtual extensible local area network tunnel endpoint device according to embodiment 3 of the present invention;
fig. 4 is a schematic flowchart of a method for processing MAC address aging on a VM side of a virtual machine device according to embodiment 4 of the present invention;
fig. 5 is a schematic structural diagram of a virtual extensible local area network tunnel endpoint device VTEP provided in embodiment 5 of the present invention;
fig. 6 is a schematic structural diagram of a virtual machine device VM according to embodiment 6 of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
It is to be understood that the specific embodiments and figures described herein are merely illustrative of the invention and are not limiting of the invention.
It is to be understood that the embodiments and features of the embodiments can be combined with each other without conflict.
It is to be understood that, for the convenience of description, only parts related to the present invention are shown in the drawings of the present invention, and parts not related to the present invention are not shown in the drawings.
It should be understood that each unit and module related in the embodiments of the present invention may correspond to only one physical structure, may also be composed of multiple physical structures, or multiple units and modules may also be integrated into one physical structure.
It will be understood that, without conflict, the functions, steps, etc. noted in the flowchart and block diagrams of the present invention may occur in an order different from that noted in the figures.
It is to be understood that the flowchart and block diagrams of the present invention illustrate the architecture, functionality, and operation of possible implementations of systems, apparatus, devices and methods according to various embodiments of the present invention. Each block in the flowchart or block diagrams may represent a unit, module, segment, code, which comprises executable instructions for implementing the specified function(s). Furthermore, each block or combination of blocks in the block diagrams and flowchart illustrations can be implemented by a hardware-based system that performs the specified functions or by a combination of hardware and computer instructions.
It is to be understood that the units and modules involved in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware, for example, the units and modules may be located in a processor.
The MAC address aging processing method provided by the embodiment of the invention can be applied to virtual expansion local area network tunnel endpoint equipment and virtual machine equipment which is connected to the virtual expansion local area network tunnel endpoint equipment.
As shown in fig. 1, an embodiment of the present invention provides a MAC address aging method that may be applied to a virtual extensible local area network tunnel endpoint device, where the method may include the following steps:
step 11, under the condition that the MAC address table item of the first VM which is linked to the local VTEP in the local MAC address table satisfies the preset condition, broadcasting an ARP request packet carrying a first preset OP (operation code) indication value in the second layer network segment linked to the local VTEP.
The first preset OP indication value may be 0x 0003.
The virtual machine device VM is connected to a virtual extended local area network tunnel endpoint device VTEP, and the VTEP automatically learns and establishes an address table item of the VM in a local MAC address table item according to a source MAC address of a received data packet in advance.
Under the condition that the MAC address table entry of the first VM in the VTEP local MAC address table meets the preset condition, it may be stated that the aging time of the MAC address table entry of the first VM is overtime, but at this time, the VTEP does not directly delete the MAC address table entry of the first VM from the local MAC address table, but broadcasts an extended ARP request packet in a two-layer network segment connected under the VTEP, where a value of the ARP request packet corresponding to the OP indication is 0x0003, which indicates that the VTEP requests to verify all VMs in the two-layer network segment connected under the VTEP, and a destination IP (Internet Protocol) address of the ARP request packet is a two-layer network segment address, and subnet mask information is added, where the destination MAC address is a broadcast MAC address, the source IP address is an IP address of the VTEP, and the source MAC address is an MAC address of the VTEP.
And step 12, in response to receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, re-timing the aging time of the MAC address table entry of the VM which is connected to the VTEP in a random manner.
The second preset OP indication value may be 0x 0004.
If the VTEP receives an ARP response packet returned by any VM (which may include the first VM) that is uplinked to the VTEP within a preset time length after broadcasting an ARP request packet carrying the first preset OP indication value in the two-layer network segment that is downlinked by the VTEP, and acquires the second preset OP indication value from the ARP response packet, the VTEP may determine that the VM that is uplinked to the VTEP passes the verification. At this time, the VTEP may reset the aging time of the MAC address table entry of the VM arbitrarily linked to the VTEP in the local MAC address table, that is, re-count the aging time of the MAC address table entry of the VM arbitrarily linked to the VTEP.
Note that, if the first VM sends the ARP response packet to the VTEP within the preset time period, the first VM is also listed as "VM linked to the VTEP arbitrarily".
As can be seen from steps 11 to 12, in the MAC address aging processing method provided in the embodiment of the present invention, when the MAC address table entry of the first VM that is linked to the local VTEP in the local MAC address table satisfies the preset condition, the VTEP broadcasts the ARP request packet carrying the first preset OP indication value in the second layer network segment that is linked to the local VTEP, and when the ARP response packet sent by any VM that is linked to the local VTEP in the uplink is received within the preset time period and the second preset OP indication value is obtained from the ARP response packet, and the aging time of the MAC address table entry of the VM that is linked to the local VTEP in the uplink is re-timed, the VTEP does not need to delete the MAC address table entry of the first VM from the local MAC address table, that is, it does not need to broadcast an ARP request in the second layer domain of the VNI after deleting the MAC address table entry of the first VM from the local MAC address table to re-obtain the MAC address of the first VM, so that the MAC address aging processing method provided in the embodiment of the MAC address aging processing method can effectively reduce the MAC address aging processing method of the VTEP that is broadcasted in the second layer domain of the VTEP in the downlink Accordingly, saving of network resources is achieved.
In some embodiments, the MAC address table entry of the first VM linked to the local VTEP in the local MAC address table satisfies a preset condition (i.e., described in step 11), which may include:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the inquired times of the MAC address table item of the first VM in the aging time are less than a preset threshold value.
In the aging time of the MAC address table entry of the first VM in the local MAC address table, if the VTEP receives a packet using the MAC address of the first VM as the source MAC address, the VTEP will count the aging time of the MAC address table entry of the first VM again and set the aging time flag bit of the MAC address table entry of the first VM to 1. After the aging time of the MAC address table entry of the first VM in the local MAC address table is out of date, if the VTEP does not receive a data packet using the MAC address of the first VM as the source MAC address, the VTEP sets the aging time flag bit of the MAC address table entry of the first VM to 0.
In the embodiment of the present invention, when the VTEP detects that the aging time flag bit of the MAC address table entry of the first VM is 0 and the number of times that the VTEP queries the MAC address table entry of the first VM in the local MAC address table within the aging time is less than the preset threshold, the VTEP may determine that it needs to request the first VM to be verified at this time, that is, send the ARP request packet carrying the first preset OP indication value to the VM.
As shown in fig. 2, in some embodiments, after broadcasting the ARP request packet carrying the first preset OP indication value in the two-layer network segment connected under the VTEP (i.e. step 11), the MAC address aging processing method provided by the present invention may further include the following steps:
and step 12', in response to not receiving the ARP response packet sent by the second VM connected to the VTEP within the preset time, deleting the MAC address table entry of the second VM from the local MAC address table.
If the VTEP does not receive an ARP response packet returned by a second VM (which may include the first VM) that is linked to the VTEP within a preset time period after broadcasting an ARP request packet carrying the first preset OP indication value in a second layer network segment that is linked to the VTEP downstream, the VTEP may determine that the second VM is not verified. At this point, the VTEP may delete the MAC address table entry of the second VM from the native MAC address table.
The VTEP does not receive the ARP response packet returned by the second VM within the preset time duration after broadcasting the ARP request packet carrying the first preset OP indication value in the second layer network segment of the VTEP downlink, which may be because the second VM is offline.
It should be noted that, the VMs which are connected to the VTEP within the preset time period and do not send the ARP response packet to the VTEP are all the second VMs; and if the first VM does not send the ARP response packet to the VTEP, the second VM also comprises the first VM.
As shown in fig. 3, after re-timing the aging time of the MAC address table entry of any VM linked to the VTEP (i.e. step 12), the MAC address aging processing method provided by the present invention may further include the following steps:
step 13, in response to receiving the data packet whose destination IP address is the IP address of the VM arbitrarily linked to the local VTEP, forwarding the data packet to the VM arbitrarily linked to the local VTEP according to the MAC address table entry of the VM arbitrarily linked to the local VTEP.
After the aging time of the MAC address table entry of the VM linked to the local VTEP is re-timed and before the aging time of the MAC address table entry of the VM linked to the local VTEP is timed out again, if the traffic sent to the VM linked to the local VTEP reaches the VTEP, the VTEP may determine the MAC address of the VM according to the MAC address table entry of the VM linked to the local VTEP directly in the local MAC address table, and send the traffic to the VM.
As shown in fig. 4, an embodiment of the present invention provides a MAC address aging method applicable to a virtual machine device, where the method includes the following steps:
step 21, in response to receiving the ARP request packet broadcasted by the VTEP that is linked up with the VM and acquiring the first preset OP indication value from the ARP request packet, sending an ARP response packet carrying the second preset OP indication value to the VTEP, so that the VTEP retimes the aging time of the MAC address table entry of the VM in the local MAC address table.
The first preset OP indicator may be 0x0003, and the second preset OP indicator may be 0x 0004.
When the VM receives an ARP request packet broadcasted by the VTEP and acquires a first preset OP indication value from the ARP request packet, it can be shown that the VTEP requests all VMs in a two-layer network segment connected downstream from the VTEP to verify because the aging time of the MAC address table entry of the first VM in the local MAC address table of the VTEP is over and the number of times of querying the MAC address table entry of the first VM in the aging time is less than a preset threshold. In this case, the VM may return an extended ARP response packet to the VTEP, where the ARP response packet has a corresponding value of 0x0004 in the OP instruction, and the ARP response packet has a destination IP address of the VTEP, a destination MAC address of the VTEP, a source IP address of the VM, and a source MAC address of the VM.
And after receiving the ARP response packet sent by the VM and acquiring a second preset OP indicating value from the ARP response packet, the VTEP counts the aging time of the MAC address table item of the VM in the local MAC address table again.
As can be seen from step 21, in the MAC address aging processing method provided in the embodiment of the present invention, in response to receiving the ARP request packet broadcasted by the VTEP that is linked to the VM and acquiring the first preset OP indication value from the ARP request packet, sending the ARP response packet carrying the second preset OP indication value to the VTEP for the VTEP to re-time the aging time of the MAC address entry of the VM in the local MAC address table of the VTEP, the VTEP does not need to delete the MAC address entry of the VM whose MAC address aging time is overtime from the local MAC address table, that is, does not need to broadcast an ARP request to the VM whose MAC address aging time is overtime in the second-layer domain of the VNI after deleting the MAC address entry of the VM whose MAC address aging time is overtime from the local MAC address table to re-acquire the MAC address of the VM whose MAC address aging time is overtime, so that the MAC address aging processing method provided in the embodiment of the present invention can effectively reduce the broadcast traffic of the VTEP in the second-layer domain, thereby realizing saving of network resources.
The MAC address aging method provided by the present invention is briefly described below with reference to a specific embodiment.
In step a, VM1 is linked to VTEP1, VM1 needs to communicate with VM2 belonging to the same VNI in the same network segment, but VM1 does not acquire the MAC address of VM2 in the local ARP cache, so VM1 sends an ARP request to VTEP1, where the ARP request includes the IP address and MAC address of VM 1.
Step b, after receiving the ARP request, the VTEP1 may first determine a message ingress interface (a physical interface corresponding to the second-layer sub-interface, that is, an interface that receives the ARP request) corresponding to the ARP request, and then may determine, according to configurations on the message ingress interface and the second-layer sub-interface, that the ARP request needs to enter the VXLAN tunnel, a BD (Bridge Domain, broadcast Domain) to which the ARP request belongs, and a VNI to which the ARP request belongs.
Step c, the VTEP1 determines that the local MAC address table does not have the address table entry of the VM1 according to the VNI, learns the corresponding relationship between the MAC address of the VM1, the VNI, and the packet ingress interface, generates the address table entry of the VM1 in the local MAC address table according to the corresponding relationship, and starts timing the aging time of the address table entry of the VM 1.
And d, the VTEP1 copies the ARP request message received in the step b according to the head end copy list and encapsulates the ARP request message. The outer layer source IP address of the encapsulated message is the IP address of VTEP1, the outer layer source MAC address is the MAC address of VTEP1, the outer layer destination IP address is the IP address of all opposite end VTEPs, and the outer layer destination MAC address is the MAC address of the next hop device in the network to the destination IP address.
Step d, after the package message reaches the devices between the VTEP1 and the opposite end VTEP, the devices modify the outer layer address of the package message, so that the package message is transmitted in the IP network until the package message reaches the opposite end VTEP.
And e, after the encapsulated message reaches the VTEP at the opposite end, the VTEP at the opposite end de-encapsulates the encapsulated message to obtain an original ARP request message sent by the VM1, and the VTEP at the opposite end learns the corresponding relation among the MAC address of the VM1, the VNI and the IP address of the VTEP1 and records the corresponding relation in a local MAC address table.
And step f, the VTEP at the opposite end correspondingly processes the original ARP request message sent by the VM1 according to the configuration on the two-layer subinterface and broadcasts the message in the corresponding two-layer domain.
Step g, after receiving the ARP request, the VM2 connected to the VTEP at a certain opposite end sends an ARP response.
Up to this point, VM1 may obtain the MAC address of VM2 from the ARP response sent by VM 2.
Step h, the VTEP1 checks that the aging time flag bit of the MAC address table entry of the VM1 is 0 and the number of times of querying the MAC address table entry of the VM1 in the aging time is less than the preset threshold, the VTEP1 broadcasts an extended ARP request packet in the two-layer network segment connected under the VTEP, the ARP request packet has a corresponding value of 0x0003 in the OP indication, which indicates that the VTEP1 requests to verify all VMs in the two-layer network segment connected under the VTEP, the destination IP address of the ARP request packet is a two-layer network segment address, and subnet mask information is added, the destination MAC address is a broadcast MAC address, the source IP address is an IP address of the VTEP1, and the source MAC address is a MAC address of the VTEP 1.
Step i, all VMs in the two-layer network segment under VTEP1 receive the ARP request packet sent by VTEP1 and obtain the OP indication value with the value of 0x0003 from the ARP request packet, and may return an extended ARP response packet to VTEP1, where the ARP response packet has the value of 0x0004 corresponding to the OP indication, the destination IP address of the ARP response packet is the IP address of VTEP1, the destination MAC address is the MAC address of VTEP1, the source IP address is the IP address of the VM, and the source MAC address is the MAC address of the VM.
Step j, the VTEP1 receives an ARP response packet sent by any VM (which may include VM1) linked to the VTEP1 within a preset time period and acquires an OP indication value with a value of 0x0004 from the ARP response packet, retimes the aging time of the MAC address table entry of the VM linked to the VTEP1 in the local MAC address table, and sets the aging time flag bit of the MAC address table entry of the VM linked to the VTEP1 to 1.
In step k, VTEP1 receives the traffic that needs to be sent to the VM linked up to its own VTEP1, and forwards the traffic to the VM linked up to its own VTEP1 according to the MAC address table entry of the VM linked up to its own VTEP1 in the local MAC address table.
In step l, the VTEP1 does not receive the ARP response packet sent by the VM3 linked to the VTEP within the preset time length, and deletes the MAC address table entry of the VM3 from the local MAC address table.
If VM3 has gone offline, VTEP1 will not receive the ARP response packet sent by VM3, and then VTEP1 may delete the MAC address table entry of VM3 from the local MAC address table.
Based on the same technical concept, as shown in fig. 5, an embodiment of the present invention further provides a virtual extended local area network tunnel endpoint device, where the virtual extended local area network tunnel endpoint device includes:
the broadcast module 101 is configured to broadcast an ARP request packet carrying a first preset operation code OP indication value in a two-layer network segment connected to a local virtual machine device VM of a virtual extensible local area network (VTEP) in a local Media Access Control (MAC) address table when the MAC address table entry of the first VM connected to the VTEP meets a preset condition.
A receiving module 102, configured to receive an ARP response packet sent by any VM that is linked to the VTEP.
The processing module 103 is configured to, in response to the receiving module 102 receiving the ARP response packet sent by any VM that is connected to the VTEP in the preset time period and acquiring a second preset OP indication value from the ARP response packet, count again the aging time of the MAC address table entry of the VM that is connected to the VTEP in the random time period.
In some embodiments, the MAC address table entry of the first VM linked to the local VTEP in the local MAC address table satisfies a preset condition, including:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the number of times of inquiring the MAC address table item of the first VM in the aging time is smaller than a preset threshold value.
In some embodiments, the processing module 103 is further configured to, in response to that the receiving module 102 does not receive an ARP response packet sent by a second VM that is linked to the local VTEP within a preset time period, delete a MAC address table entry of the second VM from a local MAC address table.
In some embodiments, the receiving module 102 is further configured to receive a data packet with a destination IP address being an IP address of the VM.
The sending module 101 is further configured to, in response to the receiving module 102 receiving a data packet whose destination IP address is the IP address of the arbitrary VM that is linked up to the local VTEP, forward the data packet to the arbitrary VM that is linked up to the local VTEP according to the MAC address table entry of the arbitrary VM that is linked up to the local VTEP.
Based on the same technical concept, as shown in fig. 6, an embodiment of the present invention further provides a virtual machine device, where the virtual machine device includes:
a receiving module 201, configured to receive an address resolution protocol ARP request packet broadcasted by a virtual extension local area network tunnel endpoint device VTEP that is connected to a virtual machine VM of the virtual machine VM, and obtain a first preset operation code OP indication value from the ARP request packet;
a sending module 202, configured to send, in response to the receiving module 201 receiving an ARP request packet sent by a VTEP that is associated with the VM and obtaining a first preset OP indication value from the ARP request packet, an ARP response packet carrying a second preset OP indication value to the VTEP, so that the VTEP retimes the aging time of the MAC address table entry of the VM in its local media access control MAC address table.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.
Claims (10)
1. A MAC address aging processing method is characterized by comprising the following steps:
under the condition that an MAC address table item of a first virtual machine device VM which is connected to a virtual extended local area network (VTEP) tunnel endpoint device in a local Media Access Control (MAC) address table meets a preset condition, broadcasting an ARP (Address resolution protocol) request packet carrying a first preset operation code (OP) indication value in a two-layer network segment connected under the VTEP;
and in response to receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, re-timing the aging time of the MAC address table entry of the VM which is connected to the VTEP in a random manner.
2. The method according to claim 1, wherein the MAC address table entry of the first VM linked to the local VTEP in the local MAC address table satisfies a predetermined condition, and the method comprises:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the number of times of inquiring the MAC address table item of the first VM in the aging time is smaller than a preset threshold value.
3. The method according to claim 1, wherein after broadcasting the ARP request packet carrying the first preset OP indication value in the layer two segment under the VTEP, the method further comprises:
and in response to the fact that an ARP response packet sent by a second VM which is connected to the VTEP in an up-link mode is not received within a preset time length, deleting the MAC address table entry of the second VM from a local MAC address table.
4. The method of claim 1, wherein after re-timing the aging time of the MAC address table entry of any VM that is linked to the VTEP, the method further comprises:
and in response to receiving a data packet with a destination IP address being the IP address of the VM which is arbitrarily linked to the local VTEP, forwarding the data packet to the VM which is arbitrarily linked to the local VTEP according to the MAC address table entry of the VM which is arbitrarily linked to the local VTEP.
5. A MAC address aging processing method is characterized by comprising the following steps:
responding to an ARP request packet broadcasted by a virtual extensible local area network (VTEP) tunnel endpoint device (VTEP) which is connected to a Virtual Machine (VM) in an uplink and acquiring a first preset operation code (OP) indicated value from the ARP request packet, and sending an ARP response packet carrying a second preset OP indicated value to the VTEP so as to enable the VTEP to count the aging time of an MAC address table item of the VM in a local Media Access Control (MAC) address table again.
6. A virtual extended local area network tunnel endpoint device, the virtual extended local area network tunnel endpoint device comprising:
the broadcast module is used for broadcasting an ARP request packet carrying a first preset operation code OP indication value in a second-layer VNI connected under a local virtual local area network (VTEP) under the condition that an MAC address table item of a first virtual machine device VM connected to the VTEP in a local Media Access Control (MAC) address table meets a preset condition;
the receiving module is used for receiving an ARP response packet sent by any VM (virtual machine) which is connected to the VTEP;
and the processing module is used for responding to the ARP response packet sent by any VM (virtual machine) which is connected to the VTEP and received by the receiving module in a preset time length and acquiring a second preset OP indicating value from the ARP response packet, and retiming the aging time of the MAC address table entry of the VM which is connected to the VTEP.
7. The virtual local area network tunnel endpoint device of claim 6, wherein the MAC address table entry of the first VM associated with the local VTEP in the local MAC address table satisfies a predetermined condition, and the predetermined condition includes:
the aging time of the MAC address table item of the first VM connected to the local VTEP in the local MAC address table is overtime, and the number of times of inquiring the MAC address table item of the first VM in the aging time is smaller than a preset threshold value.
8. The virtual local area network tunnel endpoint device of claim 6, wherein the processing module is further configured to delete the MAC address table entry of the second VM from the local MAC address table in response to the receiving module not receiving the ARP response packet sent by the second VM connected to the local VTEP within a preset time period.
9. The virtual local area network tunnel endpoint device of claim 6, wherein the receiving module is further configured to receive a data packet with a destination IP address that is any IP address of a VM that is linked up to the VTEP;
the sending module is further configured to, in response to the receiving module receiving a data packet whose destination IP address is an IP address of a VM that is arbitrarily linked to the VTEP, forward the data packet to the VM that is arbitrarily linked to the VTEP according to the MAC address table entry of the VM that is arbitrarily linked to the VTEP.
10. A virtual machine device, the virtual machine device comprising:
the virtual machine equipment VM uplink virtual expansion local area network tunnel endpoint equipment VTEP broadcast address resolution protocol ARP request packets are received, and a first preset operation code OP indicated value is obtained from the ARP request packets;
and the sending module is used for responding to an ARP request packet which is received by the receiving module and sent by a VTEP which is connected with the VM and acquiring a first preset OP indicating value from the ARP request packet, and sending an ARP response packet carrying a second preset OP indicating value to the VTEP so as to enable the VTEP to count the aging time of the MAC address table item of the VM in a local media access control MAC address table again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110788323.1A CN113472916A (en) | 2021-07-13 | 2021-07-13 | MAC address aging processing method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110788323.1A CN113472916A (en) | 2021-07-13 | 2021-07-13 | MAC address aging processing method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113472916A true CN113472916A (en) | 2021-10-01 |
Family
ID=77880070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110788323.1A Pending CN113472916A (en) | 2021-07-13 | 2021-07-13 | MAC address aging processing method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113472916A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115225573A (en) * | 2022-07-18 | 2022-10-21 | 中国联合网络通信集团有限公司 | Table entry aging processing method, traffic forwarding method, device, VTEP and VXLAN |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108023974A (en) * | 2017-11-30 | 2018-05-11 | 新华三技术有限公司 | A kind of address aging method and apparatus |
CN108418759A (en) * | 2018-05-31 | 2018-08-17 | 新华三技术有限公司 | A kind of MAC Address list item processing method and processing device |
CN109218456A (en) * | 2017-07-06 | 2019-01-15 | 北京华为数字技术有限公司 | The processing method and processing device of the ageing time of mac address table |
JP2019201419A (en) * | 2019-07-12 | 2019-11-21 | Necプラットフォームズ株式会社 | Mac address table management circuit, ethernet packet switching apparatus, table management method, and program |
CN112565476A (en) * | 2020-12-01 | 2021-03-26 | 中国联合网络通信集团有限公司 | Virtual machine creation method, ARP proxy gateway and VTEP |
CN112866435A (en) * | 2021-02-23 | 2021-05-28 | 中国联合网络通信集团有限公司 | MAC address aging processing method and equipment |
CN112929193A (en) * | 2019-12-06 | 2021-06-08 | 华为技术有限公司 | Method and apparatus for configuring aging time of medium access control address |
-
2021
- 2021-07-13 CN CN202110788323.1A patent/CN113472916A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109218456A (en) * | 2017-07-06 | 2019-01-15 | 北京华为数字技术有限公司 | The processing method and processing device of the ageing time of mac address table |
CN108023974A (en) * | 2017-11-30 | 2018-05-11 | 新华三技术有限公司 | A kind of address aging method and apparatus |
CN108418759A (en) * | 2018-05-31 | 2018-08-17 | 新华三技术有限公司 | A kind of MAC Address list item processing method and processing device |
JP2019201419A (en) * | 2019-07-12 | 2019-11-21 | Necプラットフォームズ株式会社 | Mac address table management circuit, ethernet packet switching apparatus, table management method, and program |
CN112929193A (en) * | 2019-12-06 | 2021-06-08 | 华为技术有限公司 | Method and apparatus for configuring aging time of medium access control address |
CN112565476A (en) * | 2020-12-01 | 2021-03-26 | 中国联合网络通信集团有限公司 | Virtual machine creation method, ARP proxy gateway and VTEP |
CN112866435A (en) * | 2021-02-23 | 2021-05-28 | 中国联合网络通信集团有限公司 | MAC address aging processing method and equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115225573A (en) * | 2022-07-18 | 2022-10-21 | 中国联合网络通信集团有限公司 | Table entry aging processing method, traffic forwarding method, device, VTEP and VXLAN |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112866435B (en) | MAC address aging processing method and equipment | |
US9838221B2 (en) | Base station deployment configuration method for base station, base station, and server | |
US11736411B2 (en) | Method, device, and system for transmitting multicast packet | |
EP4142219A1 (en) | Message processing method and apparatus, announcement method and apparatus, network bridge node, source device, storage medium, and message processing system | |
WO2021174958A1 (en) | Message forwarding method, device, system, network device and storage medium | |
CN112134776B (en) | Method for generating multicast forwarding table item and access gateway | |
WO2022007828A1 (en) | Redundant path resource reservation method, network device, and storage medium | |
JP2002111684A (en) | Radio communication system and its time out value updating method | |
EP3633934A1 (en) | Sdn-based arp implementation method and apparatus | |
CN114143283B (en) | Tunnel self-adaptive configuration method and device, central terminal equipment and communication system | |
US20210184963A1 (en) | Communication Method and Communications Device | |
US20220264419A1 (en) | Method and apparatus for user plane resource optimization | |
US11330085B2 (en) | Data transmission protection method, device, system, and computer readable storage medium | |
CN113472916A (en) | MAC address aging processing method and equipment | |
CN108900422B (en) | Multicast forwarding method and device and electronic equipment | |
CN108989173B (en) | Message transmission method and device | |
CN112994928B (en) | Virtual machine management method, device and system | |
CN113472912B (en) | ARP cache table item updating method, VTEP, VM and device | |
WO2022068484A1 (en) | Service chain address pool slicing method, device and system | |
CN111405615B (en) | Communication data transmission method, device and storage medium | |
CN107911301B (en) | Message forwarding method and device | |
CN113852572B (en) | Message processing method and device | |
US11509536B2 (en) | Relay functionality in an application centric infrastructure (ACI) fabric | |
CN105813027B (en) | Method, equipment and system for transmitting signaling | |
CN108881015B (en) | Message broadcasting method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211001 |