CN109495368B - Updating method of MAC address forwarding table and network equipment - Google Patents

Updating method of MAC address forwarding table and network equipment Download PDF

Info

Publication number
CN109495368B
CN109495368B CN201811551854.3A CN201811551854A CN109495368B CN 109495368 B CN109495368 B CN 109495368B CN 201811551854 A CN201811551854 A CN 201811551854A CN 109495368 B CN109495368 B CN 109495368B
Authority
CN
China
Prior art keywords
mac address
forwarding table
address forwarding
module
mac
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
CN201811551854.3A
Other languages
Chinese (zh)
Other versions
CN109495368A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201811551854.3A priority Critical patent/CN109495368B/en
Publication of CN109495368A publication Critical patent/CN109495368A/en
Application granted granted Critical
Publication of CN109495368B publication Critical patent/CN109495368B/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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/50Address allocation
    • H04L61/5053Lease time; Renewal aspects

Abstract

The invention discloses a method for updating an MAC address forwarding table and network equipment, wherein the method comprises the following steps: after the VXLAN module detects that the MAC address is aged or deleted, a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address is sent to the MAC module; after receiving the deletion notification, the MAC module determines that a stored first MAC address forwarding table does not comprise a first MAC address forwarding table item of an MAC address and a VXLAN tunnel portal identifier, and then sends an acquisition request carrying the MAC address to the MLAG module; after receiving the acquisition request, the MLAG module searches a second MAC address forwarding table item comprising the MAC address in the learned second MAC address forwarding table, and if the second MAC address forwarding table item is found, sends a virtual aggregation port identifier and an acquisition response of the MAC address, wherein the virtual aggregation port identifier and the acquisition response of the MAC address are contained in the second MAC address forwarding table item, to the MAC module; and after receiving the acquisition response, the MAC module adds a third MAC address forwarding table entry comprising the MAC address and the virtual aggregation port identifier. This scheme ensures that the VM normally accesses the network.

Description

Updating method of MAC address forwarding table and network equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for updating a Media Access Control (MAC) Address forwarding table and a network device.
Background
A Virtual eXtensible Local Area Network (VXLAN) is a Network virtualization technology of a modern data center, and encapsulates data packets sent by a Virtual Machine (VM) or a physical server in a User Datagram Protocol (UDP), encapsulates the data packets by using an Internet Protocol (IP)/MAC of a physical Network as a header, transmits the encapsulated data packets on an IP Network, decapsulates the encapsulated data packets by using a Virtual eXtensible Local Area Network Tunnel End (VTEP) after reaching a destination, and sends the decapsulated data packets to a target VM or a physical server. A Multi-chassis Link Aggregation Group (MLAG) is a mechanism for implementing cross-chassis Link Aggregation, in which two or more devices are aggregated to form a dual active system, and the dual active system is docked with an accessed device, and for the accessed device, the dual active system is as if the dual active system is docked with the same device. In practical applications, these two networks are sometimes deployed together for use.
As shown in fig. 1, which is a network architecture diagram of accessing MLAG in VXLAN, Switch-a and Switch-B, besides serving as VTEP, also constitute MLAG dual-machine redundancy backup. If a VM migrates from the access terminal Switch-E of MLAG to the access terminal Switch-C of VXLAN, for Switch-a and Switch-B, a MAC address migration occurs, the MLAG module sends an addition notification for adding a MAC address and a virtual aggregation port identifier to the MAC module before migration, the VXLAN module sends an addition notification for adding a MAC address and a VXLAN tunnel port to the MAC module after migration, at this time, the MAC address forwarding table entry of the MAC module on Switch-a and Switch-B should update the interface of the MAC address to be the VXLAN tunnel port, and when the VXLAN module and the MLAG module detect that the MAC address ages, the access terminal Switch-C of VXLAN also sends a corresponding deletion notification to the MAC module.
If the VM frequently migrates between the VXLAN and the MLAG in a short time, because the addition notifications of the VXLAN module and the MLAG module cannot be guaranteed in time, there may be a case that the VM actually migrates from the MLAG to the VXLAN, but the MAC address forwarding table entry actually validated by the MAC module is the MAC address in the addition notification sent from the MLAG module that is received late, and the MAC module should validate the MAC address in the addition notification sent by the VXLAN module that is received early.
In the method for updating the MAC address forwarding table, the MAC module updates the MAC address forwarding table according to the time sequence of the received notification, and when the VM frequently migrates, the situation that the MAC address forwarding table in the MAC module does not conform to the actual environment of the VM may exist, so that the VM normally accesses the network, and the user experience is seriously affected.
Disclosure of Invention
The embodiment of the invention provides an updating method of an MAC address forwarding table and network equipment, which are used for solving the problems that in the prior art, the normal network access of a Virtual Machine (VM) is influenced and the user experience is seriously influenced due to the fact that an MAC address forwarding table item in an MAC module is inconsistent with the actual environment of the VM.
According to an embodiment of the present invention, a method for updating a MAC address forwarding table is provided, where the method is applied to a network device that deploys an extensible virtual local area network VXLAN and a cross-device link aggregation group MLAG, where the network device includes a MAC module, a VXLAN module, and a MLAG module, and the method includes:
after detecting that the MAC address is aged or deleted, the VXLAN module sends a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module;
after receiving the deletion notification, the MAC module determines that a stored first MAC address forwarding table does not include the MAC address and a first MAC address forwarding table entry of the VXLAN tunnel portal identifier, and then sends an acquisition request carrying the MAC address to the MLAG module;
after receiving the acquisition request, the MLAG module searches a second MAC address forwarding table entry including the MAC address in a learned second MAC address forwarding table, and if the second MAC address forwarding table entry is found, sends an acquisition response carrying a virtual aggregation port identifier included in the second MAC address forwarding table entry and the MAC address to the MAC module;
and after receiving the acquisition response, the MAC module adds a third MAC address forwarding table entry comprising the MAC address and the virtual aggregation port identifier in the first MAC address forwarding table.
Specifically, determining that the stored first MAC address forwarding table does not include the MAC address and the first MAC address forwarding table entry identified by the VXLAN tunnel portal includes:
searching a first MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the first MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table does not include the first MAC address forwarding table entry;
if the first MAC address forwarding table entry is found from the first MAC address forwarding table, after the first MAC address forwarding table entry is deleted from the MAC address forwarding table, it is determined that the first MAC address forwarding table does not include the first MAC address forwarding table entry.
Optionally, the method further includes:
and if the MLAG module does not find the forwarding table item comprising the second MAC address, ignoring the acquisition request.
According to an embodiment of the present invention, there is also provided a method for updating a MAC address forwarding table, which is applied to a network device that deploys VXLAN and MLAG, where the network device includes a MAC module, a VXLAN module, and a MLAG module, and the method includes:
after detecting that the MAC address is aged or deleted, the MLAG module sends a deletion notification carrying the MAC address and a virtual aggregation port identifier corresponding to the MAC address to the MAC module;
after receiving the deletion notification, the MAC module determines that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from a stored first MAC address forwarding table, and then sends an acquisition request carrying the MAC address to the VXLAN module;
after receiving the acquisition request, the VXLAN module searches a fifth MAC address forwarding table item comprising the MAC address in a learned third MAC address forwarding table, and if the fifth MAC address forwarding table item is found, the VXLAN module sends an acquisition response carrying a VXLAN tunnel portal identifier and the MAC address, wherein the VXLAN tunnel portal identifier and the MAC address are included in the fifth MAC address forwarding table item;
and after receiving the acquisition response, the MAC module adds a sixth MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel portal identifier in the first MAC address forwarding table.
Specifically, determining to delete a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier in the stored first MAC address forwarding table specifically includes:
searching a fourth MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, it is determined that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table after the fourth MAC address forwarding table entry is deleted from the MAC address forwarding table.
Optionally, the method further includes:
and if the VXLAN module does not find the fifth MAC address forwarding table entry, ignoring the acquisition request.
According to an embodiment of the present invention, there is also provided a network device, applied to a network device that deploys VXLAN and MLAG, the network device including a MAC module, a VXLAN module, and an MLAG module, the network device including:
the VXLAN module is used for sending a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module after the aging or deletion of the MAC address is detected;
the MAC module is configured to send an acquisition request carrying the MAC address to the MLAG module after determining that a stored first MAC address forwarding table does not include the MAC address and a first MAC address forwarding table entry of the VXLAN tunnel portal identifier after receiving the deletion notification;
the MLAG module is configured to, after receiving the acquisition request, search a second MAC address forwarding table entry including the MAC address in a learned second MAC address forwarding table, and send an acquisition response carrying a virtual aggregation port identifier included in the second MAC address forwarding table entry and the MAC address to the MAC module if the second MAC address forwarding table entry is found;
the MAC module is further configured to add a third MAC address forwarding entry including the MAC address and the virtual aggregation port identifier to the first MAC address forwarding table after receiving the acquisition response.
Specifically, the MAC module is configured to determine a first MAC address forwarding table entry in a stored first MAC address forwarding table, where the first MAC address forwarding table entry does not include the MAC address and the VXLAN tunnel portal identifier, and specifically configured to:
searching a first MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the first MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table does not include the first MAC address forwarding table entry;
if the first MAC address forwarding table entry is found from the first MAC address forwarding table, after the first MAC address forwarding table entry is deleted from the MAC address forwarding table, it is determined that the first MAC address forwarding table does not include the first MAC address forwarding table entry.
Specifically, the MLAG module is configured to ignore the acquisition request if the forwarding entry including the second MAC address is not found.
According to an embodiment of the present invention, there is also provided a network device, applied to a network device that deploys VXLAN and MLAG, the network device including a MAC module, a VXLAN module, and an MLAG module, the network device including:
the MLAG module is configured to send a deletion notification carrying the MAC address and a virtual aggregation port identifier corresponding to the MAC address to the MAC module after detecting that the MAC address is aged or deleted;
the MAC module is configured to, after receiving the deletion notification, determine that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from a stored first MAC address forwarding table, and send an acquisition request carrying the MAC address to the VXLAN module;
the VXLAN module is configured to, after receiving the acquisition request, search a fifth MAC address forwarding entry including the MAC address in a learned third MAC address forwarding table, and send an acquisition response carrying a VXLAN tunnel portal identifier included in the fifth MAC address forwarding entry and the MAC address to the MAC module if the fifth MAC address forwarding entry is found;
the MAC module is further configured to add a sixth MAC address forwarding entry including the MAC address and the VXLAN tunnel portal identifier to the first MAC address forwarding table after receiving the acquisition response.
Specifically, the MAC module is configured to determine that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from a stored first MAC address forwarding table, and specifically configured to:
searching a fourth MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, it is determined that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table after the fourth MAC address forwarding table entry is deleted from the MAC address forwarding table.
Optionally, the VXLAN module is further configured to ignore the obtaining request if the fifth MAC address forwarding entry is not found.
The invention has the following beneficial effects:
the embodiment of the invention provides an updating method of an MAC address forwarding table and network equipment, wherein after a VXLAN module detects that an MAC address is aged or deleted, a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address is sent to the MAC module; after receiving the deletion notification, the MAC module determines that a stored first MAC address forwarding table does not include the MAC address and a first MAC address forwarding table entry of the VXLAN tunnel portal identifier, and then sends an acquisition request carrying the MAC address to the MLAG module; after receiving the acquisition request, the MLAG module searches a second MAC address forwarding table entry including the MAC address in a learned second MAC address forwarding table, and if the second MAC address forwarding table entry is found, sends an acquisition response carrying a virtual aggregation port identifier included in the second MAC address forwarding table entry and the MAC address to the MAC module; and after receiving the acquisition response, the MAC module adds a third MAC address forwarding table entry comprising the MAC address and the virtual aggregation port identifier in the first MAC address forwarding table. In the scheme, the VXLAN module sends a deletion notice after detecting that the MAC address is aged or deleted, the MAC module determines whether an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier is not stored, and also determines whether an MLAG module stores an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, and after determining that the MLAG module stores an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, the MAC module also adds the MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier.
Drawings
Fig. 1 is a diagram of a network architecture for deploying VXLAN and MLAG simultaneously in the prior art;
fig. 2 is a flowchart of a method for updating a MAC address forwarding table according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for updating a MAC address forwarding table according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network device corresponding to fig. 2 according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a network device corresponding to fig. 3 in an embodiment of the present invention.
Detailed Description
Aiming at the problem that the normal access of a VM to a network is affected and the user experience is seriously affected due to the fact that an MAC address forwarding table entry in an MAC module is not in accordance with the actual environment of the VM in the prior art, an embodiment of the present invention provides an updating method of an MAC address forwarding table, which is applied to a network device for deploying VXLAN and MLAG, where the network device may be a Switch-a and a Switch-B shown in fig. 1, and the Switch-a and the Switch-B include an MAC module, a VXLAN module and an MLAG module, and the flow of the method is shown in fig. 2, and the execution steps are as follows:
s21: and after the VXLAN module detects that the MAC address is aged or deleted, sending a deletion notice carrying the MAC address and the VXLAN tunnel portal identification corresponding to the MAC address to the MAC module.
When a VM is migrated from a VXLAN to an MLAG, a message for accessing the VM does not go to the VXLAN any more, an MAC address learned in the original VXLAN (stored in a VXLAN module) becomes a failed MAC address, and after the aging time of the MAC address expires, the VXLAN module sends a deletion notice carrying the MAC address and a VXLAN tunnel port identifier corresponding to the MAC address to the MAC module. Or after the MAC is deleted, the VXLAN module also sends a deletion notification carrying the MAC address and the VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module.
S22: after receiving the deletion notification, the MAC module determines that a first MAC address forwarding table entry including the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address is deleted from a stored first MAC address forwarding table, and then sends an acquisition request carrying the MAC address to the MLAG module.
The specific implementation process comprises the following steps: searching a first MAC address forwarding table item comprising an MAC address and a VXLAN tunnel portal identifier from a first MAC address forwarding table; if the first MAC address forwarding table item is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table item does not comprise the first MAC address forwarding table item; and if the first MAC address forwarding table item is found from the first MAC address forwarding table, deleting the first MAC address forwarding table item from the MAC address forwarding table, and determining that the first MAC address forwarding table item does not comprise the first MAC address forwarding table item.
After receiving the deletion notification sent by the VXLAN module, the MAC module may determine whether the stored MAC address forwarding table stores the MAC address forwarding table entry of the MAC and the VXLAN tunnel portal identifier corresponding to the MAC address included in the deletion notification, where the stored MAC address forwarding table may be defined as a first MAC address forwarding table, and the MAC address forwarding table entry of the VXLAN tunnel portal identifier corresponding to the MAC and the MAC address included in the deletion notification may be defined as a first MAC address forwarding table, so long as the first MAC address forwarding table entry is found, the MAC address forwarding table may be directly deleted. Because the VXLAN module sends out the deletion notification, which indicates that the VM corresponding to the MAC address is not in VXLAN, the obtaining request carrying the MAC address may be sent to the MLAG module again to determine whether the VM corresponding to the MAC address is in the MLAG.
S23: after receiving the obtaining request, the MLAG module searches a second MAC address forwarding table entry including the MAC address in the learned second MAC address forwarding table, and sends a virtual aggregation port identifier and an obtaining response of the MAC address, which are included in the second MAC address forwarding table entry, to the MAC module if the second MAC address forwarding table entry is found.
The MAC address forwarding table learned by the MLAG module may be defined as a second MAC address forwarding table, and an MAC address forwarding table entry of the MAC address included in the second MAC address forwarding table may be defined as a second MAC address forwarding table entry. After receiving the obtaining request, the MLAG module searches a second MAC address forwarding table for a second MAC address forwarding table, and if the second MAC address forwarding table is found, which indicates that the VM corresponding to the MAC address is in the MLAG, sends an obtaining response carrying the virtual aggregation port identifier and the MAC address included in the second MAC address forwarding table to the MAC module.
S24: and after receiving the acquisition response, the MAC module adds a third MAC address forwarding table entry comprising the MAC address and the virtual aggregation port identifier in the first MAC address forwarding table.
In the scheme, the VXLAN module sends a deletion notice after detecting that the MAC address is aged or deleted, the MAC module determines whether an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier is not stored, and also determines whether an MLAG module stores an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, and after determining that the MLAG module stores an MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, the MAC module also adds the MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier.
Optionally, S23 further includes:
and if the MLAG module does not find the forwarding table item comprising the second MAC address, ignoring the acquisition request.
The MLAG module does not search a second MAC address forwarding table item in a second MAC address forwarding table, which indicates that the VM corresponding to the MAC address is not in the MLAG, the MLAG module ignores the acquisition request, at this time, if the VM corresponding to the MAC address is migrated into VXLN, the VXLAN module learns the MAC address and then sends an addition notice to the MAC module again, and if the VM corresponding to the MAC address is not in VXLAN and MLAG, the MAC module does not store the MAC address forwarding table item of the MAC address, so that the interface corresponding to the MAC address stored by the MAC module can be ensured to be consistent with the actually corresponding interface of the MAC address, thereby ensuring that the VM normally accesses the network and improving user experience.
The above introduces the updating method of the MAC address forwarding table when VXLAN sends a deletion notification, and the following introduces the updating method of the MAC address forwarding table when MLAG sends a deletion notification, as shown in fig. 3, the specific implementation steps include:
s31: and after detecting that the MAC address is aged or deleted, the MLAG module sends a deletion notice carrying the MAC address and the virtual aggregation port identifier corresponding to the MAC address to the MAC module.
After a VM is migrated from an MLAG to a VXLAN, a message for accessing the VM does not leave the MLAG any more, an MAC address learned in the original MLAG (stored in an MLAG module) becomes a failed MAC address, and after the aging time of the MAC address expires, the MLAG module sends a deletion notification carrying the MAC address and a virtual aggregation port identifier corresponding to the MAC address to the MAC module. Or after the MAC is deleted, the MLAG module also sends a deletion notification carrying the MAC address and the virtual aggregation port identifier corresponding to the MAC address to the MAC module.
S32: after receiving the deletion notice, the MAC module determines that a fourth MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier corresponding to the MAC address is deleted from the stored first MAC address forwarding table, and then sends an acquisition request carrying the MAC address to the VXLAN module.
The specific implementation process comprises the following steps: searching a fourth MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table; if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table; and if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, deleting the fourth MAC address forwarding table entry from the MAC address forwarding table, and determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table.
After receiving the deletion notification sent by the MLAG module, the MAC module may determine whether the stored MAC address forwarding table stores the MAC address forwarding table entry of the MAC address and the virtual aggregation port identifier corresponding to the MAC address included in the deletion notification, where the stored MAC address forwarding table may be defined as a first MAC address forwarding table, and the MAC address forwarding table entry of the virtual aggregation port identifier corresponding to the MAC address included in the deletion notification may be defined as a fourth MAC address forwarding table, and may be directly deleted as long as the fourth MAC address forwarding table entry is found. Because the MLAG module sends out the deletion notification, which indicates that the VM corresponding to the MAC address is not in the MLAG, the acquisition request carrying the MAC address may be sent to the VXLAN module again to determine whether the VM corresponding to the MAC address is in the VXLAN.
S33: after receiving the acquisition request, the VXLAN module searches a fifth MAC address forwarding table item comprising the MAC address in the learned third MAC address forwarding table, and if the fifth MAC address forwarding table item is found, the VXLAN module sends an acquisition response carrying the VXLAN tunnel portal identification and the MAC address included in the fifth MAC address forwarding table item to the MAC module.
The MAC address forwarding table learned by the VXLAN module may be defined as a third MAC address forwarding table, and an MAC address forwarding table entry of the MAC address included in the third MAC address forwarding table may be defined as a fifth MAC address forwarding table entry. And after receiving the acquisition request, the VXLAN module searches a fifth MAC address forwarding table item in a third MAC address forwarding table, and if the fifth MAC address forwarding table item is found, the VM corresponding to the MAC address is in VXLAN, the VXLAN module sends an acquisition response carrying the VXLAN tunnel portal identification and the MAC address included in the fifth MAC address forwarding table item to the MAC module.
S34: and after receiving the acquisition response, the MAC module adds a sixth MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal in the first MAC address forwarding table.
In the scheme, the MLAG module sends a deletion notice only after detecting that the MAC address is aged or deleted, the MAC module deletes the MAC address forwarding table entry of the MAC address and the virtual aggregation port identifier, and also confirms whether the VXLAN module stores the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier, and after confirming that the VXLAN module stores the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier, the MAC module also adds the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier.
Optionally, S33 further includes:
and if the VXLAN module does not find the fifth MAC address forwarding table item, ignoring the acquisition request.
The VXLAN module does not search a fifth MAC address forwarding table item in a third MAC address forwarding table, which indicates that the VM corresponding to the MAC address is not in VXLAN, the acquisition request is ignored, at the moment, if the VM corresponding to the MAC address is migrated into the MLAG, the MLAG module learns the MAC address and then sends an addition notice to the MAC module again, and if the VM corresponding to the MAC address is not in VXLAN and MLAG, the MAC module does not store the MAC address forwarding table item of the MAC address, so that the interface corresponding to the MAC address stored by the MAC module is ensured to be consistent with the actually corresponding interface of the MAC address, thereby ensuring that the VM normally accesses the network and improving user experience.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for updating a MAC address forwarding table, which is applied to a network device that deploys VXLAN and MLAG, where the network device includes a VXLAN module 41, a MAC module 42, and an MLAG module 43, and a structure of the apparatus is shown in fig. 4, and includes:
the VXLAN module 41 is configured to send a deletion notification carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module after detecting that the MAC address is aged or deleted;
the MAC module 42 is configured to, after receiving the deletion notification, send an acquisition request carrying an MAC address to the MLAG module after determining that the stored first MAC address forwarding table does not include the first MAC address forwarding entry including the MAC address and the VXLAN tunnel portal identifier;
the MLAG module 43 is configured to, after receiving the acquisition request, search a second MAC address forwarding table entry including the MAC address in the learned second MAC address forwarding table, and if the second MAC address forwarding table entry is found, send an acquisition response carrying the virtual aggregation port identifier and the MAC address included in the second MAC address forwarding table entry to the MAC module;
the MAC module 42 is further configured to add a third MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier in the first MAC address forwarding table after receiving the obtaining response.
In the scheme, the VXLAN module sends a deletion notice after detecting that the MAC address is aged or deleted, the MAC module determines whether the MAC address and the MAC address forwarding table item of the VXLAN tunnel port identifier are not available, and also determines whether the MLAG module stores the MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, and after determining that the MLAG module stores the MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, the MAC module also adds the MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier, so that an interface corresponding to the MAC address stored by the MAC module conforms to an actually corresponding interface of the MAC address, thereby ensuring that a VM normally accesses a network and improving user experience.
Specifically, the MAC module is configured to determine a first MAC address forwarding table entry in a stored first MAC address forwarding table, where the first MAC address forwarding table entry does not include a MAC address and a VXLAN tunnel portal identifier, and specifically configured to:
searching a first MAC address forwarding table item comprising an MAC address and a VXLAN tunnel portal identifier from a first MAC address forwarding table;
if the first MAC address forwarding table item is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table item does not comprise the first MAC address forwarding table item;
and if the first MAC address forwarding table item is found from the first MAC address forwarding table, deleting the first MAC address forwarding table item from the MAC address forwarding table, and determining that the first MAC address forwarding table item does not comprise the first MAC address forwarding table item.
Specifically, the MLAG module is configured to ignore the acquisition request if the forwarding entry including the second MAC address is not found.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for updating a MAC address forwarding table, which is applied to a network device that deploys VXLAN and MLAG, where the network device includes an MLAG module 51, a MAC module 52, and a VXLAN module 53, and the apparatus has a structure as shown in fig. 5, and includes:
the MLAG module 51 is configured to send a deletion notification carrying the MAC address and the virtual aggregation port identifier corresponding to the MAC address to the MAC module after detecting that the MAC address is aged or deleted;
the MAC module 52 is configured to, after receiving the deletion notification, determine that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from the stored first MAC address forwarding table, and send an acquisition request carrying the MAC address to the VXLAN module;
the VXLAN module 53 is configured to, after receiving the acquisition request, search a fifth MAC address forwarding entry including the MAC address in the learned third MAC address forwarding table, and if the fifth MAC address forwarding entry is found, send an acquisition response carrying a VXLAN tunnel portal identifier and the MAC address included in the fifth MAC address forwarding entry to the MAC module;
the MAC module 52 is further configured to add a sixth MAC address forwarding table entry including the MAC address and the VXLAN tunnel portal identifier to the first MAC address forwarding table after receiving the acquisition response.
In the scheme, the MLAG module sends a deletion notice only after detecting that the MAC address is aged or deleted, the MAC module deletes the MAC address forwarding table entry of the MAC address and the virtual aggregation port identifier, and also confirms whether the VXLAN module stores the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier, and after confirming that the VXLAN module stores the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier, the MAC module also adds the MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel port identifier.
Specifically, the MAC module is configured to determine that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from the stored first MAC address forwarding table, and specifically configured to:
searching a fourth MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table;
and if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, deleting the fourth MAC address forwarding table entry from the MAC address forwarding table, and determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table.
Optionally, the VXLAN module is further configured to ignore the obtaining request if the fifth MAC address forwarding entry is not found.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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.
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.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (12)

1. A method for updating a Media Access Control (MAC) address forwarding table is applied to a network device which deploys a scalable virtual local area network (VXLAN) and a cross-device link aggregation group (MLAG), wherein the network device comprises a MAC module, a VXLAN module and a MLAG module, and the method comprises the following steps:
after detecting that the MAC address is aged or deleted, the VXLAN module sends a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module;
after receiving the deletion notification, the MAC module determines that a stored first MAC address forwarding table does not include the MAC address and a first MAC address forwarding table entry of the VXLAN tunnel portal identifier, and then sends an acquisition request carrying the MAC address to the MLAG module;
after receiving the acquisition request, the MLAG module searches a second MAC address forwarding table entry including the MAC address in a learned second MAC address forwarding table, and if the second MAC address forwarding table entry is found, sends an acquisition response carrying a virtual aggregation port identifier included in the second MAC address forwarding table entry and the MAC address to the MAC module;
and after receiving the acquisition response, the MAC module adds a third MAC address forwarding table entry comprising the MAC address and the virtual aggregation port identifier in the first MAC address forwarding table.
2. The method of claim 1, wherein determining a first MAC address forwarding entry in the stored first MAC address forwarding table that does not include the MAC address and the VXLAN tunnel portal identifier comprises:
searching a first MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the first MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table does not include the first MAC address forwarding table entry;
if the first MAC address forwarding table entry is found from the first MAC address forwarding table, after the first MAC address forwarding table entry is deleted from the MAC address forwarding table, it is determined that the first MAC address forwarding table does not include the first MAC address forwarding table entry.
3. The method of claim 1 or 2, further comprising:
and if the MLAG module does not find the forwarding table item comprising the second MAC address, ignoring the acquisition request.
4. A method for updating a MAC address forwarding table is applied to a network device for deploying VXLAN and MLAG, the network device comprises a MAC module, a VXLAN module and a MLAG module, and the method comprises the following steps:
after detecting that the MAC address is aged or deleted, the MLAG module sends a deletion notification carrying the MAC address and a virtual aggregation port identifier corresponding to the MAC address to the MAC module;
after receiving the deletion notification, the MAC module determines that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from a stored first MAC address forwarding table, and then sends an acquisition request carrying the MAC address to the VXLAN module;
after receiving the acquisition request, the VXLAN module searches a fifth MAC address forwarding table item comprising the MAC address in a learned third MAC address forwarding table, and if the fifth MAC address forwarding table item is found, the VXLAN module sends an acquisition response carrying a VXLAN tunnel portal identifier and the MAC address, wherein the VXLAN tunnel portal identifier and the MAC address are included in the fifth MAC address forwarding table item;
and after receiving the acquisition response, the MAC module adds a sixth MAC address forwarding table entry comprising the MAC address and the VXLAN tunnel portal identifier in the first MAC address forwarding table.
5. The method of claim 4, wherein determining that a fourth MAC address forwarding entry comprising the MAC address and the virtual aggregation port identifier is deleted from the stored first MAC address forwarding table comprises:
searching a fourth MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier from the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, it is determined that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table after the fourth MAC address forwarding table entry is deleted from the MAC address forwarding table.
6. The method of claim 4 or 5, further comprising:
and if the VXLAN module does not find the fifth MAC address forwarding table entry, ignoring the acquisition request.
7. A network device for use in a network device that deploys VXLAN and MLAG, the network device comprising a MAC module, a VXLAN module, and a MLAG module, the network device comprising:
the VXLAN module is used for sending a deletion notice carrying the MAC address and a VXLAN tunnel portal identifier corresponding to the MAC address to the MAC module after the aging or deletion of the MAC address is detected;
the MAC module is configured to send an acquisition request carrying the MAC address to the MLAG module after determining that a stored first MAC address forwarding table does not include the MAC address and a first MAC address forwarding table entry of the VXLAN tunnel portal identifier after receiving the deletion notification;
the MLAG module is configured to, after receiving the acquisition request, search a second MAC address forwarding table entry including the MAC address in a learned second MAC address forwarding table, and send an acquisition response carrying a virtual aggregation port identifier included in the second MAC address forwarding table entry and the MAC address to the MAC module if the second MAC address forwarding table entry is found;
the MAC module is further configured to add a third MAC address forwarding entry including the MAC address and the virtual aggregation port identifier to the first MAC address forwarding table after receiving the acquisition response.
8. The network device of claim 7, wherein the MAC module is configured to determine a first MAC address forwarding entry in the stored first MAC address forwarding table that does not include the MAC address and the VXLAN tunnel portal identifier, and is specifically configured to:
searching a first MAC address forwarding table item comprising the MAC address and the VXLAN tunnel portal identification from the first MAC address forwarding table;
if the first MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the first MAC address forwarding table does not include the first MAC address forwarding table entry;
if the first MAC address forwarding table entry is found from the first MAC address forwarding table, after the first MAC address forwarding table entry is deleted from the MAC address forwarding table, it is determined that the first MAC address forwarding table does not include the first MAC address forwarding table entry.
9. The network device according to claim 7 or 8, wherein the MLAG module is configured to ignore the acquisition request if the forwarding entry including the second MAC address is not found.
10. A network device for use in a network device that deploys VXLAN and MLAG, the network device comprising a MAC module, a VXLAN module, and a MLAG module, the network device comprising:
the MLAG module is configured to send a deletion notification carrying the MAC address and a virtual aggregation port identifier corresponding to the MAC address to the MAC module after detecting that the MAC address is aged or deleted;
the MAC module is configured to, after receiving the deletion notification, determine that a fourth MAC address forwarding table entry including the MAC address and the virtual aggregation port identifier is deleted from a stored first MAC address forwarding table, and send an acquisition request carrying the MAC address to the VXLAN module;
the VXLAN module is configured to, after receiving the acquisition request, search a fifth MAC address forwarding entry including the MAC address in a learned third MAC address forwarding table, and send an acquisition response carrying a VXLAN tunnel portal identifier included in the fifth MAC address forwarding entry and the MAC address to the MAC module if the fifth MAC address forwarding entry is found;
the MAC module is further configured to add a sixth MAC address forwarding entry including the MAC address and the VXLAN tunnel portal identifier to the first MAC address forwarding table after receiving the acquisition response.
11. The network device of claim 10, wherein the MAC module is configured to determine to delete a fourth MAC address forwarding entry comprising the MAC address and the virtual aggregation interface identifier from the stored first MAC address forwarding table, and is specifically configured to:
searching a fourth MAC address forwarding table item comprising the MAC address and the virtual aggregation port identifier from the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is not found from the first MAC address forwarding table, determining that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table;
if the fourth MAC address forwarding table entry is found from the first MAC address forwarding table, it is determined that the fourth MAC address forwarding table entry is not included in the first MAC address forwarding table after the fourth MAC address forwarding table entry is deleted from the MAC address forwarding table.
12. The network device of claim 10 or 11, wherein the VXLAN module is further configured to ignore the acquisition request if the fifth MAC address forwarding entry is not found.
CN201811551854.3A 2018-12-19 2018-12-19 Updating method of MAC address forwarding table and network equipment Active CN109495368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811551854.3A CN109495368B (en) 2018-12-19 2018-12-19 Updating method of MAC address forwarding table and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811551854.3A CN109495368B (en) 2018-12-19 2018-12-19 Updating method of MAC address forwarding table and network equipment

Publications (2)

Publication Number Publication Date
CN109495368A CN109495368A (en) 2019-03-19
CN109495368B true CN109495368B (en) 2021-07-16

Family

ID=65710835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811551854.3A Active CN109495368B (en) 2018-12-19 2018-12-19 Updating method of MAC address forwarding table and network equipment

Country Status (1)

Country Link
CN (1) CN109495368B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079424B (en) * 2013-03-29 2017-07-11 国际商业机器公司 For the apparatus and method of asymmetric link polymerization
US9769088B2 (en) * 2014-07-31 2017-09-19 Arista Networks, Inc. Method and system for VTEP redundancy in a multichassis link aggregation domain
US10200278B2 (en) * 2016-03-02 2019-02-05 Arista Networks, Inc. Network management system control service for VXLAN on an MLAG domain
CN106878199B (en) * 2016-12-20 2020-02-11 新华三技术有限公司 Configuration method and device of access information
CN108696416A (en) * 2017-04-12 2018-10-23 中兴通讯股份有限公司 A kind of VXLAN is mono- to return and dual homed hybrid access method, device and PE equipment
CN107547402B (en) * 2017-07-19 2020-04-03 新华三技术有限公司 Forwarding table generation method and device
CN107547370B (en) * 2017-09-25 2020-05-12 新华三技术有限公司 Flow forwarding method, device and system
CN107707690B (en) * 2017-11-28 2021-07-16 锐捷网络股份有限公司 Method, device and medium for preventing dynamic address from aging
CN107733793B (en) * 2017-11-28 2020-03-06 新华三技术有限公司 Forwarding table item maintenance method and device
CN108600099B (en) * 2018-04-19 2020-04-03 新华三技术有限公司 Message forwarding method and device and leaf equipment
CN108900414B (en) * 2018-06-08 2021-09-10 新华三技术有限公司 Forwarding table generation method and device

Also Published As

Publication number Publication date
CN109495368A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US10397045B2 (en) Method for migrating service of data center, apparatus, and system
CN104243318B (en) MAC address learning method and device in VXLAN networks
CN107547349B (en) Virtual machine migration method and device
CN103763121B (en) The method and device that a kind of network configuration information quickly issues
US20110238820A1 (en) Computer, communication device, and communication control system
WO2017100365A1 (en) Directing data traffic between intra-server virtual machines
US10361992B2 (en) Method for synchronizing virtual machine location information between data center gateways, gateway, and system
CN107623757B (en) Table entry updating method and device
JP6928076B2 (en) Packet monitoring
US10171339B2 (en) Populating forwarding database tables in a fabric environment
US9660902B2 (en) Apparatus, method and computer-readable medium of providing acceptable transmission unit
US20190065229A1 (en) Network notification loss detection for virtual machine migration
CN104243630A (en) MAC (media access control) address learning method and MAC address learning device in VXLAN (virtual extensible local area network)
CN109412925B (en) Forwarding table item updating method based on VTEP and VTEP
WO2016058483A1 (en) Association of a vxlan with a tunnel
WO2016090900A1 (en) Flow table update method and device
CN105634901A (en) MAC address information synchronization method and device based on CAS VXLAN
CN111934969B (en) Maintenance method and device of MAC forwarding table
CN107547505B (en) Message processing method and device
CN108810183B (en) Method and device for processing conflicting MAC addresses and machine-readable storage medium
CN105812495B (en) Message forwarding method and equipment
CN109495368B (en) Updating method of MAC address forwarding table and network equipment
CN107528929B (en) ARP (Address resolution protocol) entry processing method and device
WO2016070617A1 (en) Method and device for updating flow table
CN106230658A (en) A kind of method and apparatus monitoring the network equipment

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