CN111556179B - ARP (Address resolution protocol) table entry updating method and device - Google Patents
ARP (Address resolution protocol) table entry updating method and device Download PDFInfo
- Publication number
- CN111556179B CN111556179B CN202010351680.7A CN202010351680A CN111556179B CN 111556179 B CN111556179 B CN 111556179B CN 202010351680 A CN202010351680 A CN 202010351680A CN 111556179 B CN111556179 B CN 111556179B
- Authority
- CN
- China
- Prior art keywords
- arp
- request message
- switch
- message
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000004044 response Effects 0.000 claims description 52
- 230000008859 change Effects 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 claims description 8
- 239000000725 suspension Substances 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 3
- 238000001514 detection method Methods 0.000 abstract description 7
- 230000007246 mechanism Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 9
- 230000006855 networking Effects 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 239000004744 fabric Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5053—Lease time; Renewal aspects
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides an ARP table entry updating method and device, which are used for deleting partial ARP table entries in an ARP cache table by utilizing an ARP detection mechanism when the network topology structure of a switching unit network configured with STP changes.
Description
Technical Field
The present disclosure relates to network communication technologies, and in particular, to an ARP entry updating method and apparatus.
Background
In a switch network configured with STP (Spanning Tree Protocol ), an election mechanism according to the STP protocol will elect one switch as the root switch and the remaining switches as designated switches. When the root switch senses that the networking topology structure is changed, the root switch can also inform all other appointed switches to empty the ARP cache table of the root switch while the root switch is empty of the ARP cache table of the root switch.
When a large number of terminal devices exist in the switch network, the network topology structure is frequently changed due to frequent online and offline of the terminal devices, so that ARP cache tables in the root switch and each designated switch are frequently deleted, the ARP request messages sent in a broadcasting mode in the network are flooded, network resources are greatly consumed, the root switch and each designated switch cannot normally forward IP messages, and the IP message transmission is abnormal.
Disclosure of Invention
The application provides an ARP table entry updating method and device, which are used for deleting partial ARP table entries in an ARP cache table by utilizing an ARP detection mechanism when the network topology structure of a switching unit network configuring STP changes.
The technical scheme that this application provided includes:
according to a first aspect of the present application, there is provided a method for updating ARP table entries, the method being applied to a root switch in a switch network configured for STP, the switch network further comprising: at least one designated switch other than the root switch, the root switch connecting the designated switch through an assigned port; the method comprises the following steps:
when a TCN message is received through a local assignment port, sending a TC message to an assigned switch in the STP of the switch network, and determining a first ARP (address resolution protocol) table item to be deleted from a local ARP cache table according to the assignment port; the TC message is used for indicating to suspend updating the ARP list item;
constructing an ARP request message corresponding to each first ARP table item and sending the ARP request message, and deleting the first ARP table item if an ARP response message for responding to the ARP request message is not received within a specified duration; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table.
According to a second aspect of the present application, there is provided an ARP entry updating method applied to any designated switch in a switch network configured to STP, the switch network further comprising: a root switch other than the specified switch, the specified switch being connected to the root switch through a root port; the method comprises the following steps:
when receiving a TC message through a local root port, suspending updating an ARP table entry in a local ARP cache table;
if an ARP request message sent by the root switch is received in the suspension time period, determining a second ARP table item to be deleted from a local ARP cache table according to the ARP request message;
and if the ARP response message for responding to the ARP request message is not received within the appointed time, deleting the second ARP list item.
According to a third aspect of the present application, there is provided an ARP entry updating apparatus for use in a root switch in a switch network configured for STP, the switch network further comprising: at least one designated switch other than the root switch, the root switch connecting the designated switch through an assigned port; the device comprises:
the first determining unit is used for sending a TC message to a designated switch in the switch network STP when receiving the TCN message through a local assigned port, and determining a first ARP table entry to be deleted from a local ARP cache table according to the assigned port; the TC message is used for indicating to suspend updating the ARP list item;
the first updating unit is used for constructing an ARP request message corresponding to each first ARP table item and sending the ARP request message, and deleting the first ARP table item if an ARP response message for responding to the ARP request message is not received within a specified duration; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table.
According to a fourth aspect of the present application, there is provided an ARP entry updating apparatus, the apparatus being applied to any designated switch in a switch network configured with STP, the switch network further comprising: a root switch other than the specified switch, the specified switch being connected to the root switch through a root port; the device comprises:
the receiving unit is used for suspending updating the ARP table entry in the local ARP cache table when the TC message is received through the local root port;
the second determining unit is used for determining a second ARP table entry to be deleted from a local ARP cache table according to the ARP request message if the ARP request message sent by the root switch is received in the suspension time period;
and the second updating unit is used for deleting the second ARP table entry if the ARP response message for responding to the ARP request message is not received within the appointed duration.
According to the technical scheme, when the network topology of the exchange network configuring the STP changes, the root exchange and each appointed exchange do not directly empty the ARP cache table any more, but the ARP detection mechanism is utilized to pertinently delete the ARP table entry corresponding to the equipment leaving the exchange network or interrupted with the link between the root exchange. On the basis, on one hand, because the ARP request message sent by the ARP detection mechanism is sent in a unicast mode, the problem of flooding of the ARP request message sent in a broadcast mode due to the change of a network topology in the related art is avoided; on the other hand, when the network topology structure changes each time, only part of ARP list items are deleted, so that the root exchanger and each appointed exchanger can normally forward the IP message, and the abnormal transmission of the IP message is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario diagram provided in the present application;
FIG. 2 is a flowchart of an ARP entry update method performed by a root switch side provided in the present application;
FIG. 3 is a flowchart of a method for updating ARP entries performed by a designated exchange side provided in the present application;
fig. 4 is a schematic structural diagram of an ARP entry updating apparatus for a root switch according to the present application;
fig. 5 is a schematic structural diagram of an ARP entry updating apparatus for a specified switch according to the present application;
FIG. 6 is a schematic diagram of a hardware structure of the apparatus shown in FIG. 4 provided in the present application;
fig. 7 is a schematic hardware structure of the apparatus shown in fig. 5 provided in the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
Fig. 1 is an application scenario diagram of an ARP entry updating method provided in the present application. As shown in fig. 1, the application scenario is a switch network that enables STP protocol, hereinafter referred to as a switch network STP, where the switch network STP includes a root switch, N designated switches, and N hosts.
The root switch is a root node in the STP networking, and the network bridge with the highest priority in all the network bridges in the STP networking is used as the root node. The root bridge may be connected to the internet to transfer data sent by each host in the STP network to the internet and to transfer data in the internet to be transferred to the hosts in the STP network to each host. The root switch may also connect to each designated switch through an assigned port. When the root switch receives a TCN (Topology Change Notification ) message sent by any designated switch through any designated port in the local area, a TC (Topology Change) message is sent outwards through all designated ports in the local area, so as to notify each designated switch to update its own ARP cache table. Meanwhile, the root switch updates the locally stored ARP cache table.
The assigned switch is a network bridge responsible for data forwarding tasks on a physical segment, and the network bridge with the highest priority in the physical segment is used as the network bridge. The designated switch may be connected to other designated switches, root switches or hosts within the STP network, as well as to switches, routers in other local area networks. When any appointed switch senses that the network topology structure of STP networking changes, a TCN message is sent to the root switch to inform the root switch that the network topology structure of STP networking changes. After receiving the TC BPDU message sent by the root exchange, the ARP cache table of the root exchange is updated.
Wherein the hosts may be connected to a designated switch for communication with hosts within an STP network or other local area network through the designated switch or with the internet through the designated switch and a root switch.
The ARP entry updating method provided in the embodiment of the present application will be described below from the root exchange side and the designated exchange side, respectively.
Referring to fig. 2, fig. 2 is a flowchart of an ARP entry updating method performed by a root exchange side according to an embodiment of the application. The ARP entry updating method may be applied to a root switch in the switch fabric shown in fig. 1, where the root switch may be a frame switch.
As shown in fig. 2, the process may include the steps of:
step 101, when a TCN message is received through a local assignment port, sending the TC message to an assigned switch in a switch network STP, and determining a first ARP table entry to be deleted from a local ARP cache table according to the assignment port; the TC message is used for indicating to suspend updating the ARP table entry;
as an example, in the switch networking STP, when any given switch senses a change in network topology, a TCN message is sent to the root switch through its own root port to notify the root switch that the network topology of the STP networking changes. When the root switch receives the TCN message through any assigned port, the TCN message is responded to generate a TC message, and the TC message is sent outwards through all the assigned ports locally, so that the TC message is transmitted to all the assigned switches in the switch network STP. After receiving the TC message, each appointed exchanger does not directly empty the ARP cache table, but temporarily updates the ARP table entry in the ARP cache table. How the designated switch responds to the TC message to update the ARP table entry will be described below and will not be described in detail.
As an example, when the root switch in the embodiment of the present application receives a TCN BPDU packet, the root switch does not directly empty the local ARP cache table, but selects an ARP entry related to a network topology change from the ARP cache table as a first target entry to be deleted. For other ARP entries in the ARP cache table, because there is no relationship between the ARP entry and the network topology change, it is not necessary to update the ARP entry. All first ARP list items to be deleted are determined from the local ARP cache list, and various implementation modes exist. As one implementation, when the root switch receives a TCN packet, it may record the assigned port that received the TCN BPDU packet. When the first ARP entry to be deleted needs to be determined from the ARP cache table, the assigned port may be used as a key, and all ARP entries including the key may be found in the ARP cache table, so that the found ARP entries are determined to be the first ARP entry to be deleted.
As an example, to distinguish the first ARP entry in the ARP cache table from other normal ARP entries, in the embodiment of the present application, an identifier may be additionally set for each ARP entry in the ARP cache table. For example, the identifier may be a flag bit, an attribute value, etc., so that the first ARP entry is distinguished from other ARP entries by the flag bit or the attribute value. As one implementation, a flag bit may be added to each ARP entry in the ARP cache table, where the flag bit may be 1 or 0. And when the flag bit is 0, indicating that the ARP table entry corresponding to the flag bit is a normal ARP table entry. And when the flag bit is 1, the ARP table entry corresponding to the indication flag bit is the first ARP table entry. On the basis, the first ARP table entry and the normal ARP table entry in the ARP cache table can be distinguished by changing the value of the flag bit.
As an example, when the method is applied to a frame device, this step may be performed by a main control board in the frame device. Namely, the main control board obtains an ARP cache table from the local cache, and determines a first ARP table item to be deleted from the ARP cache table.
102, constructing an ARP request message corresponding to each first ARP table item and sending the ARP request message according to each first ARP table item; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table.
As an example, after determining the first ARP entry to be deleted from the ARP cache table, an operation of constructing the ARP request message may be triggered by an event such as a change in an identification of the ARP entry, or a timeout of a specified duration after determining the first ARP entry, or after completing a determination of whether all ARP entries in the ARP cache table are the first ARP entry. It should be noted that, the ARP request message in the embodiment of the present application is a message sent in a unicast manner. The ARP request message sent in the unicast mode is different from the ARP request message sent in the broadcast mode in that the destination MAC address of the ARP request message is not filled with the full F, but the MAC address recorded in the first ARP table entry is filled with the destination MAC address of the ARP request message. Because the MAC address of the ARP request message in the embodiment of the present application is no longer a broadcast MAC address, the ARP request message is no longer sent in a broadcast form by other designated switches, but is sent in a unicast form. Therefore, the unicast transmission form of the ARP request message can greatly reduce the number of broadcast messages in the STP networking.
As an example, when generating the ARP request message, it may be determined whether to generate the ARP request message for each ARP entry in the ARP cache table according to the flag bit and the attribute value of the ARP entry. Here, still taking the above-mentioned adding a flag bit to each ARP entry in the ARP cache table as an example, when generating the ARP request message, it may be determined, for each ARP entry, whether the flag bit of the ARP entry is 1. If yes, determining the ARP table entry as a first ARP table entry to be deleted, and generating an ARP request message according to the first ARP table entry to be deleted.
As an example, when the method is applied to a frame device, the step may be performed by a main control board in the frame device in cooperation with a service board. Namely, the main control board generates ARP request messages aiming at each ARP table item to be deleted. After the main control board generates the ARP request message, the ARP request message is sent to the service board through an inter-board channel between the main control board and the service board. After obtaining ARP request message sent by main control board, service board forwards the ARP request message.
Step 103, checking whether an ARP response message for responding to the ARP request message is received within a specified time period. If not, go to step 104; if yes, go to step 105.
As one example, the specified duration may be implemented by a timer. For example, when the method is applied to the frame device, after the main control board issues the ARP request message to the service board, a timer with a preset designated duration may be associated with the main control board. When receiving the ARP response message, the timer associated with the ARP response message can be determined according to the destination MAC address of the ARP response message, and whether the designated time length is elapsed when receiving the ARP response message can be judged according to whether the timer is overtime.
It should be noted that the specified duration may be set according to practical situations, and the present application does not specifically limit the duration.
Step 104, deleting the first ARP table entry.
As an example, if it is determined that the ARP reply message for responding to the ARP request message is not received within the specified duration, it indicates that the device corresponding to the first ARP entry is faulty or that a link between the root switch and the device is broken, and thus the ARP entry may be deleted.
Step 105, maintaining the first ARP entry.
As an example, there may be two different reply results for the reply message of the ARP request message. And as one of the response results, the source IP address of the response message is the same as the source MAC address and the IP address and the MAC address of the first ARP table entry corresponding to the ARP request message. And as another response result, the source IP address of the response message and the IP address of the first ARP table item corresponding to the ARP request message are different, but the source MAC address of the response message and the MAC address of the first ARP table item corresponding to the ARP request message are the same. The response result is that the device responding to the ARP request message changes its IP address due to reasons such as connection and disconnection, replacement of the access location, etc., so that when responding to the ARP request message, a situation that the IP address in the response message is different from the IP address of the ARP table entry to be deleted corresponding to the ARP request message occurs.
As an example, there are various implementations to determine whether the source IP address of the reply message is consistent with the IP address in the first ARP table entry. As one implementation manner, the source MAC address of the ARP reply message may be used as a key, and the first ARP entry that includes the key may be found in the ARP cache table. After the first ARP entry containing the key is found, it may be compared whether the IP address recorded in the first ARP entry is consistent with the source IP address of the reply message.
As an example, to further improve the judging efficiency, when searching for the first ARP table entry that includes the key in the ARP cache table by using the source MAC address of the ARP reply message as the key, the source MAC address may be further used as the key to search for all the first ARP table entries.
As an example, if it is determined that the source IP address of the reply packet is the same as the source MAC address and the IP address and the MAC address of the first ARP entry corresponding to the ARP request packet, this indicates that the first ARP entry is still a correct ARP entry, and the device corresponding to the ARP entry is still located in the STP network, so that deletion or modification of the ARP entry is not required.
As an example, if it is determined that the source IP address of the reply packet and the IP address of the first ARP entry to be used corresponding to the ARP request packet are different, it indicates that the device corresponding to the ARP entry is still located in the STP network, but the first ARP entry is not a correct ARP entry. Therefore, the source IP address in the response message can be utilized to update the IP address in the first ARP table entry, so that the IP address in the first ARP table entry is consistent with the IP address of the equipment for sending the response message.
As an example, after determining that the first ARP entry may be maintained, a flag bit of the first ARP entry may be modified from 1 for indicating an entry to be deleted to 0 for indicating a normal ARP entry.
Thus, the flow shown in fig. 4 is completed.
When the network topology of the exchange network configuring STP changes, the root exchange and each appointed exchange do not directly empty the ARP buffer table any more, but the ARP detection mechanism is utilized to aim at, and only the ARP table entry corresponding to the equipment leaving the exchange network or interrupting the link between the root exchange is deleted. On the basis, on one hand, because the ARP request message sent by the ARP detection mechanism is sent in a unicast mode, the problem of flooding of the ARP request message sent in a broadcast mode due to the change of a network topology in the related art is avoided; on the other hand, when the network topology structure changes each time, only part of ARP list items are deleted, so that the root exchanger and each appointed exchanger can normally forward the IP message, and the abnormal transmission of the IP message is avoided.
Furthermore, when the root switch is a frame switch, the problem of ARP request message flooding sent in a broadcast mode caused by network topology change in the related art is avoided, and the problem that the channel broadband between the service board and the main control board is smaller, ARP request message channel blockage is easy to occur, and further, the problem that IP message packet loss is caused by ARP list items cannot be learned in time is solved.
Referring to fig. 3, fig. 3 is a flowchart of an ARP entry updating method performed by a designated exchange side according to an embodiment of the present application. The ARP entry updating method may be applied to a designated switch in the switch fabric shown in fig. 1.
As shown in fig. 3, the process may include the steps of:
step 201, when receiving the TC message through the local root port, suspending updating the ARP entry in the local ARP cache table.
As one example, TC messages are constructed and sent by a root switch upon receipt of TCN messages.
As one example, when a specified switch receives a TC message, the local ARP cache table is no longer directly emptied, but the ports are adjusted to probe states. The detection state of the port refers to that when the port receives an ARP request message, the ARP request message is sent to the CPU, and then the CPU carries out corresponding processing on the ARP request message so as to update an ARP table entry.
Step 202, if an ARP request message sent by the root switch is received within the suspension period, determining a second ARP entry to be deleted from the local ARP cache table according to the ARP request message.
As an example, a TC message may be used to instruct a given switch that each port is in the probe state described above for a suspension period. This suspension period may be set according to the actual situation, which is not limited in the embodiment of the present application.
As an example, the content related to the ARP request message has been described in the ARP entry updating method performed on the root switch side, and reference may be made to the related content described above, which is not described herein.
As one example, there are multiple implementations of determining the second ARP entry to be deleted from the local ARP cache table. As one implementation, the destination IP address and the destination MAC address may be obtained from an ARP request message. And searching an ARP table entry containing the key word in a local ARP cache table by using the destination MAC address as the key word. And then, determining the searched ARP table entry as a second ARP table entry.
As an example, in this embodiment, the manner of distinguishing the second ARP entry to be deleted from other normal ARP entries may be adopted in the foregoing manner of distinguishing the first ARP entry to be deleted from the normal ARP entries. Since the two are similar in implementation, the description is omitted.
Step 203, judging whether an ARP response message for responding to the ARP request message is received within a specified duration; if not, go to step 204; if yes, go to step 205.
As one example, the specified duration may be implemented by a timer. For example, after the second ARP entry is determined, a timer of a pre-configured specified duration may be associated therewith. When receiving the ARP response message, the timer associated with the ARP response message can be determined according to the destination MAC address of the ARP response message, and whether the designated time length is elapsed when receiving the ARP response message can be judged according to whether the timer is overtime.
It should be noted that the specified duration may be set according to practical situations, and the present application does not specifically limit the duration.
Step 204, deleting the second ARP entry.
As an example, if it is determined that the ARP reply message for responding to the ARP request message is not received within the specified duration, it indicates that the device corresponding to the second ARP entry is faulty or that a link between the switch and the device is broken, and thus the ARP entry may be deleted.
Step 205, maintain the second ARP entry.
As an example, there may be two different reply results for the reply message of the ARP request message. And as one of the response results, the source IP address of the response message is the same as the source MAC address and the IP address and the MAC address of the second ARP table entry corresponding to the ARP request message. And as another response result, the source IP address of the response message and the IP address of the second ARP table corresponding to the ARP request message are different, but the source MAC address of the response message and the MAC address of the second ARP table corresponding to the ARP request message are the same. The response result is that the device responding to the ARP request message changes its IP address due to reasons such as connection and disconnection, replacement of the access location, etc., so that when responding to the ARP request message, a situation that the IP address in the response message is different from the IP address of the ARP table entry to be deleted corresponding to the ARP request message occurs.
As an example, determining whether the source IP address of the reply message matches the IP address in the second ARP table entry may refer to the description related to the ARP table entry updating method performed on the root switch side described above. Since the two are similar in implementation, the description is omitted here.
As an example, if it is determined that the source IP address of the reply packet is the same as the source MAC address and the IP address and MAC address of the second ARP table entry corresponding to the ARP request packet, this indicates that the second ARP table entry is still a correct ARP table entry, and the device corresponding to the ARP table entry is still located in the STP network, so that deletion or modification of the ARP table entry is not required.
As an example, if it is determined that the source IP address of the reply packet and the IP address of the second ARP entry corresponding to the ARP request packet are different, it indicates that the device corresponding to the ARP entry is still located in the STP network, but the second ARP entry is not a correct ARP entry. Therefore, the source IP address in the response message can be utilized to update the IP address in the second ARP table entry, so that the IP address in the second ARP table entry is consistent with the IP address of the equipment for sending the response message.
As an example, after determining that the second ARP entry may be maintained, the flag of the second ARP entry may be modified to a flag that indicates a normal ARP entry.
Thus, the flow shown in fig. 3 is completed.
The methods provided herein are described above. The apparatus provided in this application is described below:
referring to fig. 4, a schematic structural diagram of an ARP entry updating device provided in an embodiment of the present application is shown, where the ARP entry updating device may be applied to a root switch in the foregoing method embodiment, and as shown in fig. 4, the ARP entry updating device may include:
a first determining unit 410, configured to send a TC packet to a designated switch in a switch network STP when receiving the TCN packet through a local assignment port, and determine a first ARP entry to be deleted from a local ARP cache table according to the assignment port; the TC message is used for indicating to suspend updating the ARP table entry;
a first updating unit 420, configured to construct an ARP request message corresponding to each first ARP entry and send the ARP request message, and delete the first ARP entry if an ARP reply message for responding to the ARP request message is not received within a specified duration; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table.
As one example, the root switch is a frame switch that includes a master control board and a service board. The first updating unit 420 includes a configuration subunit (not shown in the figure) disposed on the main control board and a transmission unit not shown in the figure disposed on the service board. And the construction subunit is used for constructing an ARP request message corresponding to the first ARP table entry through the main control board and transmitting the ARP request message to the service board. And the transmission subunit is used for receiving the ARP request message issued by the main control board through the service board and sending the ARP request message.
As an example, the first updating unit 420 is further configured to maintain the first ARP table entry if an ARP reply message for responding to the ARP request message is received within a specified duration.
The description of the apparatus shown in fig. 4 is thus completed.
Referring to fig. 5, a schematic structural diagram of an ARP entry updating device provided in an embodiment of the present application is shown, where the ARP entry updating device may be applied to a designated switch in the foregoing method embodiment, and as shown in fig. 5, the ARP entry updating device may include:
a receiving unit 510, configured to suspend updating an ARP entry in a local ARP cache table when a TC packet is received through a local root port;
a second determining unit 520, configured to determine, in the suspension period, a second ARP entry to be deleted from the local ARP cache table according to the ARP request message if the ARP request message sent by the root switch is received;
a second updating unit 530, configured to delete the second ARP entry if the ARP reply message for responding to the ARP request message is not received within a specified duration.
As an example, the second updating unit 530 is further configured to maintain the second ARP table entry if an ARP reply message for responding to the ARP request message is received within a specified duration.
The description of the apparatus shown in fig. 5 is thus completed.
Referring to fig. 6, fig. 6 is a hardware structure diagram of a root switch where an ARP entry updating device according to the present application is located, where the hardware structure includes: a processor and a machine-readable storage medium.
Wherein the machine-readable storage medium is for storing machine-executable instructions;
a processor for reading and executing machine-executable instructions stored on a machine-readable storage medium to implement the ARP entry updating method shown in fig. 2.
The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, or the like, for one embodiment. For example, a machine-readable storage medium may be: volatile machine-readable storage medium, non-volatile machine-readable storage medium, or similar storage medium. In particular, the machine-readable storage medium may be RAM (Radom Access Memory, random access machine-readable storage medium), flash memory, a storage drive (e.g., hard drive), a solid state drive, any type of storage disk (e.g., optical disk, DVD, etc.), or a similar storage medium, or a combination thereof.
The description of the apparatus shown in fig. 6 is thus completed.
Referring to fig. 7, fig. 7 is a hardware structure diagram of a designated switch where the ARP entry updating device according to the present application is located, where the hardware structure includes: a processor and a machine-readable storage medium.
Wherein the machine-readable storage medium is for storing machine-executable instructions;
a processor for reading and executing machine-executable instructions stored on a machine-readable storage medium to implement the ARP entry updating method shown in fig. 3.
The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, or the like, for one embodiment. For example, a machine-readable storage medium may be: volatile machine-readable storage medium, non-volatile machine-readable storage medium, or similar storage medium. In particular, the machine-readable storage medium may be RAM (Radom Access Memory, random access machine-readable storage medium), flash memory, a storage drive (e.g., hard drive), a solid state drive, any type of storage disk (e.g., optical disk, DVD, etc.), or a similar storage medium, or a combination thereof.
The description of the apparatus shown in fig. 7 is thus completed.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. The ARP table entry updating method is characterized in that the method is applied to a root switch in a switch network configured with STP, and the switch network further comprises: at least one designated switch other than the root switch, the root switch connecting the designated switch through an assigned port; the method comprises the following steps:
when a topology change notification TCN message is received through a local assignment port, sending a topology change TC message to a designated switch in the switch network STP, and determining a first ARP table entry to be deleted from a local ARP cache table according to the assignment port; the TC message is used for indicating to suspend updating the ARP list item;
constructing an ARP request message corresponding to each first ARP table item and sending the ARP request message, and deleting the first ARP table item if an ARP response message for responding to the ARP request message is not received within a specified duration; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table;
if an ARP response message for responding to the ARP request message is received within a specified time length, maintaining the first ARP list item; the source IP address and the source MAC address of the ARP response message are the same as the IP address and the MAC address of the first ARP table entry corresponding to the ARP request message; or the source IP address of the ARP response message is different from the IP address of the first ARP table item corresponding to the ARP request message, and the source MAC address of the ARP response message is the same as the MAC address of the first ARP table item corresponding to the ARP request message.
2. The method of claim 1, wherein the root switch is a frame switch comprising a master control board and a service board; the constructing the ARP request message corresponding to the first ARP table entry and sending the ARP request message include:
constructing an ARP request message corresponding to the first ARP table entry through the main control board and transmitting the ARP request message to the service board;
and receiving an ARP request message sent by the main control board through the service board and sending the ARP request message.
3. The method of claim 1, wherein if an ARP reply message for responding to the ARP request message is received within a specified period of time, the method further comprises:
maintaining the first ARP entry.
4. The ARP table entry updating method is characterized in that the method is applied to any appointed exchanger in a switch network configured with STP, and the switch network further comprises: a root switch other than the specified switch, the specified switch being connected to the root switch through a root port; the method comprises the following steps:
when receiving a TC message through a local root port, suspending updating an ARP table entry in a local ARP cache table;
if an ARP request message sent by the root switch is received in the suspension time period, determining a second ARP table item to be deleted from a local ARP cache table according to the ARP request message;
if the ARP response message for responding to the ARP request message is not received within the appointed time length, deleting the second ARP table item; if an ARP response message for responding to the ARP request message is received within the appointed time, maintaining the second ARP list item; the source IP address and the source MAC address of the ARP response message are the same as the IP address and the MAC address of a second ARP table entry corresponding to the ARP request message; or the source IP address of the ARP response message is different from the IP address of the second ARP table item corresponding to the ARP request message, and the source MAC address of the ARP response message is the same as the MAC address of the second ARP table item corresponding to the ARP request message.
5. The method of claim 4, wherein if an ARP reply message for responding to the ARP request message is received within a specified period of time, the method further comprises:
maintaining the second ARP entry.
6. An ARP table entry updating apparatus, wherein the apparatus is applied to a root switch in a switch network configured with STP, the switch network further comprising: at least one designated switch other than the root switch, the root switch connecting the designated switch through an assigned port; the device comprises:
the first determining unit is used for sending a TC message to a designated switch in the switch network STP when receiving the TCN message through a local assigned port, and determining a first ARP table entry to be deleted from a local ARP cache table according to the assigned port; the TC message is used for indicating to suspend updating the ARP list item;
the first updating unit is used for constructing an ARP request message corresponding to each first ARP table item and sending the ARP request message, and deleting the first ARP table item if an ARP response message for responding to the ARP request message is not received within a specified duration; the destination IP address of the ARP request message is the IP address in the first ARP table, and the destination MAC address is the MAC address in the first ARP table; if an ARP response message for responding to the ARP request message is received within a specified time length, maintaining the first ARP list item; the source IP address and the source MAC address of the ARP response message are the same as the IP address and the MAC address of the first ARP table entry corresponding to the ARP request message; or the source IP address of the ARP response message is different from the IP address of the first ARP table item corresponding to the ARP request message, and the source MAC address of the ARP response message is the same as the MAC address of the first ARP table item corresponding to the ARP request message.
7. The apparatus of claim 6, wherein the root switch is a frame switch comprising a master control board and a service board;
the first updating unit comprises a construction subunit arranged on the main control board and a transmission subunit arranged on the service board;
the construction subunit is configured to construct an ARP request message corresponding to the first ARP table entry through the main control board and send the ARP request message to the service board;
the transmission subunit is configured to receive, through the service board, an ARP request message sent by the main control board and send the ARP request message.
8. The apparatus of claim 6, wherein the first updating unit is further configured to maintain the first ARP entry if an ARP reply message for responding to the ARP request message is received within a specified duration.
9. An ARP table entry updating apparatus, wherein the apparatus is applied to any designated switch in a switch network configured with STP, the switch network further comprising: a root switch other than the specified switch, the specified switch being connected to the root switch through a root port; the device comprises:
the receiving unit is used for suspending updating the ARP table entry in the local ARP cache table when the TC message is received through the local root port;
the second determining unit is used for determining a second ARP table entry to be deleted from a local ARP cache table according to the ARP request message if the ARP request message sent by the root switch is received in the suspension time period;
the second updating unit is used for deleting the second ARP table entry if the ARP response message for responding to the ARP request message is not received within the appointed duration; if an ARP response message for responding to the ARP request message is received within the appointed time, maintaining the second ARP list item; the source IP address and the source MAC address of the ARP response message are the same as the IP address and the MAC address of a second ARP table entry corresponding to the ARP request message; or the source IP address of the ARP response message is different from the IP address of the second ARP table item corresponding to the ARP request message, and the source MAC address of the ARP response message is the same as the MAC address of the second ARP table item corresponding to the ARP request message.
10. The apparatus according to claim 9, wherein the second updating unit is further configured to maintain the second ARP entry if an ARP reply message for responding to the ARP request message is received within a specified duration.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010351680.7A CN111556179B (en) | 2020-04-28 | 2020-04-28 | ARP (Address resolution protocol) table entry updating method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010351680.7A CN111556179B (en) | 2020-04-28 | 2020-04-28 | ARP (Address resolution protocol) table entry updating method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111556179A CN111556179A (en) | 2020-08-18 |
| CN111556179B true CN111556179B (en) | 2023-04-28 |
Family
ID=72002653
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010351680.7A Active CN111556179B (en) | 2020-04-28 | 2020-04-28 | ARP (Address resolution protocol) table entry updating method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111556179B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113347101B (en) * | 2021-06-01 | 2022-11-15 | 中国联合网络通信集团有限公司 | A sending control method of routing information, VTEP and computer-readable storage medium |
| CN117857481A (en) * | 2022-09-30 | 2024-04-09 | 明泰科技股份有限公司 | Routing information management method and system for three-layer switch |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1764193A (en) * | 2005-11-23 | 2006-04-26 | 杭州华为三康技术有限公司 | Method for renewing address analysis protocol rapidly |
| CN1870660A (en) * | 2006-06-22 | 2006-11-29 | 杭州华为三康技术有限公司 | Method and node equipment for updating address analytic protocol table entry |
| EP2658193A2 (en) * | 2012-04-27 | 2013-10-30 | Huawei Technologies Co., Ltd. | Method and apparatus for sending topology change packet, and method and apparatus for updating forwarding table |
| CN110247851A (en) * | 2019-06-28 | 2019-09-17 | 北京东土军悦科技有限公司 | Information updating method, device, three-tier switch and medium in three-tier switch |
-
2020
- 2020-04-28 CN CN202010351680.7A patent/CN111556179B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1764193A (en) * | 2005-11-23 | 2006-04-26 | 杭州华为三康技术有限公司 | Method for renewing address analysis protocol rapidly |
| CN1870660A (en) * | 2006-06-22 | 2006-11-29 | 杭州华为三康技术有限公司 | Method and node equipment for updating address analytic protocol table entry |
| EP2658193A2 (en) * | 2012-04-27 | 2013-10-30 | Huawei Technologies Co., Ltd. | Method and apparatus for sending topology change packet, and method and apparatus for updating forwarding table |
| CN110247851A (en) * | 2019-06-28 | 2019-09-17 | 北京东土军悦科技有限公司 | Information updating method, device, three-tier switch and medium in three-tier switch |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111556179A (en) | 2020-08-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8018873B1 (en) | Enhanced link state protocol for identifying broadcast networks | |
| US9019815B2 (en) | Source alive route injection | |
| JP4449903B2 (en) | Router device and network connection method | |
| RU2639688C2 (en) | Control method of mediators table in the wireless network, using the device-mediators | |
| US8670449B2 (en) | Data storage system in communication network and data information processing method | |
| US9137045B2 (en) | Ethernet multicast method and device | |
| EP1453255A2 (en) | Communication system, mobile terminal and transfer device | |
| CA3104756C (en) | Loop avoidance communications method, device, and system | |
| KR20050077649A (en) | Apparatus and method of setting timer | |
| CN110505621B (en) | Terminal migration processing method and device | |
| US20020093967A1 (en) | Automatic selection of unique node identifiers in a distributed routing environment | |
| CN111556179B (en) | ARP (Address resolution protocol) table entry updating method and device | |
| WO2022048646A1 (en) | Virtual ip management method and apparatus, electronic device and storage medium | |
| CN111886843A (en) | Low power consumption Bluetooth network maintenance method, electronic device, Bluetooth network and medium | |
| CN101663865B (en) | Intelligent database exchange for ospf | |
| CN111954102B (en) | Routing control method and device in DHCPV6 PD scene | |
| US9246796B2 (en) | Transmitting and forwarding data | |
| EP2345215A1 (en) | Hierarchical mobility label-based network | |
| US6615273B1 (en) | Method for performing enhanced target identifier (TID) address resolution | |
| CN102752144A (en) | Method and device for processing topology change in soft restart in-service software upgrade process | |
| US8111635B2 (en) | Server, terminal, and method for supporting mobility | |
| KR100670818B1 (en) | Method and System for Layer 2 Table Management in Distributed Router | |
| CN116566899A (en) | Routing processing method and device | |
| US7532582B2 (en) | Method for selecting route in routing protocol | |
| KR100705565B1 (en) | MAC Address Management Device and Method for Packet Forwarding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |