[go: up one dir, main page]

WO2024066587A1 - Message forwarding method, communication device, and storage medium - Google Patents

Message forwarding method, communication device, and storage medium Download PDF

Info

Publication number
WO2024066587A1
WO2024066587A1 PCT/CN2023/104221 CN2023104221W WO2024066587A1 WO 2024066587 A1 WO2024066587 A1 WO 2024066587A1 CN 2023104221 W CN2023104221 W CN 2023104221W WO 2024066587 A1 WO2024066587 A1 WO 2024066587A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical port
port
arp
network device
arp entry
Prior art date
Application number
PCT/CN2023/104221
Other languages
French (fr)
Chinese (zh)
Inventor
林宁
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2024066587A1 publication Critical patent/WO2024066587A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Definitions

  • the present application relates to the field of network technology, and in particular to a message forwarding method, communication equipment and storage medium.
  • the ARP Address Resolution Protocol
  • the ARP entry of a network device identifies the host route of the network device, and its exit points to a forwarding path of this network device.
  • This path includes the physical port, the MAC (Media Access Control) address of the other host, Vlan (Virtual Local Area Network) and other information.
  • the convergence process of the related ARP entries after the physical port fails needs to be processed one by one, which is time-consuming.
  • the main purpose of the embodiments of the present application is to propose a message forwarding method, communication equipment and storage medium, which aims to quickly complete ARP entry convergence when the physical port of the network device fails, so as to achieve the effect of fast network switching, improve the response speed of the network device to network abnormalities, and improve the routing performance of the entire network.
  • the present application provides a message forwarding method, which is applied to a network device and includes:
  • the corresponding physical port information is deleted from a pre-configured virtual port table of the network device, wherein the virtual port table includes a correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • An embodiment of the present application also provides a communication device, which includes a memory, a processor, and a message forwarding program stored in the memory and executable on the processor, wherein the message forwarding program implements the message forwarding method described above when executed by the processor.
  • An embodiment of the present application further provides a computer-readable storage medium, on which a message forwarding program is stored.
  • a message forwarding program is executed by a processor, the message forwarding method as described above is implemented.
  • the embodiment of the present application proposes a message forwarding method, communication device and storage medium.
  • a physical port of a network device fails, the corresponding physical port information is deleted in a pre-configured virtual port table of the network device.
  • the virtual port table includes the correspondence between the physical port and the virtual port of the network device.
  • the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • the virtual port table configuring the correspondence between the physical port and the virtual port of the network device in the virtual port table, and pre-configuring the port information in the ARP entry as the virtual port information corresponding to the physical port corresponding to the ARP entry
  • the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly to achieve the effect of fast network switching.
  • the embodiment of the present application uses a virtual port (VP) to replace the physical port to write into the ARP table through the above technical solution, which can not only complete the one-time operation of the ARP table when the physical port fails, so as to achieve the rapid convergence and rapid flow cutting of the ARP entry, but also complete the flow processing of the ARP table in the case of port oscillation without causing a large number of routing oscillations.
  • VP virtual port
  • FIG1 is a flow chart of an embodiment of a message forwarding method of the present application.
  • FIG2 is a flow chart of another embodiment of the message forwarding method of the present application.
  • FIG3 is a flow chart of another embodiment of the message forwarding method of the present application.
  • FIG4 is a schematic diagram of the internal flow of a network device in an embodiment of the present application.
  • FIG5 is a schematic diagram of an actual networking application scenario of an embodiment of the present application.
  • FIG6 is a schematic diagram of functional modules of an embodiment of a message forwarding device of the present application.
  • FIG. 7 is a schematic diagram of functional modules of an embodiment of a communication device of the present application.
  • first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information
  • second information may also be referred to as the first information.
  • word “if” as used herein can be interpreted as “at the time of” or “when” or “in response to determination”.
  • singular forms “one”, “one” and “the” are intended to also include plural forms, unless there is an opposite indication in the context.
  • “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and/or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”.
  • An exception to this definition will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
  • steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
  • the words “if” and “if” may be interpreted as “at the time of” or “when” or “in response to determining” or “in response to detecting”, depending on the context.
  • the phrases “if it is determined” or “if (stated condition or event) is detected” may be interpreted as “when it is determined” or “in response to determining” or “when detecting (stated condition or event)” or “in response to detecting (stated condition or event)", depending on the context.
  • step codes such as S10, S100, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence.
  • module means, “component” or “unit” used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, “module”, “component” or “unit” can be used in a mixed manner.
  • the communication device may be a server, a terminal device, or a base station device, etc., and the present application needs to be determined according to the specific context.
  • the main solution of the embodiment of the present application is: in the case of failure of the physical port of the network device, the corresponding physical port information is deleted in the pre-configured virtual port table of the network device, the virtual port table includes the correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • ARP Address Resolution Protocol
  • IP address Resolution Protocol is a TCP/IP protocol that obtains the physical address based on the IP address.
  • a host sends information, it broadcasts the ARP request containing the target IP address to all hosts on the network and receives the return message to determine the physical address of the target; after receiving the return message, the IP address and physical address are stored in the local ARP cache and retained for a certain period of time. The next request directly queries the ARP cache to save resources.
  • ARP table refers to the host routing table, which includes several ARP entries.
  • the ARP entry in the ARP table identifies the host route of the network device, and its exit points to a forwarding path of this network device.
  • this path contains the routing information of the network device such as the VP corresponding to the physical port, the MAC address of the opposite host, and the Vlan.
  • ARP entries converge in response to the failure of the physical port of the network device and its related forwarding path.
  • the so-called convergence means that after the physical port fails, all related ARP entries are deleted, and the neighboring devices are notified of the related route deletion through the routing protocol.
  • MC-LAG Multi-Chassis Link Aggregation Group
  • cross-device link aggregation group After entering the era of mobile Internet, the Internet has become increasingly closely integrated with people's daily lives. While bringing people a convenient network experience, it has also brought the interactive processing of massive data to the network, and put forward higher requirements for the bandwidth and reliability of the network.
  • traditional link aggregation technology is limited to one-to-one between two devices, and cannot achieve link aggregation between one-to-many devices. Therefore, in order to provide a more reliable network, MC-LAG was created.
  • an access device which can be a server or a switch
  • MC-LAG technology can be used to form a cross-device link aggregation group.
  • MC-LAG The basic idea of MC-LAG is to allow two network devices A and B to perform link aggregation with the access device in the same state. From the access device's point of view, it is as if a link aggregation relationship has been established with the same network device. In this way, link aggregation technology is expanded from one-to-one device docking to being able to access two devices at the same time and form a dual-active system.
  • VLAN Virtual Local Area Network
  • a VLAN can be implemented on a switch or across switches. VLANs can be grouped according to the location, role, department of network users or according to the applications and protocols used by network users. Switch-based virtual LANs can solve conflict domains, broadcast domains, and bandwidth issues for LANs.
  • MAC address Media Access Control address, also known as LAN address, Ethernet address, physical address, media access control address, is an address used to confirm the location of network devices.
  • the length of a MAC address is 48 bits (6 bytes), usually expressed as 12 hexadecimal numbers.
  • the MAC address is used to uniquely identify a network card in the network. If a device has one or more network cards, each network card needs and will have a unique MAC address. MAC address filtering technology can ensure that authorized MAC addresses can access network resources.
  • VPN Virtual Private Network
  • VPN Virtual Private Network
  • VPN technology can use insecure networks to send reliable and secure messages, which can be achieved through servers, hardware, software and other methods.
  • the embodiment of the present application considers that, in the related art, the convergence process of the ARP entry response to the failure of the physical port of the network device and its related forwarding path is as follows:
  • the network device senses the abnormality of the port and notifies the CPU of the abnormality of the physical port;
  • the protocol stack calculates all ARP entries (i.e., ARP entries) that need to be deleted according to the abnormal physical port, and notifies the network device one by one to perform hardware deletion of the ARP entries.
  • the protocol stack receives a message that the hardware has been successfully deleted and notifies other network devices of the deleted ARP entry through the routing protocol.
  • the embodiment of the present application proposes a solution, in the case of a physical port failure of a network device, all the ARP entries related thereto can be quickly converged at one time.
  • this method there is no need to process the ARP entries one by one, but all the ARP entries related thereto can be directly processed according to the physical port. Therefore, with this method, all the ARP entries related to the failed physical port can be quickly converged, and the neighboring network devices can be quickly notified. Thereby, the response speed of the network device to the network abnormality is improved, the routing convergence speed of the whole network is improved, and the routing performance of the whole network is improved.
  • FIG. 1 is a flow chart of an embodiment of a message forwarding method of the present application.
  • an embodiment of the present application provides a message forwarding method, which is applied to a network device and includes:
  • Step S101 when a physical port of a network device fails, the corresponding physical port information is deleted in a pre-configured virtual port table of the network device, the virtual port table includes a correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • the network device may be a switch or a router, etc., and the internal processing flow of the network device may be shown in FIG. 4 .
  • the application environment of the message forwarding method of this embodiment may include: a switch or a router needs to quickly converge and respond to changes in the ARP entry of a physical port, for example, in MCLAG switching, core network connection, etc.
  • the actual networking scenario can be shown in FIG5 .
  • the execution subject of the method of this embodiment may be a network device.
  • the network device is pre-configured with a virtual port table, wherein the virtual port table includes a correspondence between the physical ports of the network device and the virtual ports.
  • the ARP entry in the ARP table sent to the network device identifies the host route of the network device, and its exit points to a forwarding path of this network device, which includes the virtual port corresponding to the physical port, the MAC address of the opposite host, Vlan and other routing information of the network device.
  • the port information in the ARP entry is the virtual port information corresponding to the physical port corresponding to the ARP entry corresponding to the physical port, that is, the physical port information in the ARP entry of the physical port corresponding to the virtual port is replaced with the virtual port information.
  • the virtual port table may be a VP table, or other table entries similar to the VP that can be bound to a physical port and can find the physical port during forwarding.
  • This embodiment takes the VP table as an example.
  • the main idea of the embodiment of the present application is to utilize the virtual port VP resources of the network device and correspond one-to-one with the physical port.
  • ARP processing is performed, the real physical port is no longer used to write into the ARP table, but VP is written into the ARP table, and the information of the real physical port is then corresponded in the VP table.
  • the physical port of the network device fails and ARP entries need to be converged, the ARP entries are no longer processed one by one, but the VP table is processed directly. In this way, all ARP entries related to the failed physical port can be quickly converged, thereby achieving a fast convergence effect.
  • network devices generally have VP resources, which are normally used for VPN services.
  • This embodiment uses the VP resources to manage ARP entries, thereby achieving the effect of fast convergence of ARP entries when a physical port fails.
  • a virtual port table (VP table is used as an example below) is pre-configured on the network device, and the VP is written into the ARP table, and the real physical port is no longer used to write into the ARP table.
  • the VP table includes the correspondence between the physical ports and virtual ports (hereinafter referred to as VP) of the network device.
  • the VP table includes VPs and physical port information corresponding to the VPs one by one, wherein the physical port information may include a physical port ID.
  • the ARP entry in the ARP table identifies the host route of the network device, and its exit points to a forwarding path of this network device. Contains the routing information of network devices such as the VP corresponding to the physical port, the MAC address of the remote host, and VLAN.
  • the port information in the ARP entry is virtual port information corresponding to the physical port corresponding to the ARP entry.
  • the VP of the network device is matched with the physical port of the network device one by one. Specifically, the corresponding port ID of the physical port can be written into the VP table.
  • VP is used in the hardware of the network device to replace the existing method of using physical ports to write into the ARP table, that is, the exit path of the ARP entry is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, VP is written into the ARP table entry, and the real physical port is no longer used to write into the ARP table.
  • the correspondence between the virtual port VP and the physical port is configured in the VP table.
  • the message finds the exit through the ARP entry.
  • the real exit will be found in the VP table, so as to find the real physical port for forwarding. In this way, the message forwarding can still be carried out according to the original correct path.
  • the network device when the network device senses that the physical port fails, the corresponding physical port information is deleted from the pre-configured virtual port table of the network device, and the virtual port table includes the correspondence between the physical port and the virtual port of the network device. After this processing, when the physical port fails, there is no need to process the ARP entries one by one.
  • the ARP entry related to the physical port can be deleted to the neighbor devices of the network device through the routing protocol.
  • the neighbor devices of the network device can be informed that the corresponding physical port has failed, and the ARP entries related to the failed physical port need to be deleted.
  • the neighbor devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, thereby achieving the effect of fast network switching.
  • the network device after the network device directly deletes the corresponding physical port information in the VP table, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted.
  • the CPU immediately triggers a routing protocol notification to delete all ARP entries related to the failed physical port in the network protocol to the neighbors of the network device.
  • the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not really deleted.
  • the ARP entry in the hardware still exists, but because its egress VP has failed, the ARP entry cannot forward traffic at present. Therefore, in the case of a physical port failure of the network device, you only need to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, achieving the effect of fast network switching.
  • the real hardware ARP entries in the network device can be deleted one by one according to the routing protocol. Since the routing announcement and the forwarding interruption of the ARP entries of the underlying hardware have been completed, the deletion of the ARP entries in the hardware will no longer affect the fast convergence speed of the entire network.
  • the routing processing scheme of this embodiment no longer needs to process the deletion of hardware ARP entries one by one, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighbor device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation.
  • the speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
  • This embodiment uses the above scheme.
  • a physical port of a network device fails, the corresponding physical port information is deleted from a pre-configured virtual port table of the network device.
  • the virtual port table includes the correspondence between the physical port of the network device and the virtual port.
  • the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • the embodiment of the present application uses the above technical solution to use a virtual port (VP) to replace the physical port to write into the ARP table, which can not only complete the one-time operation of the ARP table when the physical port fails, to achieve rapid convergence of ARP entries and rapid traffic cutoff, but also complete the traffic processing of ARP table entries in the case of port oscillation without causing a large number of routing oscillations.
  • VP virtual port
  • a very efficient and simple ARP processing method when a port fails. Therefore, using this method can improve the response speed of network devices to network abnormalities, improve the routing convergence speed of the entire network, and improve the routing performance of the entire network.
  • FIG. 2 is a flow chart of another embodiment of the message forwarding method of the present application.
  • step S101 when the physical port of the network device fails, after deleting the corresponding physical port information in the pre-configured virtual port table of the network device, it also includes:
  • Step S102 Sending a notification of physical port failure to a neighbor device of the network device through a routing protocol, so that the neighbor device deletes all ARP entries related to the failed physical port.
  • the ARP entry related to the physical port can be deleted to the neighbor devices of the network device through the routing protocol.
  • the neighbor devices of the network device can be informed that the corresponding physical port has failed, and all ARP entries related to the failed physical port need to be deleted.
  • the neighbor devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so as to quickly complete the ARP entry convergence and achieve the effect of fast network switching.
  • the network device after the network device directly deletes the corresponding physical port information in the VP table, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted.
  • the CPU immediately triggers a routing protocol notification to delete all ARP entries related to the failed physical port in the network protocol to the neighbors of the network device.
  • the method may further include, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device:
  • the physical port information in the ARP entry of the physical port corresponding to the virtual port is replaced with the virtual port information corresponding to the physical port.
  • the method may further include, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device:
  • the first correspondence table is used to represent the correspondence between the virtual port corresponding to the physical port of the network device and the ARP entry of the physical port, the port information of the ARP entry in the first correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry;
  • a second correspondence table is generated, where the second correspondence table is used to characterize the correspondence between the physical port of the network device and the ARP entry, and the port information of the ARP entry in the second correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port.
  • the virtual port table is searched to obtain the corresponding target virtual port
  • the first correspondence table is searched, as shown in FIG4 , to obtain a target ARP entry corresponding to the target virtual port, wherein the first correspondence table includes a correspondence between a virtual port corresponding to a physical port of the network device and an ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
  • the target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
  • a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port.
  • the second correspondence table includes a correspondence between the physical port of the network device and the ARP entry (VP1 in the first correspondence table shown in FIG. 4 may be replaced with PORT1 to obtain a second correspondence table of correspondence between the physical port and the ARP entry), and the port information of the ARP entry in the second correspondence table is virtual port information;
  • the target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
  • a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port.
  • a routing notification of the invalidation of the target virtual port is sent to a neighbor device of the network device, so that the neighbor device deletes all target ARP entries corresponding to the target virtual port according to the first correspondence table obtained from the network device, wherein the first correspondence table includes the correspondence between the virtual port corresponding to the physical port of the network device and the ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • this embodiment corresponds the VP of the network device to the physical port of the network device one by one, and writes it into the VP table.
  • the VP table is written into the ARP table item. That is, when the ARP table item is issued, the VP is used to replace the physical port to write the ARP table item in the hardware of the network device, that is, the exit path of the ARP item is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, the VP table is written in the ARP table item, and the real physical port is no longer used to write the ARP table item.
  • the correspondence between the VP and the physical port is configured in the VP table.
  • the message finds the exit through the ARP entry.
  • the real physical port will be found in the VP table to find the real physical port for forwarding. In this way, the message forwarding can still be carried out according to the original correct path.
  • the network device When a physical port fails, the network device directly deletes the corresponding physical port information in the VP table. In this way, the VP of all ARP entries related to this failed physical port will not be able to find the real physical port in the VP table. Therefore, all traffic is immediately interrupted, the ARP entry cannot forward traffic, and the message cannot be forwarded.
  • the neighboring devices of the network device it is necessary for the neighboring devices of the network device to timely learn the routing information related to the ARP table entries of the network device.
  • the network device of this embodiment sends the relevant ARP entry and the corresponding VP routing announcement to the neighboring device of the network device through the routing protocol, so that the neighboring device obtains the association relationship table between the VP and the ARP entry, that is, the first correspondence relationship table.
  • the neighbor device of the network device may delete all target ARP entries corresponding to the target virtual port according to the first correspondence table obtained from the network device.
  • the network device can directly notify the neighboring device of the VP failure before notifying the ARP entry deletion. At this time, the neighboring device can delete all ARP entries related to this VP at a faster speed. In this way, the neighboring device can also revoke all related routes at a faster speed.
  • the network device When the network device notifies the routing information related to these ARP table entries through the routing protocol, it can simultaneously notify the VP information and the related information of the ARP table entries. In this way, the corresponding entries related to the VP and the routing can also be formed on the neighboring device. In this way, when the physical port of the network device fails, the network device can immediately send a VP failure message to the neighboring device, and the neighboring device can immediately delete all the routing entries related to this VP based on this VP information. This avoids unnecessary routing forwarding operations of neighboring devices, improves the response speed of network devices to network abnormalities, improves the routing convergence speed of the entire network, and improves the routing performance of the entire network.
  • the ARP entry related to the physical port can be deleted to the neighboring devices of the network device through the routing protocol.
  • the neighboring devices of the network device can be informed that the corresponding physical port has failed, and the ARP entries related to the failed physical port need to be deleted.
  • the neighboring devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so as to quickly complete the ARP entry convergence and achieve the effect of fast network switching.
  • the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not really deleted.
  • the ARP entry in the hardware still exists, but because its egress VP has failed, the ARP entry cannot forward traffic at present. Therefore, in the case of a physical port failure of the network device, you only need to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, achieving the effect of fast network switching.
  • the real hardware ARP entries in the network device can be deleted one by one according to the routing protocol. Since the routing announcement and the forwarding interruption of the ARP entries of the underlying hardware have been completed, the deletion of the ARP entries in the hardware will no longer affect the fast convergence speed of the entire network.
  • the routing processing scheme of this embodiment no longer needs to process one by one.
  • deleting hardware ARP entries there is no need to wait for the hardware ARP entry deletion time and then notify neighbor devices through the network protocol. Instead, you only need to perform an operation on the VP once, and all ARP entries can be deleted based on the result of this operation.
  • the speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
  • FIG. 3 is a flow chart of another embodiment of the message forwarding method of the present application.
  • FIG. 3 another embodiment of the present application provides a message forwarding method. Based on the embodiment shown in FIG. 1 above, the method further includes:
  • Step S103 Delete the target ARP entries corresponding to the invalid physical ports one by one through the routing protocol.
  • this embodiment further includes: a solution in which the network device deletes the ARP entry related to the failed physical port.
  • the corresponding physical port information in the VP table is deleted from the ARP table entry of the network device.
  • the network device After the network device deletes the corresponding physical port information in the VP table in the ARP table entry, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted. The CPU immediately triggers a routing protocol notification to delete all ARP entries related to the invalid physical port in the network protocol to the neighbors of the network device.
  • the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not actually deleted.
  • the ARP entry in the hardware still exists, but because its egress VP has expired, the ARP entry cannot currently forward traffic.
  • the network device deletes the ARP entry related to the failed physical port in the network device according to the routing protocol.
  • the relationship between the ARP entry and the VP can be stored in a fast-retrieval correspondence table (ie, the first correspondence table in this embodiment) on the network device for fast software deletion.
  • a fast-retrieval correspondence table ie, the first correspondence table in this embodiment
  • the virtual port table is searched to obtain the corresponding target virtual port
  • the first correspondence table includes a correspondence between a virtual port corresponding to a physical port of the network device and an ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
  • target ARP entries are deleted one by one through the routing protocol.
  • the processing speed will be faster, and the network device can quickly delete all ARP entries corresponding to this VP in the network protocol and notify all neighbor devices through the network protocol.
  • the relationship between the ARP entry and the physical port can also be stored in a correspondence table (i.e., the second correspondence table referred to in this embodiment) on the network device, so that the network device can delete the ARP entry related to the failed physical port in the network device through the routing protocol based on the correspondence table between the ARP entry and the physical port.
  • a correspondence table i.e., the second correspondence table referred to in this embodiment
  • the second correspondence table is searched to obtain a target ARP entry corresponding to the failed physical port, wherein the second correspondence table includes a correspondence between the physical port of the network device and the ARP entry, and the port information of the ARP entry in the second correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
  • the target ARP entries are deleted one by one through the routing protocol.
  • the routing processing scheme of this embodiment no longer needs to process the deletion of hardware ARP entries one by one, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighbor device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation.
  • the speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
  • the virtual port table includes the correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry; at the same time, the ARP entry related to the failed physical port in the network device can be deleted according to the routing protocol.
  • a virtual port VP is used to replace the physical port in the ARP table entry.
  • the traffic processing of the ARP table entry can be completed in the case of port oscillation without causing a large number of routing oscillations, thereby improving the routing performance of the entire network.
  • the method may further include:
  • Step S104 when a message forwarding request is received, extracting the destination IP address carried in the message forwarding request;
  • Step S105 determining a corresponding ARP entry according to the destination IP address
  • Step S106 determining the destination virtual port corresponding to the corresponding ARP entry
  • Step S107 searching the virtual port table for a corresponding destination physical port ID based on the destination virtual port;
  • Step S108 when the corresponding destination physical port ID is found, the message is forwarded through the corresponding destination physical port; when the corresponding destination physical port ID is not found, the message is not forwarded.
  • this embodiment corresponds the VP of the network device to the physical port of the network device one by one, and writes them into the VP table.
  • VP is used to replace the physical port to write the ARP table entry, that is, the exit path of the ARP entry is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, the real physical port is no longer used to write the ARP table entry, and the VP table is written in the ARP table entry, and the correspondence between VP and physical port is configured in the VP table.
  • the network device When the network device receives a message forwarding request, it extracts the destination IP address carried in the message forwarding request; and determines a corresponding ARP entry according to the destination IP address.
  • the egress path of the ARP entry is searched in the ARP table of the network device: VP+host MAC+vlan.
  • the corresponding VP is determined according to the egress path of the ARP entry.
  • the network device forwards the message, it finds the egress path of the message through the ARP entry. When it finds that the egress is a VP, it looks up its real physical port in the VP table, such as looking up its real physical port ID in the VP table.
  • the corresponding physical port ID when searching for the corresponding physical port ID in the VP table, if the corresponding physical port ID is not found, it means that the physical port has failed and the corresponding physical port information in the VP table has been deleted, and the message is not forwarded.
  • the network device When a physical port fails, the network device directly deletes the corresponding physical port information in the VP table. In this way, all VPs of ARP entries related to this failed physical port will not be able to find the real physical port in the VP table. Therefore, all traffic is immediately interrupted, ARP entries cannot forward traffic, and messages cannot be forwarded.
  • the method may further include:
  • Step S109 when the invalid physical port of the network device becomes valid again, correspondingly adding valid physical port information to the virtual port table;
  • the network device may add corresponding valid physical port information to the VP table of the ARP table entry.
  • the embodiment of the present application can directly delete the physical port corresponding to the VP when it is invalid. If the physical port becomes valid again before the target ARP entries are deleted one by one, the valid physical port can be directly added to the VP table. Only one operation is required to make all the ARPs related to it valid again or invalid, thereby greatly reducing the consumption of CPU.
  • the method may further include:
  • the port information in the ARP entry is replaced with the virtual port information corresponding to the second physical port.
  • the VP also needs to be updated synchronously, which is similar to the general The effect of using VP is different (VP is generally used in VPN, and the export change is to directly change the export in the VP table).
  • VP is generally used in VPN, and the export change is to directly change the export in the VP table.
  • the physical port corresponding to the VP in the VP table is not changed, but the VP in the ARP entry is changed to the VP corresponding to the new physical port, that is, the VP is updated.
  • the routing processing scheme of the embodiment of the present application no longer needs to process the deletion of hardware ARP entries one by one when the physical port of the network device fails, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighboring device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation.
  • the speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
  • the embodiment of the present application can directly delete the physical port corresponding to the VP when it fails. If the physical port is valid again, this valid physical port can be directly added to the VP table. Only one operation is required to make all related ARPs valid or invalid again, thereby greatly reducing CPU consumption.
  • the ARP entries in the hardware can be compared with the protocol calculation results after the network reaches a steady state, and deleted or added to achieve the same effect as the ARP entries in the protocol and hardware.
  • the specific implementation effect can be shown in Figure 4.
  • the description is mainly divided into two steps.
  • the first step is to use VP to replace the real physical port to write into the ARP table.
  • the specific process is as follows:
  • the network device is assigned VP1, and VP1 corresponds to physical port port1; the network device is assigned VP2, and VP2 corresponds to physical port port2;
  • the entries in the VP table are as follows:
  • the physical port port1 is found to correspond to VP1
  • the physical port port2 is found to correspond to VP2.
  • the VP information is written into the hardware (optionally, ARP entries 10.10.10.1, 10.10.10.2 corresponding to VP1 and ARP entry 10.10.10.3 corresponding to VP2 are formed in the software).
  • the ARP entries written into the hardware are:
  • the ARP entry of 10.1.1.3 changes and is transferred to port1.
  • the network device finds the corresponding VP of port1 as VP1, and directly modifies the relevant fields of the ARP table.
  • the entry of 10.1.1.3 written into the ARP table becomes (optionally, modify the corresponding table of software VP and ARP):
  • the field in the VP table becomes: VP1->NULL (not pointing to any port).
  • the CPU senses that port 1 has failed, and immediately searches for all ARP entries related to port 1 in the software, and notifies neighboring devices through the routing protocol that all of their own ARP entries have been revoked.
  • VP1 can be found through port1, and all ARP entries related to it can be quickly indexed through VP1 for rapid revocation;
  • the neighboring device supports creating routes through the VP notified by the network device, the failure of VP1 can be directly notified to the neighboring device, and the neighboring device will revoke all routes related to VP1 at one time.
  • ARP entries in the hardware are not deleted immediately at this time, after the protocol completes the notification and sends the hardware to delete the ARP entries, these ARP entries can continue to be deleted synchronously with the protocol (since the action of quickly cutting off the traffic has been completed, the subsequent deletion of ARP synchronized by the hardware and protocol will not affect the speed of ARP fast convergence).
  • the correspondence between VP and port1 can be directly restored without taking any other actions, and all ARP traffic recovery can be completed at one time. Since the protocol side will accumulate one ARP deletion and one ARP addition, the device will no longer be processed for ARP deletion and addition, and no notification will be made to neighboring devices. The processing of such situations in this application can quickly respond to the oscillation of the physical port and cut off ARP traffic without generating a large number of routing announcements.
  • routing processing method in the above example in addition to the currently available VP solution, if there are other table entries similar to VP in the chip that can bind ports and can find ports during forwarding, they can also be used for processing in a similar manner to this method and also fall within the protection scope of the present application solution.
  • the application environment of this application is mainly used in the scenario where the switch or router needs to quickly converge and respond to the change of the physical port in the ARP entry, and is mainly used in the scenarios of MCLAG switching, core network connection, etc.
  • the actual networking usage scenario is shown in Figure 5.
  • FIG. 5 is a schematic diagram of an actual networking application scenario of an embodiment of the present application.
  • the actual networking application scenario includes: router G, switch A, switch B, and servers C1, server C2, server C3, and server C4.
  • Router G learns the 32-bit mask routes of downstream servers C1, C2, C3, and C4 respectively. Router G learns the routes of downstream servers C1 and C2 pointing to switch A, and learns the routes of downstream servers C3 and C4 pointing to switch B.
  • a main link and a backup link are configured on the server side.
  • the main link of server C1 is A1, and the backup link is B1;
  • the main link of server C2 is A2, and the backup link is B2;
  • the main link of server C3 is B3, and the backup link is A3;
  • the main link of server C4 is B4, and the backup link is A4, as shown by the arrows in Figure 5.
  • switch B4 fails, and all ARP entries related to B4 need to be quickly converged, and router G should be notified immediately to withdraw related routes.
  • the primary link of server C4 is B4, and the backup link is A4. If a failure occurs between server C4 and the primary link B4, server C4 switches to the backup link A4.
  • router G After the relevant routes of router G are withdrawn, router G re-learns the downstream server C4 route pointing to switch A.
  • an embodiment of the present application provides a routing device, including:
  • a deletion module is used to delete the corresponding physical port information in a pre-configured virtual port table of the network device when a physical port of the network device fails.
  • the virtual port table includes the correspondence between the physical port and the virtual port of the network device.
  • the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  • an embodiment of the present application also proposes a communication device, which includes a memory, a processor, and a message forwarding program stored in the memory and executable on the processor, and when the message forwarding program is executed by the processor, it implements the message forwarding method described in the above embodiments.
  • the communication device may be a network device, such as a switch or a router. As shown in FIG. 7 , the communication device may include an output module 110 , a processor 120 , a memory 130 , and a communication module 140 .
  • the memory 130 stores a message forwarding program.
  • the communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or a server through the communication module 140.
  • an embodiment of the present application further proposes a computer-readable storage medium, on which a message forwarding program is stored.
  • a message forwarding program is executed by a processor, the message forwarding method described in the above embodiments is implemented.
  • the embodiment of the present application uses a virtual port (VP) to replace the physical port in the ARP table entry through the above technical solution, which can not only complete the one-time operation of the ARP table entry when the physical port fails, achieve the rapid convergence of the ARP entry and the rapid flow cutoff, but also complete the flow processing of the ARP table entry in the case of port oscillation without causing a large number of routing oscillations.
  • VP virtual port

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application discloses a message forwarding method, a communication device, and a storage medium. The method comprises: when a physical port of a network device fails, deleting corresponding physical port information from a pre-configured virtual port table of the network device, wherein the virtual port table comprises the correspondence between the physical port and a virtual port of the network device, and port information in an ARP entry corresponding to the physical port is virtual port information corresponding to the physical port corresponding to the ARP entry.

Description

报文转发方法、通信设备及存储介质Message forwarding method, communication device and storage medium
相关申请Related Applications
本申请要求于2022年9月30日申请的、申请号为202211210587.X的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese patent application No. 202211210587.X filed on September 30, 2022, the entire contents of which are incorporated by reference into this application.
技术领域Technical Field
本申请涉及网络技术领域,尤其涉及一种报文转发方法、通信设备及存储介质。The present application relates to the field of network technology, and in particular to a message forwarding method, communication equipment and storage medium.
背景技术Background technique
一般情况下,网络设备的ARP(Address Resolution Protocol,地址解析协议)条目标识了网络设备的主机路由,其出口指向此网络设备的一个转发路径,此路径包含了物理端口、对端主机MAC(Media Access Control,介质访问控制)地址、Vlan(Virtual Local Area Network,虚拟局域网)等信息。Generally speaking, the ARP (Address Resolution Protocol) entry of a network device identifies the host route of the network device, and its exit points to a forwarding path of this network device. This path includes the physical port, the MAC (Media Access Control) address of the other host, Vlan (Virtual Local Area Network) and other information.
目前,在网络设备与其相关的转发路径的物理端口失效时,对于物理端口失效之后相关ARP条目的收敛过程需要逐条处理,其过程较为耗时。而在一些场景中,需要对物理端口失效以后的ARP条目进行快速收敛,以达到网络快速切换的效果,而目前的ARP收敛技术,尚不能满足此类场景的快速收敛的要求。At present, when the physical port of a network device and its related forwarding path fails, the convergence process of the related ARP entries after the physical port fails needs to be processed one by one, which is time-consuming. In some scenarios, it is necessary to quickly converge the ARP entries after the physical port fails to achieve the effect of fast network switching, but the current ARP convergence technology cannot meet the requirements of fast convergence in such scenarios.
发明内容Summary of the invention
有鉴于此,本申请实施例的主要目的在于提出一种报文转发方法、通信设备及存储介质,旨在网络设备的物理端口失效的情况下,快速完成ARP条目收敛,以达到网络快速切换的效果,提高网络设备对网络异常情况的响应速度,提升全网的路由性能。In view of this, the main purpose of the embodiments of the present application is to propose a message forwarding method, communication equipment and storage medium, which aims to quickly complete ARP entry convergence when the physical port of the network device fails, so as to achieve the effect of fast network switching, improve the response speed of the network device to network abnormalities, and improve the routing performance of the entire network.
本申请实施例提供一种报文转发方法,所述方法应用于网络设备,所述方法包括:The present application provides a message forwarding method, which is applied to a network device and includes:
在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。In the event that a physical port of a network device fails, the corresponding physical port information is deleted from a pre-configured virtual port table of the network device, wherein the virtual port table includes a correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
本申请实施例还提供一种通信设备,所述通信设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的报文转发程序,所述报文转发程序被所述处理器执行时实现如上所述的报文转发方法。An embodiment of the present application also provides a communication device, which includes a memory, a processor, and a message forwarding program stored in the memory and executable on the processor, wherein the message forwarding program implements the message forwarding method described above when executed by the processor.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有报文转发程序,所述报文转发程序被处理器执行时实现如上所述的报文转发方法。An embodiment of the present application further provides a computer-readable storage medium, on which a message forwarding program is stored. When the message forwarding program is executed by a processor, the message forwarding method as described above is implemented.
本申请实施例提出的一种报文转发方法、通信设备及存储介质,在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。由此,通过预先配置虚拟端口表,并在虚拟端口表配置网络设备的物理端口与虚拟端口的对应关系,并将ARP条目中的端口信息预先配置为该ARP条目对应的物理端口所对应的虚拟端口信息,在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,从而可以快速完成ARP条目收敛,以达到网络快速切换的效果。The embodiment of the present application proposes a message forwarding method, communication device and storage medium. When a physical port of a network device fails, the corresponding physical port information is deleted in a pre-configured virtual port table of the network device. The virtual port table includes the correspondence between the physical port and the virtual port of the network device. The port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry. Thus, by pre-configuring the virtual port table, configuring the correspondence between the physical port and the virtual port of the network device in the virtual port table, and pre-configuring the port information in the ARP entry as the virtual port information corresponding to the physical port corresponding to the ARP entry, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly to achieve the effect of fast network switching.
相比现有技术中一般的ARP处理方法,本申请实施例通过上述技术方案,使用虚拟端口(VP)来替代物理端口写入ARP表项中,既可以完成在物理端口失效时,针对ARP表项的一次性操作,达到ARP条目的快速收敛和快速流量切断,又可以针对端口震荡的情况完成ARP表项的流量处理且不引起大量路由震荡。是一种非常高效且简单的端口失效时的ARP处理方式。因此,运用此方法可以提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,提升全网的路由性能。Compared with the general ARP processing method in the prior art, the embodiment of the present application uses a virtual port (VP) to replace the physical port to write into the ARP table through the above technical solution, which can not only complete the one-time operation of the ARP table when the physical port fails, so as to achieve the rapid convergence and rapid flow cutting of the ARP entry, but also complete the flow processing of the ARP table in the case of port oscillation without causing a large number of routing oscillations. It is a very efficient and simple ARP processing method when the port fails. Therefore, the use of this method can improve the response speed of network equipment to network abnormalities, improve the routing convergence speed of the entire network, and improve the routing performance of the entire network.
附图说明 BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
图1为本申请报文转发方法一实施例的流程示意图;FIG1 is a flow chart of an embodiment of a message forwarding method of the present application;
图2为本申请报文转发方法另一实施例的流程示意图;FIG2 is a flow chart of another embodiment of the message forwarding method of the present application;
图3为本申请报文转发方法又一实施例的流程示意图;FIG3 is a flow chart of another embodiment of the message forwarding method of the present application;
图4为本申请实施例中网络设备的内部流程示意图;FIG4 is a schematic diagram of the internal flow of a network device in an embodiment of the present application;
图5为本申请实施例的实际组网应用场景示意图;FIG5 is a schematic diagram of an actual networking application scenario of an embodiment of the present application;
图6为本申请报文转发装置一实施例的功能模块示意图;FIG6 is a schematic diagram of functional modules of an embodiment of a message forwarding device of the present application;
图7为本申请通信设备一实施例的功能模块示意图。FIG. 7 is a schematic diagram of functional modules of an embodiment of a communication device of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。In this article, the term "comprises", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. Components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context in the specific embodiment.
尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。本申请使用的术语“或”、“和/或”、“包括以下至少一个”等可被解释为包括性的,或意味着任一个或任何组合。例如,“包括以下至少一个:A、B、C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”,再如,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。Although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and/or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and/or groups. The terms "or", "and/or", "including at least one of the following" used in this application, etc. can be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and/or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。Although the various steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
在本文中,采用了诸如S10、S100等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制。In this article, step codes such as S10, S100, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence.
此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。 The specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或者“单元”的后缀仅为了有利于本申请的说明,其本身没有特定的意义。因此,“模块”、“部件”或者“单元”可以混合地使用。In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
在本申请实施例中,通信设备可以为服务器、终端设备,也可以为基站设备等,需要根据具体上下文来加以确定本申请。In the embodiments of the present application, the communication device may be a server, a terminal device, or a base station device, etc., and the present application needs to be determined according to the specific context.
后续描述中将以服务器为例进行说明,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本申请的实施方式的构造也能够应用于其他固定类型的终端。The following description will be made by taking a server as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present application can also be applied to other fixed types of terminals.
本申请实施例的主要解决方案是:在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。由此,通过预先配置虚拟端口表,并在虚拟端口表配置网络设备的物理端口与虚拟端口的对应关系,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,从而可以快速完成ARP条目收敛,以达到网络快速切换的效果,提高网络设备对网络异常情况的响应速度,提升全网的路由性能。The main solution of the embodiment of the present application is: in the case of failure of the physical port of the network device, the corresponding physical port information is deleted in the pre-configured virtual port table of the network device, the virtual port table includes the correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry. Therefore, by pre-configuring the virtual port table and configuring the correspondence between the physical port and the virtual port of the network device in the virtual port table, it is only necessary to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly to achieve the effect of fast network switching, improve the response speed of the network device to network abnormalities, and improve the routing performance of the entire network.
本申请实施例涉及的技术术语:Technical terms involved in the embodiments of this application:
VP,Virtual Port,虚拟端口;VP, Virtual Port, virtual port;
ARP,Address Resolution Protocol,地址解析协议,是根据IP地址获取物理地址的一个TCP/IP协议。主机发送信息时将包含目标IP地址的ARP请求广播到网络上的所有主机,并接收返回消息,以此确定目标的物理地址;收到返回消息后将该IP地址和物理地址存入本机ARP缓存中并保留一定时间,下次请求时直接查询ARP缓存以节约资源。ARP, Address Resolution Protocol, is a TCP/IP protocol that obtains the physical address based on the IP address. When a host sends information, it broadcasts the ARP request containing the target IP address to all hosts on the network and receives the return message to determine the physical address of the target; after receiving the return message, the IP address and physical address are stored in the local ARP cache and retained for a certain period of time. The next request directly queries the ARP cache to save resources.
ARP表:指主机路由表,ARP表中包括若干ARP条目。ARP表中的ARP条目标识了网络设备的主机路由,其出口指向此网络设备的一个转发路径。本申请实施例中,此路径包含了与物理端口对应的VP、对端主机MAC地址、Vlan等网络设备的路由信息。ARP table: refers to the host routing table, which includes several ARP entries. The ARP entry in the ARP table identifies the host route of the network device, and its exit points to a forwarding path of this network device. In the embodiment of the present application, this path contains the routing information of the network device such as the VP corresponding to the physical port, the MAC address of the opposite host, and the Vlan.
ARP条目的收敛:ARP条目响应网络设备与其相关的转发路径的物理端口失效的收敛,所谓收敛,即在物理端口失效之后,与之相关的ARP条目全部删除,并且通过路由协议通知邻居设备相关的路由删除。Convergence of ARP entries: ARP entries converge in response to the failure of the physical port of the network device and its related forwarding path. The so-called convergence means that after the physical port fails, all related ARP entries are deleted, and the neighboring devices are notified of the related route deletion through the routing protocol.
MC-LAG,Multi-Chassis Link Aggregation Group,跨设备链路聚合组:进入移动互联时代后,互联网与人们的日常生活越发密切,在给人们带来网络便捷体验的同时,也给网络带来了海量数据的交互处理,对网络的带宽和可靠性提出了更高要求。而传统的链路聚合技术仅限于一对一的两台设备之间,不能实现一对多台设备之间的链路聚合。于是,为了提供更可靠的网络,MC-LAG产生了。当一台接入设备(可以是服务器或交换机)与上层两台网络设备A和B对接时,可采用MC-LAG技术组成跨设备链路聚合组。MC-LAG, Multi-Chassis Link Aggregation Group, cross-device link aggregation group: After entering the era of mobile Internet, the Internet has become increasingly closely integrated with people's daily lives. While bringing people a convenient network experience, it has also brought the interactive processing of massive data to the network, and put forward higher requirements for the bandwidth and reliability of the network. However, traditional link aggregation technology is limited to one-to-one between two devices, and cannot achieve link aggregation between one-to-many devices. Therefore, in order to provide a more reliable network, MC-LAG was created. When an access device (which can be a server or a switch) is connected to two upper-layer network devices A and B, MC-LAG technology can be used to form a cross-device link aggregation group.
MC-LAG的基本思想是让两台网络设备A、B以同一状态与接入设备进行链路聚合,在接入设备看来,就如同与同一台网络设备建立了链路聚合关系。这样就将链路聚合技术从一对一的设备对接,扩展到了可以同时接入对端两台设备,并组成了一个双活系统。The basic idea of MC-LAG is to allow two network devices A and B to perform link aggregation with the access device in the same state. From the access device's point of view, it is as if a link aggregation relationship has been established with the same network device. In this way, link aggregation technology is expanded from one-to-one device docking to being able to access two devices at the same time and form a dual-active system.
VLAN,Virtual Local Area Network,虚拟局域网,是对连接到的第二层交换机端口的网络用户的逻辑分段,不受网络用户的物理位置限制而根据用户需求进行网络分段。一个VLAN可以在一个交换机或者跨交换机实现。VLAN可以根据网络用户的位置、作用、部门或者根据网络用户所使用的应用程序和协议来进行分组。基于交换机的虚拟局域网能够为局域网解决冲突域、广播域、带宽问题。VLAN, Virtual Local Area Network, is a logical segmentation of network users connected to the second layer switch port. It is not limited by the physical location of the network users but is segmented according to user needs. A VLAN can be implemented on a switch or across switches. VLANs can be grouped according to the location, role, department of network users or according to the applications and protocols used by network users. Switch-based virtual LANs can solve conflict domains, broadcast domains, and bandwidth issues for LANs.
MAC地址,Media Access Control地址,别称局域网地址、以太网地址、物理地址,介质访问控制地址,是用来确认网络设备位置的位址。MAC地址的长度为48位(6个字节),通常表示为12个16进制数。MAC地址用于在网络中唯一标示一个网卡,一台设备若有一个或多个网卡,则每个网卡都需要并会有一个唯一的MAC地址。通过MAC地址过滤技术可以保证授权的MAC地址能对网络资源进行访问。MAC address, Media Access Control address, also known as LAN address, Ethernet address, physical address, media access control address, is an address used to confirm the location of network devices. The length of a MAC address is 48 bits (6 bytes), usually expressed as 12 hexadecimal numbers. The MAC address is used to uniquely identify a network card in the network. If a device has one or more network cards, each network card needs and will have a unique MAC address. MAC address filtering technology can ensure that authorized MAC addresses can access network resources.
VPN,Virtual Private Network,虚拟专用网络,VPN是一种用于连接中、大型企业或团体与团体间的私人网络的通讯方法,它利用隧道协议来达到保密、发送端认证、消息准确性等私人消息安全效果。VPN技术可以用不安全的网络来发送可靠、安全的消息,可通过服务器、硬件、软件等多种方式实现。VPN, Virtual Private Network, is a communication method used to connect medium and large enterprises or private networks between groups. It uses tunneling protocols to achieve confidentiality, sender authentication, message accuracy and other private message security effects. VPN technology can use insecure networks to send reliable and secure messages, which can be achieved through servers, hardware, software and other methods.
本申请实施例考虑到,相关技术中,ARP条目响应网络设备与其相关的转发路径的物理端口失效的收敛过程如下: The embodiment of the present application considers that, in the related art, the convergence process of the ARP entry response to the failure of the physical port of the network device and its related forwarding path is as follows:
首先,网络设备感知端口出现异常,通知CPU物理端口异常;First, the network device senses the abnormality of the port and notifies the CPU of the abnormality of the physical port;
然后,CPU根据出现异常的物理端口,通知协议栈,协议栈根据异常的物理端口计算需要删除的ARP所有表项(即ARP条目),一条一条通知网络设备进行ARP表项的硬件删除;Then, the CPU notifies the protocol stack according to the abnormal physical port. The protocol stack calculates all ARP entries (i.e., ARP entries) that need to be deleted according to the abnormal physical port, and notifies the network device one by one to perform hardware deletion of the ARP entries.
最后,协议栈得到硬件删除成功的消息,通过路由协议将被删除的ARP表项通告给其他网络设备。Finally, the protocol stack receives a message that the hardware has been successfully deleted and notifies other network devices of the deleted ARP entry through the routing protocol.
由此可见,在现有技术中,对于物理端口失效之后的相关的ARP条目的收敛是一个比较耗时的过程,而且其处理与ARP的条目相关,ARP条目越多处理时间越慢。而在一些场景中,需要对物理端口失效以后的ARP条目进行快速收敛,以达到网络快速切换的效果,例如在MCLAG(Multi-Chassis Link Aggregation Group,跨设备链路聚合组)的网络切换场景中,就会出现类似的需求,而目前的ARP收敛技术,尚不能满足此类场景的快速收敛的要求。It can be seen that in the prior art, the convergence of related ARP entries after the failure of a physical port is a relatively time-consuming process, and its processing is related to the ARP entries. The more ARP entries there are, the slower the processing time. In some scenarios, it is necessary to quickly converge the ARP entries after the failure of a physical port to achieve the effect of fast network switching. For example, in the network switching scenario of MCLAG (Multi-Chassis Link Aggregation Group, cross-device link aggregation group), similar requirements will arise, and the current ARP convergence technology cannot meet the requirements of fast convergence in such scenarios.
因此,本申请实施例提出一种解决方案,在网络设备的物理端口失效的情况下,可以快速将所有与之相关的ARP条目一次性收敛,利用此方法不需要再针对ARP条目一条一条的处理,而是根据物理端口直接处理所有与之相关的ARP条目。因此,运用此方法可以快速收敛与失效物理端口相关的所有ARP条目,并且快速通知邻居网络设备。从而提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,提升全网的路由性能。Therefore, the embodiment of the present application proposes a solution, in the case of a physical port failure of a network device, all the ARP entries related thereto can be quickly converged at one time. With this method, there is no need to process the ARP entries one by one, but all the ARP entries related thereto can be directly processed according to the physical port. Therefore, with this method, all the ARP entries related to the failed physical port can be quickly converged, and the neighboring network devices can be quickly notified. Thereby, the response speed of the network device to the network abnormality is improved, the routing convergence speed of the whole network is improved, and the routing performance of the whole network is improved.
参照图1,图1为本申请报文转发方法一实施例的流程示意图。Refer to Figure 1, which is a flow chart of an embodiment of a message forwarding method of the present application.
如图1所示,本申请一实施例提出一种报文转发方法,所述方法应用于网络设备,所述方法包括:As shown in FIG. 1 , an embodiment of the present application provides a message forwarding method, which is applied to a network device and includes:
步骤S101,在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。Step S101, when a physical port of a network device fails, the corresponding physical port information is deleted in a pre-configured virtual port table of the network device, the virtual port table includes a correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
在本实施例中,网络设备可以是交换机或者路由器等,网络设备的内部处理流程可以参照图4所示。In this embodiment, the network device may be a switch or a router, etc., and the internal processing flow of the network device may be shown in FIG. 4 .
本实施例报文转发方法的应用环境可以包括:交换机或者路由器在ARP条目需要对物理端口的变化进行快速收敛响应的场景中,比如,应用于MCLAG切换、核心网对接等场景。其中,实际组网使用场景可以参照图5所示。The application environment of the message forwarding method of this embodiment may include: a switch or a router needs to quickly converge and respond to changes in the ARP entry of a physical port, for example, in MCLAG switching, core network connection, etc. The actual networking scenario can be shown in FIG5 .
本实施例方法的执行主体可以是网络设备。The execution subject of the method of this embodiment may be a network device.
在本实施例中,网络设备预先配置有虚拟端口表,其中,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口的对应关系。In this embodiment, the network device is pre-configured with a virtual port table, wherein the virtual port table includes a correspondence between the physical ports of the network device and the virtual ports.
此外,在本实施例中,下发给网络设备的ARP表中的ARP条目标识了网络设备的主机路由,其出口指向此网络设备的一个转发路径,此路径包含了与物理端口对应的虚拟端口、对端主机MAC地址、Vlan等网络设备的路由信息。In addition, in this embodiment, the ARP entry in the ARP table sent to the network device identifies the host route of the network device, and its exit points to a forwarding path of this network device, which includes the virtual port corresponding to the physical port, the MAC address of the opposite host, Vlan and other routing information of the network device.
本实施例中,ARP条目中的端口信息为所述物理端口对应ARP条目对应的物理端口所对应的虚拟端口信息,即将虚拟端口对应的物理端口的ARP条目中的物理端口信息替换为了虚拟端口信息。In this embodiment, the port information in the ARP entry is the virtual port information corresponding to the physical port corresponding to the ARP entry corresponding to the physical port, that is, the physical port information in the ARP entry of the physical port corresponding to the virtual port is replaced with the virtual port information.
虚拟端口表可以是VP表,也可以是类似于VP的可以绑定物理端口并且可以在转发时查找到物理端口的其他表项,本实施例以VP表进行举例。The virtual port table may be a VP table, or other table entries similar to the VP that can be bound to a physical port and can find the physical port during forwarding. This embodiment takes the VP table as an example.
本申请实施例的主要思想,是利用网络设备的虚拟端口VP资源,与物理端口一一对应,在ARP处理的时候,不再使用真实物理端口写入ARP表,而是在ARP表中写入VP,在VP表中再去对应真实物理端口的信息,在网络设备的物理端口失效需要进行ARP条目收敛的时候,不再一条一条的对ARP条目进行处理,而是直接处理VP表,这样就可以快速对所有与此失效物理端口相关的ARP条目进行收敛处理,从而达到快速收敛的效果。The main idea of the embodiment of the present application is to utilize the virtual port VP resources of the network device and correspond one-to-one with the physical port. When ARP processing is performed, the real physical port is no longer used to write into the ARP table, but VP is written into the ARP table, and the information of the real physical port is then corresponded in the VP table. When the physical port of the network device fails and ARP entries need to be converged, the ARP entries are no longer processed one by one, but the VP table is processed directly. In this way, all ARP entries related to the failed physical port can be quickly converged, thereby achieving a fast convergence effect.
本实施例考虑到:网络设备中一般会存在VP资源,该VP资源正常情况下一般用于VPN业务。而本申请实施例利用此VP资源来管理ARP条目,从而达到物理端口失效快速收敛ARP条目的效果。This embodiment takes into account that: network devices generally have VP resources, which are normally used for VPN services. This embodiment uses the VP resources to manage ARP entries, thereby achieving the effect of fast convergence of ARP entries when a physical port fails.
在网络设备预先配置虚拟端口表(以下以VP表举例),并在ARP表中写入VP,不再使用真实物理端口写入ARP表。A virtual port table (VP table is used as an example below) is pre-configured on the network device, and the VP is written into the ARP table, and the real physical port is no longer used to write into the ARP table.
所述VP表包括所述网络设备的物理端口与虚拟端口(以下简称VP)的对应关系。The VP table includes the correspondence between the physical ports and virtual ports (hereinafter referred to as VP) of the network device.
该VP表中包括VP以及与所述VP一一对应的物理端口信息,其中,所述物理端口信息可以包括物理端口ID。The VP table includes VPs and physical port information corresponding to the VPs one by one, wherein the physical port information may include a physical port ID.
在ARP表中写入有ARP条目的出口路径。Write the egress path with the ARP entry in the ARP table.
ARP表中的ARP条目标识了网络设备的主机路由,其出口指向此网络设备的一个转发路径,此路径 包含了与物理端口对应的VP、对端主机MAC地址、Vlan等网络设备的路由信息。The ARP entry in the ARP table identifies the host route of the network device, and its exit points to a forwarding path of this network device. Contains the routing information of network devices such as the VP corresponding to the physical port, the MAC address of the remote host, and VLAN.
所述ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。The port information in the ARP entry is virtual port information corresponding to the physical port corresponding to the ARP entry.
在具体实现时,首先,将网络设备的VP与网络设备的物理端口一一对应起来,具体可以在VP表中,写入物理端口的对应端口ID。In specific implementation, firstly, the VP of the network device is matched with the physical port of the network device one by one. Specifically, the corresponding port ID of the physical port can be written into the VP table.
然后,在下发ARP表项的时候,在网络设备的硬件中,使用VP取代现有技术使用物理端口写入ARP表的方法,即ARP条目的出口路径不再写成:物理端口+主机MAC+vlan,而是写成:VP+主机MAC+vlan。即,在ARP表项中写入VP,不再使用真实物理端口写入ARP表,同时,在VP表中配置虚拟端口VP与物理端口的对应关系。Then, when issuing ARP table entries, VP is used in the hardware of the network device to replace the existing method of using physical ports to write into the ARP table, that is, the exit path of the ARP entry is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, VP is written into the ARP table entry, and the real physical port is no longer used to write into the ARP table. At the same time, the correspondence between the virtual port VP and the physical port is configured in the VP table.
由于在VP表中,对应了VP与物理端口的关系,因此,在网络设备转发报文的时候,报文通过ARP条目查找到出口,发现出口是一个VP的时候,就会在VP表中查找其真实出口,从而找到真实的物理端口进行转发,这样使得报文的转发仍然可以按照原有的正确路径进行。Since the VP table corresponds to the relationship between VP and physical port, when the network device forwards the message, the message finds the exit through the ARP entry. When it is found that the exit is a VP, the real exit will be found in the VP table, so as to find the real physical port for forwarding. In this way, the message forwarding can still be carried out according to the original correct path.
在本实施例中,在网络设备感知到物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口的对应关系。这样处理之后,在物理端口出现失效的时候,就不需要对ARP条目进行一条一条的处理。In this embodiment, when the network device senses that the physical port fails, the corresponding physical port information is deleted from the pre-configured virtual port table of the network device, and the virtual port table includes the correspondence between the physical port and the virtual port of the network device. After this processing, when the physical port fails, there is no need to process the ARP entries one by one.
在网络设备的物理端口失效的情况下,在网络设备直接删除VP表中对应的物理端口信息之后,所有与此物理端口相关的ARP条目的VP将无法在VP表中查找到真实物理出口,因此所有流量立刻中断,ARP条目无法转发流量,报文无法转发。When the physical port of a network device fails, after the network device directly deletes the corresponding physical port information in the VP table, all VPs of ARP entries related to this physical port will not be able to find the real physical exit in the VP table, so all traffic is immediately interrupted, ARP entries cannot forward traffic, and messages cannot be forwarded.
作为一种实施方式,在网络设备直接删除VP表中对应的物理端口信息之后,通过路由协议,可以将与所述物理端口有关的ARP条目对所述网络设备的邻居设备进行删除通告,由此,通过通告,可以告知网络设备的邻居设备对应的物理端口已经失效,与失效物理端口有关的ARP条目需要全部删除,网络设备的邻居设备则可以以将所有与此失效物理端口相关的路由全部删除,从而在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,快速完成ARP条目收敛,达到网络快速切换的效果。As an implementation method, after the network device directly deletes the corresponding physical port information in the VP table, the ARP entry related to the physical port can be deleted to the neighbor devices of the network device through the routing protocol. Thus, through the notification, the neighbor devices of the network device can be informed that the corresponding physical port has failed, and the ARP entries related to the failed physical port need to be deleted. The neighbor devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, thereby achieving the effect of fast network switching.
作为一种实施方式,在网络设备直接删除VP表中对应的物理端口信息之后,通知CPU已成功删除VP表中对应的物理端口信息,CPU立刻触发路由协议通告,将网络协议中与此失效物理端口有关的所有ARP条目对网络设备的邻居进行删除通告。As an implementation method, after the network device directly deletes the corresponding physical port information in the VP table, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted. The CPU immediately triggers a routing protocol notification to delete all ARP entries related to the failed physical port in the network protocol to the neighbors of the network device.
此时网络设备的CPU快速的发出了路由通告,但网络设备中硬件的ARP条目并未被真正的删除,硬件中的ARP条目仍然存在,只是由于其出口VP已经失效,因此ARP条目目前无法转发流量。因此,在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,就可以快速完成ARP条目收敛,达到网络快速切换的效果。At this time, the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not really deleted. The ARP entry in the hardware still exists, but because its egress VP has failed, the ARP entry cannot forward traffic at present. Therefore, in the case of a physical port failure of the network device, you only need to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, achieving the effect of fast network switching.
此时网络设备中真正的硬件ARP条目,则可以根据路由协议进行逐条的同步删除,由于已经完成了路由通告和底层硬件的ARP条目的转发中断,因此,此时硬件中的ARP条目的删除已经不再影响整个网络的快速收敛速度了。At this time, the real hardware ARP entries in the network device can be deleted one by one according to the routing protocol. Since the routing announcement and the forwarding interruption of the ARP entries of the underlying hardware have been completed, the deletion of the ARP entries in the hardware will no longer affect the fast convergence speed of the entire network.
根据以上方案可以看出,与现有技术不同,本实施例的路由处理方案,不再需要一个一个的处理硬件ARP条目的删除,也无需等待硬件的ARP条目删除时间,再通过网络协议通知邻居设备,而是只需要对VP做一次操作,根据此操作的结果即可操作所有的ARP条目进行删除。此操作的速度与ARP条目的数量不再有关,因此可以达到快速响应和快速收敛的效果,实际的操作结果可以达到毫秒级的收敛速度。According to the above scheme, it can be seen that, unlike the prior art, the routing processing scheme of this embodiment no longer needs to process the deletion of hardware ARP entries one by one, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighbor device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation. The speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
本实施例通过上述方案,在网络设备的物理端口失效的情况下,在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。由此,通过预先配置虚拟端口表,在虚拟端口表配置网络设备的物理端口与虚拟端口的对应关系,在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,从而可以快速完成ARP条目收敛,以达到网络快速切换的效果。This embodiment uses the above scheme. When a physical port of a network device fails, the corresponding physical port information is deleted from a pre-configured virtual port table of the network device. The virtual port table includes the correspondence between the physical port of the network device and the virtual port. The port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry. Thus, by pre-configuring the virtual port table and configuring the correspondence between the physical port and the virtual port of the network device in the virtual port table, when a physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly to achieve the effect of fast network switching.
相比现有一般的ARP处理方法,本申请实施例通过上述技术方案,使用虚拟端口(VP)来替代物理端口写入ARP表中,既可以完成在物理端口失效时,针对ARP表的一次性操作,达到ARP条目的快速收敛和快速流量切断,又可以针对端口震荡的情况完成ARP表项的流量处理且不引起大量路由震荡。是 一种非常高效且简单的端口失效时的ARP处理方式。因此,运用此方法可以提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,提升全网的路由性能。Compared with the existing general ARP processing method, the embodiment of the present application uses the above technical solution to use a virtual port (VP) to replace the physical port to write into the ARP table, which can not only complete the one-time operation of the ARP table when the physical port fails, to achieve rapid convergence of ARP entries and rapid traffic cutoff, but also complete the traffic processing of ARP table entries in the case of port oscillation without causing a large number of routing oscillations. A very efficient and simple ARP processing method when a port fails. Therefore, using this method can improve the response speed of network devices to network abnormalities, improve the routing convergence speed of the entire network, and improve the routing performance of the entire network.
参照图2,图2为本申请报文转发方法另一实施例的流程示意图。Refer to FIG. 2 , which is a flow chart of another embodiment of the message forwarding method of the present application.
如图2所示,本申请另一实施例提出一种报文转发方法,基于上述图1所示的实施例,在上述步骤S101,在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息之后还包括:As shown in FIG. 2 , another embodiment of the present application proposes a message forwarding method. Based on the embodiment shown in FIG. 1 above, in the above step S101, when the physical port of the network device fails, after deleting the corresponding physical port information in the pre-configured virtual port table of the network device, it also includes:
步骤S102,通过路由协议,向所述网络设备的邻居设备发送物理端口失效的通告,以使所述邻居设备删除与失效的物理端口有关的所有ARP条目。Step S102: Sending a notification of physical port failure to a neighbor device of the network device through a routing protocol, so that the neighbor device deletes all ARP entries related to the failed physical port.
在网络设备直接删除VP表中对应的物理端口信息之后,通过路由协议,可以将与所述物理端口有关的ARP条目对所述网络设备的邻居设备进行删除通告,由此,通过通告,可以告知网络设备的邻居设备对应的物理端口已经失效,与失效物理端口有关的ARP条目需要全部删除,网络设备的邻居设备则可以以将所有与此失效物理端口相关的路由全部删除,从而在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,快速完成ARP条目收敛,达到网络快速切换的效果。After the network device directly deletes the corresponding physical port information in the VP table, the ARP entry related to the physical port can be deleted to the neighbor devices of the network device through the routing protocol. Thus, through the notification, the neighbor devices of the network device can be informed that the corresponding physical port has failed, and all ARP entries related to the failed physical port need to be deleted. The neighbor devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so as to quickly complete the ARP entry convergence and achieve the effect of fast network switching.
作为一种实施方式,在网络设备直接删除VP表中对应的物理端口信息之后,通知CPU已成功删除VP表中对应的物理端口信息,CPU立刻触发路由协议通告,将网络协议中与此失效物理端口有关的所有ARP条目对网络设备的邻居进行删除通告。As an implementation method, after the network device directly deletes the corresponding physical port information in the VP table, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted. The CPU immediately triggers a routing protocol notification to delete all ARP entries related to the failed physical port in the network protocol to the neighbors of the network device.
作为一种实施方式,所述方法在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息之前还可以包括:As an implementation manner, the method may further include, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device:
创建用于表征虚拟端口与物理端口之间的对应关系的虚拟端口表;Creating a virtual port table for characterizing the correspondence between virtual ports and physical ports;
将所述虚拟端口对应的物理端口的ARP条目中的物理端口信息替换为所述物理端口对应的虚拟端口信息。The physical port information in the ARP entry of the physical port corresponding to the virtual port is replaced with the virtual port information corresponding to the physical port.
作为一种实施方式,所述方法在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息之前还可以包括:As an implementation manner, the method may further include, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device:
生成第一对应关系表,所述第一对应关系表用于表征所述网络设备的物理端口对应的虚拟端口与所述物理端口的ARP条目之间的对应关系,所述第一对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;和/或Generate a first correspondence table, the first correspondence table is used to represent the correspondence between the virtual port corresponding to the physical port of the network device and the ARP entry of the physical port, the port information of the ARP entry in the first correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry; and/or
生成第二对应关系表,所述第二对应关系表用于表征所述网络设备的物理端口与ARP条目之间的对应关系,所述第二对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。A second correspondence table is generated, where the second correspondence table is used to characterize the correspondence between the physical port of the network device and the ARP entry, and the port information of the ARP entry in the second correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry.
作为一种实施方式,通过路由协议,向所述网络设备的邻居设备发送物理端口失效的通告,以使所述邻居设备删除与失效的物理端口有关的所有ARP条目,可以采用如下方案:As an implementation mode, a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port. The following solution may be adopted:
首先,基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口;First, based on the failed physical port, the virtual port table is searched to obtain the corresponding target virtual port;
基于所述目标虚拟端口查找所述第一对应关系表,如图4所示,获得与所述目标虚拟端口对应的目标ARP条目,其中,所述第一对应关系表包括所述网络设备的物理端口对应的虚拟端口与所述物理端口的ARP条目之间的对应关系,所述第一对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;Based on the target virtual port, the first correspondence table is searched, as shown in FIG4 , to obtain a target ARP entry corresponding to the target virtual port, wherein the first correspondence table includes a correspondence between a virtual port corresponding to a physical port of the network device and an ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
最后,通过路由协议,将所述目标ARP条目通告至所述网络设备的邻居设备,以使所述邻居设备删除对应的目标ARP条目。Finally, the target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
作为另一种实施方式,通过路由协议,向所述网络设备的邻居设备发送物理端口失效的通告,以使所述邻居设备删除与失效的物理端口有关的所有ARP条目,还可以采用如下方案:As another implementation, a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port. The following solution may also be adopted:
基于失效的物理端口查找所述第二对应关系表,获得与所述失效的物理端口对应的目标ARP条目,所述第二对应关系表包括所述网络设备的物理端口与ARP条目的对应关系(可以将图4所示的第一对应关系表中的VP1替换为PORT1,得到物理端口与ARP条目的对应关系的第二对应关系表),所述第二对应关系表中的ARP条目的端口信息为虚拟端口信息;Searching the second correspondence table based on the failed physical port to obtain a target ARP entry corresponding to the failed physical port, wherein the second correspondence table includes a correspondence between the physical port of the network device and the ARP entry (VP1 in the first correspondence table shown in FIG. 4 may be replaced with PORT1 to obtain a second correspondence table of correspondence between the physical port and the ARP entry), and the port information of the ARP entry in the second correspondence table is virtual port information;
然后,通过路由协议,将所述目标ARP条目通告至所述网络设备的邻居设备,以使所述邻居设备删除对应的目标ARP条目。 Then, the target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
作为再一种实施方式,通过路由协议,向所述网络设备的邻居设备发送物理端口失效的通告,以使所述邻居设备删除与失效的物理端口有关的所有ARP条目,还可以采用如下方案:As another implementation, a notification of physical port failure is sent to a neighbor device of the network device through a routing protocol so that the neighbor device deletes all ARP entries related to the failed physical port. The following solution may also be adopted:
基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口;Searching the virtual port table based on the failed physical port to obtain the corresponding target virtual port;
通过路由协议,向所述网络设备的邻居设备发送所述目标虚拟端口失效的路由通告,以使所述邻居设备根据从所述网络设备获取的所述第一对应关系表将所有与所述目标虚拟端口对应的目标ARP条目全部删除,其中,所述第一对应关系表包括所述网络设备的物理端口对应的虚拟端口与所述物理端口的ARP条目之间的对应关系,所述第一对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。Through a routing protocol, a routing notification of the invalidation of the target virtual port is sent to a neighbor device of the network device, so that the neighbor device deletes all target ARP entries corresponding to the target virtual port according to the first correspondence table obtained from the network device, wherein the first correspondence table includes the correspondence between the virtual port corresponding to the physical port of the network device and the ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry.
如前所述,本实施例将网络设备的VP与网络设备的物理端口一一对应,并写入VP表中,同时,将VP表写入ARP表项中。即在下发ARP表项的时候,在网络设备的硬件中,使用VP取代物理端口写入ARP表项,即ARP条目的出口路径不再写成:物理端口+主机MAC+vlan,而是写成:VP+主机MAC+vlan。即,在ARP表项中写入VP表,不再使用真实物理端口写入ARP表项,同时,在VP表中配置VP与物理端口的对应关系。As mentioned above, this embodiment corresponds the VP of the network device to the physical port of the network device one by one, and writes it into the VP table. At the same time, the VP table is written into the ARP table item. That is, when the ARP table item is issued, the VP is used to replace the physical port to write the ARP table item in the hardware of the network device, that is, the exit path of the ARP item is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, the VP table is written in the ARP table item, and the real physical port is no longer used to write the ARP table item. At the same time, the correspondence between the VP and the physical port is configured in the VP table.
由于在VP表中,对应了VP与物理端口的关系,因此,在网络设备转发报文的时候,报文通过ARP条目查找到出口,发现出口是一个VP的时候,就会在VP表中查找其真实物理端口,从而找到真实的物理端口进行转发,这样使得报文的转发仍然可以按照原有的正确路径进行。Since the VP table corresponds to the relationship between VP and physical port, when the network device forwards the message, the message finds the exit through the ARP entry. When it is found that the exit is a VP, the real physical port will be found in the VP table to find the real physical port for forwarding. In this way, the message forwarding can still be carried out according to the original correct path.
而在物理端口出现失效的时候,网络设备直接删除VP表中对应的物理端口信息,这样所有与此失效物理端口相关的ARP条目的VP将无法在VP表中查找到真实物理端口,因此所有流量立刻中断,ARP条目无法转发流量,报文无法转发。When a physical port fails, the network device directly deletes the corresponding physical port information in the VP table. In this way, the VP of all ARP entries related to this failed physical port will not be able to find the real physical port in the VP table. Therefore, all traffic is immediately interrupted, the ARP entry cannot forward traffic, and the message cannot be forwarded.
在本实施例中,对于网络设备的邻居设备而言,需要及时了解网络设备的ARP表项相关路由信息。In this embodiment, it is necessary for the neighboring devices of the network device to timely learn the routing information related to the ARP table entries of the network device.
因此,本实施例网络设备在获得ARP表项后,通过路由协议,向所述网络设备的邻居设备发送相关的ARP条目以及对应的VP的路由通告,以使所述邻居设备获得该VP与ARP条目的关联关系表,即第一对应关系表。Therefore, after obtaining the ARP table entry, the network device of this embodiment sends the relevant ARP entry and the corresponding VP routing announcement to the neighboring device of the network device through the routing protocol, so that the neighboring device obtains the association relationship table between the VP and the ARP entry, that is, the first correspondence relationship table.
后续,网络设备的邻居设备在接收到网络设备发送的目标虚拟端口失效的路由通告后,邻居设备可以根据从网络设备获取的第一对应关系表将所有与所述目标虚拟端口对应的目标ARP条目全部删除。Subsequently, after receiving the routing advertisement of the invalid target virtual port sent by the network device, the neighbor device of the network device may delete all target ARP entries corresponding to the target virtual port according to the first correspondence table obtained from the network device.
因此,如果邻居设备支持把收到的VP信息与ARP条目关联,则网络设备可以在通告ARP条目删除之前,直接先对邻居设备通告VP失效,此时,邻居设备则可以以更快的速度将所有与此VP相关的ARP条目全部删除。这样邻居设备也可以做到更快速度撤销与此相关的所有路由。Therefore, if the neighboring device supports associating the received VP information with the ARP entry, the network device can directly notify the neighboring device of the VP failure before notifying the ARP entry deletion. At this time, the neighboring device can delete all ARP entries related to this VP at a faster speed. In this way, the neighboring device can also revoke all related routes at a faster speed.
网络设备在通过路由协议对外通告这些ARP表项相关的路由信息的时候,可以将此VP信息与ARP表项相关信息同步通告出去,这样,在邻居设备上,也可以形成这个VP与路由相关的对应条目。这样当网络设备的物理端口失效时,网络设备可以立刻发出一个VP失效的消息给邻居设备,邻居设备可以根据此VP信息立刻将与此VP相关的路由条目全部删除。从而避免邻居设备不必要的路由转发操作,提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,提升全网的路由性能。When the network device notifies the routing information related to these ARP table entries through the routing protocol, it can simultaneously notify the VP information and the related information of the ARP table entries. In this way, the corresponding entries related to the VP and the routing can also be formed on the neighboring device. In this way, when the physical port of the network device fails, the network device can immediately send a VP failure message to the neighboring device, and the neighboring device can immediately delete all the routing entries related to this VP based on this VP information. This avoids unnecessary routing forwarding operations of neighboring devices, improves the response speed of network devices to network abnormalities, improves the routing convergence speed of the entire network, and improves the routing performance of the entire network.
通告上述方案可知,在网络设备直接删除VP表中对应的物理端口信息之后,通过路由协议,可以将与所述物理端口有关的ARP条目对所述网络设备的邻居设备进行删除通告,通过通告,可以告知网络设备的邻居设备对应的物理端口已经失效,与失效物理端口有关的ARP条目需要全部删除,网络设备的邻居设备则可以以将所有与此失效物理端口相关的路由全部删除,从而在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,快速完成ARP条目收敛,达到网络快速切换的效果。It can be seen from the above-mentioned scheme that after the network device directly deletes the corresponding physical port information in the VP table, the ARP entry related to the physical port can be deleted to the neighboring devices of the network device through the routing protocol. Through the notification, the neighboring devices of the network device can be informed that the corresponding physical port has failed, and the ARP entries related to the failed physical port need to be deleted. The neighboring devices of the network device can then delete all routes related to the failed physical port. Therefore, when the physical port of the network device fails, it is only necessary to delete the corresponding physical port information in the ARP table item without processing the ARP entries one by one, so as to quickly complete the ARP entry convergence and achieve the effect of fast network switching.
此时网络设备的CPU快速的发出了路由通告,但网络设备中硬件的ARP条目并未被真正的删除,硬件中的ARP条目仍然存在,只是由于其出口VP已经失效,因此ARP条目目前无法转发流量。因此,在网络设备的物理端口失效的情况下,只需要在ARP表项中删除对应的物理端口信息,而无需逐条处理ARP条目,就可以快速完成ARP条目收敛,达到网络快速切换的效果。At this time, the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not really deleted. The ARP entry in the hardware still exists, but because its egress VP has failed, the ARP entry cannot forward traffic at present. Therefore, in the case of a physical port failure of the network device, you only need to delete the corresponding physical port information in the ARP table entry without processing the ARP entries one by one, so that the ARP entry convergence can be completed quickly, achieving the effect of fast network switching.
此时网络设备中真正的硬件ARP条目,则可以根据路由协议进行逐条的同步删除,由于已经完成了路由通告和底层硬件的ARP条目的转发中断,因此,此时硬件中的ARP条目的删除已经不再影响整个网络的快速收敛速度了。At this time, the real hardware ARP entries in the network device can be deleted one by one according to the routing protocol. Since the routing announcement and the forwarding interruption of the ARP entries of the underlying hardware have been completed, the deletion of the ARP entries in the hardware will no longer affect the fast convergence speed of the entire network.
根据以上方案可以看出,与现有技术不同,本实施例的路由处理方案,不再需要一个一个的处理 硬件ARP条目的删除,也无需等待硬件的ARP条目删除时间,再通过网络协议通知邻居设备,而是只需要对VP做一次操作,根据此操作的结果即可操作所有的ARP条目进行删除。此操作的速度与ARP条目的数量不再有关,因此可以达到快速响应和快速收敛的效果,实际的操作结果可以达到毫秒级的收敛速度。According to the above scheme, it can be seen that, unlike the prior art, the routing processing scheme of this embodiment no longer needs to process one by one. When deleting hardware ARP entries, there is no need to wait for the hardware ARP entry deletion time and then notify neighbor devices through the network protocol. Instead, you only need to perform an operation on the VP once, and all ARP entries can be deleted based on the result of this operation. The speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
参照图3,图3为本申请报文转发方法又一实施例的流程示意图。Refer to FIG. 3 , which is a flow chart of another embodiment of the message forwarding method of the present application.
如图3所示,本申请又一实施例提出一种报文转发方法,基于上述图1所示的实施例,所述方法还包括:As shown in FIG. 3 , another embodiment of the present application provides a message forwarding method. Based on the embodiment shown in FIG. 1 above, the method further includes:
步骤S103,通过路由协议,将与失效的物理端口对应的目标ARP条目逐条删除。Step S103: Delete the target ARP entries corresponding to the invalid physical ports one by one through the routing protocol.
相比上述图1所示的实施例,本实施例还包括:网络设备删除失效物理端口有关的ARP条目的方案。Compared with the embodiment shown in FIG. 1 , this embodiment further includes: a solution in which the network device deletes the ARP entry related to the failed physical port.
作为一种实施方式,在网络设备感知到物理端口失效的情况下,在所述网络设备的ARP表项中删除VP表中对应的物理端口信息。As an implementation mode, when a network device senses that a physical port fails, the corresponding physical port information in the VP table is deleted from the ARP table entry of the network device.
网络设备在ARP表项中删除VP表中对应的物理端口信息后,通知CPU已成功删除VP表中对应的物理端口信息,CPU立刻触发路由协议通告,将网络协议中与此失效物理端口有关的所有ARP条目对网络设备的邻居进行删除通告。After the network device deletes the corresponding physical port information in the VP table in the ARP table entry, it notifies the CPU that the corresponding physical port information in the VP table has been successfully deleted. The CPU immediately triggers a routing protocol notification to delete all ARP entries related to the invalid physical port in the network protocol to the neighbors of the network device.
此时网络设备的CPU快速的发出了路由通告,但网络设备中硬件的ARP条目并未被真正的删除,硬件中的ARP条目仍然存在,只是由于其出口VP已经失效,因此ARP条目目前无法转发流量。At this time, the CPU of the network device quickly sends out a routing announcement, but the ARP entry of the hardware in the network device is not actually deleted. The ARP entry in the hardware still exists, but because its egress VP has expired, the ARP entry cannot currently forward traffic.
在本实施例中,网络设备会根据路由协议对所述网络设备中与该失效物理端口有关的ARP条目进行删除。In this embodiment, the network device deletes the ARP entry related to the failed physical port in the network device according to the routing protocol.
作为一种实施方式,可以在网络设备上将ARP条目与VP的关系存放成一张快速检索的对应关系表(即本实施例所称第一对应关系表),以用于软件的快速删除处理。As an implementation method, the relationship between the ARP entry and the VP can be stored in a fast-retrieval correspondence table (ie, the first correspondence table in this embodiment) on the network device for fast software deletion.
具体实现如下:The specific implementation is as follows:
首先,基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口;First, based on the failed physical port, the virtual port table is searched to obtain the corresponding target virtual port;
然后,基于所述目标虚拟端口查找所述第一对应关系表,获得与所述目标虚拟端口对应的目标ARP条目,所述第一对应关系表包括所述网络设备的物理端口对应的虚拟端口与所述物理端口的ARP条目之间的对应关系,所述第一对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;Then, based on the target virtual port, searching the first correspondence table to obtain a target ARP entry corresponding to the target virtual port, wherein the first correspondence table includes a correspondence between a virtual port corresponding to a physical port of the network device and an ARP entry of the physical port, and the port information of the ARP entry in the first correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
最后,通过路由协议,将所述目标ARP条目逐条删除。Finally, the target ARP entries are deleted one by one through the routing protocol.
因此,如果存在VP与ARP条目的对应表,则处理速度更快,网络设备可以将此VP对应的所有ARP条目在网络协议中快速删除,并且通过网络协议通告给所有邻居设备。Therefore, if there is a corresponding table between VP and ARP entries, the processing speed will be faster, and the network device can quickly delete all ARP entries corresponding to this VP in the network protocol and notify all neighbor devices through the network protocol.
此外,作为另一种实施方式,也可以在网络设备上将ARP条目与物理端口的关系存放成一张对应关系表(即本实施例所称第二对应关系表),便于网络设备基于该ARP条目与物理端口的对应关系表,通过路由协议对所述网络设备中与该失效物理端口有关的ARP条目进行删除。In addition, as another implementation method, the relationship between the ARP entry and the physical port can also be stored in a correspondence table (i.e., the second correspondence table referred to in this embodiment) on the network device, so that the network device can delete the ARP entry related to the failed physical port in the network device through the routing protocol based on the correspondence table between the ARP entry and the physical port.
具体实现如下:The specific implementation is as follows:
首先,基于失效的物理端口查找所述第二对应关系表,获得与所述失效的物理端口对应的目标ARP条目,所述第二对应关系表包括所述网络设备的物理端口与ARP条目的对应关系,所述第二对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;First, based on the failed physical port, the second correspondence table is searched to obtain a target ARP entry corresponding to the failed physical port, wherein the second correspondence table includes a correspondence between the physical port of the network device and the ARP entry, and the port information of the ARP entry in the second correspondence table is virtual port information corresponding to the physical port corresponding to the ARP entry;
然后,通过路由协议,将所述目标ARP条目逐条删除。Then, the target ARP entries are deleted one by one through the routing protocol.
根据以上方案可以看出,与现有技术不同,本实施例的路由处理方案,不再需要一个一个的处理硬件ARP条目的删除,也无需等待硬件的ARP条目删除时间,再通过网络协议通知邻居设备,而是只需要对VP做一次操作,根据此操作的结果即可操作所有的ARP条目进行删除。此操作的速度与ARP条目的数量不再有关,因此可以达到快速响应和快速收敛的效果,实际的操作结果可以达到毫秒级的收敛速度。According to the above scheme, it can be seen that, unlike the prior art, the routing processing scheme of this embodiment no longer needs to process the deletion of hardware ARP entries one by one, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighbor device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation. The speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
本实施例通过上述方案,在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;同时,可以根据路由协议对所述网络设备中与失效的物理端口有关的ARP条目进行删除。由此, 通过在ARP表项中预先配置虚拟端口表,并在虚拟端口表配置网络设备的物理端口与虚拟端口的对应关系,这样,使用虚拟端口(VP)来替代物理端口写入ARP表项中,既可以完成在物理端口失效时,只需要在ARP表项中删除对应的物理端口信息,针对ARP表项的一次性操作,而无需逐条处理ARP条目,达到ARP条目的快速收敛和快速流量切断,提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,又可以针对端口震荡的情况完成ARP表项的流量处理且不引起大量路由震荡,提升全网的路由性能。Through the above scheme, in the case of failure of the physical port of the network device, the corresponding physical port information is deleted in the pre-configured virtual port table of the network device, the virtual port table includes the correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry; at the same time, the ARP entry related to the failed physical port in the network device can be deleted according to the routing protocol. Thus, By pre-configuring a virtual port table in the ARP table entry and configuring the correspondence between the physical port and the virtual port of the network device in the virtual port table, a virtual port (VP) is used to replace the physical port in the ARP table entry. This can not only complete the one-time operation of the ARP table entry by deleting the corresponding physical port information in the ARP table entry when the physical port fails, but also achieve fast convergence of ARP entries and fast traffic cutting, improve the response speed of network devices to network abnormalities, and improve the routing convergence speed of the entire network. In addition, the traffic processing of the ARP table entry can be completed in the case of port oscillation without causing a large number of routing oscillations, thereby improving the routing performance of the entire network.
作为一种实施例,所述方法还可以包括:As an embodiment, the method may further include:
步骤S104,在接收到报文转发请求的情况下,提取所述报文转发请求携带的目的IP地址;Step S104, when a message forwarding request is received, extracting the destination IP address carried in the message forwarding request;
步骤S105,根据所述目的IP地址确定对应的ARP条目;Step S105, determining a corresponding ARP entry according to the destination IP address;
步骤S106,确定所述对应的ARP条目所对应的目的虚拟端口;Step S106, determining the destination virtual port corresponding to the corresponding ARP entry;
步骤S107,基于所述目的虚拟端口从所述虚拟端口表中查找对应的目的物理端口ID;Step S107, searching the virtual port table for a corresponding destination physical port ID based on the destination virtual port;
步骤S108,在查找到对应的目的物理端口ID的情况下,通过对应的目的物理端口转发所述报文,在未查找到对应的目的物理端口ID的情况下,不转发所述报文。Step S108: when the corresponding destination physical port ID is found, the message is forwarded through the corresponding destination physical port; when the corresponding destination physical port ID is not found, the message is not forwarded.
如前所述,本实施例将网络设备的VP与网络设备的物理端口一一对应,并写入VP表中。在下发ARP表项的时候,在网络设备的硬件中,使用VP取代物理端口写入ARP表项,即ARP条目的出口路径不再写成:物理端口+主机MAC+vlan,而是写成:VP+主机MAC+vlan。即不再使用真实物理端口写入ARP表项,同时在ARP表项中写入VP表,在VP表中配置VP与物理端口的对应关系。As mentioned above, this embodiment corresponds the VP of the network device to the physical port of the network device one by one, and writes them into the VP table. When issuing ARP table entries, in the hardware of the network device, VP is used to replace the physical port to write the ARP table entry, that is, the exit path of the ARP entry is no longer written as: physical port + host MAC + vlan, but as: VP + host MAC + vlan. That is, the real physical port is no longer used to write the ARP table entry, and the VP table is written in the ARP table entry, and the correspondence between VP and physical port is configured in the VP table.
当网络设备接收到报文转发请求时,提取所述报文转发请求携带的目的IP地址;根据所述目的IP地址确定对应的ARP条目。When the network device receives a message forwarding request, it extracts the destination IP address carried in the message forwarding request; and determines a corresponding ARP entry according to the destination IP address.
在所述网络设备的ARP表项中查找ARP条目的出口路径:VP+主机MAC+vlan。The egress path of the ARP entry is searched in the ARP table of the network device: VP+host MAC+vlan.
根据所述ARP条目的出口路径确定对应的VP。The corresponding VP is determined according to the egress path of the ARP entry.
由于在VP表中,对应了VP与物理端口的关系,因此,在网络设备转发报文的时候,通过ARP条目查找到报文的出口路径,发现出口是一个VP的时候,就会在VP表中查找其真实物理端口,比如在VP表中查找其真实物理端口ID。Since the VP table corresponds to the relationship between VP and physical port, when the network device forwards the message, it finds the egress path of the message through the ARP entry. When it finds that the egress is a VP, it looks up its real physical port in the VP table, such as looking up its real physical port ID in the VP table.
作为一种情况,在从VP表中查找对应的物理端口ID时,若查找到对应的物理端口ID,说明物理端口并未失效,则通过对应的物理端口转发所述报文,从而通过上述方案找到真实的物理端口进行报文转发,这样在修改了ARP表项配置的情况下,使得报文的转发仍然可以按照原有的正确路径进行。As a case, when searching for the corresponding physical port ID from the VP table, if the corresponding physical port ID is found, it means that the physical port is not invalid, and the message is forwarded through the corresponding physical port, so that the real physical port is found through the above scheme to forward the message, so that when the ARP table configuration is modified, the message forwarding can still be carried out according to the original correct path.
作为另一种情况,在从VP表中查找对应的物理端口ID时,若未查找到对应的物理端口ID,说明该物理端口已失效,VP表中对应的物理端口信息已被删除,则不转发所述报文。As another case, when searching for the corresponding physical port ID in the VP table, if the corresponding physical port ID is not found, it means that the physical port has failed and the corresponding physical port information in the VP table has been deleted, and the message is not forwarded.
在物理端口出现失效的时候,网络设备直接删除VP表中对应的物理端口信息,这样所有与此失效物理端口相关的ARP条目的VP将无法在VP表中查找到真实物理端口,因此所有流量立刻中断,ARP条目无法转发流量,报文无法转发。When a physical port fails, the network device directly deletes the corresponding physical port information in the VP table. In this way, all VPs of ARP entries related to this failed physical port will not be able to find the real physical port in the VP table. Therefore, all traffic is immediately interrupted, ARP entries cannot forward traffic, and messages cannot be forwarded.
本实施例方案可以根据实际情况,与上述各实施例合理组合实施,在此不再详述。The solution of this embodiment can be reasonably combined with the above embodiments according to actual conditions and implemented, and will not be described in detail here.
作为一种实施例,在将目标ARP条目逐条删除之前,所述方法还可以包括:As an embodiment, before deleting the target ARP entries one by one, the method may further include:
步骤S109,在所述网络设备失效的物理端口重新有效的情况下,在所述虚拟端口表中对应添加有效的物理端口信息;Step S109, when the invalid physical port of the network device becomes valid again, correspondingly adding valid physical port information to the virtual port table;
在检测到所述网络设备失效的物理端口持续无效的情况下,执行步骤:通过路由协议,将与失效的物理端口对应的目标ARP条目逐条删除。In the case where it is detected that the failed physical port of the network device continues to be invalid, the step of: deleting the target ARP entries corresponding to the failed physical port one by one through the routing protocol.
在网络设备之前失效的物理端口重新有效的情况下,网络设备可以在所述ARP表项的VP表中对应添加有效的物理端口信息。When a previously invalid physical port of a network device becomes valid again, the network device may add corresponding valid physical port information to the VP table of the ARP table entry.
本申请实施例可以在失效的时候,直接删除VP对应的物理端口,如果在将目标ARP条目逐条删除之前,物理端口重新有效,则直接在VP表中添加此有效的物理端口即可,只需要一次操作,可以使得所有与之相关的ARP重新有效或失效,从而大幅减少对CPU的消耗。The embodiment of the present application can directly delete the physical port corresponding to the VP when it is invalid. If the physical port becomes valid again before the target ARP entries are deleted one by one, the valid physical port can be directly added to the VP table. Only one operation is required to make all the ARPs related to it valid again or invalid, thereby greatly reducing the consumption of CPU.
作为一种实施例,所述方法还可以包括:As an embodiment, the method may further include:
在所述ARP条目对应的第一物理端口变更为第二物理端口的情况下,将所述ARP条目中的端口信息替换为所述第二物理端口对应的虚拟端口信息。When the first physical port corresponding to the ARP entry is changed to a second physical port, the port information in the ARP entry is replaced with the virtual port information corresponding to the second physical port.
如果ARP条目的出口路径的物理端口信息出现变化,也同样需要将VP同步的进行更新,与一般 的VP使用的效果不同的是(一般VPN中使用VP,出口变化是直接改变VP表中的出口),此处不是将VP表中VP对应的物理端口改掉,而是要将ARP条目中的VP变成新的物理端口所对应的VP,即对VP进行更新。If the physical port information of the ARP entry's egress path changes, the VP also needs to be updated synchronously, which is similar to the general The effect of using VP is different (VP is generally used in VPN, and the export change is to directly change the export in the VP table). Here, the physical port corresponding to the VP in the VP table is not changed, but the VP in the ARP entry is changed to the VP corresponding to the new physical port, that is, the VP is updated.
根据以上方案可以看出,与现有技术不同,本申请实施例的路由处理方案,在网络设备的物理端口失效的情况下,不再需要一个一个的处理硬件ARP条目的删除,也无需等待硬件的ARP条目删除时间,再通过网络协议通知邻居设备,而是只需要对VP做一次操作,根据此操作的结果即可对所有的ARP条目进行删除。此操作的速度与ARP条目的数量不再有关,因此可以达到快速响应和快速收敛的效果,实际的操作结果可以达到毫秒级的收敛速度。According to the above scheme, it can be seen that, unlike the prior art, the routing processing scheme of the embodiment of the present application no longer needs to process the deletion of hardware ARP entries one by one when the physical port of the network device fails, nor does it need to wait for the hardware ARP entry deletion time and then notify the neighboring device through the network protocol. Instead, it only needs to operate the VP once, and all ARP entries can be deleted according to the result of this operation. The speed of this operation is no longer related to the number of ARP entries, so it can achieve the effect of fast response and fast convergence, and the actual operation result can reach a convergence speed of milliseconds.
如果此时端口出现震荡,在短时间内连续的出现有效和无效,在以往的技术中,会出现大量的CPU损耗,因为会出现大量的针对硬件的ARP删除和添加操作,而本申请实施例则可以在失效的时候,直接删除VP对应的物理端口,如果物理端口重新有效,则直接在VP表中添加此有效的物理端口即可,只需要一次操作,可以使得所有与之相关的ARP重新有效或失效,从而大幅减少对CPU的消耗。If the port oscillates at this time, and becomes valid and invalid continuously in a short period of time, in previous technologies, a large amount of CPU consumption will occur because a large number of ARP deletion and addition operations for hardware will occur. However, the embodiment of the present application can directly delete the physical port corresponding to the VP when it fails. If the physical port is valid again, this valid physical port can be directly added to the VP table. Only one operation is required to make all related ARPs valid or invalid again, thereby greatly reducing CPU consumption.
而最终硬件中存在的这些ARP条目,则可根据网络在稳态后的协议计算结果,再与协议计算结果做最后的比对,并进行删除或者添加,以达到协议与硬件的ARP条目相同的效果。具体的实现效果可以参照图4所示。The ARP entries in the hardware can be compared with the protocol calculation results after the network reaches a steady state, and deleted or added to achieve the same effect as the ARP entries in the protocol and hardware. The specific implementation effect can be shown in Figure 4.
以下结合图4通过具体实例对本实施例方案进行详细阐述:The present embodiment is described in detail below with reference to FIG4 through a specific example:
主要分两个步骤进行说明。The description is mainly divided into two steps.
假设存在ARP条目:Assuming an ARP entry exists:
10.1.1.1路径出口:物理端口port1,MAC:00:11:22:33:44:55,vlan 100;10.1.1.1 Path egress: physical port port1, MAC: 00:11:22:33:44:55, vlan 100;
10.1.1.2路径出口:物理端口port1,MAC:00:11:22:33:44:66,vlan 100;10.1.1.2 Path egress: physical port port1, MAC: 00:11:22:33:44:66, vlan 100;
10.1.1.3路径出口:物理端口port2,MAC:00:11:22:33:44:77,vlan 200;10.1.1.3 Path exit: physical port port2, MAC: 00:11:22:33:44:77, vlan 200;
第一步骤,使用VP代替真实物理端口写入ARP表,参照图4所示,具体流程如下:The first step is to use VP to replace the real physical port to write into the ARP table. As shown in Figure 4, the specific process is as follows:
1、网络设备分配VP1,用VP1对应物理端口port1;网络设备分配VP2,用VP2对应物理端口port2;1. The network device is assigned VP1, and VP1 corresponds to physical port port1; the network device is assigned VP2, and VP2 corresponds to physical port port2;
VP表中条目如下:The entries in the VP table are as follows:
VP1->port1;VP2->port2;VP1->port1; VP2->port2;
2、协议下发需要写入ARP10.10.10.1、10.10.10.2、10.10.10.3时,查找物理端口port1对应的是VP1,port2对应的是VP2,则将VP信息写入硬件(同时可选的,在软件上形成VP1对应的ARP条目10.10.10.1、10.10.10.2和VP2对应的ARP条目10.10.10.3),最终硬件中写入ARP条目为:2. When the protocol needs to be written into ARP 10.10.10.1, 10.10.10.2, and 10.10.10.3, the physical port port1 is found to correspond to VP1, and the physical port port2 is found to correspond to VP2. Then the VP information is written into the hardware (optionally, ARP entries 10.10.10.1, 10.10.10.2 corresponding to VP1 and ARP entry 10.10.10.3 corresponding to VP2 are formed in the software). Finally, the ARP entries written into the hardware are:
10.1.1.1路径出口:VP1,MAC:00:11:22:33:44:55,vlan 100;10.1.1.1 path egress: VP1, MAC: 00:11:22:33:44:55, vlan 100;
10.1.1.2路径出口:VP1,MAC:00:11:22:33:44:66,vlan 100;10.1.1.2 Path egress: VP1, MAC: 00:11:22:33:44:66, vlan 100;
10.1.1.3路径出口:VP2,MAC:00:11:22:33:44:77,vlan 200;10.1.1.3 Path egress: VP2, MAC: 00:11:22:33:44:77, vlan 200;
3、此时,10.1.1.3的ARP条目发生变化,转移到port1上,此时网络设备查找port1的对应VP为VP1,则直接修改ARP表的相关字段,最终写入ARP表中的10.1.1.3的条目变为(同时可选的,将软件VP与ARP对应表进行修改):3. At this time, the ARP entry of 10.1.1.3 changes and is transferred to port1. At this time, the network device finds the corresponding VP of port1 as VP1, and directly modifies the relevant fields of the ARP table. Finally, the entry of 10.1.1.3 written into the ARP table becomes (optionally, modify the corresponding table of software VP and ARP):
10.1.1.3路径出口:VP1,MAC:00:11:22:33:44:77,vlan 100;10.1.1.3 Path egress: VP1, MAC: 00:11:22:33:44:77, vlan 100;
第二步骤,物理端口出现失效:In the second step, the physical port fails:
1、此时硬件中的ARP条目如下:1. At this time, the ARP entries in the hardware are as follows:
10.1.1.1路径出口:VP1,MAC:00:11:22:33:44:55,vlan 100;10.1.1.1 path egress: VP1, MAC: 00:11:22:33:44:55, vlan 100;
10.1.1.2路径出口:VP1,MAC:00:11:22:33:44:66,vlan 100;10.1.1.2 Path egress: VP1, MAC: 00:11:22:33:44:66, vlan 100;
10.1.1.3路径出口:VP1,MAC:00:11:22:33:44:77,vlan 100;10.1.1.3 Path egress: VP1, MAC: 00:11:22:33:44:77, vlan 100;
2、若物理端口port1出现故障,需要快速收敛ARP条目,则将VP表中的VP1的值删除,即VP1对应的port字段为空:2. If the physical port port1 fails and the ARP entry needs to be quickly converged, the value of VP1 in the VP table will be deleted, that is, the port field corresponding to VP1 will be empty:
即VP表中字段变为:VP1->NULL(未指向任何port)。That is, the field in the VP table becomes: VP1->NULL (not pointing to any port).
3、此时硬件中的ARP表未做任何处理,仍然是:3. At this time, the ARP table in the hardware has not been processed and is still:
10.1.1.1路径出口:VP1,MAC:00:11:22:33:44:55,vlan 100;10.1.1.1 path egress: VP1, MAC: 00:11:22:33:44:55, vlan 100;
10.1.1.2路径出口:VP1,MAC:00:11:22:33:44:66,vlan 100; 10.1.1.2 Path egress: VP1, MAC: 00:11:22:33:44:66, vlan 100;
10.1.1.3路径出口:VP1,MAC:00:11:22:33:44:77,vlan 100;10.1.1.3 Path egress: VP1, MAC: 00:11:22:33:44:77, vlan 100;
但是由于VP1的字段已经为空,因此所有命中此ARP的报文将直接被丢弃,无法转发。However, since the VP1 field is empty, all packets that hit this ARP will be directly discarded and cannot be forwarded.
此时,CPU感知到port1出现故障,立刻查找软件中与port1有关的所有ARP条目,并通过路由协议通知邻居设备自身的这些ARP条目已经全部撤销。At this point, the CPU senses that port 1 has failed, and immediately searches for all ARP entries related to port 1 in the software, and notifies neighboring devices through the routing protocol that all of their own ARP entries have been revoked.
作为一种实施方式,如果在ARP创建的时候,创建了ARP与VP的对应表,此时可以通过port1找到VP1,通过VP1快速索引到所有与之相关的ARP条目进行快速撤销;As an implementation method, if a corresponding table of ARP and VP is created when ARP is created, VP1 can be found through port1, and all ARP entries related to it can be quickly indexed through VP1 for rapid revocation;
作为一种实施方式,如果邻居设备支持通过网络设备通告过来的VP创建路由,则可以直接向邻居设备通告VP1失效,则邻居设备将所有与VP1相关的路由一次性全部撤销。As an implementation mode, if the neighboring device supports creating routes through the VP notified by the network device, the failure of VP1 can be directly notified to the neighboring device, and the neighboring device will revoke all routes related to VP1 at one time.
由于硬件中的ARP条目此时并未被立刻删除,因此,当协议完成通告之后,且下发硬件进行ARP条目删除时,这些ARP条目可以继续与协议进行同步的删除(由于快速切断流量的动作已经完成,因此后续硬件与协议同步的ARP的删除,不会影响ARP快速收敛的速度)。Since the ARP entries in the hardware are not deleted immediately at this time, after the protocol completes the notification and sends the hardware to delete the ARP entries, these ARP entries can continue to be deleted synchronously with the protocol (since the action of quickly cutting off the traffic has been completed, the subsequent deletion of ARP synchronized by the hardware and protocol will not affect the speed of ARP fast convergence).
若在ARP未删除之前,port1的故障已经恢复(即端口出现一次震荡),则可直接恢复VP与port1之间的对应关系,无需再做其他动作,即可一次性完成所有ARP的流量恢复。由于协议侧会积累一次对ARP的删除和一次对ARP的添加,则不再对设备进行ARP删除和添加的处理,也不会对邻居设备进行通告。此类情况在本申请中的处理,可以快速应对物理端口的震荡而切断ARP流量,又不会产生大量的路由通告。If the fault of port1 has been restored before ARP is deleted (that is, the port has experienced an oscillation), the correspondence between VP and port1 can be directly restored without taking any other actions, and all ARP traffic recovery can be completed at one time. Since the protocol side will accumulate one ARP deletion and one ARP addition, the device will no longer be processed for ARP deletion and addition, and no notification will be made to neighboring devices. The processing of such situations in this application can quickly respond to the oscillation of the physical port and cut off ARP traffic without generating a large number of routing announcements.
由此可见,通过使用VP来替代物理端口写入ARP表中,既可以完成在物理端口失效时,针对ARP表的一次性操作,达到ARP表的快速收敛和快速流量切断。又可以针对端口震荡的情况完成ARP表的流量处理且不引起大量路由震荡,是一种非常高效且简单的端口失效时的ARP处理方式。It can be seen that by using VP to replace the physical port to write into the ARP table, it is possible to complete a one-time operation on the ARP table when the physical port fails, achieving rapid convergence of the ARP table and rapid traffic cutoff. It is also possible to complete the traffic processing of the ARP table in the case of port oscillation without causing a large number of routing oscillations. It is a very efficient and simple ARP processing method when the port fails.
以上实例中的路由处理方式,除了目前可以使用的VP方案,若芯片中存在类似于VP的可以绑定端口并且可以在转发时查找到端口的其他表项,亦可以用于本方法类似的方式进行处理,也属于本申请方案的保护范围。The routing processing method in the above example, in addition to the currently available VP solution, if there are other table entries similar to VP in the chip that can bind ports and can find ports during forwarding, they can also be used for processing in a similar manner to this method and also fall within the protection scope of the present application solution.
本申请的应用环境主要应用于交换机或者路由器在ARP条目需要对物理端口的变化进行快速收敛响应的场景中,主要应用于MCLAG切换、核心网对接等场景。实际组网使用场景如图5所示。The application environment of this application is mainly used in the scenario where the switch or router needs to quickly converge and respond to the change of the physical port in the ARP entry, and is mainly used in the scenarios of MCLAG switching, core network connection, etc. The actual networking usage scenario is shown in Figure 5.
参照图5,图5为本申请实施例的实际组网应用场景示意图。Refer to Figure 5, which is a schematic diagram of an actual networking application scenario of an embodiment of the present application.
如图5所示,该实际组网应用场景包括:路由器G、交换机A、交换机B以及服务器C1、服务器C2、服务器C3、服务器C4。As shown in FIG5 , the actual networking application scenario includes: router G, switch A, switch B, and servers C1, server C2, server C3, and server C4.
路由器G上分别学习下游服务器C1、C2、C3、C4的32位掩码路由,路由器G上学习下游服务器C1、C2路由指向交换机A,学习下游服务器C3、C4路由指向交换机B。Router G learns the 32-bit mask routes of downstream servers C1, C2, C3, and C4 respectively. Router G learns the routes of downstream servers C1 and C2 pointing to switch A, and learns the routes of downstream servers C3 and C4 pointing to switch B.
在服务器侧,配置有主链路和备链路,在图5中,服务器C1的主链路为A1,备链路为B1;服务器C2的主链路为A2,备链路为B2;服务器C3的主链路为B3,备链路为A3;服务器C4的主链路为B4,备链路为A4,如图5中箭头所示。On the server side, a main link and a backup link are configured. In Figure 5, the main link of server C1 is A1, and the backup link is B1; the main link of server C2 is A2, and the backup link is B2; the main link of server C3 is B3, and the backup link is A3; the main link of server C4 is B4, and the backup link is A4, as shown by the arrows in Figure 5.
此时,交换机B的B4出现故障,需要快速收敛所有与B4相关的ARP条目,并立刻通知路由器G撤销相关路由。At this time, switch B4 fails, and all ARP entries related to B4 need to be quickly converged, and router G should be notified immediately to withdraw related routes.
在服务器侧,服务器C4的主链路为B4,备链路为A4,若服务器C4与主链路B4之间出现故障,则服务器C4切换到备链路A4。On the server side, the primary link of server C4 is B4, and the backup link is A4. If a failure occurs between server C4 and the primary link B4, server C4 switches to the backup link A4.
在路由器G的相关路由撤销后,路由器G侧重新学习下游服务器C4路由指向交换机A。After the relevant routes of router G are withdrawn, router G re-learns the downstream server C4 route pointing to switch A.
由上可知,交换机B的ARP条目撤销速度直接影响整体流量切换速度。From the above, we can see that the speed at which switch B's ARP entries are revoked directly affects the overall traffic switching speed.
在实际应用场景中,结合本申请实施例的方案,在MCLAG网络快切中会产生非常好的效果,尤其是在MCLAG组网的整体快切(S-MLAG)的模式中,有非常重要的作用,因为此模式需要将虚拟机的ARP全部通告到路由器网关,因此需要在端口异常的时候快速撤销所有的ARP表条目,而本申请实施例的方案可以满足上述需要快速完成ARP条目收敛的场景的需求。In actual application scenarios, combined with the solution of the embodiments of the present application, very good effects will be produced in the MCLAG network fast switching, especially in the overall fast switching (S-MLAG) mode of MCLAG networking, it plays a very important role, because this mode requires all ARPs of the virtual machine to be notified to the router gateway, so it is necessary to quickly revoke all ARP table entries when the port is abnormal, and the solution of the embodiments of the present application can meet the needs of the above-mentioned scenarios where ARP entry convergence needs to be quickly completed.
如图6所示,本申请一实施例提出一种路由装置,包括:As shown in FIG6 , an embodiment of the present application provides a routing device, including:
删除模块,用于在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。A deletion module is used to delete the corresponding physical port information in a pre-configured virtual port table of the network device when a physical port of the network device fails. The virtual port table includes the correspondence between the physical port and the virtual port of the network device. The port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
本实施例实现报文转发的原理及实施过程,请参照上述各实施例,在此不再赘述。 For the principle and implementation process of message forwarding implemented in this embodiment, please refer to the above embodiments and will not be repeated here.
如图7所示,本申请一实施例还提出一种通信设备,所述通信设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的报文转发程序,所述报文转发程序被所述处理器执行时实现如上述各实施例所述的报文转发方法。As shown in Figure 7, an embodiment of the present application also proposes a communication device, which includes a memory, a processor, and a message forwarding program stored in the memory and executable on the processor, and when the message forwarding program is executed by the processor, it implements the message forwarding method described in the above embodiments.
该通信设备可以为网络设备,比如交换机或者路由器等,如图7所示,该通信设备可以包括输出模块110、处理器120、存储器130以及通信模块140。The communication device may be a network device, such as a switch or a router. As shown in FIG. 7 , the communication device may include an output module 110 , a processor 120 , a memory 130 , and a communication module 140 .
存储器130中存储有报文转发程序。通信模块140可以包括WIFI模块、移动通信模块以及蓝牙模块等,通过通信模块140与外部设备或服务器进行通信。The memory 130 stores a message forwarding program. The communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or a server through the communication module 140.
存储器130中的报文转发程序被处理器执行时可以实现如上述各实施例所述的报文转发方法。When the message forwarding program in the memory 130 is executed by the processor, the message forwarding method as described in the above embodiments can be implemented.
由于本报文转发程序被处理器执行时,采用了前述所有实施例的全部技术方案,因此至少具有前述所有实施例的全部技术方案所带来的所有有益效果,在此不再一一赘述。Since all the technical solutions of all the aforementioned embodiments are adopted when the message forwarding program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有报文转发程序,所述报文转发程序被处理器执行时实现如上述各实施例所述的报文转发方法。In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which a message forwarding program is stored. When the message forwarding program is executed by a processor, the message forwarding method described in the above embodiments is implemented.
由于本报文转发程序被处理器执行时,采用了前述所有实施例的全部技术方案,因此至少具有前述所有实施例的全部技术方案所带来的所有有益效果,在此不再一一赘述。Since all the technical solutions of all the aforementioned embodiments are adopted when the message forwarding program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
相比现有技术,本申请实施例通过上述技术方案,使用虚拟端口(VP)来替代物理端口写入ARP表项中,既可以完成在物理端口失效时,针对ARP表项的一次性操作,达到ARP条目的快速收敛和快速流量切断,又可以针对端口震荡的情况完成ARP表项的流量处理且不引起大量路由震荡。是一种非常高效且简单的端口失效时的ARP处理方式。因此,运用此方法可以提高网络设备对网络异常情况的响应速度,提升全网的路由收敛速度,提升全网的路由性能。Compared with the prior art, the embodiment of the present application uses a virtual port (VP) to replace the physical port in the ARP table entry through the above technical solution, which can not only complete the one-time operation of the ARP table entry when the physical port fails, achieve the rapid convergence of the ARP entry and the rapid flow cutoff, but also complete the flow processing of the ARP table entry in the case of port oscillation without causing a large number of routing oscillations. It is a very efficient and simple ARP processing method when the port fails. Therefore, the use of this method can improve the response speed of network equipment to network abnormalities, improve the routing convergence speed of the entire network, and improve the routing performance of the entire network.
在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。In this document, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台通信设备(可以是手机,计算机,服务器,被控终端,或者网络设备等)执行本申请每个实施例的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, disk, CD) as above, including a number of instructions for a communication device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the method of each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。 The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims (13)

  1. 一种报文转发方法,应用于网络设备,所述方法包括:A message forwarding method, applied to a network device, comprising:
    在网络设备的物理端口失效的情况下,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息,所述虚拟端口表包括所述网络设备的物理端口与虚拟端口之间的对应关系,所述物理端口对应的ARP条目中的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。In the event that a physical port of a network device fails, the corresponding physical port information is deleted from a pre-configured virtual port table of the network device, wherein the virtual port table includes a correspondence between the physical port and the virtual port of the network device, and the port information in the ARP entry corresponding to the physical port is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  2. 根据权利要求1所述的方法,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息之前还包括:The method according to claim 1, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device, further comprises:
    生成第一对应关系表,所述第一对应关系表用于表征所述网络设备的物理端口对应的虚拟端口与所述物理端口的ARP条目之间的对应关系,所述第一对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息;和/或Generate a first correspondence table, the first correspondence table is used to represent the correspondence between the virtual port corresponding to the physical port of the network device and the ARP entry of the physical port, the port information of the ARP entry in the first correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry; and/or
    生成第二对应关系表,所述第二对应关系表用于表征所述网络设备的物理端口与ARP条目之间的对应关系,所述第二对应关系表中的ARP条目的端口信息为所述ARP条目对应的物理端口所对应的虚拟端口信息。A second correspondence table is generated, where the second correspondence table is used to characterize the correspondence between the physical port of the network device and the ARP entry, and the port information of the ARP entry in the second correspondence table is the virtual port information corresponding to the physical port corresponding to the ARP entry.
  3. 根据权利要求2所述的方法,所述方法还包括:The method according to claim 2, further comprising:
    基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口;Searching the virtual port table based on the failed physical port to obtain the corresponding target virtual port;
    基于所述目标虚拟端口查找所述第一对应关系表,获得与所述目标虚拟端口对应的目标ARP条目;Searching the first correspondence table based on the target virtual port to obtain a target ARP entry corresponding to the target virtual port;
    通过路由协议,将所述目标ARP条目通告至所述网络设备的邻居设备,以使所述邻居设备删除对应的目标ARP条目。The target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
  4. 根据权利要求2所述的方法,所述方法还包括:The method according to claim 2, further comprising:
    基于失效的物理端口查找所述第二对应关系表,获得与所述失效的物理端口对应的目标ARP条目;Searching the second correspondence table based on the failed physical port to obtain a target ARP entry corresponding to the failed physical port;
    通过路由协议,将所述目标ARP条目通告至所述网络设备的邻居设备,以使所述邻居设备删除对应的目标ARP条目。The target ARP entry is notified to the neighboring device of the network device through a routing protocol, so that the neighboring device deletes the corresponding target ARP entry.
  5. 根据权利要求2所述的方法,所述方法还包括:The method according to claim 2, further comprising:
    基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口;Searching the virtual port table based on the failed physical port to obtain the corresponding target virtual port;
    通过路由协议,向所述网络设备的邻居设备发送所述目标虚拟端口失效的路由通告,以使所述邻居设备根据从所述网络设备获取的所述第一对应关系表将所有与所述目标虚拟端口对应的目标ARP条目全部删除。A routing notification of invalidation of the target virtual port is sent to a neighbor device of the network device through a routing protocol, so that the neighbor device deletes all target ARP entries corresponding to the target virtual port according to the first corresponding relationship table obtained from the network device.
  6. 根据权利要求2所述的方法,所述方法还包括:The method according to claim 2, further comprising:
    基于失效的物理端口查找所述虚拟端口表,获得对应的目标虚拟端口,基于所述目标虚拟端口查找所述第一对应关系表,获得与所述目标虚拟端口对应的目标ARP条目;或者基于失效的物理端口查找所述第二对应关系表,获得与所述失效的物理端口对应的目标ARP条目;Searching the virtual port table based on the failed physical port to obtain the corresponding target virtual port, searching the first correspondence table based on the target virtual port to obtain the target ARP entry corresponding to the target virtual port; or searching the second correspondence table based on the failed physical port to obtain the target ARP entry corresponding to the failed physical port;
    通过路由协议,将所述目标ARP条目逐条删除。The target ARP entries are deleted one by one through the routing protocol.
  7. 根据权利要求1所述的方法,在所述网络设备的预先配置的虚拟端口表中删除对应的物理端口信息之前还包括:The method according to claim 1, before deleting the corresponding physical port information in the pre-configured virtual port table of the network device, further comprises:
    创建用于表征虚拟端口与物理端口之间的对应关系的虚拟端口表;Creating a virtual port table for characterizing the correspondence between virtual ports and physical ports;
    将所述虚拟端口对应的物理端口的ARP条目中的物理端口信息替换为所述物理端口对应的虚拟端口信息。 The physical port information in the ARP entry of the physical port corresponding to the virtual port is replaced with the virtual port information corresponding to the physical port.
  8. 根据权利要求6所述的方法,所述物理端口信息包括物理端口ID,所述方法还包括:According to the method of claim 6, the physical port information includes a physical port ID, and the method further includes:
    在接收到报文转发请求的情况下,提取所述报文转发请求携带的目的IP地址;When receiving a message forwarding request, extracting the destination IP address carried in the message forwarding request;
    根据所述目的IP地址确定对应的ARP条目;Determine a corresponding ARP entry according to the destination IP address;
    确定所述对应的ARP条目所对应的目的虚拟端口;Determine the destination virtual port corresponding to the corresponding ARP entry;
    基于所述目的虚拟端口从所述虚拟端口表中查找对应的目的物理端口ID;Searching the corresponding destination physical port ID from the virtual port table based on the destination virtual port;
    在查找到对应的目的物理端口ID的情况下,通过对应的目的物理端口转发所述报文;When the corresponding destination physical port ID is found, forward the message through the corresponding destination physical port;
    在未查找到对应的目的物理端口ID的情况下,不转发所述报文。If the corresponding destination physical port ID is not found, the message is not forwarded.
  9. 根据权利要求6所述的方法,所述通过路由协议,将所述目标ARP条目逐条删除的步骤之前还包括:According to the method of claim 6, before the step of deleting the target ARP entries one by one through the routing protocol, the method further comprises:
    在所述网络设备失效的物理端口重新有效的情况下,在所述虚拟端口表中对应添加有效的物理端口信息;When the invalid physical port of the network device becomes valid again, correspondingly add valid physical port information to the virtual port table;
    在检测到所述网络设备失效的物理端口持续无效的情况下,执行步骤:通过路由协议,将所述目标ARP条目逐条删除。In the case where it is detected that the failed physical port of the network device continues to be invalid, the step of: deleting the target ARP entries one by one through a routing protocol is performed.
  10. 根据权利要求1所述的方法,所述ARP条目包括:IP地址、主机MAC地址、虚拟端口信息以及vlan。According to the method of claim 1, the ARP entry includes: an IP address, a host MAC address, virtual port information, and a VLAN.
  11. 根据权利要求10所述的方法,所述方法还包括:The method according to claim 10, further comprising:
    在所述ARP条目对应的第一物理端口变更为第二物理端口的情况下,将所述ARP条目中的端口信息替换为所述第二物理端口对应的虚拟端口信息。When the first physical port corresponding to the ARP entry is changed to a second physical port, the port information in the ARP entry is replaced with the virtual port information corresponding to the second physical port.
  12. 一种通信设备,其中,所述通信设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的报文转发程序,所述报文转发程序被所述处理器执行时实现如权利要求1-11中任一项所述的报文转发方法。A communication device, wherein the communication device includes a memory, a processor, and a message forwarding program stored in the memory and executable on the processor, wherein the message forwarding program, when executed by the processor, implements the message forwarding method as described in any one of claims 1 to 11.
  13. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有报文转发程序,所述报文转发程序被处理器执行时实现如权利要求1-11中任一项所述的报文转发方法。 A computer-readable storage medium, wherein a message forwarding program is stored on the computer-readable storage medium, and when the message forwarding program is executed by a processor, the message forwarding method according to any one of claims 1 to 11 is implemented.
PCT/CN2023/104221 2022-09-30 2023-06-29 Message forwarding method, communication device, and storage medium WO2024066587A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211210587.XA CN117857484A (en) 2022-09-30 2022-09-30 Message forwarding method, communication equipment and storage medium
CN202211210587.X 2022-09-30

Publications (1)

Publication Number Publication Date
WO2024066587A1 true WO2024066587A1 (en) 2024-04-04

Family

ID=90475940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/104221 WO2024066587A1 (en) 2022-09-30 2023-06-29 Message forwarding method, communication device, and storage medium

Country Status (2)

Country Link
CN (1) CN117857484A (en)
WO (1) WO2024066587A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly
US20140321265A1 (en) * 2013-04-29 2014-10-30 Telefonaktiebolaget L M Ericsson (Publ) Fast traffic recovery in vrrp based routers
US20170180274A1 (en) * 2014-07-14 2017-06-22 Hangzhou H3C Technologies Co., Ltd. Packets Processing
US20200244569A1 (en) * 2017-10-20 2020-07-30 Huawei Technologies Co., Ltd. Traffic Forwarding Method and Traffic Forwarding Apparatus
JP2020137006A (en) * 2019-02-22 2020-08-31 日本電気株式会社 Address resolution control method, network system, server device, terminal and program
CN113220413A (en) * 2021-04-21 2021-08-06 新浪网技术(中国)有限公司 Method and system for clearing ARP (address resolution protocol) table entry of old port of switch after virtual machine migration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly
US20140321265A1 (en) * 2013-04-29 2014-10-30 Telefonaktiebolaget L M Ericsson (Publ) Fast traffic recovery in vrrp based routers
US20170180274A1 (en) * 2014-07-14 2017-06-22 Hangzhou H3C Technologies Co., Ltd. Packets Processing
US20200244569A1 (en) * 2017-10-20 2020-07-30 Huawei Technologies Co., Ltd. Traffic Forwarding Method and Traffic Forwarding Apparatus
JP2020137006A (en) * 2019-02-22 2020-08-31 日本電気株式会社 Address resolution control method, network system, server device, terminal and program
CN113220413A (en) * 2021-04-21 2021-08-06 新浪网技术(中国)有限公司 Method and system for clearing ARP (address resolution protocol) table entry of old port of switch after virtual machine migration

Also Published As

Publication number Publication date
CN117857484A (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US11611509B2 (en) Communication method, communications device, and communications system
EP3188409B1 (en) Oam mechanisms for evpn active-active services
US9019814B1 (en) Fast failover in multi-homed ethernet virtual private networks
US20110032939A1 (en) Network system, packet forwarding apparatus, and method of forwarding packets
JP7306642B2 (en) Loop avoidance communication method, loop avoidance communication device and loop avoidance communication system
WO2007012239A1 (en) A method for switching the serving services of virtual private lan and a system thereof
JP2001500345A (en) Routing in multilayer distributed network elements
WO2009033428A1 (en) Method, system and device for removing media access control address
CN115118545B (en) Group management protocol host mobility in ethernet virtual private network multicast networks
JP6299745B2 (en) COMMUNICATION SYSTEM, CONTROL DEVICE, COMMUNICATION METHOD, AND PROGRAM
CN104113513B (en) A kind of detecting host method, apparatus and system
WO2010020103A1 (en) Method and device for providing service for the duplicate mac address users
WO2024066587A1 (en) Message forwarding method, communication device, and storage medium
WO2018040940A1 (en) Two-layer network, and loopback detection method of two-layer network
WO2017170155A1 (en) Communication system, flow control apparatus, flow processing apparatus, and control method
JP4011528B2 (en) Network virtualization system
CN108881015B (en) Message broadcasting method and device
CN114531396B (en) A method and device for failback in Ethernet virtual private network
CN116112191A (en) Method, device and network equipment for configuring ACL based on routing table
CN111884838A (en) A device for communicating between an SDN network and a non-SDN network
CN116074244A (en) Ethernet High Availability Point-to-Point Connectivity Based on Secure Vector Routing
WO2024230201A1 (en) Traffic data forwarding method, system, electronic device and computer storage medium
CN118842746A (en) Session forwarding method and device for dual-machine asymmetric routing environment
CN115037686A (en) A message forwarding method and device
CN115701055A (en) User information diffusion method and network equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23869835

Country of ref document: EP

Kind code of ref document: A1