CN114363114B - Method and device for forwarding traffic - Google Patents

Method and device for forwarding traffic Download PDF

Info

Publication number
CN114363114B
CN114363114B CN202011050592.XA CN202011050592A CN114363114B CN 114363114 B CN114363114 B CN 114363114B CN 202011050592 A CN202011050592 A CN 202011050592A CN 114363114 B CN114363114 B CN 114363114B
Authority
CN
China
Prior art keywords
network device
traffic
network
equipment
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011050592.XA
Other languages
Chinese (zh)
Other versions
CN114363114A (en
Inventor
刘文敏
张耀坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011050592.XA priority Critical patent/CN114363114B/en
Priority to PCT/CN2021/120741 priority patent/WO2022068736A1/en
Publication of CN114363114A publication Critical patent/CN114363114A/en
Application granted granted Critical
Publication of CN114363114B publication Critical patent/CN114363114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The embodiment of the application discloses a method and equipment for forwarding traffic, wherein the method comprises the following steps: the method comprises the steps that first network equipment receives first traffic from second network equipment, a destination address of the first traffic is first equipment, the first network equipment and the second network equipment are service provider edge PE equipment in a network, the first equipment is connected to the first network equipment and the second network equipment in multiple ways through a first link and a second link respectively, and Ethernet link identifiers ESI of the first link and the second link are different; the first network device sends the first traffic to the first device. The method and the device can reduce the packet loss of the flow.

Description

Method and device for forwarding traffic
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding traffic.
Background
In the trend of replacing virtual private lan service (virtual private LAN service, VPLS) with ethernet virtual private network (Ethernet virtual private network, EVPN), the scenario of ring network down-hanging by EVPN increases gradually. In this scenario, sometimes, a user side device, such as a Customer Edge (CE), is multiple-connected to multiple PEs, or the CE is multiple-connected to the multiple PEs through a switch, and ethernet link identifiers (Ethernet segment identifier, ESI) of links between the user side device and the multiple PEs respectively need to be configured differently. In this case, when the ring network hung under the EVPN fails, an ethernet ring protection switching (Ethernet ring protection switching, ERPS) protocol of the ring network may be triggered, so that the PE clears the stored media access control (media access control, MAC) address of the device in the network topology, and then relearns the MAC route of the device in the network topology after the failure, and normal forwarding of the traffic may be achieved after the learning is completed. However, when the number of MAC addresses is large, it takes a long time to recover the normal forwarding of the traffic, resulting in a problem that the packet loss time of the traffic is long.
In summary, how to avoid long-time packet loss after a failure is a technical problem that needs to be solved by a person skilled in the art when a user side device is connected to multiple PEs in multiple ways and ESI configurations of links between the user side device and the multiple PEs are different.
Disclosure of Invention
The application provides a method and equipment for forwarding traffic, which can solve the problem of long-time packet loss after the link between user side equipment and PE breaks down under the condition that the user side equipment is connected into a plurality of PEs in multiple ways and the ESI configuration of the link between the user side equipment and the PEs is different.
In a first aspect, the present application provides a method for forwarding traffic, the method comprising:
the method comprises the steps that first network equipment receives first traffic from second network equipment, a destination address of the first traffic is first equipment, the first network equipment and the second network equipment are service provider edge PE equipment in a network, the first equipment is connected to the first network equipment and the second network equipment in multiple categories through a first link and a second link respectively, and Ethernet link identifiers ESI of the first link and the second link are different; the first network device sends the first traffic to the first device.
In this application, each of the above-mentioned network devices may be a device in the EVPN network, the above-mentioned first device may be a user side device in a ring network that is suspended in the EVPN network, the first device is a first network device and a second network device that are connected in multiple ways to the EVPN network, and ESI of the first device that is connected to the first network device and the second network device is different, in this case, when a fault occurs in a path of the first device that is connected to the EVPN network, for example, a path that is connected to the second network device (if there is no fault), it takes a long time for the first traffic to be forwarded to the first device through the second network device, in order to reduce the time for the traffic to drop, when the second network device receives the traffic that is sent to the first device from the third network device, that is, the first traffic may be forwarded to the first device by the first network device, so that the first device may receive the traffic normally, and the probability of traffic interruption may be reduced.
In one possible implementation, before the first network device sends the first traffic to the first device, the method further includes: the first network device determines that the mapping device of the first flow in the local flow characteristic table is not a third network device, wherein the third network device is a PE device in the network, and the third network device is respectively connected with the first network device and the second network device.
The first network device determines that the source device of the first traffic in the local traffic feature table is not a third network device, including the following two cases:
the first network device determines that the mapping device of the first flow in the local flow characteristic table is the second network device;
or the first network device determines that the local traffic characteristic table does not indicate the mapping device of the first traffic; in this case, the first network device may set a mapping device of the first traffic as the second network device in the local traffic profile.
The flow characteristic table in the application is used for recording the information of the flow sent from the second network equipment in the first network equipment and recording the information of the mapping equipment of the corresponding flow reaching the first network equipment, so as to acquire whether the flow is the flow forwarded by the second network equipment. The traffic profile is used to monitor traffic received by the first network device from the second network device after the failure.
In one possible embodiment, the method further comprises:
the first network device receiving the first traffic from the third network device;
Setting, by the first network device, the mapping device of the first traffic in the local traffic feature table as the third network device, in the case where the mapping device of the first traffic in the local traffic feature table is not the third network device;
the first network device sends the first traffic from the third network device to the first device.
And, the first network device again receives the first traffic from the second network device;
and in the case that the mapping device of the first traffic in the local traffic characteristic table is the third network device, discarding, by the first network device, the first traffic received again from the first network device.
In this application, after the above-mentioned fault occurs, the first network device may receive the first traffic from the third network device, which indicates that the first traffic may be forwarded normally, and there is no problem of packet loss, in this case, the first network device may forward the first traffic from the third network device normally, and mark the first traffic in the traffic characteristic table may be received from the third network device, so when the first traffic from the second network device is received again, the first traffic may be discarded, thereby avoiding the problem of multiple packets of the first traffic.
In one possible embodiment, the method further comprises: the first network device receiving second traffic from the third network device; and when the local flow characteristic table does not comprise the information of the second flow, the first network equipment sends the second flow to second equipment in the network.
In the application, the first network device can still forward the traffic which is not affected by the fault normally, and before forwarding the traffic, the first network device checks whether the traffic has information in the traffic characteristic table, and if not, the first network device forwards the traffic normally, which is also to avoid the problem of multiple packets of the traffic.
In one possible implementation, the first traffic carries a tag indicating that the first traffic is from the second network device.
In the application, the first traffic from the second network device is identified by the label, so that the traffic affected by the fault can be clearly distinguished, and the traffic is monitored and forwarded.
In one possible implementation manner, the first network device sends the first traffic to the first device, including: and under the condition that a timer is started and the preset duration is not reached, the first network equipment sends the first flow to the first equipment, wherein the timer is started after the first network equipment senses that a communication link between the second network equipment and the first equipment is failed.
In the method, the timer can be set to monitor the duration that the traffic affected by the fault cannot be forwarded normally, so that the resource waste caused by the fact that the first network equipment still processes the traffic according to the operation when the traffic affected by the fault cannot be forwarded normally after the traffic affected by the fault can be forwarded normally can be reduced.
In one possible embodiment, the method further comprises: the first network device receiving a notification from the third network device indicating that the first network device does not need to forward the first traffic from the second network device; the first network device receives the first traffic from the second network device again, and discards the received first traffic from the second network device again in response to the notification.
In this application, when the first network device receives the traffic from the second network device due to the fault, forwarding is generally performed, but when the first network device receives the notification from the third network device, it indicates that the traffic affected by the fault can be forwarded normally, so that the traffic from the second network device is not forwarded any more, thereby solving the problem of multiple packets of the traffic.
In one possible embodiment, the method further comprises: the first network device receiving the first traffic from the third network device; the first network device sends the first traffic from the third network device to the first device.
In the present application, after the traffic affected by the failure is normally delivered to the first network device through the third network device, the first network device may forward the traffic normally.
In one possible implementation, all messages in the first flow are provided with the same feature, and the feature includes a binary group, a quaternary group, a pentad group or a heptad group.
In one possible implementation manner, the destination MAC address of the first traffic is the MAC address of the first device.
In a second aspect, the present application provides a method of forwarding traffic, the method comprising:
the method comprises the steps that first network equipment sends first traffic to second network equipment, and a destination address of the first traffic is the first equipment; the first network device and the second network device are service Provider Edge (PE) devices in a network, the first device is connected to the first network device and the second network device in multiple ways through a first link and a second link respectively, and Ethernet link identifiers (ESI) of the first link and the second link are different.
In this application, each of the above-mentioned network devices may be a device in the EVPN network, the above-mentioned first device may be a user side device in a ring network that is suspended in the EVPN network, the first device is a first network device and a second network device that are connected in multiple ways to the EVPN network, and ESI of the first device that is connected to the first network device and the second network device is different, in this case, when a fault occurs in a path of the first device that is connected to the EVPN network, for example, a path that is connected to the first network device (if there is no fault), it takes a long time for the first traffic to be forwarded to the first device through the first network device, in order to reduce the time for the traffic to drop, when the first network device receives the traffic that is sent to the first device from the third network device, that is, the above-mentioned first traffic can be forwarded to the second network device, and thus, when the first device receives the traffic normally, the traffic can be received by the first device, and the probability of traffic interruption is reduced.
In one possible embodiment, the method further comprises: the first network device broadcasts the first traffic over an access link AC interface.
In this application, the traffic from the third network device may be broadcast to the user side device connected to the first network device, and if the traffic is not the traffic affected by the fault, the traffic may be forwarded to the destination normally.
In one possible implementation manner, the first network device sends first traffic to the second network device, including: in the event of a failure of the communication link between the first network device and the first device, the first network device sends the first traffic to the second network device.
In one possible implementation manner, in a case where a communication link between the first network device and the first device fails, the first network device sends a first traffic to the second network device, including: in the case that the MAC address of the first device cannot be matched to an entry in a local media access control MAC address forwarding table of the first network device, the first network device sends a first traffic to the second network device.
In the application, since the first network device clears the entries in the MAC address forwarding table of the first network device one by one after the fault occurs, the traffic from the third network device received by the first network device after the fault may not match the forwarding entries, and at this time, the traffic may be sent to the second network device for forwarding, so as to reduce the packet loss of the traffic.
In one possible implementation manner, the first network device sends first traffic to the second network device, including: and under the condition that a timer is started and the preset duration is not reached, the first network equipment sends the first flow to the second network equipment, wherein the timer is started after the first network equipment senses that a communication link between the first network equipment and the first equipment is failed.
In the method, the timer can be set to monitor the duration that the traffic affected by the fault cannot be forwarded normally, so that the resource waste caused by the fact that the first network equipment continues to send the traffic to the second network equipment after the traffic affected by the fault can be forwarded normally can be reduced.
In one possible implementation, the first traffic carries a tag indicating that the first traffic is from the first network device.
In the application, the first traffic from the first network device is identified by the label, so that the traffic affected by the fault can be clearly distinguished, and the traffic is monitored and forwarded.
In one possible embodiment, the method further comprises: the first network device receives a second traffic; and the first network equipment sends the second flow according to a local MAC address forwarding table.
In one possible embodiment, the method further comprises: the first network device receives a third flow through an access link AC interface; in the case that the destination MAC address of the third traffic cannot be matched to an entry in the local MAC address forwarding table of the first network device, the first network device broadcasts the third traffic to network devices in the network.
Both of the above embodiments show that after the failure, the first network device can still forward traffic that is not affected by the failure normally.
In one possible implementation manner, the first network device sends the first traffic to the second network device, including: the first network device obtains a default route, and the default route is used for sending the first traffic from the third network device to the second network device when a communication link between the first network device and the first device fails; the first network device sends the first traffic to the second network device according to the default route.
In the present application, after the above-mentioned failure occurs, the first network device can send the traffic from the third network device to the second network device, because of the default route configured in the first network device in advance, so that the above-mentioned operation of avoiding the packet loss of the traffic can be implemented.
In a third aspect, the present application provides a method of forwarding traffic, the method comprising:
the first network device sends a notification to the second network device, the notification being used to indicate that the second network device does not need to forward the first traffic from the third network device; the destination address of the first flow is a first device, the first network device, the second network device and the third network device are service Provider Edge (PE) devices in a network, the first network device is respectively connected with the second network device and the third network device, the first device is respectively connected with the second network device and the third network device through a first link and a second link in multiple access, and Ethernet link identifiers (ESI) of the first link and the second link are different.
In this application, each of the above-mentioned network devices may be a device in the EVPN network, the above-mentioned first device may be a user side device in a ring network that is down-hung in the EVPN network, the first device is a second network device and a third network device that are multiple-access to the EVPN network, and ESI of the first device that is accessed to the second network device and the third network device is different, in this case, when a failure occurs in a path of the first device that is accessed to the EVPN network, for example, a path that is accessed to the third network device (if there is no failure), it takes a long time for the first traffic to be forwarded to the first device through the third network device, and in order to reduce the time for the traffic to be lost, when the second network device receives the traffic that is sent to the first device from the third network device (the third network device receives the first traffic from the first network device), the traffic may be forwarded to the first device, so that the first device may receive the traffic normally, and the probability of traffic interruption may be reduced.
However, after the first network device has learned the MAC route of the first device, the first traffic may be forwarded to the second network device normally, where the second network device does not need to forward the first traffic from the third network device, and thus, the first network device may send a notification to the second network device that the first traffic from the third network device does not need to be forwarded, thereby solving the problem of multiple packets of the first traffic. The MAC route of the first device includes the MAC address of the first device and corresponding next hop information, which may be the address of the next hop device of the first device, or an outgoing interface of the first device to the next hop device, etc.
In a fourth aspect, the present application provides a method of forwarding traffic, the method comprising:
after a communication link between a first network device and the first device fails, and a second network device does not clear an MAC address of the first device based on the failure, the second network device broadcasts a first flow to network devices in a network, a destination address of the first flow is the first device, the network devices in the network include a third network device, the first network device, the second network device and the third network device are service provider edge PE devices in the network, the second network device is respectively connected with the first network device and the third network device, the first device is connected with the first network device and the third network device through a first link and a second link, and ethernet link identifiers ESI of the first link and the second link are different.
In this application, each of the above-mentioned network devices may be a device in the EVPN network, the above-mentioned first device may be a user side device in a ring network that is down-hung in the EVPN network, the first device is a first network device and a third network device that are multiple access to the EVPN network, and ESI of the first device that is accessed to the first network device is different from ESI of the third network device, in this case, when a fault occurs in a path of the first device that is accessed to the EVPN network, for example, a path that accesses to the first network device (if there is no fault), it takes a long time for the first traffic to forward to the first device through the first network device, in order to reduce a time for the traffic to lose packets, after the first network device sends a notification of removing the MAC to the second network device, the second network device uniformly broadcasts the received first traffic, and the third network device may forward to the first device after receiving the broadcasted first traffic. After the second network device learns the MAC route of the first traffic again, broadcasting the first traffic is stopped, and the traffic can be forwarded according to the learned new route, so that the first device can normally receive the traffic, and the probability of service interruption is reduced.
In a fifth aspect, the present application provides a method of forwarding traffic, the method comprising:
a first network device receives a first flow broadcasted by a second network device, wherein the first flow is broadcasted by the first network device when a communication link between a third network device and the first destination device fails and the second network device does not clear an MAC address of the first device based on the failure, the first network device, the second network device and the third network device are service provider edge PE devices in a network, the second network device is respectively connected with the first network device and the third network device, the first device is connected with the first network device and the third network device in multiple access through a first link and a second link respectively, and Ethernet link identifiers ESI of the first link and the second link are different; the first network device sends the first traffic to the first device.
In this application, each of the above-mentioned network devices may be a device in the EVPN network, the above-mentioned first device may be a user side device in a ring network that is down-hung in the EVPN network, the first device is a first network device and a third network device that are multiple access to the EVPN network, and ESI of the first device that is accessed to the first network device is different from ESI of the third network device, in this case, when a fault occurs in a path of the first device that is accessed to the EVPN network, for example, a path that is accessed to the third network device (if there is no fault), it takes a long time for the first traffic to forward to the first device through the third network device, in order to reduce the time for packet loss of the traffic, after the third network device sends a notification for removing the MAC to the second network device, the second network device uniformly broadcasts the received first traffic, and the first network device receives the first traffic and forwards the first traffic to the first device, so that the first device can normally receive the traffic, and the probability of service interruption is reduced.
In a sixth aspect, the present application provides an apparatus for forwarding traffic, the apparatus comprising:
a receiving unit, configured to receive a first flow from a second network device, where a destination address of the first flow is a first device, and the device forwarding the flow and the second network device are service provider edge PE devices in a network, where the first device is connected to the device forwarding the flow and the second network device through a first link and a second link in multiple categories, and ethernet link identifiers ESI of the first link and the second link are different;
and the sending unit is used for sending the first flow to the first equipment.
In one possible implementation, before the sending unit sends the first traffic to the first device, the device further includes:
the determining unit is configured to determine that the mapping device of the first flow in the local flow feature table is not a third network device, where the third network device is a PE device in the network, and the third network device is connected to the device forwarding the flow and the second network device respectively.
The determining unit determines that the source device of the first flow in the local flow characteristic table is not the third network device, including the following two cases:
The determining unit determines that the mapping device of the first flow in the local flow characteristic table is the second network device;
or the determining unit determines that the local traffic characteristic table does not indicate the mapping device of the first traffic; in this case, the device forwarding the traffic may set a mapping device of the first traffic as the second network device in the local traffic feature table.
In one possible implementation manner, the receiving unit is further configured to receive the first traffic from the third network device;
the above device for forwarding traffic further includes a setting unit, configured to set, in a case where the mapping device of the first traffic in the local traffic feature table is not the third network device, the mapping device of the first traffic in the local traffic feature table as the third network device;
the sending unit is further configured to send the first traffic from the third network device to the first device.
The receiving unit is further configured to receive the first traffic from the second network device again;
the above device for forwarding traffic further includes a discarding unit, configured to discard, in a case where the mapping device of the first traffic in the local traffic feature table is the third network device, the first traffic from the device for forwarding traffic that is received again.
In one possible implementation manner, the receiving unit is further configured to receive a second traffic from the third network device;
the sending unit is further configured to send the second traffic to a second device in the network when the local traffic feature table does not include information of the second traffic.
In one possible implementation, the first traffic carries a tag indicating that the first traffic is from the second network device.
In one possible implementation manner, the sending unit is specifically configured to: and under the condition that a timer is started and the preset duration is not reached, the first flow is sent to the first device, wherein the timer is started after the flow forwarding device senses that a communication link between the second network device and the first device is failed.
In one possible implementation manner, the receiving unit is further configured to receive a notification from the third network device, where the notification is used to indicate that the device forwarding the traffic does not need to forward the first traffic from the second network device;
the receiving unit is further configured to receive the first traffic from the second network device again;
The above device for forwarding traffic further comprises a discarding unit for discarding the first traffic received again from the second network device in response to the notification.
In one possible implementation manner, the receiving unit is further configured to receive the first traffic from the third network device;
the sending unit is further configured to send the first traffic from the third network device to the first device.
In one possible implementation, all messages in the first flow are provided with the same feature, and the feature includes a binary group, a quaternary group, a pentad group or a heptad group.
In one possible implementation manner, the destination MAC address of the first traffic is the MAC address of the first device.
In a seventh aspect, the present application provides an apparatus for forwarding traffic, the apparatus comprising:
a sending unit, configured to send a first traffic to a second network device, where a destination address of the first traffic is the first device; the traffic forwarding device and the second network device are service provider edge PE devices in a network, the first device is connected to the traffic forwarding device and the second network device in multiple access through a first link and a second link, and ethernet link identifiers ESI of the first link and the second link are different.
In one possible implementation manner, the device for forwarding traffic further includes a broadcasting unit, configured to broadcast the first traffic through an access link AC interface.
In one possible implementation manner, the sending unit is specifically configured to: and sending the first traffic to the second network device in the case that the communication link between the traffic forwarding device and the first device fails.
In one possible implementation manner, the sending unit is specifically configured to: and sending the first traffic to the second network device under the condition that the MAC address of the first device cannot be matched with an entry in a local Media Access Control (MAC) address forwarding table of the traffic forwarding device.
In one possible implementation manner, the sending unit is specifically configured to: and under the condition that a timer is started and the preset duration is not reached, the device for forwarding the flow sends the first flow to the second network device, wherein the timer is started after the device for forwarding the flow senses that a communication link between the device for forwarding the flow and the first device is failed.
In one possible implementation, the first traffic carries a tag indicating that the first traffic is from the device forwarding traffic.
In one possible implementation manner, the receiving unit is further configured to receive a second flow;
the sending unit is further configured to send the second traffic according to a local MAC address forwarding table.
In one possible implementation manner, the receiving unit is further configured to: receiving a third flow through an access link AC interface;
the sending unit is further configured to broadcast the third traffic to a network device in the network when the destination MAC address of the third traffic cannot be matched to an entry in a local MAC address forwarding table of the device forwarding the traffic.
In one possible implementation manner, the apparatus for forwarding traffic further includes an obtaining unit: for obtaining a default route for sending said first traffic from said third network device to said second network device when a communication link between said traffic forwarding device and said first device fails;
the transmitting unit is specifically configured to: and sending the first traffic to the second network equipment according to the default route.
In an eighth aspect, the present application provides an apparatus for forwarding traffic, the apparatus comprising:
A sending unit, configured to send a notification to a second network device, where the notification is configured to instruct the second network device not to forward a first traffic from a third network device; the destination address of the first flow is a first device, the flow forwarding device, the second network device and the third network device are service Provider Edge (PE) devices in a network, the flow forwarding device is respectively connected with the second network device and the third network device, the first device is connected with the second network device and the third network device through a first link and a second link in multiple access, and Ethernet link identifiers (ESI) of the first link and the second link are different.
In a ninth aspect, the present application provides an apparatus for forwarding traffic, the apparatus comprising:
and the broadcasting unit is used for broadcasting first traffic to network equipment in a network after a communication link between the first network equipment and the first equipment fails and under the condition that equipment for forwarding the traffic does not clear the MAC address of the first equipment based on the failure, the destination address of the first traffic is the first equipment, the network equipment in the network comprises third network equipment, the first network equipment, the equipment for forwarding the traffic and the third network equipment are service provider edge PE equipment in the network, the equipment for forwarding the traffic is respectively connected with the first network equipment and the third network equipment, the first equipment is connected with the first network equipment and the third network equipment through a first link and a second link respectively, and the Ethernet link identifiers ESI of the first link and the second link are different.
In a tenth aspect, the present application provides an apparatus for forwarding traffic, the apparatus comprising:
a receiving unit, configured to receive a first flow broadcasted by a second network device, where the first flow is broadcasted by a second network device when a communication link between a third network device and the first destination device fails and the second network device does not clear an MAC address of the first device based on the failure, the first network device and the second network device are service provider edge PE devices in a network, the second network device is connected to the first network device and the third network device, and the first device is connected to the first network device and the third network device through a first link and a second link, respectively, where ethernet link identifiers ESI of the first link and the second link are different; the traffic forwarding device sends the first traffic to the first device.
In an eleventh aspect, the present application provides an apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is configured to store program instructions and/or data, and the processor is configured to execute the program instructions stored in the memory, so that the apparatus performs the method according to any one of the first aspect.
In a twelfth aspect, the present application provides an apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is configured to store program instructions and/or data, and the processor is configured to execute the program instructions stored in the memory, so that the apparatus performs the method according to any one of the second aspects.
In a thirteenth aspect, the present application provides an apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is configured to store program instructions and/or data, and the processor is configured to execute the program instructions stored in the memory, such that the apparatus performs the method according to any one of the third aspects.
In a fourteenth aspect, the present application provides an apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is configured to store program instructions and/or data, and the processor is configured to execute the program instructions stored in the memory, such that the apparatus performs the method according to any one of the fourth aspects.
In a fifteenth aspect, the present application provides an apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is configured to store program instructions and/or data, and the processor is configured to execute the program instructions stored in the memory, such that the apparatus performs the method of any one of the fifth aspects.
In a sixteenth aspect, the present application provides a system for forwarding traffic, where the system includes a first network device and a second network device, where the first network device is a device according to the sixth aspect, and the second network device is a device according to the seventh aspect; alternatively, the first network device is the device according to the eleventh aspect, and the second network device is the device according to the twelfth aspect.
In a seventeenth aspect, the present application provides a system for forwarding traffic, where the system includes a first network device and a second network device, where the first network device is a device according to the sixth aspect, and the second network device is a device according to the eighth aspect; alternatively, the first network device is the device according to the eleventh aspect, and the second network device is the device according to the thirteenth aspect.
In an eighteenth aspect, the present application provides a system for forwarding traffic, where the system includes a first network device and a second network device, where the first network device is a device according to the ninth aspect, and the second network device is a device according to the tenth aspect; alternatively, the first network device is the device according to the fourteenth aspect, and the second network device is the device according to the fifteenth aspect.
In a nineteenth aspect, the present application provides a computer readable storage medium storing a computer program for execution by a processor to implement the method of any one of the first aspects above; alternatively, the computer program is executed by a processor to implement the method of any of the second aspects above; alternatively, the computer program is executed by a processor to implement the method of any of the third aspects above; alternatively, the computer program is executed by a processor to implement the method of any of the fourth aspects above; alternatively, the computer program is executed by a processor to implement the method of any of the fifth aspects above.
In a twentieth aspect, the present application provides a computer program product, which when read and executed by a computer, performs any of the methods of the first aspect; alternatively, any of the methods described above for the second aspect above may be performed when the computer program product is read and executed by a computer; alternatively, any of the methods of the third aspect above may be performed when the computer program product is read and executed by a computer; alternatively, any of the methods described above in the fourth aspect may be performed when the computer program product is read and executed by a computer; alternatively, any of the methods described above in the fifth aspect may be performed when the computer program product is read and executed by a computer.
In summary, the method and the device can solve the problem of long-time packet loss after the link between the user side device and the PE breaks down under the condition that the user side device is connected into a plurality of PEs in multiple ways and the ESI configurations of the links between the user side device and the PEs are different.
Drawings
The drawings that are used as needed in the embodiments of the present application will be described below.
Fig. 1 to fig. 3 are schematic diagrams of a system scenario to which a method for forwarding traffic provided in the present application is applicable;
fig. 4 is a flow chart of a method for forwarding traffic according to an embodiment of the present application;
fig. 5 is a flow chart of another method for forwarding traffic according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a logic structure of an apparatus according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a logic structure of another device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a logic structure of another device according to an embodiment of the present disclosure;
fig. 9 is a schematic logic structure diagram of another device according to an embodiment of the present application;
fig. 10 is a schematic logic structure diagram of another device according to an embodiment of the present application;
fig. 11 is a schematic hardware structure of an apparatus according to an embodiment of the present application.
Detailed Description
The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
In order to better understand a method for forwarding traffic provided by the embodiment of the present invention, a scenario to which the embodiment of the present invention is applicable is described in the following by way of example. Referring to fig. 1, fig. 1 is a schematic diagram of a communication network architecture to which a method for forwarding traffic according to an embodiment of the present invention is applicable.
The communication network architecture may include network devices and user side devices, where the network devices establish a communication connection with each other as shown in the figure, and the user side devices access the network devices in a looped network manner, for example, the user side device 111, the user side device 112, the user side device 113, and the user side device 114 in fig. 1 access the network devices 101 and 102 in a looped network manner.
The network device may include a Provider Edge (PE), which may be a router or a switch, for connecting the customer premise equipment and the operator backbone network device. The traffic of the user flows into the user network through the PE device or flows to the backbone network through the PE device.
The customer side devices may include customer edge devices (CEs) that are routers or switches on the customer side to which the service provider is connected, the CEs providing service access to the customer by connecting one or more PEs. The user side device can establish communication connection with one or more user terminals, and the user terminals can comprise various electronic devices such as mobile phones, computers, wearable intelligent devices, vehicle-mounted devices and the like.
It should be noted that the above communication network architecture shown in fig. 1 is only an example, for example, one or more network devices may be further included between the network device 101 and the network device 103, and the user side devices of the dual homing access network device 101 and the network device 102 are not limited to the form and number shown in fig. 1. The communication network architecture to which the traffic forwarding method provided in the embodiment of the present application is applicable is not limited to the above description, and any scenario applied to the traffic forwarding method provided in the embodiment of the present application is a scenario to which the embodiment of the present application is applicable, and is not repeated here.
In addition, the communication network architecture to which the traffic forwarding method provided in the embodiment of the present application is applicable may be a virtual private network (virtual private network, VPN), a virtual private lan service (virtual private LAN service, VPLS), or an ethernet virtual private network (Ethernetvirtual private network, EVPN) architecture, and in particular, may be a dual-homing or multi-homing scenario in a network.
Before introducing the traffic forwarding method provided by the application, the technical problem to be solved by the application is described in an exemplary manner.
Referring to fig. 2, fig. 2 is a view obtained by adding related information to the base of fig. 1, and thus the above description of fig. 1 applies to fig. 2. In fig. 2, the user side device is connected to the network device 101 and the network device 102 in a dual-homing manner by a ring network, so that in order to avoid the downlink traffic looping, a disruption protocol needs to be deployed in the ring network.
The above flow looping refers to the phenomenon that the device spontaneously receives flow, and for the convenience of understanding, the flow looping is exemplified below. Referring to fig. 2, assuming that a failure protocol is not deployed, there is no point of failure in the ring network and each link can communicate normally. Assuming that user side device 112 sends a traffic that arrives at network device 101 via user side device 111, network device 101 may send the traffic to network devices 102 and 103, and network device 102 may receive the traffic via a forwarding path: the user side device 114-user side device 113-user side device 112 in turn forwards traffic back to the user side device 112, resulting in traffic looping.
The corruption protocols may include multiple spanning tree protocol (multi spanning tree protocol, MSTP), ethernet ring protection switching (Ethernet ring protection switching, ERPS) protocol, and the like. Through the deployed breaking protocol, a breaking point can be formed in the ring network, and traffic looping is avoided. The point of disruption is typically placed in the link between the two devices so that the link is not open, thereby avoiding traffic looping. For example, in fig. 2, it is assumed that a breaking point may be set in a link between the user side device 112 and the user side and device 113, so that the traffic sent by the user side device 112 cannot be forwarded back to the user side device 112, and the avoided traffic is looped.
It should be noted that, the link failure caused by the failure point is because the link is configured not to forward traffic, but not because traffic cannot be forwarded due to a fault or the like, and the link of the failure point can be opened to continue forwarding traffic when needed. For example, referring to fig. 2, it is assumed that the link between the user side device 112 and the user side device 113 is a breaking point, that is, it is indicated that the link between the user side device 112 and the user side device 113 is not feasible.
After the above-described break points are formed, the network device 101 can learn the media access control (Media Access Control, MAC) addresses from the user side device 111 and the user side device 112, but cannot learn the MAC addresses from the user side device 113 and the user side device 114. Likewise, the network device 102 may learn the MAC addresses from the user side device 113 and the user side device 114, but not the MAC addresses from the user side device 111 and the user side device 112.
Then, traffic sent from the network device 103 to the user side device may take two paths: one is network device 103-network device 101-user side device 111-user side device 112; the other is the network device 103-the network device 102-the user side device 114-the user side device 113.
Under the above network architecture, the user side device is connected to the network device 101 and the network device 102 in a dual-homing manner by the ring network, but sometimes the ethernet link identifiers (Ethernet segment identifier, ESI) of the user side device connected to the two network devices in dual-homing manner need to be configured to be different ESIs, in this case, the link between the network device 101 and the network device 102 in the existing protocol is not enabled, and when the ring network fails, the time of the packet loss of the downlink traffic cannot be guaranteed, which may cause the problem of packet loss for a long time.
Illustratively, taking fig. 3 as an example, the above description of fig. 1 and 2 applies to fig. 3. For convenience of description, part of the links are labeled with link numbers in fig. 3, the link numbers between the network device 101 and the user side device 111 are labeled with (1), the link numbers between the user side device 111 and the user side device 112 are labeled with (2), the link numbers between the user side device 112 and the user side device 113 are labeled with (3), the link numbers between the user side device 113 and the user side device 114 are labeled with (4), and the link numbers between the user side device 114 and the network device 102 are labeled with (5). Based on the foregoing, the link (3) is the point of failure of the ring network.
In fig. 3, the ESI of the dual homing access network device of the user side device is different, that is, the ESI of the configuration of the link (1) and the configuration of the link (5) are different, and may be referred to as ESI1 for the link (1) and ESI2 for the link (5). In this case, when a failure occurs in the ring network, for example, when the link (2) fails, a broken protocol in the ring network is triggered to perform route recalculation.
Specifically, when the link (2) fails, the broken point link (3) can normally communicate. Then, the user side device 112 notifies the other devices in the ring network, namely, the user side device 113, the user side device 114 and the network device 102 of the failure after sensing the failure, and the user side device 111 similarly notifies the other devices in the ring network, namely, the network device 101 of the failure after sensing the failure. After sensing the fault, other devices in the ring network clear the MAC address in the own MAC address table, and then relearn the MAC address of each device in the new network topology formed after the fault so as to form a new MAC route. The MAC route includes the MAC address of the device and corresponding next hop information, which may be the address of the next hop device, or an egress interface to the next hop device, etc. After clearing the MAC address, the network device 101 and the network device 102 send a notification of clearing the MAC address to the network device 103, so that the network device 103 also clears the MAC address in its own MAC address table after the failure occurs, and then relearns the MAC address of each device in the new network topology formed after the failure to form a new MAC route.
However, when the number of MAC addresses in the MAC address table in the network device 3 is large, the time for clearing the MAC address needs to be long, and after the fault occurs, the network device 103 has not removed the MAC address of the user side device 112, at this time, if the network device 103 receives the traffic destined for the user side device 112, the forwarding of the traffic is performed according to the original forwarding path of the traffic, that is, the network device 103-network device 101-user side device 111-user side device 112, but the forwarding path is not going through due to the fault, so that the packet loss of the traffic is caused. Because the number of MAC addresses in the MAC address table in the network device 3 is large, it takes a long time to clear the MAC address of the ue 112, which results in too long packet loss time of the traffic, thereby affecting normal operation of the service and affecting user experience.
The above description is given by taking a failure of the link (2) as an example, and in practice, the failure of the link (1) or the failure of the user equipment 111 may be also mentioned.
In order to solve the above-mentioned problems, the present application provides a method for forwarding traffic, and the method for forwarding traffic provided by the present application is described in the following by using several embodiments.
Example 1
The method for forwarding the traffic provided in this embodiment may refer to fig. 4, and the method may be applied to the scenario shown in fig. 3 to solve the problem that the packet loss time of the traffic is too long after the failure occurs in the ring network, and the method may include, but is not limited to, the following steps:
s401, the first network device sends first traffic to the second network device, and the destination address of the first traffic is the first device.
In a specific embodiment, the first network device may be the network device 101 shown in fig. 3 and the second network device may be the network device 102 shown in fig. 3, and the first device may be the user side device 112 shown in fig. 3. The first equipment is connected to the first network equipment and the second network equipment in multiple ways through a networking mode of the ring network. The ring network may be a ring network including a plurality of user side devices as shown in fig. 3, where the user side devices in the ring network are connected to the first network device and the second network device in multiple ways through a first link and a second link, respectively, and ESI of the first link is different from ESI of the second link. The first link may be, for example, link (1) in fig. 3, and the second link may be, for example, link (5) in fig. 3.
The first network device sending the first traffic to the second network device may be that the first network device sends the first traffic to the second network device when a failure occurs in the ring network. The failure may be a failure occurring on the communication link between the first network device and the first device, for example, a failure occurring on the link (2) shown in fig. 3 described above, or the like. When the failure does not occur, the traffic down to the first device may be forwarded by the first network device, and the communication link between the second network device and the first device is not enabled due to the existence of the failure point set by the failure protocol in the ring network.
As is apparent from the above description, after the first network device and the second network device sense the failure, the MAC addresses of the devices in the network topology before the failure are not found, which are already stored in the first network device and the second network device, are cleared based on the failure, and each time the MAC address is cleared, a notification of clearing the MAC address is sent to the third network device, so that the third network device also clears the MAC address.
Illustratively, the first network device and the second network device establish a border gateway protocol (border gateway protocol, BGP) neighbor, or an open shortest path first (open shortest path first, OSPF) neighbor, or a link state routing protocol neighbor of the intermediate system to the intermediate system (intermediate system to intermediate system, ISIS), etc. with the third network device, respectively, and then the first network device and the second network device may send a notification to the third network device to clear the MAC address via BGP protocol, or OSPF protocol, or ISIS protocol, etc.
The third network device may be the network device 103 shown in fig. 3, which cannot directly sense the fault, so that the MAC address of the device in the network topology before the fault is not found, which is already stored in itself, can only be cleared by the first network device and the second network device informing. The first network device, the second network device and the third network device can learn the MAC address of the device in the network topology which is changed after the failure to form a new MAC route while clearing the stored MAC address of the device in the network topology which is not in the failure.
After the fault occurs, the first network device receives a first traffic from a third network device, and on one hand, the first network device may broadcast the first traffic to user side devices in the ring network through an access link (AC) interface; in another aspect, the first network device may also send the first traffic to a second network device.
The destination address of the first flow is the MAC address of the first device, and the destination MAC address of the first flow may be the MAC address of the first device.
In a specific embodiment, after the failure occurs, in the prior art solution, the first traffic may be broadcast or unicast normally only after the MAC address of the first device is cleared in the third network device. The broadcasting refers to that the third network device transmits the first traffic by broadcasting in case the third network device clears the MAC address of the first device but has not learned the MAC route of the first device in the network topology changed after the above-mentioned failure. The unicast refers to that in the case that the third network device has relearned the MAC route of the first device in the network topology changed after the above-mentioned failure, the third network device may unicast the first traffic according to the MAC address forwarding table after receiving the first traffic. The MAC route of the first device includes the MAC address of the first device and corresponding next hop information, which may be the address of the next hop device of the first device, or an outgoing interface of the first device to the next hop device, etc.
Before the third network device clears the MAC address of the first device, the first traffic will be forwarded along the original forwarding path, i.e. the path of the third network device-the first device, but since the link between the first network device and the first device fails, the first traffic cannot be forwarded to the first device normally, resulting in packet loss of traffic and traffic interruption.
In order to solve the problem of packet loss of the traffic, in the embodiment of the present application, after the failure occurs, the first network device receives the first traffic from the third network device, and may perform address matching of the MAC address table normally, but since the first network device has cleared the MAC address in the MAC address table after the failure occurs, the source MAC address and the destination MAC address of the first traffic cannot be found in the MAC address table of the first network device, so the first network device may broadcast the first traffic to the user side device through the AC interface, and in addition, the first network device may also send the first traffic to the second network device.
Alternatively, in another possible implementation manner, after the fault occurs, the first network device receives the first traffic from the third network device, and may broadcast the first traffic to the user side device through the AC interface directly without querying the MAC address table, and send the first traffic to the second network device.
In the embodiment of the present application, in order to enable the first network device to send the first traffic to the second network device for forwarding after the failure occurs, a default route for sending the first traffic to the second network device is configured in the first network device, where the default route includes information such as a MAC address of the second network device, and after the failure occurs, the first network device may send the traffic received from the third network device, for example, the first traffic to the second network device according to the default route.
S402, the second network device receives the first traffic from the first network device.
After the first network device sends the first traffic to the second network device through the default route, the second network device may receive the first traffic.
S403, the second network device sends the first traffic to the first device.
After the fault occurs, the broken protocol in the ring network is triggered to perform route recalculation, and the broken point can be eliminated, so that the communication link between the second network device and the first device can normally communicate, and after the second network device receives the first traffic from the first network device, the second network device can normally forward the first traffic to the first device, thereby reducing the packet drop of the traffic caused by the fault.
It should be noted that, the first traffic from the first network device refers to the traffic that the first traffic passes through the first network device and is forwarded by the first network device to the second network device.
For ease of understanding, the description will be presented with reference to fig. 3. In fig. 3, after the link (2) fails, the network device 101 receives the first traffic from the network device 103 to the user side device 112, and the network device 101 broadcasts the first traffic to the user side device of the ring network through the AC port and also sends the first traffic to the network device 102. Since the point-of-failure link (3) may resume normal communication after the failure, the network device 102 may pass through the forwarding path: the network device 102-the user side device 114-the user side device 113-the user side device 112 forwards the first traffic to the user side device 112, so that the packet loss of the first traffic is reduced.
In a possible implementation manner, based on the method for forwarding traffic described in fig. 4, after the occurrence of the fault, the second network device may monitor the traffic received from the first network device through the traffic profile. The traffic profile may record characteristics of traffic received from the first network device after the failure and record an identification of one or more devices through which the traffic passed before reaching the second network device.
The characteristics of the traffic may be characteristics of messages in the traffic, and the characteristics of all the messages included in one traffic are the same, and the characteristics include a tuple, a quadruple, a quintuple or a seven tuple of the messages in the traffic. The identification of the device may include an internet protocol (internet protocol, IP) address or MAC address of the device, etc. The identification of the one or more devices through which the traffic passes before reaching the second network device may include the identification of the first network device. In this application, one or more devices through which the traffic passes before reaching the second network device may be referred to as a mapping device for the traffic.
Wherein the doublet of the traffic includes the source MAC address and the destination MAC address of the traffic. The quadruple of traffic includes source IP address, destination IP address, source port and destination port of traffic. The five-tuple of the traffic includes the source IP address, destination IP address, source port, destination port, and protocol number of the traffic. The seven-tuple of the traffic includes the source IP address, destination IP address, protocol number, source port, destination port, service type, and interface index of the traffic.
After the failure occurs, the second network device receives the first traffic sent from the first network device, and may process the first traffic by:
In the first case, the second network device determines that the information of the first traffic is not recorded in the traffic characteristic table.
Specifically, the second network device may parse the received message in the first flow, obtain the feature in the message, compare the obtained feature with the feature in the flow feature table, and if the feature in the flow feature table is not the same as the obtained feature, it indicates that the information of the first flow is not recorded in the flow feature table. I.e. it is indicated that this is the first time the second network device receives the first traffic from the first network device after the above-mentioned failure.
In this case, the second network device adds information of the first traffic in the traffic characteristics table, including the characteristics of the first traffic and the identification of the mapping device of the first traffic. The second network device then transmits the first traffic received from the first network device to the first device. See, for example, table 1.
TABLE 1
Source MAC address Destination MAC address Mapping apparatus
1.1.1.1 2.2.2.2 3.3.3.3
Table 1 exemplifies information of a first flow rate recorded in a flow rate characteristic table with a characteristic of the flow rate as a binary group. As can be seen in table 1, the traffic profile may record the source MAC address (which may be 1.1.1.1, for example), destination MAC address (which may be 2.2.2.2, for example) and mapping device for the first traffic. The mapping device may be the first network device described above, and the mapping device may be identified by a MAC address, e.g. the MAC address of the mapping device may be 3.3.3.3.
In the second case, the second network device determines that the mapping device of the first flow in the flow characteristic table includes the first network device.
Similarly, the second network device may parse the received message in the first traffic, obtain the feature in the message, compare the obtained feature with the feature in the traffic feature table, find the same feature as the obtained feature in the traffic feature table to indicate that the traffic feature table records the information of the first traffic, and then find the mapping device of the first traffic in the traffic feature table, if the mapping device of the first traffic is the first network device, it indicates that the second network device receives the first traffic from the first network device again after the fault.
Since the mapping device of the first traffic in the traffic profile is still the first network device, it indicates that the second network device has not received the first traffic from the third network device, because if the second network device receives the first traffic from the third network device, the second network device sets the mapping device of the first traffic in the traffic profile as the third network device. The second network device has not received the first traffic from the third network device, and after the fault occurs, the third network device has not cleared the MAC address of the first device in the MAC address table stored by itself, and still forwards the first traffic to the first network device, and the first network device may continue to send the received first traffic to the second network device. The second network device then transmits the first traffic received from the first network device to the first device.
The first traffic from the third network device refers to the first traffic sent by the third network device to the second network device, and the first traffic does not need to be forwarded through the first network device. For ease of understanding, reference may be made to fig. 3. For the second network device, network device 102, the first traffic from the third network device, network device 103, refers to the first traffic that arrives at network device 102 via path (6) after being sent out from network device 103. Of course, other network device(s) may also be included in path (6). The first traffic from the first network device, i.e. the network device 101, refers to the first traffic sent from the network device 103, reaching the network device 101 via the path (7), and then reaching the network device 102 via the path (8). Of course, other network device(s) may be included in path (7) and path (8).
And in the third case, the second network device determines that the mapping device of the first flow in the flow characteristic table comprises the third network device.
Similarly, the second network device may parse the received message in the first flow, obtain the feature in the message, compare the obtained feature with the feature in the flow feature table, find the same feature as the obtained feature in the flow feature table, indicate that the information of the first flow is recorded in the flow feature table, and then find the mapping device of the first flow in the flow feature table. If the mapping device of the first traffic is the third network device, it indicates that the second network device has received the first traffic from the third network device before receiving the first traffic from the first network device again.
Specifically, after the fault occurs, the third network device completes the clearing of the MAC address of the first device after receiving the notification sent by the first network device to clear the MAC address of the first device, and then when the third network device receives the first traffic again, if the MAC route of the first device in the new network topology after the fault is not learned yet, the third network device can broadcast the received first traffic, and then both the first network device and the second network device can receive the first traffic. If the third network device has learned the MAC route of the first device in the new network topology after the failure, the third network device may unicast the first traffic to the second network device according to the MAC address table.
After receiving the first traffic broadcast by the third network device, the second network device may find information of the first traffic in the traffic feature table, and if the mapping device of the first traffic in the traffic feature table is not the third network device, the second network device may set the mapping device of the first traffic in the traffic feature table as the third network device. Specifically, the identifier of the mapping device of the first flow in the flow characteristic table may be replaced by the identifier of the third network device.
In the case where the mapping device of the first traffic in the traffic characteristic table is the third network device, the second network device may not send the received first traffic from the first network device to the first device, and may directly discard the received first traffic from the first network device.
In the case where the mapping device of the first traffic in the traffic profile is the third network device, the second network device may send the first traffic from the third network device to the first device.
In the embodiment of the present application, the mapping device of the received first traffic is monitored by the traffic feature table, and as long as the mapping device of the first traffic in the traffic feature table is not the third network device, the second network device may continue forwarding the first traffic from the first network device. When the mapping device of the first traffic in the traffic monitoring table is the third network device, it indicates that the third network device can forward the first traffic normally after the fault occurs, and in order to avoid multiple packets, the second network device discards the first traffic from the first network device received again and only forwards the first traffic from the third network device.
In a possible implementation manner, in combination with the first embodiment and the second embodiment, the second network device may further receive, after the occurrence of the fault, a second traffic from the third network device, where the second traffic is sent to the second device. The second device may be, for example, the user side device 113 or the user side device 114 in fig. 3. Of course, the second network device may look up the feature of the second flow in the flow feature table, but since the flow feature table is only information for recording the flow from the first network device after the failure, the flow feature table does not include the information of the second flow. The second network device then sends the second traffic to the second device.
In a possible implementation manner, in combination with the first embodiment and the second embodiment, after the occurrence of the fault, the first network device may further receive a third traffic, where the third traffic may be from another network device, for example, a third network device, and if a forwarding table entry of the third traffic may be found in its MAC address table, the first network device may send the third traffic according to the forwarding table entry.
In combination with the first embodiment and the second embodiment, after the fault occurs, the first network device may further receive a fourth traffic, where the fourth traffic is received through the AC interface, and indicates that the traffic is from the user side device, and similarly, if a forwarding table entry of the fourth traffic may be found in the MAC address table of the first network device, the first network device may send the fourth traffic according to the forwarding table entry. If the forwarding entry for the fourth traffic is not found in the own MAC address table, the first network device may broadcast the fourth traffic to other network devices in the network.
In one possible implementation, after the occurrence of the fault, the first traffic sent by the first network device to the second network device may carry a tag, which may be used to indicate that the first traffic is from the first network device. The tag may be added to the header of the message included in the first flow, for example, a field may be added to the header of the message in the first flow, where the tag is carried by the field, or the tag may be carried in an original field. After the second network device receives the first traffic carrying the tag, the tag may be identified, so as to learn that the traffic carrying the tag comes from the first network device.
In a possible implementation manner, the operations performed by the first network device and the second network device in the foregoing embodiments may be operations performed before the timer reaches the preset duration.
In a specific embodiment, after the first network device and the second network device sense the fault, for example, after the MAC address forwarding tables of the first network device and the second network device have been cleared, a timer is set respectively. The timer of the first network device may be referred to as a first timer and the timer of the second network device may be referred to as a second timer. The time period of the first timer may be a first preset time period, and the time period of the second timer may be a second preset time period. The first preset time length and the second preset time length are longer than the convergence time of the third network device, and the convergence time comprises the time length from the beginning of the fault to the completion of the third network device clearing the self MAC address table according to the notification of the first network device and the second network device. The first preset time period and the second preset time period may be 60 seconds, or may be 50 seconds or 70 seconds, or the like, for example.
In another possible embodiment, in order to solve the above-mentioned multi-packet problem, in addition to the embodiment of monitoring the flow characteristic table, the following embodiment may be adopted:
in a specific embodiment, the third network device completes the clearing of the MAC address of the first device after receiving the notification sent by the first network device to clear the MAC address of the first device, and then sends a notification to the second network device, where the notification is used to indicate that the second network device does not need to forward the first traffic from the first network device. The notification may be, for example, a notification that the third network device may have sent the first traffic to the second network device, or the notification may be a first traffic that the third network device has first sent to the second network device in a broadcast manner after clearing the MAC address of the first device, or the notification may be a predefined one indication message, etc.
The reason why the third network device has cleared the MAC address of the first device is that the third network device sends the notification to the second network device is that the third network device can send the first traffic to the second network device after clearing the MAC address of the first device, regardless of whether the third network device has relearned the MAC route of the first device in the network topology after the failure. That is, if the third network device does not learn the MAC route of the first device again after clearing the MAC address of the first device, the third network device sends the first traffic to other network devices including the second network device in a broadcast manner; if the third network device learns the MAC route of the first device again after the MAC address of the first device is cleared, the third network device sends the first traffic to the second network device in a unicast manner according to the learned MAC route of the first device.
Therefore, after receiving the notification, the second network device does not forward the first traffic from the first network device again when receiving the first traffic from the first network device again, and can discard the first traffic. At the same time, the second network device will forward the first traffic from the third network device to the first device. Thereby avoiding the problem of multiple packets of the first traffic.
The method for forwarding the traffic and the possible implementation manner of the method for forwarding the traffic described in fig. 4 mainly configure a default route between the first network device and the second network device, so as to complete forwarding of the first traffic through the second network device in the case of the failure, so as to reduce packet loss of the traffic. In this application, the problem of reducing the dropped packets after the failure may also be achieved by broadcasting the traffic by the third network device, which is specifically described in the second embodiment.
Example two
The second embodiment is another method for forwarding traffic provided in the present application, and the method for forwarding traffic provided in the present embodiment may refer to fig. 5, and the method may be applicable to the scenario shown in fig. 3 to solve the problem that the packet loss time of traffic is too long after the failure occurs in the ring network, and the method may include, but is not limited to, the following steps:
S501, the first network equipment senses faults in the accessed looped network, clears the MAC address in the MAC address table of the first network equipment based on the faults, and simultaneously sends a notice of clearing the MAC address to the third network equipment.
S502, the third network equipment receives the notification and clears the MAC address in the MAC address table of the third network equipment.
The relationship between the first network device, the second network device, the third network device, and the first device in this embodiment, and the specific implementation procedures of S501 and S502 may be referred to the corresponding descriptions in S401 in the first embodiment, which are not repeated here.
S503, after receiving the notification and before relearning the MAC route of the first device, the third network device broadcasts the received first traffic with the destination MAC address being the first device to other network devices.
In a specific embodiment, the notification may be a notification of a first clear MAC address sent to the third network device after the first network device senses the failure. After receiving the notification, the third network device starts to clear the corresponding MAC address, and may start to learn the MAC route of the device in the network topology after the failure.
If the MAC route of the first device has not been relearned after receiving the notification, the third network device may broadcast the first traffic destined for the first device so that the second network device may receive the first traffic.
S504, the second network equipment receives the broadcasted first traffic and broadcasts the first traffic to the user side equipment so that the first equipment can receive the first traffic.
After receiving the first traffic broadcast from the third network device, if the first traffic is received for the first time, the second network device cannot find forwarding information of the first traffic in its own MAC address table, and then the second network device may send the forwarding information to the user side device from the AC interface in a broadcast manner, so that the first device may receive the first traffic. After receiving the first traffic, the first device returns a message to the second network device indicating that the first traffic is addressed to the first device. Then, after the second network device receives the message, a forwarding table entry of the first traffic may be added to the MAC address forwarding table, for example, to record information such as source MAC address and destination MAC address, and an outgoing port number of the characteristics of the first traffic. When the second network device receives the first traffic again, the first traffic can be sent to the first device through unicast through the forwarding table entry in the MAC address forwarding table.
In one possible implementation, if the third network device has relearned the MAC route of the first device after receiving the notification, the third network device may forward the first traffic of the first device normally according to the MAC address forwarding table.
In one possible implementation, when the failure is not the failure of the link (2) in fig. 3, but the failure of the link (4), the problem of excessively long packet loss time of the traffic can also be solved by the methods described in the foregoing embodiments. In this case, the first network device may be the network device 102 in fig. 3, the second network device may be the network device 101 in fig. 3, the third network device may be the network device 103 in fig. 3, and the first device may be the user side device 113 in fig. 3.
In the second embodiment, after the first network device sends the notification of removing the MAC to the third network device due to the failure, the third network device uniformly broadcasts the received first traffic, and the second network device may forward the received first traffic to the first device. After the third network device learns the MAC route of the first traffic again, broadcasting the first traffic is stopped, and the traffic can be forwarded according to the learned new route, so that the first device can normally receive the traffic, and the probability of service interruption is reduced.
The foregoing mainly describes the method for forwarding traffic provided in the embodiments of the present application. It will be appreciated that each device, in order to implement the corresponding functions described above, includes corresponding hardware structures and/or software modules that perform each function. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional modules of the device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, the division of the modules in the embodiments of the present application is merely a logic function division, and other division manners may be actually implemented.
Fig. 6 shows a schematic diagram of a possible logic structure of a device, which may be the second network device in the above-described embodiments, in the case of dividing the respective functional modules with the respective functions. It should be noted that the second network device involved in describing the device illustrated in fig. 6 may be the first network device in the above embodiments. The device 600 depicted in fig. 6 comprises a receiving unit 601 and a transmitting unit 602. Wherein:
a receiving unit 601, configured to receive a first traffic from a second network device, where a destination address of the first traffic is a first device, where the device 600 and the second network device are service provider edge PE devices in a network, and the first device is connected to the device 600 and the second network device through a first link and a second link in multiple categories, where ethernet link identifiers ESI of the first link and the second link are different; the receiving unit 601 may perform the operations described in step 402 shown in fig. 4.
A sending unit 602, configured to send the first traffic to the first device. The transmitting unit 602 may perform the operations described in step 403 shown in fig. 4.
In one possible implementation, before the sending unit 602 sends the first traffic to the first device, the device further includes:
A determining unit, configured to determine that the mapping device of the first flow in the local flow feature table is not a third network device, where the third network device is a PE device in the network, and the third network device is connected to the device 600 and the second network device respectively.
The determining unit determines that the source device of the first flow in the local flow characteristic table is not the third network device, including the following two cases:
the determining unit determines that the mapping device of the first flow in the local flow characteristic table is the second network device;
or the determining unit determines that the local traffic feature table does not indicate the mapping device of the first traffic; in this case, the device 600 may set the mapping device of the first traffic as the second network device in the local traffic profile.
In one possible implementation manner, the receiving unit 601 is further configured to receive the first traffic from the third network device;
the above device 600 further includes a setting unit, configured to set, in a case where the mapping device of the first traffic in the local traffic feature table is not the third network device, the mapping device of the first traffic in the local traffic feature table as the third network device;
The sending unit 602 is further configured to send the first traffic from the third network device to the first device.
The receiving unit 601 is further configured to receive the first traffic from the second network device again;
the above device 600 further comprises a discarding unit configured to discard the first traffic received again from the device 600 in case the mapping device of the first traffic in the local traffic profile is the third network device.
In one possible implementation manner, the receiving unit 601 is further configured to receive a second traffic from the third network device;
the sending unit 602 is further configured to send the second traffic to a second device in the network when the local traffic profile does not include information of the second traffic.
In one possible implementation, the first traffic carries a tag indicating that the first traffic is from the second network device.
In one possible implementation manner, the sending unit 602 is specifically configured to: and sending the first traffic to the first device when a timer is started and a preset duration is not reached, wherein the timer is started after the device 600 senses that the communication link between the second network device and the first device is faulty.
In one possible implementation manner, the receiving unit 601 is further configured to receive a notification from the third network device, where the notification is used to indicate that the device 600 does not need to forward the first traffic from the second network device;
the receiving unit 601 is further configured to receive the first traffic from the second network device again;
the device 600 further comprises a discarding unit for discarding the first traffic from the second network device received again in response to the notification.
In one possible implementation manner, the receiving unit 601 is further configured to receive the first traffic from the third network device;
the sending unit 602 is further configured to send the first traffic from the third network device to the first device.
The specific operation and advantages of the various units in the apparatus 600 shown in fig. 6 can be seen from the description of the method and the possible embodiments of the method described in fig. 4, and are not repeated here.
Fig. 7 shows a schematic diagram of a possible logic structure of a device, which may be the first network device in the above-described respective embodiments, in the case where respective functional modules are divided with corresponding respective functions. It should be noted that the second network device involved in describing the device illustrated in fig. 7 may be the second network device in the above embodiments. The device 700 depicted in fig. 7 comprises a transmitting unit 701. Wherein:
A sending unit 701, configured to send a first traffic to a second network device, where a destination address of the first traffic is the first device; the device 700 and the second network device are service provider edge PE devices in the network, and the first device is connected to the device 700 and the second network device through a first link and a second link respectively, and ethernet link identifiers ESI of the first link and the second link are different. The transmitting unit 701 may perform the operations described in step 401 shown in fig. 4.
In one possible implementation, the device 700 further comprises a broadcasting unit for broadcasting the first traffic over the access link AC interface.
In one possible implementation manner, the sending unit 701 is specifically configured to: in the event of a failure of the communication link between the device 700 and the first device, the first traffic is sent to the second network device.
In one possible implementation manner, the sending unit 701 is specifically configured to: in the event that the MAC address of the first device cannot match an entry in the local media access control MAC address forwarding table of the device 700, a first traffic is sent to the second network device.
In one possible implementation manner, the sending unit 701 is specifically configured to: in the case that a timer is started and a preset duration is not reached, the device 700 sends the first traffic to the second network device, where the timer is started after the device 700 senses that the communication link between the device 700 and the first device is faulty.
In one possible implementation, the first flow carries a tag indicating that the first flow is from the device 700.
In one possible implementation manner, the receiving unit is further configured to receive a second flow;
the sending unit 701 is further configured to send the second traffic according to a local MAC address forwarding table.
In one possible implementation manner, the receiving unit is further configured to: receiving a third flow through an access link AC interface;
the sending unit 701 is further configured to broadcast the third traffic to a network device in the network if the destination MAC address of the third traffic cannot be matched to an entry in the local MAC address forwarding table of the device 700.
In one possible implementation manner, the apparatus 700 further includes an obtaining unit: for obtaining a default route for sending the first traffic from the third network device to the second network device when a communication link between the device 700 and the first device fails;
The transmitting unit 701 specifically is configured to: the first traffic is sent to the second network device according to the default route.
The specific operation and advantages of the various units in the apparatus 700 shown in fig. 7 may be found in the description of the method and possible embodiments of the method described in fig. 4, and are not repeated here.
Fig. 8 shows a schematic diagram of a possible logic structure of a device, which may be the third network device in the above-described respective embodiments, in the case where respective functional modules are divided with corresponding respective functions. It should be noted that the second network device involved in describing the device of fig. 8 may be the second network device in the above embodiments, and the third network device involved in describing the device of fig. 8 may be the first network device in the above embodiments. The device 800 depicted in fig. 8 comprises a transmitting unit 801. Wherein:
a sending unit 801, configured to send a notification to a second network device, where the notification is used to instruct the second network device not to forward the first traffic from the third network device; the destination address of the first flow is a first device, the device 800, the second network device and the third network device are service provider edge PE devices in the network, the device 800 is connected to the second network device and the third network device respectively, the first device is connected to the second network device and the third network device through a first link and a second link respectively, and ethernet link identifiers ESI of the first link and the second link are different.
The specific operation and beneficial effects of each unit in the device 800 shown in fig. 8 may be referred to in fig. 4 and the possible implementation manners thereof, and the description of the embodiment in which the notification that the first traffic from the first network device is not required to be forwarded is sent to the second network device by the third network device is not repeated herein.
Fig. 9 shows a schematic diagram of a possible logic structure of a device, which may be the third network device in the above-described respective embodiments, in the case where respective functional modules are divided with corresponding respective functions. It should be noted that the third network device involved in describing the device illustrated in fig. 9 may be the second network device in the above embodiments. The device 900 described in fig. 9 comprises a broadcasting unit 901. Wherein:
a broadcasting unit 901, configured to broadcast, after a communication link between a first network device and the first device fails and if the device 900 does not clear a MAC address of the first device based on the failure, a first traffic to a network device in a network, where a destination address of the first traffic is the first device, the network device in the network includes a third network device, the first network device, the device 900, and the third network device are service provider edge PE devices in the network, the device 900 is respectively connected to the first network device and the third network device, the first device is connected to the first network device and the third network device through a first link and a second link, respectively, and ethernet link identifiers ESI of the first link and the second link are different.
The broadcasting unit 901 may perform the operations described in step 503 shown in fig. 5.
The specific operation and advantages of each unit in the apparatus 900 shown in fig. 9 can be seen from the description in the second embodiment and the possible implementation manners thereof, and will not be repeated here.
Fig. 10 shows a schematic diagram of a possible logic structure of a device, which may be the second network device in the above-described respective embodiments, in the case where respective functional modules are divided with corresponding respective functions. It should be noted that the second network device involved in describing the device of fig. 10 may be the third network device in the above embodiments, and the third network device involved in describing the device of fig. 10 may be the first network device in the above embodiments. The device 1000 depicted in fig. 10 comprises a receiving unit 1001. Wherein:
a receiving unit 1001, configured to receive a first traffic broadcast by a second network device, where the first traffic is broadcast by the device 1000 when a communication link between a third network device and the first destination device fails and the second network device does not clear a MAC address of the first device based on the failure, where the device 1000, the second network device, and the third network device are service provider edge PE devices in a network, the second network device is connected to the device 1000 and the third network device, the first device is connected to the device 1000 and the third network device through a first link and a second link, respectively, and ethernet link identifiers ESI of the first link and the second link are different; the device 1000 sends the first traffic to the first device.
The receiving unit 1001 may perform the operation of the receiving described in step 504 shown in fig. 5.
The specific operation and beneficial effects of each unit in the apparatus 1000 shown in fig. 10 can be seen from the description in the second embodiment and the possible implementation manners thereof, and will not be repeated here.
Fig. 11 is a schematic diagram of a possible hardware structure of a device provided in the present application, where the device may be any one of the network devices in the method described in the foregoing embodiments, for example, may be a first network device, or may be a second network device, or may be a third network device. The apparatus 1100 comprises: a processor 1101, a memory 1102, and a communication interface 1103. The processor 1101, the communication interface 1103 and the memory 1102 may be interconnected or interconnected by a bus 1104.
By way of example, memory 1102 is used to store computer programs and data for device 1100, and memory 1102 may include, but is not limited to, random access memory (random access memory, RAM), read-only memory (ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable read-only memory (compact disc read-only memory, CD-ROM), and the like. The communication interface 1103 is used to support communication with the device 1100, such as receiving or transmitting data or signals, etc.
In implementing embodiment one and its possible implementation, software or program code required to perform the functions of all or part of the units in embodiment one is stored in memory 1102.
In implementing the second embodiment and its possible implementation, software or program code required to perform the functions of all or part of the units in the second embodiment is stored in the memory 1102.
In the case of implementing any of the above embodiments, if software or program codes required for the functions of part of the units are stored in the memory 1102, the processor 1101 may perform other functions (such as the functions of receiving and transmitting data) described in any of the embodiments in cooperation with other components (such as the communication interface 1103) in addition to calling the program codes in the memory 1102 to implement part of the functions.
By way of example, the processor 1101 may be a central processor unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. A processor may also be a combination that performs a computational function, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so forth. The processor 1101 may be configured to read the program stored in the memory 1102, and perform the operations performed by the first network device, the second network device, or the third network device in the methods described in the foregoing embodiments.
The specific operations and advantages performed by the apparatus 1100 shown in fig. 11 may be referred to the descriptions of the above method embodiments and possible implementation manners thereof, and are not repeated herein.
The present application also provides an apparatus comprising a processor, a communication interface and a memory, the apparatus being configured to perform the method according to any of the above-described embodiments and possible embodiments thereof.
In one possible implementation, the device is a Chip or a System on a Chip (SoC).
The present application also provides a computer readable storage medium storing a computer program to be executed by a processor to implement the method according to any one of the above embodiments and possible embodiments thereof.
The present application also provides a computer program product which, when read and executed by a computer, performs the method of any of the various embodiments described above and possible embodiments thereof.
The embodiments of the present application also provide a computer program, which when executed on a computer, causes the computer to implement the method according to any one of the foregoing embodiments and possible embodiments thereof.
In summary, the method and the device can solve the problem of long-time packet loss after the link between the user side device and the PE breaks down under the condition that the user side device is connected into a plurality of PEs in multiple ways and the ESI configurations of the links between the user side device and the PEs are different.
The terms "first," "second," and the like in this application are used to distinguish between identical or similar items that have substantially the same function and function, and it should be understood that there is no logical or chronological dependency between the "first," "second," and "nth" terms, nor is it limited to the number or order of execution. It will be further understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element. For example, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image, without departing from the scope of the various described examples. The first image and the second image may both be images, and in some cases may be separate and distinct images.
It should also be understood that, in the embodiments of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It should be appreciated that determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information.
It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should be further understood that reference throughout this specification to "one embodiment," "an embodiment," "one possible implementation," means that a particular feature, structure, or characteristic described in connection with the embodiment or implementation is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment," "one possible implementation" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (27)

1. A method of forwarding traffic, the method comprising:
the method comprises the steps that first network equipment receives first traffic from second network equipment, a destination address of the first traffic is first equipment, the first network equipment and the second network equipment are service provider edge PE equipment in a network, the first equipment is connected to the first network equipment and the second network equipment in multiple categories through a first link and a second link respectively, and Ethernet link identifiers ESI of the first link and the second link are different;
the first device is user side device in a looped network hung under the first network device and the second network device; a communication link between the first device and the second network device in the ring network fails; the first flow is sent to the first network device by the second network device according to a default route;
the ring network also comprises second equipment, wherein the second equipment is positioned on a transmission path from the first network equipment to the first equipment; before the fault occurs, the second device and the first device cannot communicate due to the existence of a breaking point; after the fault occurs, triggering a broken protocol in the looped network to perform route recalculation so that communication between the second equipment and the first equipment is enabled; the damage points are formed by a damage protocol deployed in the ring network in order to avoid looping of the traffic;
The first network device sends the first traffic to the first device.
2. The method of claim 1, wherein prior to the first network device sending the first traffic to the first device, the method further comprises:
the first network device determines that the mapping device of the first flow in the local flow characteristic table is not a third network device, wherein the third network device is PE (provider edge) equipment in the network and is respectively connected with the first network device and the second network device; the mapping device is a device through which the first traffic passes before reaching the first network device.
3. The method of claim 2, wherein the first network device determining that the source device of the first traffic in the local traffic profile is not a third network device comprises:
and the first network equipment determines that the mapping equipment of the first flow in the local flow characteristic table is the second network equipment.
4. The method of claim 2, wherein the first network device determining that the source device of the first traffic in the local traffic profile is not a third network device comprises:
The first network device determines that a local traffic feature table does not indicate a mapping device of the first traffic;
the first network device sets mapping device of the first flow as the second network device in the local flow characteristic table.
5. The method according to any one of claims 2 to 4, further comprising:
the first network device receiving the first traffic from the third network device;
setting, by the first network device, the mapping device of the first traffic in the local traffic feature table as the third network device, in the case where the mapping device of the first traffic in the local traffic feature table is not the third network device;
the first network device sends the first traffic from the third network device to the first device.
6. The method of claim 5, wherein the method further comprises:
the first network device again receives the first traffic from the second network device;
and in the case that the mapping device of the first traffic in the local traffic characteristic table is the third network device, discarding, by the first network device, the first traffic received again from the first network device.
7. The method according to any one of claims 2 to 4, further comprising:
the first network device receiving second traffic from the third network device;
and when the local flow characteristic table does not comprise the information of the second flow, the first network equipment sends the second flow to second equipment in the network.
8. The method of any of claims 1-4, wherein the first traffic carries a tag indicating that the first traffic is from the second network device.
9. The method of any of claims 1-4, wherein the first network device sending the first traffic to the first device comprises:
and under the condition that a timer is started and the preset duration is not reached, the first network equipment sends the first flow to the first equipment, wherein the timer is started after the first network equipment senses that a communication link between the second network equipment and the first equipment is failed.
10. The method according to claim 1, wherein the method further comprises:
the first network device receiving a notification from a third network device, the notification indicating that the first network device does not need to forward the first traffic from the second network device;
The first network device receives the first traffic from the second network device again, and discards the received first traffic from the second network device again in response to the notification.
11. The method according to claim 10, wherein the method further comprises:
the first network device receiving the first traffic from the third network device;
the first network device sends the first traffic from the third network device to the first device.
12. The method of any one of claims 1 to 4, 10 or 11, wherein all messages in the first flow are provided with the same characteristics, the characteristics comprising a binary group, a quaternary group, a pentad group or a heptad group.
13. The method of any one of claims 1 to 4, 10 or 11, wherein the destination MAC address of the first traffic is the MAC address of the first device.
14. A method of forwarding traffic, the method comprising:
the method comprises the steps that first network equipment sends first traffic to second network equipment, and a destination address of the first traffic is the first equipment; the first network device and the second network device are service Provider Edge (PE) devices in a network, the first device is connected to the first network device and the second network device in multiple ways through a first link and a second link respectively, and Ethernet link identifiers (ESI) of the first link and the second link are different; the first device is user side device in a looped network hung under the first network device and the second network device; a communication link between the first device and the second network device in the ring network fails;
The ring network also comprises second equipment, wherein the second equipment is positioned on a transmission path from the first network equipment to the first equipment; before the fault occurs, the second device and the first device cannot communicate due to the existence of a breaking point; after the fault occurs, triggering a broken protocol in the looped network to perform route recalculation so that communication between the second equipment and the first equipment is enabled; the damage points are formed by a damage protocol deployed in the ring network in order to avoid looping of the traffic;
the first network device sending a first traffic to a second network device, comprising:
the first network device obtains a default route, and the default route is used for sending the first traffic from a third network device to the second network device when a communication link between the first network device and the first device fails;
the first network device sends the first traffic to the second network device according to the default route.
15. The method of claim 14, wherein the method further comprises:
the first network device broadcasts the first traffic over an access link AC interface.
16. The method of claim 14, wherein the first network device sending the first traffic to the second network device comprises:
in the event of a failure of the communication link between the first network device and the first device, the first network device sends the first traffic to the second network device.
17. The method of claim 16, wherein the first network device sending the first traffic to the second network device in the event of a failure of the communication link between the first network device and the first device comprises:
in the case that the MAC address of the first device cannot be matched to an entry in a local media access control MAC address forwarding table of the first network device, the first network device sends a first traffic to the second network device.
18. The method of any of claims 14 to 17, wherein the first network device sending the first traffic to the second network device comprises:
and under the condition that a timer is started and the preset duration is not reached, the first network equipment sends the first flow to the second network equipment, wherein the timer is started after the first network equipment senses that a communication link between the first network equipment and the first equipment is failed.
19. The method of any of claims 14 to 17, wherein the first traffic carries a tag indicating that the first traffic is from the first network device.
20. The method according to any one of claims 14 to 17, further comprising:
the first network device receives a second traffic;
and the first network equipment sends the second flow according to a local MAC address forwarding table.
21. The method according to any one of claims 14 to 17, further comprising:
the first network device receives a third flow through an access link AC interface;
in the case that the destination MAC address of the third traffic cannot be matched to an entry in the local MAC address forwarding table of the first network device, the first network device broadcasts the third traffic to network devices in the network.
22. An apparatus for forwarding traffic, characterized by comprising means for performing the method of any of claims 1 to 13.
23. An apparatus for forwarding traffic, characterized by comprising means for performing the method of any of claims 14 to 21.
24. An apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is for storing program instructions and/or data, and wherein the processor is for executing the program instructions stored in the memory, such that the apparatus performs the method of any of claims 1 to 13.
25. An apparatus for forwarding traffic, comprising a processor, a communication interface and a memory, wherein the memory is for storing program instructions and/or data, and wherein the processor is for executing the program instructions stored in the memory, such that the apparatus performs the method of any of claims 14 to 21.
26. A system for forwarding traffic, comprising a first network device and a second network device, wherein the first network device is the device of claim 22 and the second network device is the device of claim 23; alternatively, the first network device is the device of claim 24 and the second network device is the device of claim 25.
27. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor to implement the method of any one of claims 1 to 13; alternatively, the computer program is executed by a processor to implement the method of any of claims 14 to 21.
CN202011050592.XA 2020-09-29 2020-09-29 Method and device for forwarding traffic Active CN114363114B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011050592.XA CN114363114B (en) 2020-09-29 2020-09-29 Method and device for forwarding traffic
PCT/CN2021/120741 WO2022068736A1 (en) 2020-09-29 2021-09-26 Traffic forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011050592.XA CN114363114B (en) 2020-09-29 2020-09-29 Method and device for forwarding traffic

Publications (2)

Publication Number Publication Date
CN114363114A CN114363114A (en) 2022-04-15
CN114363114B true CN114363114B (en) 2023-07-07

Family

ID=80951220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011050592.XA Active CN114363114B (en) 2020-09-29 2020-09-29 Method and device for forwarding traffic

Country Status (2)

Country Link
CN (1) CN114363114B (en)
WO (1) WO2022068736A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865792A (en) 2019-12-31 2023-03-28 华为技术有限公司 Method and device for processing routing information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6768738B1 (en) * 1998-10-05 2004-07-27 Hitachi, Ltd. Packet forwarding apparatus with a flow detection table
CN101035063A (en) * 2006-03-07 2007-09-12 华为技术有限公司 Multicast flow forwarding method and its router and system
CN101656679A (en) * 2009-09-25 2010-02-24 华为技术有限公司 Method for rapidly converging multicast, router and communication system
CN105743689A (en) * 2014-12-31 2016-07-06 瞻博网络公司 Fast convergence on link failure in multi-homed ethernet virtual private networks
CN109672619A (en) * 2017-10-17 2019-04-23 华为技术有限公司 A kind of method, equipment and system handling message

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4231766B2 (en) * 2003-10-24 2009-03-04 株式会社日立コミュニケーションテクノロジー A communication apparatus and a communication method for performing path control between ASs.
US9762545B2 (en) * 2014-11-03 2017-09-12 Cisco Technology, Inc. Proxy forwarding of local traffic by edge devices in a multi-homed overlay virtual private network
CN110050445B (en) * 2016-12-09 2021-01-05 华为技术有限公司 Method, device and system for sending and receiving message
CN109787797B (en) * 2017-11-14 2021-08-20 华为技术有限公司 Link fault detection method, device and system
CN110351772B (en) * 2018-04-08 2022-10-25 慧与发展有限责任合伙企业 Mapping between wireless links and virtual local area networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6768738B1 (en) * 1998-10-05 2004-07-27 Hitachi, Ltd. Packet forwarding apparatus with a flow detection table
CN101035063A (en) * 2006-03-07 2007-09-12 华为技术有限公司 Multicast flow forwarding method and its router and system
CN101656679A (en) * 2009-09-25 2010-02-24 华为技术有限公司 Method for rapidly converging multicast, router and communication system
CN105743689A (en) * 2014-12-31 2016-07-06 瞻博网络公司 Fast convergence on link failure in multi-homed ethernet virtual private networks
CN109672619A (en) * 2017-10-17 2019-04-23 华为技术有限公司 A kind of method, equipment and system handling message

Also Published As

Publication number Publication date
CN114363114A (en) 2022-04-15
WO2022068736A1 (en) 2022-04-07

Similar Documents

Publication Publication Date Title
US11533249B2 (en) Route processing method and apparatus, and data transmission method and apparatus
US8750314B2 (en) Method and device for link protection in virtual private local area network
US8416775B2 (en) Systems and methods for equal-cost multi-path virtual private LAN service
EP2643940B1 (en) Method of shrinking a data loss window in a packet network device
US8908537B2 (en) Redundant network connections
US20090310481A1 (en) Method and device of network protection
US20030063560A1 (en) Protection switching in a communications network employing label switching
US20070036161A1 (en) System and method of routing Ethernet MAC frames using Layer-2 MAC addresses
US20100023632A1 (en) Method and system for negotiating the bidirectional forwarding detection session discriminator of pseudo wire
US8817601B2 (en) HVPLS hub connectivity failure recovery with dynamic spoke pseudowires
KR20040102177A (en) Traffic network flow control using dynamically modified metrics for redundancy connections
WO2022166543A1 (en) Fault protection method and device, storage medium, and electronic device
CN111447095B (en) Bidirectional forwarding detection switching method, bidirectional forwarding detection module and edge device
CN114363114B (en) Method and device for forwarding traffic
US8670299B1 (en) Enhanced service status detection and fault isolation within layer two networks
JP4611863B2 (en) Loop detection method and loop detection apparatus
US20080130503A1 (en) Method and system for forwarding ethernet frames over redundant networks with all links enabled
WO2008095360A1 (en) Method and system for switching rapidly when there is a failure of virtual private network link path
US20230164070A1 (en) Packet sending method, device, and system
EP2523401B1 (en) Virtual networks within a physical network
EP4325777A1 (en) Method and device for electing designated forwarder (df)
WO2007039364A1 (en) Detecting inactive links in a communication network
CN109981452B (en) Method and device for switching back PW link
JPWO2006001060A1 (en) Network system, transmission-side switch device, reception-side switch device, dual-purpose switch device, and frame data transmission method
CN102355398A (en) MPLS (Multiple Protocol Label Switching) L3VPN (Lay3 Virtual Private Network) FRR (Fast Reroute) method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant