MAC routing update method, device and system
In a network where EVPN and VPLS coexist, the first network device sends an instruction to the third network device to delete the old MAC route, thereby solving the problem of untimely MAC table updates after device migration and achieving normal message forwarding and network stability.
Patent Information
- Application Number
- CN202010915906.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2040-09-03
AI Technical Summary
In a network where EVPN and VPLS coexist, after device migration, the converged PE device cannot promptly update the MAC table entries corresponding to MAC addresses, resulting in incorrect packet forwarding.
After learning the MAC address of the destination device, the first network device sends a message including instruction information to the third network device to instruct the third network device to delete the first MAC route stored therein and send a MAC withdrawal route when necessary to ensure timely update of the MAC table entry.
This ensures that the converged PE device can update the MAC table entries corresponding to the MAC addresses in a timely manner, ensuring that the messages can be forwarded to the destination device normally, and improving the compatibility and stability of the network.
Smart Images

Figure CN114143262B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a method, device, and system for updating media access control (MAC) routing. Background Art
[0002] During the evolution of virtual private LAN service (VPLS) networks to Ethernet virtual private networks (EVPN) networks, a networking state in which EVPN and VPLS coexist will appear. In a network where EVPN and VPLS coexist, a provider edge (PE) device that is deployed with both a VPLS instance and an EVPN instance can also be referred to as a converged PE device. The converged PE device can carry VPLS services with a first PE device that is deployed with a VPLS instance, and the converged PE device can carry EVPN services with a second PE that is deployed with an EVPN instance. In a scenario where EVPN and VPLS coexist, the traffic of the VPLS service is not interoperable with the traffic of the EVPN service.
[0003] In related technologies, after learning the MAC address of a device to which it is connected, the second PE device can send a MAC route for the MAC address to the converged PE device. The device can, for example, be a user host or a network device that serves as the destination device for receiving traffic. The converged PE device can generate or update a MAC table entry for the MAC address based on the MAC route. If the device migrates from the second PE device to the first PE device, the converged PE device can learn the MAC address of the device from the first PE device again and update the MAC table entry for the MAC address. However, at this time, the converged PE device will not send the MAC route for its newly learned MAC address to the second PE device. Accordingly, the second PE device cannot perceive the migration of the device.
[0004] If the device migrates again from the first PE to a second PE, the second PE, unaware of the previous migration, will not send the MAC route for the MAC address to the converged PE. Consequently, the converged PE will be unable to promptly update the MAC table entry corresponding to the MAC address. Consequently, the converged PE will be unable to correctly forward packets destined for the device to the second PE. Summary of the Invention
[0005] The present application provides a MAC routing update method, device and system, which can solve the network operation problem caused by the inability of network devices to timely update the MAC table entries corresponding to the MAC address of the destination device after the destination device is migrated in the related art.
[0006] In a first aspect, a method for updating a MAC route is provided, the method comprising: a first network device updating a MAC table entry corresponding to a MAC address of a destination device learned from a second network device, wherein the MAC table entry before the update is obtained by the first network device based on a first MAC route of the MAC address sent by a third network device; thereafter, the first network device sending a message to the third network device based on the MAC address learned from the second network device, the message including the MAC address and indication information, the indication information being used to instruct the third network device to delete the first MAC route in the third network device.
[0007] After the third network device deletes the first MAC route, if it learns the MAC address of the destination device again, it can send the MAC route for the MAC address to the first network device again. This ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the MAC route sent again by the third network device, thereby ensuring that packets sent to the destination device can be forwarded normally.
[0008] It should be understood that "deleting" may mean directly deleting the MAC route, or temporarily making the MAC route unavailable (i.e., invalid) without actually deleting the MAC route. For example, the MAC route may be made unavailable by setting a flag bit on the MAC route.
[0009] Optionally, after the first network device sends a message to the third network device based on the MAC address learned from the second network device, the method may further include: the first network device receives a first MAC withdrawal route sent by the third network device, and the first network device deletes the first MAC route in the first network device based on the first MAC withdrawal route.
[0010] The first network device deletes the first MAC route in the first network device, which can prevent the remaining first MAC route from occupying too much memory space.
[0011] 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 another form, such as a message. When the message is in the form of a second MAC route, the third network device may directly identify and process the message, thereby facilitating the maintenance of normal network operation and improving network compatibility.
[0012] Optionally, after the first network device sends a message to the third network device based on the MAC address learned from the second network device, the method may further include: deleting, by the first network device, the second MAC route stored in the first network device. The first network device deletes the stored second MAC route to prevent the second MAC route from remaining and occupying excessive memory space.
[0013] 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 sending a second MAC withdrawal route to the third network device, the second MAC withdrawal route being used to instruct the third network device to delete the second MAC route in the third network device. This prevents the remaining second MAC route from occupying memory space on the third network device.
[0014] 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.
[0015] It should be understood that after deleting the first MAC route according to the instruction information in the second MAC route, the third network device may also directly delete the second MAC route. Accordingly, the first network device may not need to send the second MAC withdrawal route.
[0016] Optionally, after the first network device updates the MAC table entry corresponding to the MAC address of the destination device learned from the second network device, the method may further include: the first network device setting the first MAC route in the first network device as an invalid route.
[0017] Because the first network device has already updated the MAC table entry corresponding to the destination device's MAC address based on the MAC address learned from the second network device, it can invalidate the first MAC route received from the third network device, for example, by setting a route invalid flag. This prevents the first network device from mistakenly updating the MAC table entry corresponding to the MAC address based on the first MAC route.
[0018] Optionally, after the first network device sends a message to the third network device based on the MAC address learned from the second network device, the method may also include: the first network device receives a third MAC route of the MAC address sent by the third network device; and the first network device updates the MAC table entry corresponding to the MAC address based on the third MAC route.
[0019] Since both the first network device and the third network device have deleted the first MAC route after the first network device updates the MAC table entry corresponding to the destination device's MAC address based on the MAC address learned from the second network device, the third network device can again send the third MAC route for the MAC address to the first network device when the third network device learns the destination device's MAC address again. This ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the third MAC route.
[0020] Optionally, the first network device and the second network device may be used to carry VPLS services, and the first network device and the third network device may be used to carry EVPN services.
[0021] Optionally, the process of the first network device sending the message to the third network device may include: the first network device sending the message to the third network device according to a HUB attribute of a pseudo wire (PW) between the first network device and the second network device.
[0022] If the PW between the first and second network devices has the HUB attribute, the communication system is a network where VPLS services and EVPN services coexist. If the PW between the first and second network devices has the SPOKEN attribute, the communication system is a network where VPLS services and EVPN services are spliced together. Generally, traffic cannot be communicated between the second and third network devices in a network where VPLS services and EVPN services coexist, but traffic can be communicated between the second and third network devices in a network where VPLS services and EVPN services are spliced together.
[0023] In the scenario where the VPLS service is spliced with the EVPN service, in a first possible implementation, since the services between VPLS and EVPN are interoperable, the first network device can, based on a traditional MAC route learning mechanism, send a MAC route with its outbound interface pointing to the second network device to the third network device, so that the third network device updates its local MAC route based on the MAC route with its outbound interface pointing to the second network device. Alternatively, in a second possible implementation, the first network device can also send a fourth MAC route to the third network device based on the MAC address learned from the second network device. The fourth MAC route includes the MAC address and indication information. The indication information can be used to indicate that the PW between the first and second network devices has the SPOKEN attribute, i.e., indicates that the communication system is a scenario where VPLS services and EVPN services are spliced. The fourth MAC route can be used to instruct the third network device to update the MAC table entry corresponding to the MAC address.
[0024] Among them, the indication information can be carried in the extended group attribute of the fourth MAC route. That is, in the second possible implementation method, after the first network device receives the MAC route sent by the second network device, if the PW between the first network device and the second network device is a HUB attribute, the first network device sends a MAC route carrying the first extended group attribute to the third network device. If the PW between the first network device and the second network device is a SPOKEN attribute, the first network device sends a MAC route carrying the second extended group attribute to the third network device. The values of the indication fields in the first extended group attribute and the second extended group attribute are different. For example, the indication field is a 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 can perform operations in different scenarios according to different values of the indication field.
[0025] Optionally, the first network device, the second network device, and the third network device may all be PE devices, which may be switches, routers, or other types of devices.
[0026] In a second aspect, a method for updating a MAC route is provided, the method comprising: a third network device receiving a message sent by a first network device, the message comprising a MAC address of a destination device and indication information, the message being sent by the first network device based on the MAC address learned from the second network device after the MAC table entry corresponding to the MAC address is updated based on the MAC address learned from the second network device, wherein the MAC table entry before the update is obtained by the first network device based on the first MAC route of the MAC address sent by the third network device; thereafter, the third network device can delete the first MAC route in the third network device based on the indication information.
[0027] After the third network device deletes the first MAC route, if it learns the MAC address of the destination device again, it can resend the MAC route for the MAC address to the first network device. This ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the MAC route resent by the third network device, thereby ensuring that packets sent to the destination device can be forwarded normally. The first MAC route can be generated by the third network device or statically configured in the third network device.
[0028] Optionally, after the third network device deletes the first MAC route in the third network device according to the instruction information, the method further includes:
[0029] 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.
[0030] Optionally, the message is a second MAC route.
[0031] Optionally, after the third network device deletes the first MAC route in the third network device according to the instruction information, the method may further include: the third network device deleting the second MAC route in the third network device.
[0032] 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 device receives the second MAC withdrawal route sent by the first network device; accordingly, the third network device may delete the second MAC route in the third network device according to the second MAC withdrawal route.
[0033] Optionally, after the third network device deletes the first MAC route in the third network device according to the indication information, the method may also include: the third network device sends a third MAC route of the MAC address to the first network device based on the learned MAC address of the destination device, and the third MAC route is used to instruct the first network device to update the MAC table entry corresponding to the MAC address.
[0034] Optionally, the first network device and the second network device are used to carry VPLS services, and the first network device and the third network device are used to carry EVPN services.
[0035] Optionally, the message is sent by the first network device according to a PW between the first network device and the second network device being a HUB attribute.
[0036] Optionally, the first network device, the second network device and the third network device are all PE devices.
[0037] In a third aspect, a network device is provided. The network device may be the first network device described in the above aspect. The network device may include:
[0038] an updating module, configured to update a MAC table entry corresponding to the MAC address according to the MAC address of the destination device learned from the second network device, wherein the MAC table entry before the update is obtained by the network device according to the first MAC route of the MAC address sent by the third network device;
[0039] The sending module is used 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, where the indication information is used to instruct the third network device to delete the first MAC route in the third network device.
[0040] Optionally, the network device may further include:
[0041] a receiving module, configured to receive a first MAC withdrawal route 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;
[0042] The processing module is configured to delete the first MAC route in the network device according to the first MAC cancellation route.
[0043] 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.
[0044] 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 based on the MAC address learned from the second network device;
[0045] Optionally, the sending module can also be used to send a second MAC withdrawal route to the third network device after the receiving module receives the first MAC withdrawal route sent by the third network device, and the second MAC withdrawal route is used to instruct the third network device to delete the second MAC route in the third network device.
[0046] Optionally, the network device may further include:
[0047] The setting module is configured to set the first MAC route in the network device to 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 device learned from the second network device.
[0048] Optionally, the receiving module can also be used 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 based on the MAC address learned from the second network device; accordingly, the updating module can also be used to update the MAC table entry corresponding to the MAC address according to the third MAC route.
[0049] Optionally, the network device and the second network device may be used to carry VPLS services, and the network device and the third network device may be used to carry EVPN services.
[0050] Optionally, the sending module may be configured to: send the message to the third network device according to the PW between the network device and the second network device being a HUB attribute.
[0051] Optionally, the network device, the second network device, and the third network device may all be PE devices, which may be switches, routers, or other types of devices.
[0052] In a fourth aspect, a network device is provided. The network device may be the third network device described in the above aspect. The network device may include:
[0053] a receiving module, configured to receive a message sent by a first network device, the message including a MAC address of a destination device and indication information, the message being sent by the first network device based on the MAC address learned from the second network device after updating a MAC table entry corresponding to the MAC address based on the MAC address learned from the second network device, wherein the MAC table entry before the update is obtained by the first network device based on a first MAC route of the MAC address sent by the network device;
[0054] The processing module is configured to delete the first MAC route in the network device according to the indication information.
[0055] Optionally, the network device may further include:
[0056] The sending module is configured to send a first MAC withdrawal route to the first network device after the processing module deletes the first MAC route in the network device according to the instruction information, 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.
[0057] Optionally, the message is a second MAC route.
[0058] 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.
[0059] Optionally, the receiving module may be further configured to receive a second MAC withdrawal route sent by the first network device after the sending module sends the first MAC withdrawal route to the first network device;
[0060] The processing module can be used to cancel the route according to the second MAC and delete the second MAC route in the network device.
[0061] Optionally, the sending module can also be used to send a third MAC route of the MAC address to the first network device based on 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. The third MAC route is used to instruct the first network device to update the MAC table entry corresponding to the MAC address.
[0062] Optionally, the first network device and the second network device are used to carry VPLS services, and the first network device and the network device are used to carry EVPN services.
[0063] Optionally, the message is sent by the first network device according to a PW between the first network device and the second network device being a HUB attribute.
[0064] Optionally, the first network device, the second network device and the network device are all PE devices.
[0065] In a fifth aspect, a network device is provided, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the network device performs the MAC routing update method provided in the first aspect above.
[0066] In a sixth aspect, a network device is provided, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the network device executes the MAC routing update method provided in the second aspect above.
[0067] In a seventh aspect, a computer-readable storage medium is provided, which stores instructions. When the instructions are executed by a processor, the method for updating the MAC routing provided in the first aspect is implemented, or the method for updating the MAC routing provided in the second aspect is implemented.
[0068] In an eighth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer executes the MAC routing update method provided in the first aspect, or implements the MAC routing update method provided in the second aspect.
[0069] In a ninth aspect, a communication system is provided, which includes: a network device as provided in the third or fifth aspect above, and a network device as provided in the fourth or sixth aspect above.
[0070] In summary, the present application provides a method, device, and system for updating MAC routes. After a first network device updates a MAC table entry based on the MAC address of a destination device learned from a second network device, it can send a message including instruction information to a third network device to instruct the third network device to delete the first MAC route stored therein. Since the MAC table entry before the update is obtained by the first network device based on the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC table entry. This ensures that after the third network device learns the MAC address of the destination device again, it can send the MAC route of the MAC address to the first network device again. Furthermore, it ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the MAC route sent again by the third network device, so as to ensure that the message sent to the destination device can be forwarded normally. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1a This is a structural diagram of a scenario in which VPLS services and EVPN services coexist, as provided in an embodiment of the present application;
[0072] Figure 1b This is a structural diagram of a VPLS service and EVPN service splicing scenario provided by an embodiment of the present application;
[0073] Figure 2 A schematic diagram of a MAC routing update process in the related art;
[0074] Figure 3 This is a flow chart of a MAC routing update method provided by an embodiment of the present application;
[0075] Figure 4 This is a flowchart of another MAC routing update method provided by an embodiment of the present application;
[0076] Figure 5 This is a schematic diagram of a MAC routing update process provided by an embodiment of the present application;
[0077] Figure 6 This is a schematic diagram of another MAC routing update process provided by an embodiment of the present application;
[0078] Figure 7 This is a flowchart of another MAC routing update method provided in an embodiment of the present application;
[0079] Figure 8 This is a schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0080] Figure 9 This is a schematic diagram of the structure of another network device provided in an embodiment of the present application;
[0081] Figure 10 This is a structural diagram of another network device provided in an embodiment of the present application;
[0082] Figure 11 This is a structural diagram of another network device provided in an embodiment of the present application;
[0083] Figure 12 This is a structural diagram of another network device provided in an embodiment of the present application;
[0084] Figure 13 This is a structural diagram of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0085] The following describes in detail the MAC routing update method, device, and system provided by the embodiments of the present application in conjunction with the accompanying drawings.
[0086] It should be understood that the term "at least one" mentioned herein means one or more, and "plurality" means two or more. In the description of this application, in order to facilitate a clear description of the technical solutions of the embodiments of this application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily mean different. The terms "system" and "network" are used interchangeably herein.
[0087] Before explaining the embodiments of the present application, the application scenarios of the embodiments of the present application are first explained.
[0088] EVPN is a Layer 2 network interconnection technology with advantages such as simple deployment and strong scalability. Based on the Border Gateway Protocol (BGP), EVPN uses the MAC address and other information of the destination device to be advertised. The generated MAC table entries are used for Layer 2 packet forwarding, achieving Layer 2 network interconnection. Furthermore, EVPN defines a common control plane to separate the data and control planes. The control plane is responsible for distributing routing information, while the data plane is responsible for packet forwarding. This clear division of labor facilitates management.
[0089] When evolving from a Layer 2 virtual private network (L2VPN) network using VPLS technology to an EVPN network, it's difficult to quickly switch all VPLS services to EVPN. Therefore, during this gradual migration, VPLS and EVPN services may coexist.
[0090] Networks where VPLS and EVPN services coexist typically fall into two scenarios: coexistence with and without coexistence. Coexistence with and without coexistence means that two PE devices carry both EVPN and VPLS services. In this scenario, EVPN services are available, but VPLS services are not. Coexistence without coexistence means that a converged PE device is deployed with both EVPN and VPLS instances and can establish different types of services with different neighboring PE devices. In this scenario, both EVPN and VPLS services are available.
[0091] For example, Figure 1a This is a structural diagram of a scenario in which VPLS services and EVPN services coexist but do not share a common path, as provided in an embodiment of the present application. Figure 1a As shown, PE1 is a converged PE device with both an EVPN instance and a VPLS instance deployed on it. PE2 is also deployed with a VPLS instance and is connected to PE1 via a PW. The VPLS service is carried between PE1 and PE2. PE3 is also deployed with an EVPN instance and is used to carry EVPN services between it and PE1.
[0092] In a VPLS network, full PW connectivity and split horizon are generally used to avoid loops. Split horizon means that if a PE device receives a packet from another PE device through a PW, it will no longer forward the packet to other PWs associated with the same broadcast domain. This broadcast domain can be a bridge domain (BD) or a virtual switch instance (VSI) broadcast domain. If the PW between two PEs has the HUB attribute, the split horizon principle must be followed. If the PW between two PEs has the SPOKEN attribute, the split horizon principle does not need to be followed.
[0093] In scenarios where VPLS services and EVPN services coexist but do not share the same path, EVPN service traffic and VPLS service traffic cannot communicate with each other. Figure 1a , the PW between PE1 and PE2 has hub attributes, and the link between PE1 and PE3 also has hub attributes. Alternatively, it can be understood as follows: the VPLS services on PE1 and PE2 all have hub attributes, and the EVPN services on PE1 and PE3 all have hub attributes. In this case, similar to the split horizon principle, after PE1 receives traffic 1 from PE2, it will not forward it to PE3. Similarly, after PE1 receives traffic 2 from PE3, it will not forward it to PE2.
[0094] Figure 1b This is a structural diagram of a scenario where a VPLS service and an EVPN service are spliced together, as provided in an embodiment of the present application. Figure 1b As shown, in a scenario where VPLS services and EVPN services are spliced together, PE1's device type can be set to, for example, a user-facing PE (UPE) near the user side. In this scenario, EVPN and VPLS service traffic can interoperate. The PW between PE1 and PE2 uses the SPOKEN attribute, and the link between PE1 and PE3 uses the SPOKEN attribute. Alternatively, it can be understood that both the VPLS services in PE1 and PE2 use the SPOKEN attribute, and both the EVPN services in PE1 and PE3 use the SPOKEN attribute. In this scenario, after receiving traffic 1 from PE2, PE1 can forward it to PE3. Similarly, after receiving traffic 2 from PE3, PE1 can forward it to PE2. In this splicing scenario, traffic between PE2 and PE3 can interoperate.
[0095] In an embodiment of the present application, each PE device can be connected to one or more custom edge (CE) devices. Each CE device can also be connected to one or more user terminals (terminals), that is, each CE device can mount at least one user terminal. Among them, each PE device and each CE device can be a network device such as a router or a switch. For example, the PE device can be a router and the CE device can be a switch. The user terminal can also be referred to as a host or user device, and the user terminal can be a computer, a wireless terminal device, or a virtual machine (VM) created on a server. Among them, each PE device can generate or update the MAC table entry corresponding to the MAC address based on the learned MAC address of the destination device. The destination device can be a CE device, or it can be a user terminal connected to the CE device.
[0096] On the one hand, each PE device can learn a local MAC address. This learning refers to the PE device learning the source MAC address in packets sent by the connected CE device. Based on the learned local MAC address, the PE device generates or updates a MAC table entry that records the source MAC address and the port that received the packet. Because this port connects to the CE device, it is also called an access (AC) port or AC interface.
[0097] On the other hand, each PE device can also learn remote MAC addresses. This learning refers to the PE device learning the MAC address of the destination device based on packets sent by other PE devices or MAC routes sent by other PE devices. For two PE devices carrying VPLS services, one PE device can learn the source MAC address in a packet sent by the other PE device. That is, the PE device can learn the MAC address of the destination device based on packets received on its forwarding plane. Based on the learned remote MAC address, the PE device can record the source MAC address in the MAC table entry it generates or updates, and the outbound interface of the MAC table entry generated or updated by the PE device can point to the other PE device that sent the packet to the PE device.
[0098] For two PE devices carrying EVPN services, one PE device can send its learned local MAC address to the other PE device via MAC routing. The other PE device can then learn the remote MAC address based on the MAC route. In other words, the PE device can learn the destination device's MAC address based on the MAC route received by its control plane. Based on the learned remote MAC address, the PE device can record the source MAC address in the MAC table entry it generates or updates. The outbound interface of the MAC table entry generated or updated by the PE device can point to the other PE device that sent the MAC route to the PE device.
[0099] In related technologies, such as Figure 2 As shown in the figure, after PE3 learns the local MAC address with the source MAC (SMAC) address of mac1, it can generate the MAC route of mac1: route 1, and send the route 1 to PE1. PE1 can then generate or update the MAC table entry corresponding to mac1 based on route 1, and the outbound interface of the MAC table entry points to PE3. Afterwards, if the destination device with the MAC address of mac1 migrates to PE2, PE2 can send the message from the destination device to PE1. PE1 can then update the MAC table entry corresponding to mac1 based on the message. Figure 2 As shown in the figure, the outbound interface of the updated MAC table entry points to PE2. Furthermore, PE1 sets the MAC route of mac1 (i.e., Route 1) previously sent by PE3 as an invalid route, for example by setting a flag to indicate that Route 1 is an invalid route. The MAC route marked as an invalid route is temporarily no longer used to guide user packet forwarding.
[0100] Furthermore, if the destination device with MAC address mac1 migrates to PE3 again, PE3 will not send the MAC route of mac1 to PE1 again because PE3 still stores the previously generated route 1. Accordingly, PE1 will not update the MAC table entry corresponding to mac1 until the aging period of mac1 is reached. The aging period is generally 5 minutes. Figure 2 As shown, if PE1 receives a message sent to the destination device, that is, a message with a destination MAC (DMAC) address of mac1, within the aging period of mac1, PE1 will send the message to PE2 based on the MAC table entry corresponding to mac1 stored in it, and cannot forward it to PE3 correctly.
[0101] Based on the above analysis, it can be seen that in a scenario where VPLS services and EVPN services coexist but do not share the same path, if the destination device migrates between different PEs, the converged PE device may be unable to promptly update the MAC table entry corresponding to mac1, resulting in failure to forward packets normally. The present embodiment provides a MAC routing update method that can solve the problem of a converged PE device being unable to promptly update the MAC table entry for the destination device's MAC address after the destination device migrates, thereby ensuring that the converged PE device can normally forward packets sent to the destination device.
[0102] The following is a detailed explanation of the MAC routing update method provided in the embodiment of the present application.
[0103] Figure 3 This is a flowchart of a MAC routing update method provided in an embodiment of the present application, which can 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 to the second network device and the third network device, respectively. The first network device, the second network device, and the third network device can all be PE devices, or can also be other types of network devices. Optionally, the communication system can be a system in which VPLS services and EVPN services coexist, and the first network device and the second network device are used to carry VPLS services, and the first network device and the third network device are used to carry EVPN services, that is, the first network device is a converged PE device. As Figure 3 As shown, the method may include:
[0104] S301: The first network device updates the MAC table entry corresponding to the MAC address of the destination device learned from the second network device.
[0105] The MAC table entry before updating is obtained by the first network device according to the first MAC route of the MAC address sent by the third network device.
[0106] In an embodiment of the present application, when the destination device is connected to the third network device (either directly or indirectly through another network device), the third network device can learn the MAC address of the destination device and send a first MAC route for the MAC address to the first network device. The first MAC route can be a MAC route generated by the third network device or a MAC route statically configured in the third network device.
[0107] After receiving the first MAC route, the first network device can generate or update the MAC table entry corresponding to the MAC address based on the first MAC route. When the destination device migrates to the second network device, the first network device can learn the MAC address of the destination device from the second network device again and update the MAC table entry corresponding to the MAC address.
[0108] S302: The first network device sends a message to the third network device according to the MAC address learned from the second network device. The message includes the MAC address and indication information.
[0109] Since the first network device knows that the MAC address has been migrated based on the MAC address learned from the second network device, it can send a message including 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 can be a second MAC route, and the indication information can be carried in the extended group attribute of the second MAC route. Alternatively, the message can also be a message, and the embodiment of the present application does not limit the form of the message. When the message is in the form of a second MAC route, the third network device can directly identify and process the message, thereby ensuring the normal operation of the network at a lower implementation cost and improving the compatibility of the network.
[0110] S303: The third network device deletes the first MAC route in the third network device according to the instruction information.
[0111] After receiving the message sent by the first network device, the third network device can delete its stored first MAC route according to the instruction information in the message. As a result, when the destination device migrates to the third network device again, the third network device can generate a third MAC route for the MAC address based on the MAC address of the destination device learned again, and send the third MAC route to the first network device. Accordingly, the first network device can promptly update the MAC table entry corresponding to the MAC address stored in it based on the third MAC route, ensuring that when the first network device subsequently receives a message sent to the destination device, it can correctly forward the message to the third network device.
[0112] It should be understood that the "deletion" 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 unavailable (i.e., invalid) without actually deleting the MAC route. For example, the MAC route may be rendered unavailable by setting a flag bit on the MAC route.
[0113] In summary, an embodiment of the present application provides a method for updating a MAC route. After a first network device updates a MAC table entry based on the MAC address of a destination device learned from a second network device, the first network device can send a message including instruction information to a third network device to instruct the third network device to delete the first MAC route stored therein. Since the MAC table entry before the update is obtained by the first network device based on the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC table entry. This ensures that after the third network device learns the MAC address of the destination device again, it can send the MAC route of the MAC address to the first network device again. Furthermore, it ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the MAC route sent again by the third network device, so as to ensure that subsequent messages sent to the destination device can be forwarded normally.
[0114] Figure 4 This is a flowchart of another MAC routing update method provided by an embodiment of the present application, which can be applied to a communication system including a first network device, a second network device, and a third network device. The following description will be made by taking the communication system as a system in which VPLS services and EVPN services coexist, the first network device, the second network device, and the third network device as PE devices, and the connection between the first network device and the second network device is used to carry VPLS services, and the connection between the first network device and the third network device is used to carry EVPN services as an example. Figure 4 As shown, the MAC route updating method may include:
[0115] S401: The third network device sends a first MAC route of the MAC address to the first network device based on the learned MAC address of the destination device.
[0116] If the destination device is connected to a third network device (either directly or indirectly through another network device), the third network device can learn the MAC address of the destination device and send a first MAC route for the MAC address to the first network device. The first MAC route includes the MAC address. The first MAC route can be a MAC route generated by the third network device or a MAC route statically configured in the third network device.
[0117] For example, Figure 5 As shown in the figure, assume that the connection between PE1 and PE2 carries VPLS services, and the connection between PE1 and PE3 carries EVPN services. When PE3 receives a packet with the SMAC address mac1 from the destination device, it learns the destination device's MAC address: mac1. PE3 then generates a first MAC route for mac1 and sends it to PE1.
[0118] S402: The first network device generates or updates a MAC table entry corresponding to the MAC address according to the first MAC route.
[0119] After the first network device receives the first MAC route for the MAC address, if the MAC table entry corresponding to the MAC address is not stored in the forwarding plane of the first network device, the first network device can generate a MAC table entry corresponding to the MAC address. If the MAC table entry corresponding to the MAC address is already stored in the forwarding plane of the first network device, the first network device can update the MAC table entry. The MAC table entry generated or updated by the first network device records the MAC address, and the outbound interface points to the third network device. Thereafter, when the first network device needs to send a message to the destination device, it can send the message to the third network device based on the MAC table entry.
[0120] For example, when the first network device deletes the MAC table entry corresponding to the MAC address due to aging of the MAC address, or when a new destination device is connected to the communication system, the first network device may not have stored the MAC table entry corresponding to the MAC address. In this case, the first network device needs to generate a new MAC table entry based on the first MAC route.
[0121] For example, continue to refer to Figure 5 After PE1 receives the first MAC route sent by PE3, it can generate a MAC table entry of mac1, and the outbound interface of the MAC table entry points to PE3.
[0122] S403: 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.
[0123] After the destination device is migrated from the third network device to the second network device, the second network device can send the message from the destination device to the first network device. The first network device can then learn the MAC address of the destination device from the second network device again and update the MAC table entry corresponding to the MAC address. The outbound interface of the updated MAC table entry points to the second network device.
[0124] For example, Figure 5 As shown in FIG, after the destination device migrates to PE2, PE2 can send a message with SMAC mac1 to PE1. Based on this message, PE1 can update the outbound interface of the MAC table entry corresponding to mac1 to point to PE2.
[0125] S404: The first network device sets the first MAC route in the first network device as an invalid route.
[0126] After the first network device learns the MAC address of the destination device from the second network device (i.e., the first network device's VPLS neighbor or PW neighbor), it invalidates the first MAC route for the MAC address received from the third network device (i.e., the first network device's EVPN neighbor). For example, the first network device can invalidate the first MAC route by setting a flag bit in the first MAC route. This prevents the first network device from subsequently erroneously updating the MAC table entry based on the first MAC route.
[0127] If the first network device does not set the first MAC route as an invalid route on the control plane after updating the MAC table entry, that is, the first MAC route is still valid on the control plane, then the forwarding plane of the first network device will also update the MAC table entry based on the first MAC route, that is, the outbound interface of the MAC table entry will be updated to point to the third network device again. However, since the destination device has been migrated to the second network device, the forwarding plane of the first network device will continue to 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 will cause the forwarding plane of the first network device to repeatedly update the MAC table entry, which will cause traffic to not be forwarded normally.
[0128] S405: The first network device sends a second MAC route to the third network device, where the second MAC route includes the MAC address and indication information.
[0129] The first network device may send a second MAC route to the third network device based on the MAC address learned from the second network device, where the second MAC route includes the MAC address and instruction information, wherein the instruction information is used to instruct the third network device to delete the first MAC route in the third network device.
[0130] Optionally, the indication information may be carried in the extended community attribute of the second MAC route. Figure 5 As shown, PE1 can send a second MAC route to PE3. The second MAC route can include mac1 and an extended community attribute HubSpk for carrying the indication information. For example, the extended community attribute HubSpk includes a type field, and the value of the type field is 1 to indicate the indication information.
[0131] In an embodiment of the present application, the first network device can send the second MAC route to the third network device based on the received configuration instruction. That is, the first network device can enable its function of sending the second MAC route based on the configuration instruction. If the first network device does not receive the configuration instruction, it will not send the second MAC route. The configuration instruction can be configured on the first network device by an operation and maintenance personnel through a command line, or it can be issued by another network device.
[0132] S406: The third network device deletes the first MAC route in the third network device according to the instruction information.
[0133] After receiving the second MAC route sent by the first network device, the third network device can delete its stored first MAC route based on the instruction information in the second MAC route. As a result, when the destination device migrates to the third network device again, the third network device can send the third MAC route with the MAC address to the first network device based on the MAC address of the destination device learned again. Accordingly, the first network device can promptly update the MAC table entry corresponding to the MAC address stored in it based on the third MAC route, ensuring that when the first network device subsequently receives a message sent to the destination device, it can correctly forward the message to the third network device.
[0134] For example, Figure 6 As shown in (1), after receiving the second MAC route sent by PE1, if PE3 detects that the value of the type field of the extended community attribute HubSpk in the second MAC route is 1, it can delete the first MAC route.
[0135] It should be understood that after the third network device learns the MAC address of the destination device in S401 above, it will also generate or update the MAC table entry for the MAC address. Accordingly, in S406, the third network device can also delete the MAC table entry corresponding to the MAC address in the third network device according to the instruction information.
[0136] S407: The third network device sends the first MAC withdrawal route to the first network device.
[0137] After receiving the message carrying the instruction information, the third network device may also send the first MAC withdrawal route to the first network device. For example, after deleting the first MAC route stored by the third network device, the third network device may send the first MAC withdrawal route to the first network device. The first MAC withdrawal route is used to instruct the first network device to delete the first MAC route stored in the first network device.
[0138] S408: The first network device deletes the first MAC route in the first network device according to the first MAC cancellation route.
[0139] After receiving the first MAC withdrawal route sent by the third network device, the first network device can delete the first MAC route previously received from the third network device based on the first MAC withdrawal route. By deleting the invalid first MAC route, the first network device can prevent the remaining first MAC route from occupying too much memory space.
[0140] S409: The first network device deletes the second MAC route in the first network device.
[0141] In this embodiment of the present application, the second MAC route carrying the instruction information generated by the first network device is used to notify the third network device to delete the local first MAC route, and does not need to be used to guide message forwarding. Therefore, the first network device can also delete the second MAC route in the first network device based on the first MAC revocation route. The first network device can delete the second MAC route to prevent the remaining second MAC route from occupying excessive memory space.
[0142] For example, Figure 6 As shown in (2) and (3), after PE1 receives the first MAC withdrawal route sent by PE3, it can delete the first MAC route and the second MAC route stored in its control plane.
[0143] S410: The first network device sends a second MAC withdrawal route to the third network device.
[0144] After receiving the first MAC withdrawal route sent by the third network device, the first network device may also send a second MAC withdrawal route to the third network device. The second MAC withdrawal 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 withdrawal route to the third network device after deleting the second MAC route stored therein.
[0145] 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.
[0146] For example, the second MAC withdrawal route sent by PE1 to PE3 may include an extended community attribute HubSpk, and the value of the type field in the extended community attribute HubSpk is 1, to indicate the indication information.
[0147] S411: The third network device deletes the second MAC route in the third network device according to the second MAC cancellation route.
[0148] After receiving the second MAC withdrawal route sent by the first network device, the third network device can delete the second MAC route in the third network device based on the second MAC withdrawal route. The third network device deletes the stored second MAC route to avoid the remaining second MAC route occupying too much storage space.
[0149] For example, Figure 6 As shown in (4) and (5), after PE3 receives the second MAC withdrawal route sent by PE2, it can delete the second MAC route it has stored.
[0150] It should be understood that, after deleting the first MAC route according to the instruction information in the second MAC route in S406 above, the third network device may also directly delete the second MAC route. In this manner, the first network device may not need to send the second MAC withdrawal route to the third network device, and instead the third network device may independently perform the deletion or invalidation operation on the second MAC route at an appropriate time.
[0151] S412: The third network device sends a third MAC route of the MAC address to the first network device based on the learned MAC address of the destination device.
[0152] In this embodiment of the present application, if the destination device is again transferred from the second network device to the third network device, the third network device can learn the MAC address of the destination device again. Since the third network device does not store the MAC route of the destination device, the third network device can again send a third MAC route of the MAC address to the first network device.
[0153] S413: The first network device updates the MAC table entry corresponding to the MAC address according to the third MAC route.
[0154] After receiving the third MAC route sent by the third network device, the first network device can update the MAC table entry corresponding to the MAC address based on the third MAC route. The outbound interface of the updated MAC table entry points to the third network device. As a result, 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.
[0155] It should be understood that before S411 above, that is, before the destination device migrates again to the third network device, if the first network device continues to receive packets from the second network device whose source MAC address is the MAC address of the destination device, then because the outbound interface of the MAC table entry corresponding to the MAC address in the first network device points to the second network device, the first network device can determine that there is no need to update the MAC table entry corresponding to the MAC address. Accordingly, the first network device does not need to generate and send a message carrying this indication information.
[0156] In the embodiment of the present application, the first network device may also set its device type to the UPE type according to the received configuration instruction. Figure 1a and Figure 1b , the fusion PE device PE1 can set its device type to UPE type based on the received configuration instructions. The UPE type PE device can also be called 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 a SPOKEN attribute, and the attribute of the link between the first network device and the third network device is also changed to a SPOKEN attribute. That is, the scenario where the VPLS service and the EVPN service coexist is changed to a scenario where the VPLS service and the EVPN service are spliced together. For the scenario where the VPLS service and the EVPN service are spliced together, such as Figure 7 As shown, the MAC routing update method provided in the embodiment of the present application may include the following steps:
[0157] S701: The third network device sends a first MAC route of the MAC address to the first network device based on the learned MAC address of the destination device.
[0158] S702: The first network device generates or updates a MAC table entry corresponding to the MAC address according to the first MAC route.
[0159] 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.
[0160] S704: The first network device sets the first MAC route in the first network device as an invalid route.
[0161] The implementation process of S701 to S704 above can be referred to Figure 4 The relevant descriptions of S401 to S405 in the illustrated embodiment are not repeated here.
[0162] S705: The first network device sends a fourth MAC route to the third network device, where the fourth MAC route includes the MAC address.
[0163] In an embodiment of the present application, since the PW between the first network device and the second network device has a SPOKEN attribute, and the link between the first network device and the third network device also has a SPOKEN attribute, in one possible implementation, the first network device may send a fourth MAC route to the third network device based on the MAC address of the destination device learned from the second network 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 table entry corresponding to the MAC address in the third network device. That is, the fourth MAC route may also not include the additional indication information, but instead use a traditional mechanism to notify the third network device of the MAC address of the destination device.
[0164] In another possible implementation, the fourth MAC route may also include indication information, but different from the indication information in the aforementioned 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.
[0165] For example, the indication information can be used to indicate that the PW between the first network device and the second network device has a SPOKEN attribute, that is, to indicate that the communication system is a scenario where VPLS services and EVPN services are spliced. Similar to the specific implementation of the aforementioned second MAC route, the fourth MAC route can also include an extended community attribute HubSpk for carrying the indication information. The extended community attribute HubSpk includes a type field. Unlike the aforementioned second MAC route in which the value of the type field is set to 1, the value of the type field in the fourth MAC route can be set to 0.
[0166] S706: The third network device updates the MAC table entry of the MAC address in the third network device according to the fourth MAC route.
[0167] After receiving the fourth MAC route sent by the first network device, the third network device can update the MAC table entry corresponding to the MAC address of the destination device stored therein based on the fourth MAC route according to the last-in-first-out principle. The outbound interface of the updated MAC table entry can point to the first network device.
[0168] For example, after receiving the fourth MAC route sent by PE1, if PE3 detects that the value of the type field of the extended community attribute HubSpk in the fourth MAC route is 0, it can update the MAC table entry corresponding to mac1, and the outbound interface of the updated MAC table entry points to PE1.
[0169] S707: The third network device sends the first MAC withdrawal route to the first network device.
[0170] In addition to updating the MAC table entry based on the fourth MAC route, the third network device may also delete the first MAC route in the third network device and send a first MAC withdrawal route to the first network device, wherein the first MAC withdrawal route is used to instruct the first network device to delete the first MAC route in the first network device.
[0171] S708: The first network device deletes the first MAC route in the first network device according to the first MAC cancellation route.
[0172] After receiving the first MAC withdrawal 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 first MAC withdrawal route.
[0173] It should be understood that the order of the steps of the MAC route update method provided in the embodiment of the present application can be appropriately adjusted, and the steps can also be increased or decreased according to the situation. For example, S411 can be executed before S407, and S410 can be deleted according to the situation, that is, the first network device does not need to send the second MAC withdrawal route, and the third network device can directly delete the second MAC route after deleting the first MAC route. Alternatively, S407 can be executed before S406, and S707 can be executed before S706. Alternatively, S409 can be executed before S408, that is, the first network device can directly delete the second MAC route after sending the second MAC route. Alternatively, S409 and S411 can be deleted according to the situation, that is, the first network device and the third network device may not delete the second MAC route.
[0174] In summary, an embodiment of the present application provides a method for updating a MAC route. After a first network device updates a MAC table entry based on the MAC address of a destination device learned from a second network device, the first network device can send a message including instruction information to a third network device to instruct the third network device to delete the first MAC route stored therein. Since the MAC table entry before the update is obtained by the first network device based on the first MAC route, the first network device instructs the third network device to delete the first MAC route after updating the MAC table entry. This ensures that after the third network device learns the MAC address of the destination device again, it can send the MAC route of the MAC address to the first network device again. Furthermore, it ensures that the first network device can promptly update the MAC table entry corresponding to the MAC address based on the MAC route sent again by the third network device, so as to ensure that subsequent messages sent to the destination device can be forwarded normally.
[0175] Figure 8 1 is a schematic diagram of the structure of a network device provided in an embodiment of the present application. The network device may be a PE device or other types of devices. In addition, the network device may be used to implement the steps performed by the first network device in the above embodiment. Figure 8 As shown, the network device may include:
[0176] Update module 801 is configured to update a MAC table entry corresponding to a destination device's MAC address learned from a second network device, wherein the MAC table entry before the update is obtained by the network device based on a first MAC route for the MAC address sent by a third network device. The implementation of the functionality of update module 801 may refer to the description of S301, S403, or S703 above.
[0177] A sending module 802 is configured to send a message to the third network device based on the MAC address learned from the second network device, the message including the MAC address and instruction information, the instruction information being used to instruct the third network device to delete the first MAC route in the third network device. The implementation of the functions of the sending module 802 may refer to the description of S302 or S405 above.
[0178] Alternatively, as Figure 9 As shown, the network device may further include:
[0179] The receiving module 803 is configured to receive the first MAC withdrawal route sent by the third network device after the sending module 802 sends a message to the third network device based on the MAC address learned from the second network device. The implementation of the function of the receiving module 803 can refer to the relevant description of S407 above.
[0180] The processing module 804 is configured to delete the first MAC route in the network device according to the first MAC cancellation route. The function of the processing module 804 can be realized by referring to the relevant description of S408 above.
[0181] Optionally, the message is a second MAC route.
[0182] Optionally, the processing module 804 may also be configured to delete the second MAC route in the network device after the sending module 80 sends a message to the third network device based on the MAC address learned from the second network device. The implementation of the functions of the processing module 804 may also refer to the description of S409 above.
[0183] The sending module 802 may also be configured to send a second MAC withdrawal route to the third network device after the receiving module 803 receives the first MAC withdrawal route sent by the third network device. The second MAC withdrawal route is used to instruct the third network device to delete the second MAC route in the third network device. The implementation of the functions of the sending module 802 may also refer to the description of S410 above.
[0184] Alternatively, as Figure 9 As shown, the network device also includes:
[0185] The setting module 805 is configured to set the first MAC route in the network device as an invalid route after the updating module 801 updates the MAC table entry corresponding to the destination device's MAC address learned from the second network device. The implementation of the function of the setting module 805 can also refer to the description of S404 above.
[0186] Optionally, the receiving module 803 may also be configured to receive a third MAC route for the MAC address sent by the third network device after the sending module 802 sends a message to the third network device based on the MAC address learned from the second network device. The functional implementation of the receiving module 803 may also refer to the relevant description of S412 above.
[0187] The updating module 801 may also be used to update the MAC table entry corresponding to the MAC address according to the third MAC route. The implementation of the function of the updating module 801 may also refer to the relevant description of S413 above.
[0188] Optionally, the network device and the second network device are used to carry VPLS services, and the network device and the third network device are used to carry EVPN services.
[0189] Optionally, the sending module 802 may be configured to send the message to the third network device according to the PW between the network device and the second network device being a HUB attribute.
[0190] Optionally, the network device, the second network device and the third network device are all PE devices.
[0191] In summary, an embodiment of the present application provides a network device that, after updating a MAC table entry based on the MAC address of a destination device learned from a second network device, can send a message including instruction information to a third network device to instruct the third network device to delete the first MAC route stored therein. Since the MAC table entry before the update is obtained by the network device based on the first MAC route, the network device instructs the third network device to delete the first MAC route after updating the MAC table entry, thereby ensuring that the third network device can again send the MAC route for the MAC address to the network device after learning the MAC address of the destination device again. Furthermore, it can be ensured that the network device can timely update the MAC table entry corresponding to the MAC address based on the MAC route re-sent by the third network device, thereby ensuring that subsequent messages sent to the destination device can be forwarded normally.
[0192] Figure 10 This is a structural diagram of another network device provided in an embodiment of the present application. The network device may be a PE device or other types of devices. In addition, the network device may be used to implement the steps performed by the third network device in the above embodiment. Figure 10 As shown, the network device may include:
[0193] The receiving module 1001 is 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.
[0194] The message is sent by the first network device based on the MAC address learned from the second network device after the first network device updates the MAC table entry corresponding to the MAC address based on the MAC address learned from the second network device. The MAC table entry before the update is obtained by the first network device based on the first MAC route of the MAC address sent by the network device. The functional implementation of the receiving module 1001 can refer to the relevant description of S302 or S405 above.
[0195] The processing module 1002 is configured to delete the first MAC route in the network device according to the instruction information. The function of the processing module 1002 can be implemented by referring to the relevant description of S303 or S406 above.
[0196] Alternatively, as Figure 11As shown, the network device may further include:
[0197] The sending module 1003 is configured to send a first MAC withdrawal route to the first network device after the processing module 1002 deletes the first MAC route from the network device according to the instruction information. The first MAC withdrawal route is used to instruct the first network device to delete the first MAC route from the first network device. The implementation of the functions of the sending module 1003 may refer to the description of S407 above.
[0198] Optionally, the message is a second MAC route.
[0199] 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.
[0200] Optionally, the receiving module 1001 may be further configured to receive a second MAC withdrawal route sent by the first network device after the sending module 1003 sends the first MAC withdrawal route to the first network device.
[0201] The processing module 1002 can be used to cancel the route according to the second MAC address and delete the second MAC address in the network device. The function of the processing module 1002 can also refer to the relevant description of S411 above.
[0202] Optionally, the sending module 1003 may also be configured to, after the processing module 1002 deletes the first MAC route in the network device according to the instruction information, send a third MAC route for the MAC address to the first network device based on the learned MAC address of the destination device. The third MAC route is used to instruct the first network device to update the MAC table entry corresponding to the MAC address. The implementation of the functions of the sending module 1003 may also refer to the relevant description of S412 above.
[0203] Optionally, the first network device and the second network device are used to carry VPLS services, and the first network device and the network device are used to carry EVPN services. The message is sent by the first network device according to the PW between the first network device and the second network device being a HUB attribute.
[0204] Optionally, the first network device, the second network device and the network device are all PE devices.
[0205] In summary, an embodiment of the present application provides a network device that, after receiving a message including indication information sent by a first network device, can delete the first MAC route stored therein according to the indication information. Since the message is sent by the first network device after updating the MAC table entry according to the MAC address of the destination device learned from the second network device, and the MAC table entry before the update 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, thereby ensuring that after learning the MAC address of the destination device again, it can send the MAC route of the MAC address to the first network device again. Furthermore, it can ensure that the first network device can timely update the MAC table entry corresponding to the MAC address based on the MAC route sent again by the network device, so as to ensure that the message sent to the destination device can be forwarded normally in the future.
[0206] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the various network devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0207] It should be understood that the network device provided in the embodiments of the present application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The network access method provided in the above method embodiment can also be implemented by software. When the MAC routing update method provided in the above method embodiment is implemented by software, the various modules in the network device provided in the embodiments of the present application can also be software modules.
[0208] Figure 12 1 is a structural diagram of another network device provided in an embodiment of the present application. The network device 1200 may be the first network device or the third network device in any of the above embodiments. The network device 1200 may be a PE device, and the network device 1200 may be applied to a system where VPLS services and EVPN services coexist. Figure 12As shown, the network device 1200 includes: a main control board 1210, an interface board 1230, and an interface board 1240. In the case of multiple interface boards, a switching network board (not shown) may be included, which is used to complete data exchange between the interface boards (interface boards are also called line cards or service boards).
[0209] The main control board 1210 is used to perform 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 implement message forwarding. The main control board 1210 mainly contains three types of functional units: the system management and control unit, the system clock unit, and the system maintenance unit. The main control board 1210, interface board 1230, and interface board 1240 are connected to the system backplane via the system bus to achieve intercommunication. The interface board 1230 includes one or more processors 1231. Processors 1231 are used to control and manage the interface boards, communicate with the central processing unit 1212 on the main control board 1210, and forward messages. The memory 1232 on the interface board 1230 is used to store forwarding table entries. Processor 1231 forwards messages by searching the forwarding table entries stored in memory 1232.
[0210] The interface board 1230 includes one or more network interfaces 1233 for receiving messages sent by the previous hop node and sending the processed messages to the next hop node according to the instructions of the processor 1231. The specific implementation process is not described in detail here. The specific functions of the processor 1231 are also not described in detail here.
[0211] It is understandable that Figure 12 As shown, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1240 is basically similar to the operation on the interface board 1230. For the sake of brevity, it will not be repeated. In addition, it can be understood that Figure 12 Processors 1231 and / or 1241 in interface board 1230 can be dedicated hardware or chips, such as network processors or application-specific integrated circuits, to implement the aforementioned functions. This implementation is commonly referred to as using dedicated hardware or chips for forwarding plane processing. In other embodiments, processors 1231 and / or 1241 can also be general-purpose processors, such as general-purpose CPUs, to implement the aforementioned functions.
[0212] It should also be noted that there may be one or more main control boards, including a primary and backup main control board. There may also be one or more interface boards. The higher the data processing capability of the device, the more interface boards are provided. With multiple interface boards, they can communicate with each other through one or more switching fabric boards, and when there are multiple boards, they can collectively implement load balancing and redundant backup. In a centralized forwarding architecture, the device may not require a switching fabric board; the interface board handles the entire system's service data processing. In a distributed forwarding architecture, the device includes multiple interface boards, which can exchange data between them through the switching fabric board, providing high-capacity data exchange and processing capabilities. Therefore, network devices with a distributed architecture have greater data access and processing capabilities than those with a centralized architecture. The specific architecture to adopt depends on the specific network deployment scenario and is not limited here.
[0213] In a specific embodiment, the memory 1232 can 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, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a 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 can be accessed by a computer, but is not limited thereto. The memory 1232 can exist independently and be connected to the processor 1231 via a communication bus. The memory 1232 can also be integrated with the processor 1231.
[0214] The memory 1232 is used to store program codes, and is controlled by the processor 1231 to execute the MAC routing update method provided in the above embodiment. The processor 1231 is used to execute the program codes stored in the memory 1232. The program codes may include one or more software modules. The one or more software modules may be the above Figure 8 or Figure 9 The functional modules provided in the embodiment shown may be Figure 10 or Figure 11 Functional modules provided in the illustrated embodiment.
[0215] In a specific embodiment, the network interface 1233 may be a device such as any transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
[0216] Figure 13 : is a structural diagram of another network device provided in an embodiment of the present application, and the network device may be the first network device or the third network device in the above embodiment. Figure 13 The network device may include a processor 1301, a memory 1302, a transceiver 1303, and a bus 1304. Bus 1304 is used to connect processor 1301, memory 1302, and transceiver 1303. Transceiver 1303 (which may be wired or wireless) enables communication with other devices. Memory 1302 stores computer programs that implement various application functions.
[0217] It should be understood that in the embodiment 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, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0218] Memory 1302 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), EEPROM, or flash memory. The volatile memory may be RAM, which serves as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0219] In addition to the data bus, the bus 1304 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus 1304 in the figure.
[0220] When the network device is a first network device, the processor 1301 is configured to execute a computer program stored in the memory 1302 . The processor 1301 implements the steps performed by the first network device in the above method embodiment by executing the computer program 13021 .
[0221] 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 method embodiment by executing the computer program 13021 .
[0222] An embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. The instructions are executed by a processor to implement the steps performed by the first network device or the third network device in the above method embodiment.
[0223] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps performed by the first network device or the third network device in the above method embodiment.
[0224] The embodiment of the present application further provides a communication system, which may include a first network device and a third network device. The first network device may be Figure 8 、 Figure 9 、 Figure 12 or Figure 13 The device shown in FIG. 1 , the third network device may be as follows Figures 10 to 13 The apparatus shown in any one of the accompanying drawings.
[0225] Optionally, the communication system may further include a second network device. The first network device and the second network device are used to carry VPLS services, and the first network device and the third network device are used to carry EVPN services. Furthermore, the communication system may be a system in which VPLS services and EVPN services coexist.
[0226] Optionally, the first network device, the second network device and the third network device may all be PE devices.
[0227] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0228] It should be understood that the term "and / or" used herein indicates that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0229] The above are merely optional embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for updating MAC routing, characterized in that: The method comprises: The first network device updates a MAC table entry corresponding to the media access control MAC address of the destination device learned from the second network device, wherein the MAC table entry before the update is obtained by the first network device according to the first MAC route of the MAC address sent by the third network device; The first network device sends a message to the third network device according to the MAC address learned from the second network device, the message including the MAC address and instruction information, the instruction information being used to instruct the third network device to delete the first MAC route in the third network device; The first network device and the second network device are used to carry Virtual Private Local Area Network (VPLS) services, and the first network device and the third network device are used to carry Ethernet Virtual Private Network (EVPN) services.
2. The method according to claim 1, characterized in that 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 further includes: The first network device receives a first MAC withdrawal route sent by the third network device; The first network device deletes the first MAC route in the first network device according to the first MAC withdrawal route.
3. The method according to claim 1, characterized in that The message is a second MAC route.
4. The method according to claim 3, characterized in that 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 further includes: The first network device deletes the second MAC route in the first network device.
5. The method according to claim 3, characterized in that After the first network device receives the first MAC withdrawal route sent by the third network device, the method further includes: 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, characterized in that: After the first network device updates the MAC table entry corresponding to the MAC address of the destination device learned from the second network device, the method further includes: The first network device sets the first MAC route in the first network device as an invalid route.
7. The method according to any one of claims 1 to 5, characterized in that: 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 further includes: The first network device receives a third MAC route of the MAC address sent by the third network device; The first network device updates the MAC table entry corresponding to the MAC address according to the third MAC route.
8. The method according to any one of claims 1 to 5, characterized in that: The first network device sending a message to the third network device includes: The first network device sends the message to the third network device according to the attribute that the pseudo wire PW between the first network device and the second network device is a central HUB.
9. The method according to any one of claims 1 to 5, characterized in that: The first network device, the second network device, and the third network device are all provider edge (PE) devices.
10. A method for updating MAC routing, characterized in that: The method comprises: The third network device receives a message sent by the first network device, the message including a media access control MAC address of a destination device and indication information, the message being sent by the first network device based on the MAC address learned from the second network device after the first network device updates a MAC table entry corresponding to the MAC address based on the MAC address learned from the second network device, wherein the MAC table entry before the update is obtained by the first network device based on the first MAC route of the MAC address sent by the third network device; The third network device deletes the first MAC route in the third network device according to the instruction information; The first network device and the second network device are used to carry Virtual Private Local Area Network (VPLS) services, and the first network device and the third network device are used to carry Ethernet Virtual Private Network (EVPN) services.
11. The method according to claim 10, characterized in that After the third network device deletes the first MAC route in the third network device according to the instruction 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.
12. The method according to claim 10, characterized in that The message is a second MAC route.
13. The method according to claim 12, characterized in that After the third network device deletes the first MAC route in the third network device according to the instruction information, the method further includes: The third network device deletes the second MAC route in the third network device.
14. The method according to claim 13, characterized in that After the third network device sends the first MAC withdrawal route to the first network device, the method further includes: The third network device receives the second MAC withdrawal route sent by the first network device; The third network device deleting the second MAC route in the third network device includes: the third network device canceling the route according to the second MAC, and deleting the second MAC route in the third network device.
15. The method according to any one of claims 10 to 14, characterized in that: After the third network device deletes the first MAC route in the third network device according to the instruction information, the method further includes: The third network device sends a third MAC route of the MAC address to the first network device based on 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 table entry corresponding to the MAC address.
16. The method according to any one of claims 10 to 14, characterized in that: The message is sent by the first network device according to the attribute that the pseudo wire PW between the first network device and the second network device is a HUB.
17. The method according to any one of claims 10 to 14, characterized in that: The first network device, the second network device, and the third network device are all provider edge (PE) devices.
18. A network device, characterized in that: The network device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory to enable the network device to perform the method according to any one of claims 1 to 9.
19. A network device, characterized in that: The network device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory to enable the network device to perform the method according to any one of claims 10 to 17.
20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented, or the method according to any one of claims 10 to 17 is executed.
21. A communication system, characterized in that: The system comprises: the network device according to claim 18, and the network device according to claim 19.
Citation Information
Patent Citations
A method and apparatus for message forwarding
CN109039909A