[go: up one dir, main page]

CN111556179A - ARP (Address resolution protocol) table item updating method and device - Google Patents

ARP (Address resolution protocol) table item updating method and device Download PDF

Info

Publication number
CN111556179A
CN111556179A CN202010351680.7A CN202010351680A CN111556179A CN 111556179 A CN111556179 A CN 111556179A CN 202010351680 A CN202010351680 A CN 202010351680A CN 111556179 A CN111556179 A CN 111556179A
Authority
CN
China
Prior art keywords
arp
switch
request message
entry
message
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.)
Granted
Application number
CN202010351680.7A
Other languages
Chinese (zh)
Other versions
CN111556179B (en
Inventor
李有
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010351680.7A priority Critical patent/CN111556179B/en
Publication of CN111556179A publication Critical patent/CN111556179A/en
Application granted granted Critical
Publication of CN111556179B publication Critical patent/CN111556179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects

Landscapes

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

Abstract

The application provides a method and a device for updating ARP (address resolution protocol) table entries, which are used for deleting only part of the ARP table entries in an ARP cache table by utilizing an ARP detection mechanism when a network topology structure of a switch networking configured with STP (spanning Tree protocol) is changed.

Description

ARP (Address resolution protocol) table item updating method and device
Technical Field
The present application relates to network communication technologies, and in particular, to a method and an apparatus for updating ARP entries.
Background
In a switch group network configured with STP (Spanning Tree Protocol), one switch is elected as a root switch and the remaining switches are designated switches according to an election mechanism of the STP Protocol. When the root switch senses that the networking topological structure changes, the root switch clears the ARP cache table of the root switch and informs all other appointed switches to clear the ARP cache tables of the root switch.
When a large number of terminal devices exist in the switch group network, the networking topology structure is frequently changed due to frequent connection and disconnection of the terminal devices, and then the ARP cache tables in the root switch and each designated switch are frequently deleted, so that the ARP request messages sent in the broadcasting mode in the network are abused, network resources are greatly consumed, the root switch and each designated switch cannot normally forward IP messages, and the transmission of the IP messages is abnormal.
Disclosure of Invention
The application provides a method and a device for updating ARP table entries, which are used for deleting only part of the ARP table entries in an ARP cache table by utilizing an ARP detection mechanism when a network topology structure of a switch networking configured with STP is changed.
The technical scheme provided by the application comprises the following steps:
according to a first aspect of the present application, there is provided an ARP entry updating method, which is applied to a root switch in a switch networking configured with STP, where the switch networking further includes: at least one designated switch other than the root switch, the root switch connecting the designated switches through assigned ports; the method comprises the following steps:
when receiving a TCN message through a local assignment port, sending the TC message to a designated switch in a switch networking 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 of ARP table items;
constructing an ARP request message corresponding to each first ARP table entry, sending the ARP request message, and deleting the first ARP table entry if an ARP response message for responding to the ARP request message is not received within a specified time length; the target IP address of the ARP request message is the IP address in the first ARP table entry, and the target MAC address is the MAC address in the first ARP table entry.
According to a second aspect of the present application, there is provided an ARP entry updating method, which is applied to any specified switch in a switch network configured with STP, where the switch network further includes: a root switch other than the designated switch, the designated switch connected to the root switch through a root port; the method comprises the following steps:
when a TC message is received through a local root port, updating ARP table entries in a local ARP cache table in a deferred manner;
within the suspension duration, if an ARP request message sent by the root switch is received, determining a second ARP table entry 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 specified duration, deleting the second ARP table entry.
According to a third aspect of the present application, there is provided an ARP entry updating apparatus applied to a root switch in a switch network configured with STP, the switch network further includes: at least one designated switch other than the root switch, the root switch connecting the designated switches through assigned ports; the device comprises:
the first determining unit is used for sending a TC message to a designated switch in the STP of the switch networking when the TCN message is received through a local designated port, and determining a first ARP table item to be deleted from a local ARP cache table according to the designated port; the TC message is used for indicating to suspend updating of ARP table items;
a first updating unit, configured to construct, for each first ARP entry, an ARP request message corresponding to the 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 target IP address of the ARP request message is the IP address in the first ARP table entry, and the target MAC address is the MAC address in the first ARP table entry.
According to a fourth aspect of the present application, there is provided an ARP entry updating apparatus, which is applied to any specified switch in a switch network configured with STP, the switch network further includes: a root switch other than the designated switch, the designated switch connected to the root switch through a root port; the device comprises:
a receiving unit, configured to suspend updating of an ARP entry in a local ARP cache table when a TC packet is received through a local root port;
a second determining unit, configured to determine, within the suspension duration, a second ARP 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;
and the second updating unit is used for deleting the second ARP table entry if an ARP response message for responding to the ARP request message is not received within the specified duration.
According to the technical scheme, when the network topology structure of the switch networking configured with the STP is changed, the root switch and each appointed switch do not directly clear the ARP cache table, but use an ARP detection mechanism to pertinently delete only the ARP table items corresponding to the devices which leave the switch networking or are interrupted by the link between the root switch. On the basis, on one hand, the ARP request message sent by the ARP detection mechanism is sent in a unicast mode, so that the problem of flooding of the ARP request message sent in a broadcast mode due to the change of a network topological structure in the related technology is avoided; on the other hand, when the network topology structure changes, only partial ARP table items are deleted, so that the root switch and each appointed switch 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 present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a diagram of an application scenario provided by the present application;
fig. 2 is a flowchart of an ARP entry update method executed by a root switch side according to the present application;
FIG. 3 is a flowchart of a method for updating ARP entries executed by a designated switch side according to the present application;
fig. 4 is a schematic structural diagram of an ARP entry updating apparatus applied to a root switch according to the present application;
fig. 5 is a schematic structural diagram of an ARP entry updating apparatus applied to a designated switch according to the present application;
FIG. 6 is a diagram of a hardware configuration of the apparatus shown in FIG. 4 provided in the present application;
fig. 7 is a schematic hardware structure diagram of the apparatus shown in fig. 5 provided in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the 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 and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response 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 the ARP entry updating method provided in the present application. As shown in fig. 1, the application scenario is a switch networking enabled by STP protocol, which is hereinafter referred to as switch networking STP, and the switch networking STP includes a root switch, N designated switches, and N hosts.
The root switch is a root node in the STP networking, and a bridge with the highest priority in all bridges in the STP networking plays a role. The root bridge can be connected with the internet so as to transmit the data sent by each host in the STP networking to the internet and transmit the data which needs to be transmitted to the host in the STP networking in the internet to each host. The root switch may also connect the designated switches through the assigned ports. When a root switch receives a TCN (Topology Change Notification) message sent by any designated switch through any local assigned port, the root switch sends a TC (Topology Change) message to the outside through all local assigned ports to notify each designated switch to update its own ARP cache table. At the same time, the root switch will also update the locally stored ARP cache table.
The designated switch is a bridge responsible for data forwarding tasks in a physical segment, and the bridge with the highest priority in the physical segment plays a role. The designated switch may be connected to other designated switches, root switches or hosts in the STP group, or to switches, routers in other local area networks. When any appointed switch senses that the network topology structure of the STP networking is changed, a TCN message is sent to the root switch to inform the root switch that the network topology structure of the STP networking is changed. After receiving the TC BPDU message sent by the root switch, the ARP cache table of the root switch itself is also updated.
The host can be connected with the appointed switch so as to communicate with the host in the STP group network or other local area networks through the appointed switch or communicate with the Internet through the appointed switch and the root switch.
The ARP entry update method provided in the embodiment of the present application will be described below separately from the root switch side and the designated switch side.
Referring to fig. 2, fig. 2 is a flowchart of an ARP entry update method executed by a root switch according to an embodiment of the present application. The ARP entry updating method may be applied to a root switch in the switch network shown in fig. 1, where the root switch may be a frame switch.
As shown in fig. 2, the process may include the following steps:
step 101, when receiving a TCN message through a local assignment port, sending the TC message to a designated switch in a switch networking 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 of the ARP table entry;
as an example, in a switch networking STP, when any specified switch senses a change in a network topology, a TCN message is sent to a root switch through its own root port to notify the root switch of the change in the network topology of the STP networking. When the root switch receives the TCN message through any assigned port, the root switch generates a TC message in response to the TCN message, and sends the TC message out through all local assigned ports, so that the TC message is transmitted to all designated switches in the switch networking STP. After each appointed switch receives the TC message, the ARP cache table is not directly cleared, and the ARP table entries in the ARP cache table are temporarily updated. Hereinafter, how the designated switch updates the ARP entry in response to the TC message will be described, which will not be described herein again.
As an example, when receiving a TCN BPDU message, a root switch in the embodiment of the present application does not directly clear a 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 table entries in the ARP cache table, the ARP table entry does not need to be updated as there is no relation between the ARP table entry and the network topology change. And determining all first ARP table entries to be deleted from the local ARP cache table, wherein the method has multiple implementation modes. As one implementation, when the root switch receives the TCN packet, the assigned port receiving the TCN BPDU packet may be recorded. 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 are found in the ARP cache table, so that the found ARP entries are determined as the first ARP entries to be deleted.
As an example, in order to distinguish the first ARP entry from other normal ARP entries in the ARP cache table, 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, or the like, and the first ARP entry is distinguished from other ARP entries by the flag bit or the attribute value. As one implementation manner, a flag bit may be added to each ARP entry in the ARP cache table, where the flag bit may be 1 or 0. When the flag bit is 0, the ARP table entry corresponding to the flag bit is indicated to be 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 in the ARP cache table can be distinguished from the normal ARP table entry by changing the value of the flag bit.
As an example, when the method is applied to a boxed device, this step may be performed by a main control board in the boxed device. Namely, the main control board obtains the ARP cache table from the local cache, and determines the first ARP table entry to be deleted from the ARP cache table.
Step 102, aiming at each first ARP table entry, constructing an ARP request message corresponding to the first ARP table entry and sending the ARP request message; the destination IP address of the ARP request message is the IP address in the first ARP entry, and the destination MAC address is the MAC address in the first ARP entry.
As an example, after determining the first ARP entry to be deleted from the ARP cache table, the operation of constructing the ARP request packet may be triggered by an event such as an identifier change of the ARP entry, timeout of a specified duration after determining the first ARP entry, or completion of determination of whether all ARP entries in the ARP cache table are the first ARP entries. It should be noted that the ARP request message in the embodiment of the present application is a unicast message. The difference between the ARP request message sent in the unicast form and the ARP request message sent in the broadcast form is that the destination MAC address of the ARP request message is not filled in full F any more, but the MAC address recorded in the first ARP entry is filled in the destination MAC address of the ARP request message. Since the MAC address of the ARP request packet in the embodiment of the present application is no longer a broadcast MAC address, the ARP request packet is not sent by other specified switches in a broadcast manner, but in a unicast manner. Therefore, due to the unicast sending mode of the ARP request message, the number of broadcast messages in the STP networking can be greatly reduced.
As an example, when generating an ARP request message, it may be determined whether to generate an ARP request message for each ARP entry in the ARP cache table according to the flag and the attribute value of the ARP entry. Here, taking the example that a flag bit is added to each ARP entry in the ARP cache table, when generating an ARP request message, it may be determined whether the flag bit of the ARP entry is 1 for each ARP entry. If so, determining that the ARP table entry is 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, this step may be executed by a main control board in the frame device in cooperation with a service board. That is, the master control board generates an ARP request message for each ARP entry to be deleted. After the master control board generates the ARP request message, the ARP request message is sent to the service board through the inter-board channel between the master control board and the service board. After obtaining the ARP request message sent by the main control board, the service board will forward the ARP request message.
Step 103, checking whether an ARP reply message for responding to the ARP request message is received within a specified duration. 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 a frame device, after the master control board issues the ARP request packet to the service board, a timer with a preset specified duration may be associated with the master control board. When receiving the ARP response message, the associated timer can be determined according to the target MAC address of the ARP response message, and then whether the appointed time length passes when receiving the ARP response message can be judged according to whether the timer is overtime or not.
It should be noted that the specified time duration here may be set according to actual situations, and the present application does not specifically limit the specified time duration.
And 104, deleting the first ARP table entry.
As an example, if it is determined that an ARP reply message for responding to the ARP request message is not received within the specified duration, it indicates that an equipment failure corresponding to the first ARP entry or a link between the root switch and the equipment is interrupted, and the ARP entry may be deleted.
Step 105, maintaining the first ARP entry.
As an example, the response message of the ARP request message, which may have two different response results. 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 entry corresponding to the ARP request message. And as another response result, the source IP address of the response message is different from the IP address of the first ARP entry corresponding to the ARP request message, but the source MAC address of the response message is the same as the MAC address of the first ARP entry corresponding to the ARP request message. The response result is caused by the device responding to the ARP request message, and the IP address of the device is changed due to the reason of going up and down the line, changing the access position, and the like, so that when responding to the ARP request message, the situation that the IP address in the response message is different from the IP address of the ARP entry to be deleted corresponding to the ARP request message occurs.
As an example, there are various implementation manners to determine whether the source IP address of the response packet is consistent with the IP address in the first ARP entry. As one implementation manner, a source MAC address of an ARP reply packet may be used as a key, and a first ARP entry containing the key is searched in an ARP cache table. After the first ARP entry containing the keyword 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 packet.
As an example, in order to further improve the determination efficiency, when the source MAC address of the ARP reply packet is used as a key to search for a first ARP entry containing the key in the ARP cache table, the source MAC address may be further used as a key to search for all the first ARP entries.
As an example, if it is determined that the source IP address of the response 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, it indicates that the first ARP entry is still the correct ARP entry, and the device corresponding to the ARP entry is still located in the STP networking, so that the ARP entry does not need to be deleted or modified.
As an example, if it is determined that the source IP address of the response message is different from the IP address of the first ARP entry corresponding to the ARP request message, it indicates that the device corresponding to the ARP entry is still located in the STP networking, but the first ARP entry is not the correct ARP entry. Therefore, the IP address in the first ARP entry can be updated by using the source IP address in the reply message, so that the IP address in the first ARP entry is consistent with the IP address of the device sending the reply message.
As an example, after determining that the first ARP entry can be maintained, the 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.
The flow shown in fig. 4 is completed.
When the network topology structure of the switch group network configured with STP is changed, the root switch and each appointed switch do not directly clear the ARP cache table, but use the ARP detection mechanism to pertinently delete only the ARP table item corresponding to the device which leaves the switch group network or has the link interruption with the root switch. On the basis, on one hand, the ARP request message sent by the ARP detection mechanism is sent in a unicast mode, so that the problem of flooding of the ARP request message sent in a broadcast mode due to the change of a network topological structure in the related technology is avoided; on the other hand, when the network topology structure changes, only partial ARP table items are deleted, so that the root switch and each appointed switch 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 flooding of ARP request messages sent in a broadcast manner due to changes in network topology structure in the related art is avoided, and the problem that the broadband of a channel between a service board and a main control board is small, the channel of the ARP request message is easily blocked, and the ARP table entry cannot be learned in time, so that the IP message is lost is solved.
Referring to fig. 3, fig. 3 is a flowchart of an ARP entry update method executed by a designated switch side according to an embodiment of the present application. The ARP entry updating method may be applied to a designated switch in the switch network shown in fig. 1.
As shown in fig. 3, the process may include the following steps:
step 201, when receiving the TC message through the local root port, suspending updating the ARP entry in the local ARP cache table.
As an example, the TC message is constructed and sent by the root switch upon receiving the TCN message.
As an example, when the designated switch receives the TC message, the local ARP cache table is not cleared directly, but each port is adjusted to a detection state. The detection state of the port means that when the port receives the ARP request message, the ARP request message is sent to the CPU, and the CPU performs corresponding processing on the ARP request message to update the ARP entry.
Step 202, in the suspension duration, if receiving an ARP request message sent by the root switch, determining a second ARP entry to be deleted from the local ARP cache table according to the ARP request message.
As an example, the TC message may be used to indicate that each port is in the above-mentioned probing state during the suspension period of the designated switch. The buffering duration may be set according to actual conditions, and is not limited in this embodiment of the application.
As an example, the content related to the ARP request message has been described in the foregoing ARP entry updating method executed by the root switch, and reference may be made to the foregoing related content, which is not described herein again.
As an example, there are various 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 the ARP request message. And then using the target MAC address as a key word, and searching an ARP table item containing the key word in a local ARP cache table. And then, determining the searched ARP table entry as a second ARP table entry.
As an example, in this embodiment, a manner of distinguishing the second ARP entry to be deleted from other normal ARP entries may be the foregoing manner of distinguishing the first ARP entry to be deleted from the normal ARP entry. Since the two are similar in implementation, they are not described in detail.
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 configured with a specified duration in advance may be associated with the second ARP entry. When receiving the ARP response message, the associated timer can be determined according to the target MAC address of the ARP response message, and then whether the appointed time length passes when receiving the ARP response message can be judged according to whether the timer is overtime or not.
It should be noted that the specified time duration here may be set according to actual situations, and the present application does not specifically limit the specified time duration.
And step 204, deleting the second ARP table entry.
As an example, if it is determined that an 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 has failed or the link between the local switch and the device is interrupted, and the ARP entry may be deleted.
Step 205, maintain the second ARP entry.
As an example, the response message of the ARP request message, which may have two different response results. 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 entry corresponding to the ARP request message. And as another response result, the source IP address of the response message is different from the IP address of the second ARP table entry corresponding to the ARP request message, but the source MAC address of the response message is the same as the MAC address of the second ARP table entry corresponding to the ARP request message. The response result is caused by the device responding to the ARP request message, and the IP address of the device is changed due to the reason of going up and down the line, changing the access position, and the like, so that when responding to the ARP request message, the situation that the IP address in the response message is different from the IP address of the ARP entry to be deleted corresponding to the ARP request message occurs.
As an example, it is determined whether the source IP address of the reply packet is consistent with the IP address in the second ARP entry, and the foregoing description of the ARP entry updating method executed by the root switch side may be referred to. Since the two are similar in implementation, detailed description is omitted here.
As an example, if it is determined that the source IP address of the response packet is the same as the source MAC address and the IP address and the MAC address of the second ARP entry corresponding to the ARP request packet, it indicates that the second ARP entry is still the correct ARP entry, and the device corresponding to the ARP entry is still located in the STP networking, so that the ARP entry does not need to be deleted or modified.
As an example, if it is determined that the source IP address of the response packet is different from the IP address of the to-be-second ARP entry corresponding to the ARP request packet, it indicates that the device corresponding to the ARP entry is still located in the STP networking, but the second ARP entry is not the correct ARP entry. Therefore, the IP address in the second ARP entry can be updated by using the source IP address in the reply message, so that the IP address in the second ARP entry is consistent with the IP address of the device sending the reply message.
As an example, after determining that the second ARP entry can be maintained, the flag of the second ARP entry may be modified to indicate a normal ARP entry.
The flow shown in fig. 3 is completed.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 4, a schematic structural diagram of an ARP entry updating apparatus provided in an embodiment of the present application is shown, where the ARP entry updating apparatus may be applied to a root switch in the foregoing method embodiment, and as shown in fig. 4, the ARP entry updating apparatus may include:
a first determining unit 410, configured to send a TCN message to a designated switch in a switch networking STP when the TCN message is received through a local designated port, and determine a first ARP entry to be deleted from a local ARP cache table according to the designated port; the TC message is used for indicating to suspend updating of the ARP table entry;
a first updating unit 420, configured to construct, for each first ARP entry, an ARP request message corresponding to the 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 entry, and the destination MAC address is the MAC address in the first ARP entry.
As an example, the root switch is a box switch, and the box switch includes a main control board and a service board. The first updating unit 420 includes a construction subunit (not shown) disposed on the main control board and a transmission unit (not shown) disposed on the service board. And the construction subunit is used for constructing the ARP request message corresponding to the first ARP table entry through the main control board and sending the ARP request message to the service board. And the transmission subunit is used for receiving the ARP request message sent 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 entry if an ARP reply message for responding to the ARP request message is received within a specified time duration.
This completes the description of the apparatus shown in fig. 4.
Referring to fig. 5, a schematic structural diagram of an ARP entry updating apparatus provided in an embodiment of the present application is shown, where the ARP entry updating apparatus may be applied to a designated switch in the foregoing method embodiment, and as shown in fig. 5, the ARP entry updating apparatus 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, within the suspension duration, 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 packet for responding to the ARP request packet is not received within the specified duration.
As an example, the second updating unit 530 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 time duration.
This completes the description of the apparatus shown in fig. 5.
Referring to fig. 6, fig. 6 is a hardware structure diagram of a root switch where the ARP entry updating apparatus of 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 configured to store machine-executable instructions;
a processor configured to read and execute machine-executable instructions stored by the machine-readable storage medium to implement the ARP entry update method shown in fig. 2.
For one embodiment, a 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, and so forth. For example, the machine-readable storage medium may be: volatile machine-readable storage media, non-volatile machine-readable storage media, or similar storage media. In particular, the machine-readable storage medium may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the apparatus shown in fig. 6 is completed.
Referring to fig. 7, fig. 7 is a hardware structure diagram of a designated switch where the ARP entry updating apparatus of 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 configured to store machine-executable instructions;
a processor configured to read and execute machine-executable instructions stored by the machine-readable storage medium to implement the ARP entry update method shown in fig. 3.
For one embodiment, a 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, and so forth. For example, the machine-readable storage medium may be: volatile machine-readable storage media, non-volatile machine-readable storage media, or similar storage media. In particular, the machine-readable storage medium may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the apparatus shown in fig. 7 is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. An ARP entry update method, 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 switches through assigned ports; the method comprises the following steps:
when receiving a topology change notification TCN message through a local assignment port, sending a topology change TC message to a designated switch in a switch networking 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 of ARP table items;
constructing an ARP request message corresponding to each first ARP table entry, sending the ARP request message, and deleting the first ARP table entry if an ARP response message for responding to the ARP request message is not received within a specified time length; the target IP address of the ARP request message is the IP address in the first ARP table entry, and the target MAC address is the MAC address in the first ARP table entry.
2. The method of claim 1, wherein the root switch is a frame switch, and the frame switch comprises a main control board and a service board; the constructing an ARP request message corresponding to the target ARP table entry and the sending the ARP request message comprise:
constructing an ARP request message corresponding to the first ARP table entry through the main control board and sending the ARP request message to the service board;
and receiving the ARP request message issued 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 is received within a specified duration for responding to the ARP request message, the method further comprises:
the first ARP entry is maintained.
4. An ARP entry update method, applied to any specified switch in a switch network configured with STP, the switch network further comprising: a root switch other than the designated switch, the designated switch connected to the root switch through a root port; the method comprises the following steps:
when a TC message is received through a local root port, updating ARP table entries in a local ARP cache table in a deferred manner;
within the suspension duration, if an ARP request message sent by the root switch is received, determining a second ARP table entry 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 specified duration, deleting the second ARP table entry.
5. The method of claim 4, wherein if an ARP reply message is received within a specified duration for responding to the ARP request message, the method further comprises:
and maintaining the second ARP table entry.
6. An ARP entry update apparatus, 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 switches through assigned ports; the device comprises:
the first determining unit is used for sending a TC message to a designated switch in the STP of the switch networking when the TCN message is received through a local designated port, and determining a first ARP table item to be deleted from a local ARP cache table according to the designated port; the TC message is used for indicating to suspend updating of ARP table items;
a first updating unit, configured to construct, for each first ARP entry, an ARP request message corresponding to the 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 target IP address of the ARP request message is the IP address in the first ARP table entry, and the target MAC address is the MAC address in the first ARP table entry.
7. The method of claim 6, wherein the root switch is a frame switch, and the frame switch comprises a main control board and a service board;
the first updating unit comprises a construction subunit arranged on the main control board and a transmission unit arranged on the service board;
the constructing subunit is configured to construct, through the main control board, an ARP request message corresponding to the first ARP entry and send 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.
8. The method of claim 6, wherein the first updating unit is further configured to maintain the first ARP entry if an ARP reply message is received within a specified duration for responding to the ARP request message.
9. An ARP entry update apparatus, applied to any specified switch in a switch network configured with STP, the switch network further comprising: a root switch other than the designated switch, the designated switch connected to the root switch through a root port; the device comprises:
a receiving unit, configured to suspend updating of an ARP entry in a local ARP cache table when a TC packet is received through a local root port;
a second determining unit, configured to determine, within the suspension duration, a second ARP 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;
and the second updating unit is used for deleting the second ARP table entry if an ARP response message for responding to the ARP request message is not received within the specified duration.
10. The method of claim 9, wherein the second update unit is further configured to maintain the second ARP entry if an ARP reply message is received within a specified time period in response to the ARP request message.
CN202010351680.7A 2020-04-28 2020-04-28 ARP (Address resolution protocol) table entry updating method and device Active CN111556179B (en)

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 true CN111556179A (en) 2020-08-18
CN111556179B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347101A (en) * 2021-06-01 2021-09-03 中国联合网络通信集团有限公司 Routing information sending control method, VTEP and computer readable storage medium
US12388781B2 (en) * 2022-09-30 2025-08-12 Alpha Networks Inc. Routing information management method for a layer-3 switch, and system implementing the same

Citations (4)

* 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
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

Patent Citations (4)

* 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
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347101A (en) * 2021-06-01 2021-09-03 中国联合网络通信集团有限公司 Routing information sending control method, VTEP and computer readable storage medium
CN113347101B (en) * 2021-06-01 2022-11-15 中国联合网络通信集团有限公司 A sending control method of routing information, VTEP and computer-readable storage medium
US12388781B2 (en) * 2022-09-30 2025-08-12 Alpha Networks Inc. Routing information management method for a layer-3 switch, and system implementing the same

Also Published As

Publication number Publication date
CN111556179B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
US8018873B1 (en) Enhanced link state protocol for identifying broadcast networks
US11032197B2 (en) Reroute detection in segment routing data plane
CN100559770C (en) Method and device for accelerating border gateway protocol convergence
US7382731B1 (en) Method and apparatus for updating probabilistic network routing information
US9019815B2 (en) Source alive route injection
CN110798403B (en) Communication method, communication device and communication system
CN108600099B (en) Message forwarding method and device and leaf equipment
US10616175B2 (en) Forwarding information to forward data to proxy devices
CA3104756C (en) Loop avoidance communications method, device, and system
CN110505621B (en) Terminal migration processing method and device
GB2513188A (en) Identification of the paths taken through a network of interconnected devices
JP2010530694A (en) Method and system for assigning routers to hosts
US6898187B2 (en) Automatic selection of unique node identifiers in a distributed routing environment
WO2022048646A1 (en) Virtual ip management method and apparatus, electronic device and storage medium
CN107682261B (en) Flow forwarding method and device
CN101663865B (en) Intelligent database exchange for ospf
JP6299745B2 (en) COMMUNICATION SYSTEM, CONTROL DEVICE, COMMUNICATION METHOD, AND PROGRAM
US10958554B2 (en) Monitoring flow activity on a network device
CN111556179B (en) ARP (Address resolution protocol) table entry updating method and device
CN111954102B (en) Routing control method and device in DHCPV6 PD scene
CN108540386B (en) Method and device for preventing service flow interruption
CN118055067A (en) Communication method and device
US20080008201A1 (en) Communication terminal, a method for communication, and a program strorage medium storing a program thereof
US20130232277A1 (en) Transmitting and Forwarding Data
US6615273B1 (en) Method for performing enhanced target identifier (TID) address resolution

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