CN114143262A - MAC route updating method, equipment and system - Google Patents

MAC route updating method, equipment and system Download PDF

Info

Publication number
CN114143262A
CN114143262A CN202010915906.1A CN202010915906A CN114143262A CN 114143262 A CN114143262 A CN 114143262A CN 202010915906 A CN202010915906 A CN 202010915906A CN 114143262 A CN114143262 A CN 114143262A
Authority
CN
China
Prior art keywords
network device
mac
route
network
mac address
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
Application number
CN202010915906.1A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010915906.1A priority Critical patent/CN114143262A/en
Priority to PCT/CN2021/114078 priority patent/WO2022048469A1/en
Publication of CN114143262A publication Critical patent/CN114143262A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Abstract

The application provides a method, equipment and a system for updating an MAC (media access control) route, belonging to the technical field of networks. In the solution provided by the present application, after updating the MAC entry according to the MAC address of the destination device learned from the second network device, the first network device may send a message including indication information to the third network device, so as to instruct the third network device to delete the first MAC route stored therein. Because the MAC entry before updating is obtained by the first network device according to the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC entry, which can ensure that the third network device can send the MAC route of the MAC address to the first network device again after learning the MAC address again. Further, the first network device can be ensured to update the MAC entry corresponding to the MAC address in time based on the retransmitted MAC route.

Description

MAC route updating method, equipment and system
Technical Field
The present application relates to the field of network technologies, and in particular, to a method, an apparatus, and a system for updating a Media Access Control (MAC) route.
Background
In the process of a Virtual Private LAN Service (VPLS) network evolving into an Ethernet Virtual Private Network (EVPN) network, a networking state in which the EVPN and the VPLS coexist may occur. In a network where EVPN and VPLS coexist, a Provider Edge (PE) device in which a VPLS instance and an EVPN instance are deployed at the same time may also be referred to as a convergence PE device. The fusion PE device and a first PE device deployed with a VPLS instance can carry VPLS service, and the fusion PE device and a second PE device deployed with an EVPN instance can carry EVPN service. In the scenario of coexistence of EVPN and VPLS, the flow of VPLS service and the flow of EVPN service are not intercommunicated.
In the related art, after learning the MAC address of a device connected to the second PE device, the second PE device may send the MAC route of the MAC address to the convergence PE device, where the device may be, for example, a user host or a network device that is a destination device for receiving traffic. The converged PE device may generate or update a MAC entry for the MAC address based on the MAC route. If the device is migrated from the second PE device to the first PE device, the convergence PE device may learn the MAC address of the device from the first PE device again, and update the MAC entry of the MAC address. However, at this time, the converged PE device does not send the MAC route of the MAC address that it has learned newly to the second PE device. Accordingly, the second PE device is unaware of the migration of the device.
If the device is migrated from the first PE device to the second PE device again, the second PE device does not send the MAC route of the MAC address to the convergence PE device because the second PE device does not perceive that the device has been migrated before. Therefore, the convergence PE device cannot update the MAC entry corresponding to the MAC address in time, and the convergence PE device cannot correctly forward the packet to the second PE device after receiving the packet addressed to the device.
Disclosure of Invention
The application provides a method, a device and a system for updating an MAC route, which can solve the network operation problem caused by the fact that after target equipment in the related art is migrated, network equipment cannot update an MAC table item corresponding to an MAC address of the target equipment in time.
In a first aspect, a method for updating a MAC route is provided, where the method includes: the first network equipment updates an MAC table item corresponding to the MAC address according to the MAC address of the target equipment learned from the second network equipment, wherein the MAC table item before updating is obtained by the first network equipment according to a first MAC route of the MAC address sent by the third network equipment; then, the first network device sends a message to the third network device according to the MAC address learned from the second network device, where the message includes the MAC address and indication information, and the indication information is used to instruct the third network device to delete the first MAC route in the third network device.
After deleting the first MAC route, the third network device may send the MAC route of the MAC address to the first network device again if the MAC address of the destination device is learned again. Further, it can be ensured that the first network device can update the MAC entry corresponding to the MAC address in time based on the MAC route retransmitted by the third network device, so as to ensure that the packet addressed to the destination device can be forwarded normally.
It should be understood that "deleting" may refer to deleting the MAC route directly, or may not actually delete the MAC route, but temporarily leave the MAC route in an unavailable state (i.e., an invalid state). For example, the MAC route may be set to an unavailable state by setting a flag bit or the like.
Optionally, after the first network device sends a message to the third network device according to learning the MAC address from the second network device, the method may further include: the first network device receives a first MAC withdrawn route sent by a third network device, and deletes the first MAC route in the first network device according to the first MAC withdrawn route.
The first network device deletes the first MAC route in the first network device, which can prevent the residual first MAC route from occupying too much memory space.
Optionally, the message is a second MAC route. The indication information may be carried in an extended community attribute of the second MAC route. Alternatively, the message may be in other forms such as a message. When the message is in the second MAC routing form, the third network equipment can directly identify and process the message, so that the normal operation of the network is maintained, and the compatibility of the network is improved.
Optionally, after the first network device sends a message to the third network device according to the MAC address learned from the second network device, the method may further include: the first network device deletes the second MAC route in the first network device. The first network device deletes the stored second MAC route, so that the second MAC route can be prevented from remaining and occupying excessive memory space.
Optionally, after the first network device receives the first MAC withdrawal route sent by the third network device, the method may further include: the first network device sends a second MAC withdrawal route to the third network device, where the second MAC withdrawal route is used to instruct the third network device to delete the second MAC route in the third network device. Therefore, the memory space of the third network device occupied by the residual second MAC route can be avoided.
Wherein the second MAC withdrawal route may also include the indication information. For example, the indication information may be carried in an extended community attribute of the second MAC withdrawal route. The third network device may delete the second MAC route in the third network device based on the indication information.
It should be understood that the third network device may also delete the second MAC route directly after deleting the first MAC route according to the indication information in the second MAC route. Accordingly, the first network device may not need to send the second MAC withdrawal route.
Optionally, after the first network device updates the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, the method may further include: the first network device sets the first MAC route in the first network device to an invalid route.
Since the first network device has updated the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, the first MAC route received by the first network device from the third network device may be set to be invalid, for example, the route invalid flag bit is set. Therefore, the first network device can be prevented from updating the MAC table entry corresponding to the MAC address by mistake according to the first MAC route.
Optionally, after the first network device sends a message to the third network device according to learning the MAC address from the second network device, the method may further include: the first network equipment receives a third MAC route of the MAC address sent by the third network equipment; and the first network equipment updates the MAC table entry corresponding to the MAC address according to the third MAC route.
After the first network device updates the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, both the first network device and the third network device delete the first MAC route, so that the third network device may send the third MAC route of the MAC address to the first network device again when learning the MAC address of the destination device again. Therefore, the first network device can be ensured to update the MAC table entry corresponding to the MAC address in time based on the third MAC route.
Optionally, the first network device and the second network device may be configured to carry VPLS traffic, and the first network device and the third network device may be configured to carry EVPN traffic.
Optionally, the process of the first network device sending a message to the third network device may include: the first network device sends the message to the third network device according to a Pseudowire (PW) between the first network device and the second network device as a HUB (HUB) attribute.
And if the PW between the first network device and the second network device is a HUB attribute, the communication system is a network in which the VPLS service and the EVPN service coexist. And if the PW between the first network device and the second network device is a radiation (SPOKEN) attribute, indicating that the communication system is a network spliced by the VPLS service and the EVPN service. In general, the second network device and the third network device in the network where the VPLS service and the EVPN service coexist cannot communicate traffic, and the second network device and the third network device in the network where the VPLS service and the EVPN service are spliced can communicate traffic.
For the scenario of splicing the VPLS service and the EVPN service, in a first possible implementation manner, since the services between the VPLS and the EVPN may be intercommunicated, the first network device may send, according to a conventional MAC route learning mechanism, an MAC route whose output interface points to the second network device to the third network device, so that the third network device updates the local MAC route according to the MAC route whose output interface points to the second network device. Or, in a second possible implementation manner, the first network device may also send, to the third network device, a fourth MAC route according to the MAC address learned from the second network device, where the fourth MAC route includes the MAC address and indication information, and the indication information may be used to indicate that the PW between the first network device and the second network device is an SPOKEN attribute, that is, indicate that the communication system is a scenario in which a VPLS service and an EVPN service are spliced. The fourth MAC route may be used to instruct the third network device to update the MAC table entry corresponding to the MAC address.
Wherein the indication information may be carried in an extended community attribute of the fourth MAC route. That is, in this second possible implementation manner, after receiving the MAC route sent by the second network device, if the PW between the first network device and the second network device is the HUB attribute, the first network device sends the MAC route carrying the first extended community attribute to the third network device. And if the PW between the first network equipment and the second network equipment is the SPOKEN attribute, the first network equipment sends the MAC route carrying the second extended community attribute to the third network equipment. And the values of the indication fields in the first extended community attribute and the second extended community attribute are different. For example, the indication field is a type (type) field, where a value of 0 indicates that the PW attribute is a SPOKEN attribute, and a value of 1 indicates that the PW attribute is a HUB attribute. The third network device may perform operations in different scenarios according to different values of the indication field.
Optionally, the first network device, the second network device, and the third network device may all be PE devices. The PE device may be a switch or router or the like type of device.
In a second aspect, a method for updating a MAC route is provided, where the method includes: the third network device receives a message sent by the first network device, wherein the message comprises a MAC address of a destination device and indication information, the message is sent by the first network device according to the MAC address learned from the second network device after updating a MAC table item corresponding to the MAC address according to the MAC address learned from the second network device, and the MAC table item before updating is obtained by the first network device according to a first MAC route of the MAC address sent by the third network device; then, the third network device may delete the first MAC route in the third network device according to the indication information.
After deleting the first MAC route, the third network device may send the MAC route of the MAC address to the first network device again if the MAC address of the destination device is learned again. Further, it can be ensured that the first network device can update the MAC entry corresponding to the MAC address in time based on the MAC route retransmitted by the third network device, so as to ensure that the packet addressed to the destination device can be forwarded normally. Wherein the first MAC route may be generated by the third network device or may be statically configured in the third network device.
Optionally, after the third network device deletes the first MAC route in the third network device according to the indication information, the method further includes:
the third network device sends a first MAC withdrawal route to the first network device, where the first MAC withdrawal route is used to instruct the first network device to delete the first MAC route in the first network device.
Optionally, the message is a second MAC route.
Optionally, after the third network device deletes the first MAC route in the third network device according to the indication information, the method may further include: the third network device deletes the second MAC route in the third network device.
Optionally, after the third network device sends the first MAC withdrawal route to the first network device, the method may further include: the third network equipment receives a second MAC revocation route sent by the first network equipment; accordingly, the third network device may delete the second MAC route in the third network device according to the second MAC withdrawal route.
Optionally, after the third network device deletes the first MAC route in the third network device according to the indication information, the method may further include: and the third network device sends a third MAC route of the MAC address to the first network device according to the learned MAC address of the destination device, where the third MAC route is used to instruct the first network device to update the MAC entry corresponding to the MAC address.
Optionally, the first network device and the second network device are used for carrying VPLS service, and the first network device and the third network device are used for carrying EVPN service.
Optionally, the message is sent by the first network device according to the PW between the first network device and the second network device for HUB attribute.
Optionally, the first network device, the second network device, and the third network device are all PE devices.
In a third aspect, a network device is provided, which may be the first network device in the above aspect; the network device may include:
the updating module is used for updating an MAC table item corresponding to the MAC address according to the MAC address of the target device learned from the second network device, wherein the MAC table item before updating is obtained by the network device according to a first MAC route of the MAC address sent by a third network device;
a sending module, configured to send a message to the third network device according to the MAC address learned from the second network device, where the message includes the MAC address and indication information, and the indication information is used to instruct the third network device to delete the first MAC route in the third network device.
Optionally, the network device may further include:
a receiving module, configured to receive a first MAC revocation route sent by a third network device after the sending module sends a message to the third network device according to the MAC address learned from the second network device;
and the processing module is used for deleting the first MAC route in the network equipment according to the first MAC withdrawn route.
Optionally, the message is a second MAC route. The indication information may be carried in an extended community attribute of the second MAC route. Alternatively, the message may be in other forms such as a message.
Optionally, the processing module may be further configured to delete the second MAC route in the network device after the sending module sends a message to the third network device according to the MAC address learned from the second network device;
optionally, the sending module may be further configured to send, to the third network device, a second MAC revocation route after the receiving module receives the first MAC revocation route sent by the third network device, where the second MAC revocation route is used to instruct the third network device to delete the second MAC route in the third network device.
Optionally, the network device may further include:
and the setting module is used for setting the first MAC route in the network equipment as an invalid route after the updating module updates the MAC table entry corresponding to the MAC address according to the MAC address of the destination equipment learned from the second network equipment.
Optionally, the receiving module may be further configured to receive a third MAC route of the MAC address sent by the third network device after the sending module sends a message to the third network device according to the MAC address learned from the second network device; correspondingly, the updating module may be further configured to update the MAC entry corresponding to the MAC address according to the third MAC route.
Optionally, the network device and the second network device may be configured to carry VPLS traffic, and the network device and the third network device may be configured to carry EVPN traffic.
Optionally, the sending module may be configured to: and sending the message to the third network device according to the HUB attribute of the PW between the network device and the second network device.
Optionally, the network device, the second network device, and the third network device may all be PE devices. The PE device may be a switch or router or the like type of device.
In a fourth aspect, there is provided a network device, which may be the third network device in the above aspect, and which may include:
a receiving module, configured to receive a message sent by a first network device, where the message includes a MAC address of a destination device and indication information, and the message is sent by the first network device according to a MAC entry learned from a second network device after the MAC entry corresponding to the MAC address is updated according to the MAC address learned from the second network device, where the MAC entry before update is obtained by the first network device according to a first MAC route of the MAC address sent by the network device;
and the processing module is used for deleting the first MAC route in the network equipment according to the indication information.
Optionally, the network device may further include:
a sending module, configured to send a first MAC revocation route to the first network device after the processing module deletes the first MAC route in the network device according to the indication information, where the first MAC revocation route is used to indicate that the first network device deletes the first MAC route in the first network device.
Optionally, the message is a second MAC route.
Optionally, the processing module may be further configured to delete the second MAC route in the network device after deleting the first MAC route in the network device according to the indication information.
Optionally, the receiving module may be further configured to receive, after the sending module sends the first MAC revocation route to the first network device, a second MAC revocation route sent by the first network device;
the processing module may be configured to delete the second MAC route in the network device according to the second MAC withdrawal route.
Optionally, the sending module may be further configured to send, to the first network device, a third MAC route of the MAC address according to the learned MAC address of the destination device after the processing module deletes the first MAC route in the network device according to the indication information, where the third MAC route is used to indicate the first network device to update the MAC entry corresponding to the MAC address.
Optionally, the first network device and the second network device are used for carrying VPLS service, and the first network device and the network device are used for carrying EVPN service.
Optionally, the message is sent by the first network device according to the PW between the first network device and the second network device for HUB attribute.
Optionally, the first network device, the second network device, and the network device are all PE devices.
In a fifth aspect, a network device is provided that includes a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program stored in the memory to cause the network device to perform the MAC route updating method as provided in the first aspect.
In a sixth aspect, a network device is provided that includes a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program stored in the memory to cause the network device to perform the MAC route updating method as provided in the second aspect.
In a seventh aspect, a computer-readable storage medium is provided, in which instructions are stored, and when executed by a processor, implement the method for updating a MAC route as provided in the first aspect above, or implement the method for updating a MAC route as provided in the second aspect above.
In an eighth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of updating a MAC route as provided in the first aspect above, or to implement the method of updating a MAC route as provided in the second aspect above.
In a ninth aspect, there is provided a communication system comprising: a network device as provided in the above third or fifth aspect, and a network device as provided in the above fourth or sixth aspect.
In summary, the present application provides a method, a device, and a system for updating an MAC route, where after updating an MAC entry according to an MAC address of a destination device learned from a second network device, a first network device may send a message including indication information to a third network device to indicate the third network device to delete a first MAC route stored therein. Because the MAC entry before updating is obtained by the first network device according to the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC entry, which can ensure that the third network device can send the MAC route of the MAC address to the first network device again after learning the MAC address of the destination device again. Further, it can be ensured that the first network device can update the MAC entry corresponding to the MAC address in time based on the MAC route retransmitted by the third network device, so as to ensure that the packet addressed to the destination device can be forwarded normally.
Drawings
Fig. 1a is a schematic structural diagram of a VPLS service and EVPN service coexistence scenario provided in an embodiment of the present application;
fig. 1b is a schematic structural diagram of a splicing scenario of a VPLS service and an EVPN service provided in an embodiment of the present application;
fig. 2 is a diagram illustrating an update process of a MAC route in the related art;
fig. 3 is a flowchart of a method for updating a MAC route according to an embodiment of the present application;
fig. 4 is a flowchart of another MAC route updating method according to an embodiment of the present application;
fig. 5 is a schematic diagram of an update process of a MAC route according to an embodiment of the present application;
fig. 6 is a schematic diagram of another MAC route update process provided in an embodiment of the present application;
fig. 7 is a flowchart of another MAC route updating method provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another network device provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of another network device provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of another network device provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of another network device provided in an embodiment of the present application;
fig. 13 is a schematic structural diagram of another network device according to an embodiment of the present application.
Detailed Description
The following describes a method, a device, and a system for updating a MAC route according to an embodiment of the present application in detail with reference to the accompanying drawings.
It is to be understood that the term "at least one" as referred to herein means one or more and "a plurality" means two or more. In the description of the present application, for the convenience of clearly describing the technical solutions of the embodiments of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance. The terms "system" and "network" are used interchangeably herein.
Before explaining the embodiments of the present application, an application scenario of the embodiments of the present application is explained.
The EVPN is a two-layer network interconnection technology and has the advantages of simple deployment, strong expansibility and the like. The EVPN notifies information such as an MAC address of a destination device based on a Border Gateway Protocol (BGP) protocol, and performs two-layer packet forwarding through the generated MAC entry, so as to achieve the purpose of two-layer network interconnection. Furthermore, EVPN defines a common set of control planes to achieve separation of the data plane and the control plane. The control plane is responsible for issuing routing information, the data plane is responsible for forwarding messages, and the routing management system is clear in division of labor and easy to manage.
In the process of evolving a layer 2virtual private network (L2 VPN) network using a VPLS technique to an EVPN network, it is difficult to quickly switch all VPLS services to EVPN services. Therefore, in the process of gradual replacement, a scene that the VPLS service and the EVPN service coexist exists.
The network in which the VPLS service and the EVPN service coexist generally has two scenes, namely a coexisting common-path scene and a coexisting non-common-path scene. The coexistence common path means that the two PE devices simultaneously carry EVPN service and VPLS service, the EVPN service is effective in the scene, and the VPLS service is ineffective. The coexistence non-common path means that the fusion PE device is simultaneously deployed with an EVPN instance and a VPLS instance and can respectively establish different types of services with different neighbor PE devices. The EVPN service and the VPLS service are both effective in the scene.
For example, fig. 1a is a schematic structural diagram of a scenario in which a VPLS service and an EVPN service coexist and are not co-located. As shown in fig. 1a, PE1 is a converged PE device that deploys an EVPN instance and a VPLS instance. PE2 is deployed with a VPLS instance and connected to PE1 via a PW, where PE1 and PE2 are used to carry VPLS traffic. PE3 is deployed with EVPN instances that are used to carry EVPN traffic with PE 1.
In VPLS networks, PW full connectivity and horizontal splitting are typically employed to avoid loops. Wherein, horizontal segmentation means that: if a certain PE device receives a message sent by other PE devices through a PW, the message is not forwarded to other PWs associated with the same broadcast domain. The broadcast domain may be a Bridge Domain (BD) or a Virtual Switch Instance (VSI) broadcast domain. If PW between two PEs is HUB attribute, then the horizontal segmentation principle is observed. If the PW between two PEs is SPOKEN attribute, then the horizontal partitioning principle need not be observed.
In a scene that the VPLS and the EVPN coexist in different paths, the flow of the EVPN service and the flow of the VPLS are not intercommunicated. For example, referring to FIG. 1a, the PW between PE1 and PE2 is a HUB attribute, and the link between PE1 and PE3 is also a HUB attribute. Alternatively, it can also be understood that: VPLS services in PE1 and PE2 are both HUB attributes, and EVPN services in PE1 and PE3 are both HUB attributes. In this case, similar to the horizontal split principle, after receiving the traffic 1 transmitted by the PE2, the PE1 does not forward the traffic 1 to the PE3, and after receiving the traffic 2 transmitted by the PE3, the PE1 does not forward the traffic 2 to the PE 2.
Fig. 1b is a schematic structural diagram of a scenario in which a VPLS service and an EVPN service are spliced according to an embodiment of the present application. As shown in fig. 1b, in the scenario of splicing VPLS service and EVPN service, the device type of PE1 may be set to a PE (user facing PE, UPE) type near the user side, for example. At this time, the traffic of the EVPN service and the traffic of the VPLS service may be interworked, the PW between PE1 and PE2 may be an SPOKEN attribute, and the link between PE1 and PE3 may be an SPOKEN attribute. Alternatively, it can also be understood that: VPLS traffic in PE1 and PE2 are both SPOKEN attributes, and EVPN traffic in PE1 and PE3 are also both SPOKEN attributes. In this case, after receiving the traffic 1 transmitted by PE2, PE1 may forward the traffic 1 to PE3, and after receiving the traffic 2 transmitted by PE3, PE1 may forward the traffic 2 to PE 2. In this splicing scenario, traffic between PE2 and PE3 may be interworked.
In the embodiment of the present application, each PE device may be connected to one or more Customer Edge (CE) devices. Each CE device may also be connected with one or more user terminals (terminal), i.e. each CE device may mount at least one user terminal. Each PE device and each CE device may be a network device such as a router or a switch, for example, the PE device may be a router, and the CE device may be a switch. The user terminal may also be referred to as a host or a user equipment, and the user terminal may be a computer, a wireless terminal device, or a Virtual Machine (VM) created on a server. Each PE device may generate or update the MAC entry corresponding to the MAC address according to the learned MAC address of the destination device. The destination device may be a CE device or may be a user terminal to which the CE device is connected.
In one aspect, each PE device may learn a local MAC address, where learning the local MAC address refers to: the PE device learns the source MAC address in the message according to the message sent by the connected CE device. The PE device may record the source MAC address in the generated or updated MAC entry based on the learned local MAC address, and the corresponding relationship between the source MAC address and the port (port) that receives the packet. This port may also be referred to as an Access (AC) side port, or AC side interface, since it is the port to which the CE device is connected.
On the other hand, each PE device may also learn a remote MAC address, where learning the remote MAC address refers to: the PE device learns the MAC address of the destination device according to the messages sent by other PEs or the MAC routes sent by other PEs. For two PE devices carrying VPLS service, one of the PE devices may learn a source MAC address in a message sent by the other PE device based on the message. That is, the PE device can learn the MAC address of the destination device according to the packet received by its forwarding plane. The PE device may record the source MAC address in the generated or updated MAC entry based on the learned far-end MAC address, and an egress interface of the MAC entry generated or updated by the PE device may point to another PE device that sends a packet to the PE device.
For two PE devices carrying EVPN traffic, one of the PE devices may send the learned local MAC address to the other PE device through a MAC route, and the other PE device may further learn a remote MAC address based on the MAC route. That is, the PE device may learn the MAC address of the destination device based on the MAC route received by its control plane. The PE device may record the source MAC address in the generated or updated MAC entry based on the learned far-end MAC address, and an egress interface of the MAC entry generated or updated by the PE device may point to another PE device that sends a MAC route to the PE device.
In the related art, as shown in fig. 2, after learning that a source MAC (source MAC, SMAC) address is a native MAC address of MAC1, PE3 may generate a MAC route of MAC 1: route 1 and sends this route 1 to PE 1. PE1 may in turn generate or update a MAC entry corresponding to MAC1 whose egress interface points to PE3 based on this route 1. Then, if the destination device with MAC1 address migrates to PE2, PE2 may send a message from the destination device to PE 1. PE1 may further update the MAC entry corresponding to MAC1 based on the message. As shown in FIG. 2, the egress interface of the updated MAC table entry points to PE 2. And, the PE1 will set the MAC route (i.e., route 1) of MAC1 sent by the PE3 to be an invalid route, for example, the flag bit indicates that route 1 is an invalid route. The MAC route marked as invalid is temporarily no longer used to guide the forwarding of the user packet.
Further, if the destination device with MAC1 is migrated to PE3 again, PE3 does not send the MAC route of MAC1 to PE1 again because PE3 also stores the route 1 generated previously. Accordingly, PE1 does not update the MAC entry corresponding to MAC1 until the aging period of MAC1 is reached. Wherein the aging period is typically 5 minutes (min). As shown in fig. 2, if PE1 receives a packet addressed to the destination device, that is, a packet whose Destination MAC (DMAC) address is MAC1, in the aging period of MAC1, PE1 will send the packet to PE2 based on the stored MAC entry corresponding to MAC1, and cannot correctly forward the packet to PE 3.
Based on the above analysis, in a scenario where the VPLS service and the EVPN service coexist in different paths, if the destination device migrates between different PEs, the converged PE device may not update the MAC entry corresponding to MAC1 in time, so that the packet may not be forwarded normally. The embodiment of the application provides an updating method of an MAC route, which can solve the problem that after a target device is migrated, a fusion PE device cannot update an MAC table entry of an MAC address of the target device in time, and can ensure that the fusion PE device can normally forward a message sent to the target device.
The following explains the updating method of MAC route provided in the embodiments of the present application in detail.
Fig. 3 is a flowchart of a MAC route updating method provided in an embodiment of the present application, where the method may be applied to a communication system including a first network device, a second network device, and a third network device. The first network device is connected with the second network device and the third network device respectively. The first network device, the second network device, and the third network device may each be PE devices, or may also be other types of network devices. Optionally, the communication system may be a system in which a VPLS service and an EVPN service coexist, the first network device and the second network device are configured to carry the VPLS service, and the first network device and the third network device are configured to carry the EVPN service, that is, the first network device is a convergence PE device. As shown in fig. 3, the method may include:
s301, the first network device updates the MAC table entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device.
And the MAC table entry before updating is obtained by the first network equipment according to the first MAC route of the MAC address sent by the third network equipment.
In this embodiment, when the destination device is connected to the third network device (either directly or indirectly through another network device), the third network device may learn the MAC address of the destination device, and may send the first MAC route of the MAC address to the first network device. The first MAC route may be a MAC route generated by the third network device, or may be a MAC route statically configured in the third network device.
After receiving the first MAC route, the first network device may generate or update a MAC entry corresponding to the MAC address based on the first MAC route. After the destination device is migrated to the second network device, the first network device may learn the MAC address of the destination device from the second network device again, and may further update the MAC entry corresponding to the MAC address.
S302, the first network device sends a message to the third network device according to the MAC address learned from the second network device, where the message includes the MAC address and indication information.
Since the first network device knows that the MAC address has migrated according to learning from the second network device, it may send a message including the indication information to the third network device. The indication information is used to instruct the third network device to delete the first MAC route in the third network device. Optionally, the message sent by the first network device may be a second MAC route, and the indication information may be carried in an extended community attribute of the second MAC route. Or, the message may also be a message, and the form of the message is not limited in this application embodiment. When the message is in the form of the second MAC route, the third network device may directly recognize and process the message, thereby ensuring normal operation of the network at a low implementation cost and improving network compatibility.
And S303, the third network equipment deletes the first MAC route in the third network equipment according to the indication information.
After receiving the message sent by the first network device, the third network device may delete the stored first MAC route according to the indication information in the message. Therefore, after the destination device migrates to the third network device again, the third network device may generate the third MAC route of the MAC address according to the MAC address of the destination device learned again, and send the third MAC route to the first network device. Correspondingly, the first network device can update the stored MAC entry corresponding to the MAC address in time according to the third MAC route, so as to ensure that the subsequent first network device can correctly forward the packet to the third network device when receiving the packet addressed to the destination device.
It should be understood that "deleting" mentioned in the embodiments of the present application may refer to directly deleting the MAC route, or may refer to temporarily rendering the MAC route in an unavailable state (i.e., an invalid state) without actually deleting the MAC route. For example, the MAC route may be set to an unavailable state by setting a flag bit to the MAC route.
In summary, the embodiment of the present application provides a method for updating a MAC route, where after a first network device updates a MAC entry according to a MAC address of a destination device learned from a second network device, the first network device may send a message including indication information to a third network device, so as to indicate the third network device to delete a first MAC route stored in the third network device. Because the MAC entry before updating is obtained by the first network device according to the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC entry, which can ensure that the third network device can send the MAC route of the MAC address to the first network device again after learning the MAC address of the destination device again. Furthermore, the first network device can be ensured to update the MAC entry corresponding to the MAC address in time based on the MAC route sent again by the third network device, so as to ensure that the subsequent packet sent to the destination device can be forwarded normally.
Fig. 4 is a flowchart of another MAC route updating method provided in an embodiment of the present application, where the method may be applied to a communication system including a first network device, a second network device, and a third network device. The following description will take the communication system as a system in which the VPLS service and the EVPN service coexist, where the first network device, the second network device, and the third network device are all PE devices, and the first network device and the second network device are used for carrying the VPLS service, and the first network device and the third network device are used for carrying the EVPN service. As shown in fig. 4, the MAC route updating method may include:
s401, the third network device sends the first MAC route of the MAC address to the first network device according to the learned MAC address of the target device.
If the destination device is connected to the third network device (either directly or indirectly through another network device), the third network device may learn the MAC address of the destination device and may send the first MAC route of the MAC address to the first network device. Wherein the first MAC route includes the MAC address. The first MAC route may be a MAC route generated by the third network device, or may be a MAC route statically configured in the third network device.
For example, as shown in fig. 5, assume that PE1 and PE2 are used to carry VPLS traffic and PE1 and PE3 are used to carry EVPN traffic. Then, when the PE3 receives the message that the SMAC sent by the destination device is MAC1, the PE3 may learn the MAC address of the destination device: mac 1. Also, PE3 may generate the first MAC route for MAC1 and send the first MAC route to PE 1.
S402, the first network device generates or updates the MAC table entry corresponding to the MAC address according to the first MAC route.
After the first network device receives the first MAC route of the MAC address, if the forwarding plane of the first network device does not store the MAC entry corresponding to the MAC address, the first network device may generate the MAC entry corresponding to the MAC address. If the MAC entry corresponding to the MAC address has been stored in the forwarding plane of the first network device, the first network device may update the MAC entry. The MAC address is recorded in the MAC entry generated or updated by the first network device, and the egress interface points to the third network device. Then, when the first network device needs to send a message to the destination device, the message can be sent to the third network device based on the MAC table entry.
For example, when the first network device deletes the MAC entry corresponding to the MAC address due to aging of the MAC address or accesses a new destination device in the communication system, the MAC entry corresponding to the MAC address may not be stored in the first network device. At this time, the first network device needs to generate a new MAC entry according to the first MAC route.
For example, with continued reference to fig. 5, after PE1 receives the first MAC route sent by PE3, it may generate a MAC entry of MAC1 whose egress interface points to PE 3.
S403, the first network device updates the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device.
After the destination device is migrated from the third network device to the second network device, the second network device may send a packet from the destination device to the first network device. The first network device may further learn the MAC address of the destination device from the second network device again, and may update the MAC entry corresponding to the MAC address. And the output interface of the updated MAC table item points to the second network equipment.
For example, as shown in fig. 5, after the destination device is migrated to PE2, PE2 may send a message with SMAC 1 to PE 1. Based on the message, PE1 may update the egress interface of the MAC entry corresponding to MAC1 to point to PE 2.
S404, the first network device sets the first MAC route in the first network device as an invalid route.
After learning the MAC address of the destination device from the second network device (i.e., the VPLS neighbor of the first network device, or the PW neighbor), the first network device invalidates the first MAC route of the MAC address it received from the third network device (i.e., the EVPN neighbor of the first network device). For example, the first network device may set the first MAC route to an invalid route by setting a flag bit for the first MAC route, or the like. Therefore, the first network device can be prevented from updating the MAC table entry based on the first MAC route in a wrong way.
If the first network device does not set the first MAC route as an invalid route at the control plane after updating the MAC entry, that is, the first MAC route is still valid at the control plane, the forwarding plane of the subsequent first network device also updates the MAC entry based on the first MAC route, that is, the outgoing interface of the MAC entry is updated to point to the third network device again. However, since the destination device has migrated to the second network device, the forwarding plane of the first network device may continuously learn the MAC address of the destination device from the second network device, and update the MAC table entry again based on the learned MAC address. This may cause the forwarding plane of the first network device to repeatedly update the MAC entry, and further cause the traffic not to be forwarded normally.
S405, the first network device sends a second MAC route to the third network device, wherein the second MAC route comprises the MAC address and the indication information.
The first network device may send a second MAC route to the third network device based on learning the MAC address from the second network device, the second MAC route including the MAC address and the indication information. Wherein the indication information is used to instruct the third network device to delete the first MAC route in the third network device.
Optionally, the indication information may be carried in an extended community attribute of the second MAC route. For example, as shown in fig. 5, PE1 may send a second MAC route to PE 3. The second MAC route may include MAC1 and an extended community attribute HubSpk for carrying the indication information. For example, the extended community attribute HubSpk includes a type (type) field, and the value of the type field is 1 to indicate the indication information.
In this embodiment, the first network device may send the second MAC route to the third network device according to the received configuration instruction. That is, the first network device may enable its function of sending the second MAC route based on the configuration instruction, and if the first network device does not receive the configuration instruction, the first network device may not send the second MAC route. The configuration instruction may be configured on the first network device by the operation and maintenance staff in a manner of a command line, or may be issued by other network devices.
S406, the third network device deletes the first MAC route in the third network device according to the indication information.
After receiving the second MAC route sent by the first network device, the third network device may delete the stored first MAC route according to the indication information in the second MAC route. Therefore, after the destination device migrates to the third network device again, the third network device may send the third MAC route of the MAC address to the first network device according to the MAC address of the destination device learned again. Correspondingly, the first network device can update the stored MAC entry corresponding to the MAC address in time according to the third MAC route, so as to ensure that the subsequent first network device can correctly forward the packet to the third network device when receiving the packet addressed to the destination device.
For example, as shown in (1) in fig. 6, after receiving the second MAC route sent by PE1, PE3 may delete the first MAC route if it detects that the value of the type field of the extended community attribute HubSpk in the second MAC route is 1.
It should be understood that, after learning the MAC address of the destination device in S401, the third network device also generates or updates the MAC entry of the MAC address. Correspondingly, in S406, the third network device may further delete the MAC entry corresponding to the MAC address in the third network device according to the indication information.
S407, the third network device sends the first MAC withdrawal route to the first network device.
After receiving the message carrying the indication information, the third network device may further send a first MAC withdrawal route to the first network device. For example, the third network device may send the first MAC reroute to the first network device after deleting its stored first MAC route. The first MAC withdrawal route is used to instruct the first network device to delete the first MAC route in the first network device.
S408, the first network device deletes the first MAC route in the first network device according to the first MAC withdrawn route.
After the first network device receives the first MAC revocation route sent by the third network device, the first network device may delete the first MAC route previously received from the third network device according to the deletion of the first MAC revocation route. The first network device can avoid the residual first MAC route from occupying too much memory space by deleting the invalid first MAC route.
S409, the first network device deletes the second MAC route in the first network device.
In the embodiment of the present application, the second MAC route which is generated by the first network device and carries the indication information is used to notify the third network device to delete the local first MAC route, and is not required to be used for guiding packet forwarding. Thus, the first network device may also delete the second MAC route in the first network device based on the first MAC withdrawn route. The first network device deletes the second MAC route, which can prevent the residual second MAC route from occupying too much memory space.
For example, as shown in (2) and (3) of fig. 6, after PE1 receives the first MAC withdrawal route sent by PE3, it may delete the first MAC route and the second MAC route stored by its control plane.
S410, the first network device sends a second MAC withdrawal route to the third network device.
After receiving the first MAC revocation route sent by the third network device, the first network device may also send a second MAC revocation route to the third network device, where the second MAC revocation route is used to instruct the third network device to delete the second MAC route in the third network device. For example, the first network device may send the second MAC reroute to the third network device after deleting its stored second MAC route.
Wherein the second MAC withdrawal route may also include the indication information. For example, the indication information may be carried in an extended community attribute of the second MAC withdrawal route. The third network device may delete the second MAC route in the third network device based on the indication information.
For example, the extended community attribute HubSpk may be included in the second MAC withdrawal route sent by the PE1 to the PE3, and a value of a type field in the extended community attribute HubSpk is 1, so as to indicate the indication information.
S411, the third network device deletes the second MAC route in the third network device according to the second MAC withdrawn route.
After receiving the second MAC revocation route sent by the first network device, the third network device may delete the second MAC route in the third network device based on the second MAC revocation route. The third network device deletes the second MAC route stored therein, so that the residual second MAC route can be prevented from occupying too much storage space.
For example, as shown in (4) and (5) of fig. 6, after PE3 receives the second MAC revocation route sent by PE2, it may delete its stored second MAC route.
It should be understood that, in the above S406, after deleting the first MAC route according to the indication information in the second MAC route, the third network device may also directly delete the second MAC route. In this manner, the first network device may also perform the deletion or invalidation of the second MAC route by itself at an appropriate time without sending the second MAC reroute to the third network device.
S412, the third network device sends the third MAC route of the MAC address to the first network device according to the learned MAC address of the destination device.
In this embodiment, if the destination device is migrated from the second network device to the third network device again, the third network device may learn the MAC address of the destination device again. Since the MAC route of the destination device is not stored in the third network device, the third network device may send the third MAC route of the MAC address to the first network device again.
S413, the first network device updates the MAC entry corresponding to the MAC address according to the third MAC route.
After the first network device receives the third MAC route sent by the third network device, the MAC entry corresponding to the MAC address may be updated again according to the third MAC route. And the output interface of the updated MAC table item points to the third network equipment. Therefore, when the first network device needs to send a message to the destination device, the message can be correctly forwarded to the third network device.
It should be understood that before S411, that is, before the destination device migrates to the third network device again, if the first network device continuously receives, from the second network device, a message whose source MAC address is the MAC address of the destination device, since the outgoing interface of the MAC entry corresponding to the MAC address in the first network device is directed to the second network device, the first network device may determine that the MAC entry corresponding to the MAC address does not need to be updated. Accordingly, the first network device does not need to generate and send the message carrying the indication information.
In this embodiment of the present application, the first network device may further set the device type of the first network device to be the UPE type according to the received configuration instruction. For example, referring to fig. 1a and 1b, the PE1 of the converged PE device may set its device type to a UPE type based on the received configuration instruction, where the UPE type PE device may also be referred to as a splicing PE device. At this time, the attribute of the PW between the first network device and the second network device is changed to the SPOKEN attribute, and the attribute of the link between the first network device and the third network device is also changed to the SPOKEN attribute. That is, the scenario in which the VPLS service and the EVPN service coexist is changed to the scenario in which the VPLS service and the EVPN service are spliced. For the scenario in which the VPLS service and the EVPN service are spliced, as shown in fig. 7, the method for updating the MAC route provided in the embodiment of the present application may include the following steps:
s701, the third network device sends a first MAC route of the MAC address to the first network device according to the learned MAC address of the target device.
S702, the first network device generates or updates the MAC table entry corresponding to the MAC address according to the first MAC route.
S703, the first network device updates the MAC table entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device.
S704, the first network device sets the first MAC route in the first network device as an invalid route.
The implementation process of S701 to S704 may refer to the related description of S401 to S405 in the embodiment shown in fig. 4, and is not described herein again.
S705, the first network device sends a fourth MAC route to the third network device, where the fourth MAC route includes the MAC address.
In this embodiment of the present application, since the PW between the first network device and the second network device is an attribute of SPOKEN, and the link between the first network device and the third network device is also an attribute of SPOKEN, in a possible implementation manner, the first network device may send a fourth MAC route to the third network device according to the MAC address learned from the second network device to the destination device. The fourth MAC route includes the MAC address and does not include the indication information described above. The fourth MAC route is used to instruct the third network device to update the MAC entry corresponding to the MAC address in the third network device. That is, the fourth MAC route may not include the added indication information, but may notify the MAC address of the destination device to the third network device using a conventional mechanism.
In another possible implementation manner, the fourth MAC route may also include indication information, but different from the indication information in the second MAC route, the indication information in the fourth MAC route is used to instruct the third network device to update the MAC table entry corresponding to the MAC address in the third network device.
For example, the indication information may be used to indicate that the PW between the first network device and the second network device is a SPOKEN attribute, that is, to indicate that the communication system is a scenario spliced by VPLS service and EVPN service. Similar to the specific implementation of the second MAC route, the fourth MAC route may also include an extended community attribute HubSpk for carrying the indication information, where the extended community attribute HubSpk includes a type field. Unlike the aforementioned setting of the value of the type field to 1 in the second MAC route, the value of the type field in the fourth MAC route may be set to 0.
S706, the third network device updates the MAC entry of the MAC address in the third network device according to the fourth MAC route.
After receiving the fourth MAC route sent by the first network device, the third network device may update the MAC entry corresponding to the MAC address of the destination device stored in the third network device based on the fourth MAC route according to a principle of priority from back to back. The egress interface of the updated MAC table entry may be directed to the first network device.
For example, after receiving the fourth MAC route sent by PE1, if it is detected that the value of the type field of the extended community attribute HubSpk in the fourth MAC route is 0, PE3 may update the MAC entry corresponding to MAC1, where the outgoing interface of the updated MAC entry points to PE 1.
And S707, the third network device sends the first MAC withdrawal route to the first network device.
The third network device may delete the first MAC route in the third network device and send the first MAC withdrawal route to the first network device, in addition to updating the MAC entry based on the fourth MAC route. The first MAC withdrawal route is used to instruct the first network device to delete the first MAC route in the first network device.
S708, the first network device deletes the first MAC route in the first network device according to the first MAC withdrawal route.
After the first network device receives the first MAC revocation route sent by the third network device, the first network device may delete the first MAC route previously received from the third network device according to the deletion of the first MAC revocation route.
It should be understood that, the order of steps of the updating method for the MAC route provided in the embodiment of the present application may be appropriately adjusted, and the steps may also be increased or decreased according to the situation. For example, S411 may be executed before S407, and S410 may be deleted according to the situation, that is, the first network device does not need to send the second MAC to withdraw the route, and the third network device may delete the second MAC route directly after deleting the first MAC route. Alternatively, S407 may be performed before S406, and S707 may be performed before S706. Still alternatively, S409 may be performed before S408, that is, the first network device may delete the second MAC route directly after transmitting the second MAC route. Still alternatively, S409 and S411 may be deleted according to the situation, that is, the first network device and the third network device may not delete the second MAC route.
In summary, the embodiment of the present application provides a method for updating a MAC route, where after a first network device updates a MAC entry according to a MAC address of a destination device learned from a second network device, the first network device may send a message including indication information to a third network device, so as to indicate the third network device to delete a first MAC route stored in the third network device. Because the MAC entry before updating is obtained by the first network device according to the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC entry, which can ensure that the third network device can send the MAC route of the MAC address to the first network device again after learning the MAC address of the destination device again. Furthermore, the first network device can be ensured to update the MAC entry corresponding to the MAC address in time based on the MAC route sent again by the third network device, so as to ensure that the subsequent packet sent to the destination device can be forwarded normally.
Fig. 8 is a schematic structural diagram of a network device according to an embodiment of the present application, where the network device may be a PE device or other types of devices. Also, the network device may be used to implement the steps performed by the first network device in the above embodiments. As shown in fig. 8, the network device may include:
an updating module 801, configured to update a MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, where the MAC entry before updating is obtained by the network device according to the first MAC route of the MAC address sent by the third network device. The functional implementation of the updating module 801 may refer to the related description of S301, S403, or S703.
A sending module 802, configured to send a message to the third network device according to the MAC address learned from the second network device, where the message includes the MAC address and indication information, and the indication information is used to instruct the third network device to delete the first MAC route in the third network device. The functional implementation of the sending module 802 may refer to the related description of S302 or S405 above.
Optionally, as shown in fig. 9, the network device may further include:
a receiving module 803, configured to receive the first MAC revocation route sent by the third network device after the sending module 802 sends a message to the third network device according to the MAC address learned from the second network device. The function of the receiving module 803 may be implemented as described above with reference to S407.
A processing module 804, configured to delete the first MAC route in the network device according to the first MAC withdrawal route. The functional implementation of the processing module 804 can refer to the related description of S408 above.
Optionally, the message is a second MAC route.
Optionally, the processing module 804 may be further configured to delete the second MAC route in the network device after the sending module 80 sends a message to the third network device according to the MAC address learned from the second network device. The functional implementation of the processing module 804 may also refer to the related description of S409.
The sending module 802 may be further configured to send, after the receiving module 803 receives the first MAC revocation route sent by the third network device, a second MAC revocation route to the third network device, where the second MAC revocation route is used to instruct the third network device to delete the second MAC route in the third network device. The functional implementation of the sending module 802 may also refer to the related description of S410 above.
Optionally, as shown in fig. 9, the network device further includes:
a setting module 805, configured to set the first MAC route in the network device as an invalid route after the updating module 801 updates the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device. The functional implementation of the setting module 805 may also refer to the related description of S404 above.
Optionally, the receiving module 803 may be further configured to receive a third MAC route of the MAC address sent by the third network device after the sending module 802 sends a message to the third network device according to the MAC address learned from the second network device. The functional implementation of the receiving module 803 may also refer to the related description of S412 above.
The updating module 801 may be further configured to update the MAC entry corresponding to the MAC address according to the third MAC route. The functional implementation of the update module 801 may also refer to the related description of S413 above.
Optionally, the network device and the second network device are configured to carry VPLS service, and the network device and the third network device are configured to carry EVPN service.
Optionally, the sending module 802 may be configured to: and sending the message to the third network device according to the HUB attribute of the PW between the network device and the second network device.
Optionally, the network device, the second network device, and the third network device are all PE devices.
In summary, the embodiment of the present application provides a network device, where after a MAC entry is updated according to a MAC address of a destination device learned from a second network device, the network device may send a message including indication information to a third network device, so as to instruct the third network device to delete a first MAC route stored by the third network device. Because the MAC entry before updating is obtained by the network device according to the first MAC route, the network device instructs the third network device to delete the first MAC route after updating the MAC entry, which can ensure that the third network device can send the MAC route of the MAC address to the network device again after learning the MAC address of the destination device again. Further, the network device can be ensured to update the MAC entry corresponding to the MAC address in time based on the MAC route retransmitted by the third network device, so as to ensure that the subsequent packet sent to the destination device can be forwarded normally.
Fig. 10 is a schematic structural diagram of another network device provided in this embodiment of the present application, where the network device may be a PE device, and may also be another type of device. Also, the network device may be configured to implement the steps performed by the third network device in the above-described embodiments. As shown in fig. 10, the network device may include:
a receiving module 1001, configured to receive a message sent by a first network device, where the message includes a MAC address of a destination device and indication information.
Wherein the message is sent by the first network device according to the MAC address learned from the second network device after updating the MAC table entry corresponding to the MAC address according to the MAC address learned from the second network device. The MAC entry before updating is obtained by the first network device according to the first MAC route of the MAC address sent by the network device. The functional implementation of the receiving module 1001 may refer to the related description of S302 or S405.
A processing module 1002, configured to delete the first MAC route in the network device according to the indication information. The functional implementation of the processing module 1002 can refer to the related description of S303 or S406 above.
Optionally, as shown in fig. 11, the network device may further include:
a sending module 1003, configured to send, to the first network device, a first MAC revocation route after the processing module 1002 deletes the first MAC route in the network device according to the indication information, where the first MAC revocation route is used to instruct the first network device to delete the first MAC route in the first network device. The functional implementation of the sending module 1003 may refer to the related description of S407 above.
Optionally, the message is a second MAC route.
Optionally, the processing module 1002 may be further configured to delete the second MAC route in the network device after deleting the first MAC route in the network device according to the indication information.
Optionally, the receiving module 1001 may be further configured to receive a second MAC revocation route sent by the first network device after the sending module 1003 sends the first MAC revocation route to the first network device.
The processing module 1002 may be configured to delete the second MAC route in the network device according to the second MAC withdrawal route. The functional implementation of the processing module 1002 can also refer to the related description of S411 above.
Optionally, the sending module 1003 may be further configured to send, after the processing module 1002 deletes the first MAC route in the network device according to the indication information, a third MAC route of the MAC address to the first network device according to the learned MAC address of the destination device. The third MAC route is used to instruct the first network device to update the MAC entry corresponding to the MAC address. The functional implementation of the sending module 1003 may also refer to the related description of S412 above.
Optionally, the first network device and the second network device are used for carrying VPLS service, and the first network device and the network device are used for carrying EVPN service. The message is sent by the first network device for the HUB attribute according to the PW between the first network device and the second network device.
Optionally, the first network device, the second network device, and the network device are all PE devices.
In summary, the embodiment of the present application provides a network device, where after receiving a message including indication information sent by a first network device, the network device may delete a first MAC route stored in the network device according to the indication information. Since the message is sent by the first network device after the MAC entry is updated according to the MAC address of the destination device learned from the second network device, and the MAC entry before updating is obtained by the first network device according to the first MAC route, the network device deletes the first MAC route based on the indication information, and can ensure that the MAC route of the MAC address can be sent to the first network device again after the MAC address of the destination device is learned again. Further, the first network device can be ensured to update the MAC entry corresponding to the MAC address in time based on the MAC route retransmitted by the network device, so as to ensure that the subsequent packet sent to the destination device can be forwarded normally.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of each network device and each module described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be understood that the network device provided in the embodiments of the present application may also be implemented by an application-specific integrated circuit (ASIC), or a Programmable Logic Device (PLD), which may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The network access method provided by the foregoing method embodiment may also be implemented by software, and when the MAC route updating method provided by the foregoing method embodiment is implemented by software, each module in the network device provided in this embodiment may also be a software module.
Fig. 12 is a schematic structural diagram of another network device provided in an embodiment of the present application, where the network device 1200 may be the first network device or the third network device in any of the embodiments. The network device 1200 may be a PE device, and the network device 1200 may be applied to a system in which VPLS service and EVPN service coexist. As shown in fig. 12, the network device 1200 includes: main control board 1210, interface board 1230, and interface board 1240. A plurality of interface boards may include a switch network board (not shown) for performing data exchange between the interface boards (the interface boards are also called line cards or service boards).
The main control board 1210 is used to complete functions such as system management, device maintenance, and protocol processing. Interface boards 1230 and 1240 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and to implement forwarding of messages. The main control board 1210 mainly has 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1210, the interface board 1230 and the interface board 1240 are connected to the system backplane through a system bus to realize intercommunication. The interface board 1230 includes one or more processors 1231 thereon. The processor 1231 is configured to control and manage the interface board, communicate with the central processor 1212 on the main control board 1210, and forward a packet. The memory 1232 on the interface board 1230 is configured to store a forwarding table entry, and the processor 1231 performs forwarding on the packet by looking up the forwarding table entry stored in the memory 1232.
The interface board 1230 includes one or more network interfaces 1233, which are configured to receive the packet sent by the previous-hop node and send the processed packet to the next-hop node according to the instruction of the processor 1231. The specific implementation process is not described in detail herein. The detailed functions of the processor 1231 are not repeated here again.
It can be understood that, as shown in fig. 12, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and operations on the interface board 1240 are substantially similar to those of the interface board 1230 under this mechanism, and are not described again for brevity. Furthermore, it is understood that the processors 1231 and/or 1241 in the interface board 1230 in fig. 12 may be dedicated hardware or chips, such as network processors or application specific integrated circuits, to implement the above functions, that is, to implement what is called forwarding plane by using dedicated hardware or chip processing. In other embodiments, the processor 1231 and/or 1241 may also use a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, the more interface boards are provided the stronger the data processing capacity of the device. Under the condition of a plurality of interface boards, the plurality of interface boards can communicate through one or a plurality of exchange network boards, and when a plurality of interface boards exist, the redundant backup of load sharing can be realized together. Under the centralized forwarding architecture, the device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the device comprises a plurality of interface boards, and can realize data exchange among the plurality of interface boards through the exchange network board, thereby providing large-capacity data exchange and processing capacity. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
In particular embodiments, Memory 1232 may be a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1232 may be self-contained and coupled to the processor 1231 via a communication bus. Memory 1232 may also be integrated with processor 1231.
The memory 1232 is used for storing program codes and is controlled by the processor 1231 to execute the MAC route updating method provided in the above embodiments. The processor 1231 is configured to execute program code stored in the memory 1232. One or more software modules may be included in the program code. The one or more software modules may be the functional modules provided in the embodiments shown in fig. 8 or 9 described above, or may be the functional modules provided in the embodiments shown in fig. 10 or 11.
In an embodiment, the network interface 1233 may be any device using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
Fig. 13 is a schematic structural diagram of another network device provided in an embodiment of the present application, where the network device may be the first network device or the third network device in the foregoing embodiments. Referring to fig. 13, the network device may include: a processor 1301, a memory 1302, a transceiver 1303, and a bus 1304. The bus 1304 is used to connect the processor 1301, the memory 1302, and the transceiver 1303. Communication connections with other devices may be made through a transceiver 1303 (which may be wired or wireless). The memory 1302 stores therein a computer program for realizing various application functions.
It is to be understood that in the embodiments of the present application, the processor 1301 may be a CPU, and the processor 1301 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), GPUs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or any conventional processor or the like.
The memory 1302 may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a ROM, a Programmable Read Only Memory (PROM), an Erasable PROM (EPROM), an EEPROM, or a flash memory. Volatile memory can be RAM, which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct bus RAM (DR RAM).
The bus 1304 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. But for clarity of illustration the various busses are labeled in the drawings as busses 1304.
When the network device is a first network device, the processor 1301 is configured to execute the computer program stored in the memory 1302, and the processor 1301 implements the steps performed by the first network device in the above-described method embodiments by executing the computer program 13021.
When the network device is a third network device, the processor 1301 is configured to execute the computer program stored in the memory 1302, and the processor 1301 implements the steps performed by the third network device in the above-described method embodiments by executing the computer program 13021.
The present application also provides a computer-readable storage medium, in which instructions are stored, where the instructions are executed by a processor to implement the steps executed by the first network device or the third network device in the above method embodiments.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps performed by the first network device or the third network device in the above method embodiments.
An embodiment of the present application further provides a communication system, which may include a first network device and a third network device, where the first network device may be a device shown in fig. 8, 9, 12, or 13, and the third network device may be a device shown in any one of fig. 10 to 13.
Optionally, the communication system may further include a second network device. The first network device and the second network device are used for carrying VPLS service, and the first network device and the third network device are used for carrying EVPN service. And, the communication system may be a system in which VPLS traffic and EVPN traffic coexist.
Optionally, the first network device, the second network device, and the third network device may all be PE devices.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be understood that reference herein to "and/or" means that there may be three relationships, for example, a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above description is only an alternative embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (23)

1. A method for updating a MAC route, the method comprising:
the method comprises the steps that first network equipment updates an MAC table item corresponding to an MAC address according to a Media Access Control (MAC) address of target equipment learned from second network equipment, wherein the MAC table item before updating is obtained by the first network equipment according to a first MAC route of the MAC address sent by third network equipment;
the first network device sends a message to the third network device according to the MAC address learned from the second network device, wherein the message comprises the MAC address and indication information, and the indication information is used for indicating the third network device to delete the first MAC route in the third network device.
2. The method of claim 1, wherein after the first network device sends a message to the third network device based on learning the MAC address from the second network device, the method further comprises:
the first network equipment receives a first MAC revocation route sent by the third network equipment;
and the first network equipment deletes the first MAC route in the first network equipment according to the first MAC withdrawn route.
3. The method of claim 1 or 2, wherein the message is a second MAC route.
4. The method of claim 3, wherein after the first network device sends a message to the third network device based on learning the MAC address from the second network device, the method further comprises:
the first network device deletes the second MAC route in the first network device.
5. The method according to claim 3 or 4, wherein after the first network device receives the first MAC withdrawn route sent by the third network device, the method further comprises:
the first network device sends a second MAC withdrawal route to the third network device, where the second MAC withdrawal route is used to instruct the third network device to delete the second MAC route in the third network device.
6. The method according to any one of claims 1 to 5, wherein after the first network device updates the MAC entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, the method further comprises:
the first network device sets the first MAC route in the first network device to an invalid route.
7. The method of any of claims 1 to 6, wherein after the first network device sends a message to the third network device based on learning the MAC address from the second network device, the method further comprises:
the first network equipment receives a third MAC route of the MAC address sent by the third network equipment;
and the first network equipment updates the MAC table entry corresponding to the MAC address according to the third MAC route.
8. The method according to any of claims 1 to 7, wherein the first network device and the second network device are configured to carry virtual private local area network, VPLS, traffic, and wherein the first network device and the third network device are configured to carry Ethernet virtual private network, EVPN, traffic.
9. The method of claim 8, wherein sending, by the first network device, a message to the third network device comprises:
and the first network equipment sends the message to the third network equipment according to the attribute of taking the pseudo wire PW between the first network equipment and the second network equipment as a center HUB.
10. The method of any of claims 1 to 9, wherein the first network device, the second network device, and the third network device are operator edge (PE) devices.
11. A method for updating a MAC route, the method comprising:
the method comprises the steps that a third network device receives a message sent by a first network device, wherein the message comprises a Media Access Control (MAC) address of a destination device and indication information, the message is sent by the first network device according to a MAC table item learned from a second network device after the MAC table item corresponding to the MAC address is updated according to the MAC address learned from the second network device, and the MAC table item before updating is obtained by the first network device according to a first MAC route of the MAC address sent by the third network device;
and the third network equipment deletes the first MAC route in the third network equipment according to the indication information.
12. The method of claim 11, wherein after the third network device deletes the first MAC route in the third network device according to the indication information, the method further comprises:
the third network device sends a first MAC withdrawn route to the first network device, wherein the first MAC withdrawn route is used for indicating the first network device to delete the first MAC route in the first network device.
13. The method of claim 11 or 12, wherein the message is a second MAC route.
14. The method of claim 13, wherein after the third network device deletes the first MAC route in the third network device according to the indication information, the method further comprises:
the third network device deletes the second MAC route in the third network device.
15. The method of claim 14, wherein after the third network device sends the first MAC reroute to the first network device, the method further comprises:
the third network equipment receives a second MAC revocation route sent by the first network equipment;
the third network device deleting the second MAC route in the third network device comprises: and the third network equipment deletes the second MAC route in the third network equipment according to the second MAC withdrawn route.
16. The method according to any of claims 11 to 15, wherein after the third network device deletes the first MAC route in the third network device according to the indication information, the method further comprises:
and the third network device sends a third MAC route of the MAC address to the first network device according to the learned MAC address of the destination device, wherein the third MAC route is used for indicating the first network device to update the MAC table entry corresponding to the MAC address.
17. The method of any of claims 11 to 16, wherein the first network device and the second network device are configured to carry virtual private local area network, VPLS, traffic, and wherein the first network device and the third network device are configured to carry ethernet virtual private network, EVPN, traffic.
18. The method of claim 17, wherein the message is sent by the first network device according to a pseudowire PW as a HUB attribute between the first network device and the second network device.
19. The method of any of claims 11 to 18, wherein the first network device, the second network device, and the third network device are operator edge PE devices.
20. A network device, comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory to cause the network device to perform the method of any of claims 1 to 10.
21. A network device, comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory to cause the network device to perform the method of any of claims 11 to 19.
22. A computer-readable storage medium having stored therein instructions which, when executed by a processor, carry out a method according to any one of claims 1 to 10 or carry out a method according to any one of claims 11 to 19.
23. A communication system, the system comprising: a network device as claimed in claim 20, and a network device as claimed in claim 21.
CN202010915906.1A 2020-09-03 2020-09-03 MAC route updating method, equipment and system Pending CN114143262A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010915906.1A CN114143262A (en) 2020-09-03 2020-09-03 MAC route updating method, equipment and system
PCT/CN2021/114078 WO2022048469A1 (en) 2020-09-03 2021-08-23 Method, device and system for updating mac routing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010915906.1A CN114143262A (en) 2020-09-03 2020-09-03 MAC route updating method, equipment and system

Publications (1)

Publication Number Publication Date
CN114143262A true CN114143262A (en) 2022-03-04

Family

ID=80438152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010915906.1A Pending CN114143262A (en) 2020-09-03 2020-09-03 MAC route updating method, equipment and system

Country Status (2)

Country Link
CN (1) CN114143262A (en)
WO (1) WO2022048469A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319545A (en) * 2022-11-16 2023-06-23 天翼云科技有限公司 Route aggregation processing method and device based on EVPN network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9985837B2 (en) * 2015-07-23 2018-05-29 Cisco Technology, Inc. Refresh of the binding tables between data-link-layer and network-layer addresses on mobility in a data center environment
US20170373973A1 (en) * 2016-06-27 2017-12-28 Juniper Networks, Inc. Signaling ip address mobility in ethernet virtual private networks
CN108418740B (en) * 2018-02-28 2020-09-08 新华三技术有限公司 Message processing method and device
CN111277482B (en) * 2020-01-13 2022-01-18 新华三大数据技术有限公司 Message processing method and device

Also Published As

Publication number Publication date
WO2022048469A1 (en) 2022-03-10

Similar Documents

Publication Publication Date Title
CN111092801B (en) Data transmission method and device
EP3451597B1 (en) Packet forwarding
CN108574634B (en) Apparatus, system, and method for providing node protection across label switched paths sharing labels
CN111263373B (en) Data processing method, controller and forwarding equipment
US9973352B2 (en) Information sending method, apparatus, and communications system
CN109995639B (en) Data transmission method, device, switch and storage medium
EP2573988A1 (en) Method, apparatus, and system for forwarding packet in multi-topology network
US11750496B2 (en) Method for multi-cloud interconnection and device
US20220124024A1 (en) Establishment of method and apparatus for implementing entry backup
EP4239973A1 (en) Packet sending method, device, and system
CN108833272B (en) Route management method and device
CN113746717A (en) Network equipment communication method and network equipment communication device
US20240097940A1 (en) Packet Transmission Method, Device, and System
CN111556110A (en) Automatic adaptation method for different physical service networks of private cloud system
EP4020904B1 (en) Packet transmission method, device, and system
CN114143262A (en) MAC route updating method, equipment and system
CN114615179A (en) Message transmission method, device and system
CN110830598A (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
CN111435948B (en) Method for transmitting message in network and network equipment
CN115242699A (en) Message transmission method, slice generation method, device and system
CN114531319A (en) Message sending method, equipment and system
CN113973072A (en) Message sending method, equipment and system
CN114070778A (en) Route introduction method, equipment and system
CN114697251A (en) Routing processing method, related device and network system
CN114760248A (en) Message transmission method, device and system

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