CN107332773B - Method for learning ARP table entry and PTN equipment - Google Patents

Method for learning ARP table entry and PTN equipment Download PDF

Info

Publication number
CN107332773B
CN107332773B CN201610286581.9A CN201610286581A CN107332773B CN 107332773 B CN107332773 B CN 107332773B CN 201610286581 A CN201610286581 A CN 201610286581A CN 107332773 B CN107332773 B CN 107332773B
Authority
CN
China
Prior art keywords
message
forwarding information
arp
car
message forwarding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610286581.9A
Other languages
Chinese (zh)
Other versions
CN107332773A (en
Inventor
覃剑宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610286581.9A priority Critical patent/CN107332773B/en
Publication of CN107332773A publication Critical patent/CN107332773A/en
Application granted granted Critical
Publication of CN107332773B publication Critical patent/CN107332773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]

Landscapes

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

Abstract

The invention discloses a method for learning ARP (address resolution protocol) entries and PTN (packet transport network) equipment, which are used for solving the problem that when the rate of reporting ARP miss messages by a forwarding plane of the PTN equipment is limited in the prior art, impact is caused on a CPU (central processing unit) of the PTN equipment or the speed of learning the ARP entries by a control plane of the PTN equipment is influenced. In the method, the PTN equipment stores the corresponding relation between a plurality of message forwarding information sets and the CAR, namely different CAR is set for different message forwarding information sets, so that the PTN equipment can flexibly adjust the CAR corresponding to each message forwarding information set to limit the speed of a forwarding plane for reporting the ARP miss message aiming at the message forwarding information with different credibility degrees, avoid the impact on a CPU of the PTN equipment caused by setting the same CAR aiming at the messages with any credibility degree, and ensure the speed of a control plane of the PTN equipment for learning ARP table items.

Description

Method for learning ARP table entry and PTN equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for learning ARP entry and a PTN device.
Background
Currently, Packet Transport Network (PTN) networking technology is adopted for the mobile bearer Network, and the Layer two (Layer2) PTN of the mobile bearer Network is usually networked by Ethernet, for example, Gigabit Ethernet (GE), 10GE or 100 GE.
An Address Resolution Protocol (ARP) entry maintained by a PTN device of a three-Layer (Layer3) PTN in the PTN is a bridge for a three-Layer packet forwarded by the PTN device to enter a two-Layer ethernet. One ARP entry is a mapping relationship between an Internet Protocol (IP) address (i.e., a next-hop IP address) and a virtual routing Forwarding instance (VRF) of an adjacent PTN device (i.e., a next three-layer network device) in the Forwarding path of the three-layer packet at an interval of ethernet and a Media Access Control (MAC) address of the next three-layer network device, and the three-layer packet may be an IP packet or a Multi-Protocol Label Switching (MPLS) packet, and the like.
The process of forwarding the IP message by one PTN device comprises the following steps:
after the PTN equipment receives the IP message, a forwarding plane of the PTN equipment inquires a routing table stored locally according to a destination IP address in the IP message and VRF to obtain a next-hop IP address, and then inquires an ARP table item stored locally according to the next-hop IP address and the VRF;
if the ARP table entry containing the next hop IP address and the VRF is inquired, the IP message is encapsulated according to the MAC address in the inquired ARP table entry, an Ethernet frame is obtained by encapsulation and is forwarded, and the MAC address is encapsulated in the Ethernet frame header;
if the ARP list item containing the next hop IP address and the VRF is not inquired, initiating a process of learning the ARP list item: the forwarding plane reports an ARPmis message to a Central Processing Unit (CPU) of the PTN equipment, and triggers a control plane of the PTN equipment to broadcast an ARP request message, wherein the ARP request message comprises the next hop IP address; after receiving an ARP response returned by the network equipment corresponding to the next hop IP address, the control plane generates an ARP table entry according to the next hop IP address, the VRF and the MAC address of the network equipment contained in an ARP response message, and the forwarding plane forwards the IP message according to the generated ARP table entry.
The PTN device adopts a structure of separating forwarding and control, namely the PTN device comprises a forwarding plane and a control plane.
However, in general, the rate of forwarding a three-layer packet by a forwarding plane of a PTN device is very high, and when an ARP entry is not queried for a three-layer packet, an ARP miss message is reported to a CPU, and then an ARP entry cannot be queried for each subsequently forwarded three-layer packet including a destination IP address identical to the three-layer packet, and an arppiss message is also reported to the CPU, which causes the CPU in the PTN device to receive a large number of ARP miss messages in a short time, and causes impact on the CPU.
Therefore, a Committed Access Rate (CAR) is set in a conventional PTN device, and is used to limit the Rate of the ARP miss message reported by the forwarding plane, for example, the CAR set in a certain PTN device is 100KB/s, so that within one second, the forwarding plane of the PTN device may report the ARP miss message of 100KB to the CPU of the PTN device, and directly discard ARP miss messages beyond 100 KB.
The CAR is arranged in the PTN equipment, so that the rate of the ARP miss message reported by a forwarding plane of the PTN equipment can be limited, however, the value of the CAR is a fixed value, and when the value of the CAR is set to be larger, the rate of the reported ARP miss message is higher, and impact is also caused on a CPU (central processing unit) of the PTN equipment, so that the safety of a control plane of the PTN equipment is reduced; when the value setting of the CAR is small, the reported ARP miss message rate is small, the speed of the control plane of the PTN equipment for learning the ARP table entry is influenced, and the time of the three-layer message reaching the next three-layer network equipment is further prolonged, namely the service through time is prolonged.
Disclosure of Invention
The invention provides a method for learning ARP (address resolution protocol) entries and PTN (packet transport network) equipment, which are used for solving the problem that when the rate of reporting ARP miss messages by a forwarding plane of the PTN equipment is limited, impact is caused on a CPU (central processing unit) of the PTN equipment or the speed of learning the ARP entries by a control plane of the PTN equipment is influenced.
The specific technical scheme provided by the invention is as follows:
in one aspect, an embodiment of the present invention provides a method for learning an ARP entry, where the method includes:
a forwarding plane of Packet Transport Network (PTN) equipment acquires first message forwarding information of a first message to be forwarded, and does not inquire a first Address Resolution Protocol (ARP) table entry containing the first message forwarding information according to the first message forwarding information; the first message forwarding information is a virtual routing forwarding instance (VRF) and a next hop Internet Protocol (IP) address, and the first ARP table entry is a mapping relation between the first message forwarding information and a Media Access Control (MAC) address;
the forwarding plane determines a first message forwarding information set to which the first message forwarding information belongs;
the forwarding plane acquires a first packet forwarding information set (CAR) corresponding to the first CAR according to a corresponding relation between a plurality of stored packet forwarding information sets and a Committed Access Rate (CAR), wherein the first CAR is a number threshold of a first ARP miss message and a second ARP miss message which are reported to a control plane of the PTN equipment by the forwarding plane in a set time unit, the second ARP miss message is generated by the forwarding plane aiming at a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding plane aiming at the first packet to be forwarded;
the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded, reports the first ARP miss message to the control plane, and reports a second ARP miss message generated subsequently according to the first CAR;
and the control plane learns the first ARP list item according to the first ARP miss message.
By adopting the method, the PTN equipment stores the corresponding relation between a plurality of message forwarding information sets and the CAR, namely different CAR is set for different message forwarding information sets, so that the PTN equipment can flexibly adjust the CAR corresponding to each message forwarding information set to limit the ARP miss message reporting rate of a forwarding plane for users (namely message forwarding information) with different credibility degrees, avoid the situation that the same CAR is set for messages with any credibility degree to cause impact on a CPU of the PTN equipment, ensure the safety of a control plane of the PTN equipment and ensure the speed of the control plane of the PTN equipment for learning ARP table items.
In one possible design, the determining, by the forwarding plane, a first packet forwarding information set to which the first packet forwarding information belongs includes:
the forwarding plane retrieves the first message forwarding information from a plurality of stored message forwarding information sets;
and when the forwarding plane retrieves the first message forwarding information from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
According to the method, the PTN equipment stores a plurality of message forwarding information sets, so that the PTN equipment can divide a plurality of message forwarding information sets into a plurality of message forwarding information sets, determines corresponding CAR (routing access control) aiming at the message forwarding information in different message forwarding information sets according to the corresponding relation between the plurality of message forwarding information sets and the CAR, processes the corresponding message to be forwarded according to the determined CAR, and is convenient for the PTN equipment to manage the message to be forwarded.
In one possible design, the learning, by the control plane, of the first ARP entry according to the first ARP miss message includes:
the control plane generates a corresponding ARP table item learning task according to the first ARP miss message;
the control plane determines a first priority corresponding to the first message forwarding information set according to the corresponding relation between the stored message forwarding information sets and the priorities, and the first priority is used as the priority of the control plane for processing the ARP table item learning task;
and the control plane processes the ARP table entry learning task according to the first priority to generate a first ARP table entry.
By the method, the control plane in the PTN equipment stores the corresponding relation between a plurality of message forwarding information sets and the priority, namely different CAR is set for different message forwarding information sets, so that the PTN can flexibly adjust the priority corresponding to each message forwarding information set, the control plane is limited to learn the priority of ARP table entries aiming at users with different credibility degrees (namely message forwarding information), the ARP learning rate of credible users is ensured, the time for penetrating legal services is shortened, the PTN equipment is prevented from being attacked by ARP miss messages of illegal messages, and the safety of the control plane of the PTN equipment is ensured.
In one possible design, the reporting, by the forwarding plane, a second arppiss message generated subsequently according to the first CAR includes:
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is less than or equal to the difference between the first CAR and 1, the forwarding plane reports all the generated second ARP miss messages to the control plane;
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is larger than the difference between the first CAR and 1, the forwarding plane reports the generated partial second ARP miss messages to the control plane, and the number of the partial second ARP miss messages is the difference between the first CAR and 1.
By the method, the forwarding plane can limit the rate of reporting the ARP miss message by the forwarding plane aiming at the first message forwarding information through the first CAR.
In one possible design, before the control plane generates the first ARP entry, the method further includes:
the control plane generates a second ARP table entry containing the first message forwarding information, the second ARP table entry is used for indicating the forwarding plane to discard a message to be forwarded when the second ARP table entry is inquired for the message to be forwarded, and the first aging time of the second ARP table entry is set for the first message forwarding information set;
the control plane generates a second ARP table entry every time in the subsequent process, the first aging time of the second ARP table entry is prolonged for setting a first duration, the first message forwarding information in the first message forwarding information set is deleted when the first aging time after the second ARP table entry is prolonged is larger than or equal to a second aging time set for a second message forwarding information set, and the first message forwarding information is added into the second message forwarding information set; the second ARP table entry generated each time in the following is generated after the aging time of the second ARP table entry generated last time and when the control plane receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
By the method, the control plane of the PTN equipment intelligently adjusts the message forwarding information in the message forwarding information sets, so that the ability of the PTN equipment to flexibly cope with environmental changes is improved.
In one possible design, after the control plane generates the first ARP entry, the method further includes:
and the control plane deletes the second ARP table entry.
In one possible design, the first CAR is not a maximum value of the plurality of CARs included in the correspondence between the plurality of sets of packet forwarding information and CARs;
after the control plane generates the first ARP entry, the method further comprises:
and the control plane deletes the first message forwarding information in the second message forwarding information set and adds the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
By the above method, when the control plane of the PTN device successfully learns the first ARP entry, the control plane takes the first packet forwarding information as legitimate and trusted packet forwarding information, and therefore, the first packet forwarding information is moved to the most legitimate and trusted packet forwarding information set, because the packet forwarding information set (for example, white list) corresponding to the legitimate and trusted packet is the largest in CAR, and as can be known from the above discussion, the priority corresponding to the packet forwarding information set is the highest, the first packet forwarding information needs to be moved to the corresponding third packet forwarding information set with the largest CAR.
In a second aspect, an embodiment of the present invention further provides a PTN device, where the PTN device has a function of implementing a behavior of the PTN device in the above method example. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a possible design, the structure of the PTN device includes a forwarding unit and a control unit, and these units may execute corresponding functions in the foregoing method example, for specific reference, detailed description in the method example is omitted here for further details.
In one possible design, the PTN device includes a transceiver, a processor, a bus, and a memory, where the transceiver is configured to perform communication interaction with a device connected to the PTN device, and the processor is configured to support the PTN device to perform the corresponding functions of the above method. The memory is coupled to the processor and retains program instructions and data necessary for the PTN device.
By adopting the method for learning ARP table items, the PTN equipment stores the corresponding relation between a plurality of message forwarding information sets and the CAR, namely different CAR is set for different message forwarding information sets, so that the PTN equipment can flexibly adjust the CAR corresponding to each message forwarding information set to limit the rate of ARP miss information reported by a forwarding plane aiming at users with different credibility degrees (namely message forwarding information), the phenomenon that the same CAR is set for messages with any credibility degree to cause impact on a CPU of the PTN equipment is avoided, the safety of a control plane of the PTN equipment is ensured, and the speed of the control plane of the PTN equipment for learning the ARP table items is also ensured.
Drawings
Fig. 1 is a diagram of a PTN architecture implementing a method for learning ARP entries according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for learning ARP entry according to an embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating an example of learning ARP entry according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a PTN device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a PTN device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method for learning ARP (address resolution protocol) entries and a PTN (packet transport network) device, which are used for solving the problem that when the rate of reporting ARP miss messages by a forwarding plane of the PTN device is limited in the prior art, impact is caused on a CPU (central processing unit) of the PTN device or the speed of learning the ARP entries by a control plane of the PTN device is influenced. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
In the embodiment of the invention, a PTN device stores corresponding relations between a plurality of message forwarding information sets and a CAR, when a forwarding plane of the PTN device aims at a first to-be-forwarded message and does not inquire a first ARP (Address resolution protocol) table item containing first message forwarding information of the first to-be-forwarded message, the first message forwarding information set to which the first to-be-forwarded message belongs is determined, and then a first CAR corresponding to the first message forwarding information set is determined, and the forwarding plane reports a subsequently generated second ARP miss message according to the first CAR, wherein the second ARP miss message is generated by the forwarding plane aiming at a second to-be-forwarded message, and the second message forwarding information of the second to-be-forwarded message is the same as the first message forwarding information; and the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded and reports the first ARP miss message to the control plane of the PTN equipment, so that the control plane learns the first ARP table entry. Because the PTN device stores the correspondence between a plurality of message forwarding information sets and CARs, that is, different CARs are set for different message forwarding information sets, the PTN device can flexibly adjust the CAR corresponding to each message forwarding information set to limit the rate at which a forwarding plane reports ARP miss messages for users (that is, message forwarding information) of different credibility degrees, avoid setting the same CAR for messages of any credibility degree to cause impact on a CPU of the PTN device, ensure the security of a control plane of the PTN device, and also ensure the speed at which the control plane of the PTN device learns ARP entries.
The method for learning the ARP entry provided in the embodiment of the present invention is applicable to the PTN shown in fig. 1, where an L2PTN in the PTN uses an ethernet to perform networking, an L3PTN of the PTN includes a plurality of PTN devices, the PTN devices may be routers based on an ARP standard protocol or other devices having a routing function, and the ethernet includes a plurality of network devices, such as an ethernet switch 102 and other devices.
The process that PTN device 101 in L3PTN sends a three-layer packet to PTN device 103 in L3PTN through ethernet includes:
the PTN device 101 receives a three-layer packet (e.g., an IP packet), first obtains a VRF and a destination IP address of the three-layer packet, and queries a locally stored routing table according to the two pieces of information to obtain an IP address (i.e., a next hop IP address) of an adjacent PTN device (e.g., the PTN device 103) of an alternate ethernet in a forwarding path of the three-layer packet;
then, the PTN device 101 queries a plurality of locally stored ARP entries according to the next hop IP address and the VRF;
when a first ARP entry including the next hop IP address and the VRF is queried, the PTN device 101 obtains an MAC address included in the first ARP entry, and forwards the three-layer packet to the PTN device 103 according to the MAC address, which specifically includes: the PTN device 101 encapsulates the three-layer packet into an ethernet frame, encapsulates the MAC address in the ethernet frame header, and finally sends the encapsulated ethernet frame to the PTN device 103 through a network device (such as a switch 102) in the ethernet by the PTN device 101;
when a first ARP entry containing the next hop IP address and the VRF is not queried, the PTN device 101 triggers a learning process of the first ARP entry, and after the first ARP entry is learned, forwards a subsequent three-layer packet to be forwarded, which has the next hop IP address and the VRF, according to an MAC address contained in the first ARP entry.
In the embodiment of the present invention, the PTN device 101 employs a structure of separation of forwarding and control, and the PTN device 101 includes a forwarding plane and a control plane, where the forwarding plane is configured to query a locally stored routing table and an ARP entry after receiving a three-layer packet, and is further configured to report an ARP miss message to the control plane when the first ARP entry is not queried, and trigger the control plane to initiate a learning process of the first ARP entry; the control plane is used for learning ARP table items.
Referring to fig. 2, an embodiment of the present invention provides a method for learning an ARP entry, which may be but is not limited to be applied to the PTN shown in fig. 1, and a PTN device according to an embodiment of the present invention may be the PTN device 101 shown in fig. 1. The processing flow of the method comprises the following steps:
step 201: a forwarding plane of PTN equipment acquires first message forwarding information of a first message to be forwarded, and does not inquire a first ARP (address resolution protocol) table item containing the first message forwarding information according to the first message forwarding information; the first message forwarding information is a VRF and a next hop IP address, and the first ARP table entry is a mapping relation between the first message forwarding information and the MAC address.
The PTN device involved in the embodiments of the present invention employs a separate architecture for forwarding and control, and therefore, the PTN device includes a forwarding plane and a control plane.
The obtaining, by the PTN device, the VRF of the first packet to be forwarded includes:
the PTN equipment determines a Virtual Private Network (VPN) corresponding to a port according to the port for receiving the first message to be forwarded, and determines a VRF of the first message to be forwarded according to the VPN.
The obtaining, by the PTN device, a next hop IP address of the first packet to be forwarded specifically includes:
the PTN equipment acquires a destination IP address contained in the first message to be forwarded; according to the destination IP address and the obtained VRF, inquiring a routing table stored locally, wherein the mapping relation between the destination IP address and the VRF of the routing table and the next hop IP address is obtained;
and after a first routing table containing the destination IP address and the VRF is inquired, acquiring a next hop IP address contained in the first routing table.
Step 202: and the forwarding plane determines a first message forwarding information set to which the first message forwarding information belongs.
Optionally, when executing step 202, the forwarding plane of the PTN device specifically includes:
the forwarding plane retrieves the first message forwarding information from a plurality of stored message forwarding information sets;
and when the forwarding plane retrieves the first message forwarding information from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
The PTN equipment stores a plurality of message forwarding information sets, so that the PTN equipment can divide a plurality of message forwarding information into a plurality of message forwarding information sets, determines corresponding CAR for the message forwarding information in different message forwarding information sets according to the corresponding relation between the plurality of message forwarding information sets and the CAR, processes the corresponding message to be forwarded according to the determined CAR, and is convenient for the PTN equipment to manage the message to be forwarded.
For example, the plurality of message forwarding information sets may include 3 sets of a black list, a white list and a grey list, where a to-be-forwarded message having message forwarding information in the white list has the highest probability of being a legitimate trusted message, and a to-be-forwarded message having message forwarding information in the black list has the highest probability of being an illegitimate message, and a to-be-forwarded message having message forwarding information in the grey list has an uncertain credibility, and thus, the CAR corresponding to the white list is the largest, the CAR corresponding to the grey list is moderate, and the CAR corresponding to the black list is the smallest.
Optionally, the multiple message forwarding information sets may be configured in advance by the user, or may be configured adaptively by the PTN device, which is not limited in the present invention. For example, the PTN device network routes the next hop IP address and self-adaptively whitelists the routed next hop IP address, or the PTN device static Tunnel (Tunnel) next hop IP address is self-adaptively whitelisted, or the PTN device automatically whitelists the next hop IP address that has successfully learned the ARP entry.
Step 203: the forwarding plane acquires a first packet forwarding information set (CAR) corresponding to the first CAR according to a correspondence relationship between the stored plurality of packet forwarding information sets (CAR), wherein the first CAR is a number threshold of a first ARP miss message and a second ARP miss message which are reported to a control plane of the PTN equipment by the forwarding plane in a set time unit, the second ARP miss message is generated by the forwarding plane for a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding plane for the first packet to be forwarded.
Optionally, the CAR in the correspondence between the packet forwarding Information set and the CAR may include Committed Information Rate (CIR) and/or Peak Information Rate (PIR), where the CIR is an average Rate at which the ARP miss message is allowed to be reported, the PIR is a maximum Rate at which the ARP miss message is allowed to be reported, and the ARP miss message targeted by the CIR and the PIR is generated by the forwarding plane for a packet to be forwarded having the same packet forwarding Information.
Optionally, when the multiple sets of message forwarding information are 3 sets of a black list, a white list, and a gray list, values of CARs corresponding to the multiple sets of message forwarding information are shown in table 1:
TABLE 1 CAR corresponding to multiple message forwarding information sets
Message forwarding information aggregation CAR Corresponding reported ARP miss message rate
White list Big (a) Height of
Grey list In In
Black list Small Is low in
In an actual application scenario, when a PTN device is used as a sink node, the number of base stations connected to the PTN device is huge, and therefore, a large number of ARP entries need to be learned, and in a Long Term Evolution (LTE) scenario, the PTN device of the sink node bears an X2 service (i.e., a service between base stations), so that the PTN device is more vulnerable to an illegal message, which may cause a CPU of the PTN device to additionally process ARP miss messages of the illegal message, and therefore, CPU resources are occupied, and a through delay of a legal service is increased.
Because the PTN device stores the correspondence between multiple sets of message forwarding information and CARs, that is, different CARs are set for different sets of message forwarding information, the PTN device can flexibly adjust the CAR corresponding to each set of message forwarding information to limit the rate at which the forwarding plane reports arppiss messages for users of different credibility (that is, message forwarding information), thereby avoiding setting the same CAR for messages of any credibility, avoiding causing impact on the CPU of the PTN device, ensuring the security of the control plane of the PTN device, and ensuring the speed at which the control plane of the PTN device learns ARP entries.
Step 204: and the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded, reports the first ARP miss message to the control plane, and reports a second ARPmis message generated subsequently according to the first CAR.
In step 204, the forwarding plane triggers the control plane to perform learning of the first ARP entry by sending the first ARP miss message to the control plane.
Optionally, the reporting, by the forwarding plane, a second ARP miss message generated subsequently according to the first CAR includes:
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is less than or equal to the difference between the first CAR and 1, the forwarding plane reports all the generated second ARP miss messages to the control plane;
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is larger than the difference between the first CAR and 1, the forwarding plane reports the generated partial second ARP miss messages to the control plane, and the number of the partial second ARP miss messages is the difference between the first CAR and 1.
By the method, the forwarding plane can limit the rate of reporting the ARP miss message by the forwarding plane aiming at the first message forwarding information through the first CAR.
Step 205: and the control plane learns the first ARP list item according to the first ARP miss message.
Optionally, when performing step 205, the control plane includes:
the control plane generates a corresponding ARP table item learning task according to the first ARP miss message;
the control plane determines a first priority corresponding to the first message forwarding information set according to the corresponding relation between the stored message forwarding information sets and the priorities, and the first priority is used as the priority of the control plane for processing the ARP table item learning task;
and the control plane processes the ARP table entry learning task according to the first priority to generate a first ARP table entry.
The control plane stores the corresponding relationship between the multiple sets of message forwarding information and the priority, and different sets of message forwarding information have different priorities, for example, when the multiple sets of message forwarding information are 3 sets of black list, white list and gray list, the priorities corresponding to the multiple sets of message forwarding information are shown in table 2:
table 2 priority corresponding to multiple message forwarding information sets
Message forwarding information aggregation Priority level Priority of control plane processing ARP entry learning task
White list Height of Height of
Grey list In In
Black list Is low in Is low in
Optionally, the control plane may place the ARP entry learning task in a task queue corresponding to the priority according to the priority, for example, the control plane places the ARP entry learning task generated for the message forwarding information in the white list in a high-priority queue.
By the method, the control plane in the PTN equipment stores the corresponding relation between a plurality of message forwarding information sets and the priority, namely different CAR is set for different message forwarding information sets, so that the PTN can flexibly adjust the priority corresponding to each message forwarding information set, the control plane is limited to learn the priority of ARP table entries aiming at users with different credibility degrees (namely message forwarding information), the ARP learning rate of credible users is ensured, the time for penetrating legal services is shortened, the PTN equipment is prevented from being attacked by ARP miss messages of illegal messages, and the safety of the control plane of the PTN equipment is ensured.
Wherein, before the control plane performs step 205, the method further comprises:
the control plane generates a second ARP table entry containing the first message forwarding information, the second ARP table entry is used for indicating the forwarding plane to discard a message to be forwarded when the second ARP table entry is inquired for the message to be forwarded, and the first aging time of the second ARP table entry is set for the first message forwarding information set;
the control plane generates a second ARP table entry every time in the subsequent process, the first aging time of the second ARP table entry is prolonged for setting a first duration, the first message forwarding information in the first message forwarding information set is deleted when the first aging time after the second ARP table entry is prolonged is larger than or equal to a second aging time set for a second message forwarding information set, and the first message forwarding information is added into the second message forwarding information set; the second ARP table entry generated each time in the following is generated after the aging time of the second ARP table entry generated last time and when the control plane receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
The second ARP entry may be referred to as a black hole routing entry or an ARP dummy (dummy) entry, and is configured to discard the to-be-forwarded packet with the first packet forwarding information, so as to prevent the forwarding plane from continuing to report an ARP miss message to the control plane subsequently for the to-be-forwarded packet with the first packet forwarding information.
The aging time of the ARP dummy entries generated by the message forwarding information contained in different message forwarding information sets is different, for example, the aging time of the ARP dummy entries generated by a blacklist is longest, and the aging time of the ARP dummy entries generated by a whitelist is shortest, so that the ability of the PTN device for preventing the ARP miss message of an illegal message from being attacked can be improved, the ARP learning rate of a legal and credible user is accelerated, the legal service through time is shortened, and the safety of a control plane of the PTN device is ensured.
As can be seen from the above discussion, the period from the first generation of the second ARP entry containing the first message forwarding information to the time when the control plane learns the first ARP entry is longer, and the aging time of the second ARP entry is shorter, so that the forwarding plane may also receive the message to be forwarded with the first message forwarding information after the aging time of the first generated second ARP entry arrives, and thus the forwarding plane may generate the second ARP entry again, and since the forwarding plane receives a large number of messages to be forwarded with the first message forwarding information many times, the probability that the message to be forwarded with the first message forwarding information is an illegal message is increased, and by the above method, the first aging time of the generated ARP entry is extended for a first period (e.g. 2 seconds (second, s), 5s or 10s, etc.) until the first aging time of the second ARP table entry is greater than or equal to a second aging time set for a second packet forwarding information set, adjusting the first packet forwarding information to the second packet forwarding information set.
For example, the aging time set by the control plane for a white list is 10s, the aging time set for a grey list is 30s, when the control plane generates a second ARP entry including one piece of first packet forwarding information in the white list for the first time, the aging time of the second ARP entry is 10s, and after the aging time of the second ARP entry passes, the ARP entry is generated again, each time the aging time is extended by 5s, the second ARP entry is generated 5 times in total, the aging time of the second ARP entry for the 5 th time is 30s, and when the PTN device does not learn the first ARP entry at this time, the PTN device deletes the first packet forwarding information in the white list and moves the first packet forwarding information to the grey list.
By the method, the control plane of the PTN equipment intelligently adjusts the message forwarding information in the message forwarding information sets, so that the ability of the PTN equipment to flexibly cope with environmental changes is improved.
In a case that the control plane generates a second ARP entry that includes the first packet forwarding information, after the control plane generates the first ARP entry, the method further includes:
and the control plane deletes the second ARP table entry.
Optionally, the first CAR is not a maximum value of the plurality of CARs included in the correspondence between the plurality of packet forwarding information sets and CARs; after the control plane generates the first ARP entry, the method further comprises:
and the control plane deletes the first message forwarding information in the second message forwarding information set and adds the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
By the above method, when the control plane of the PTN device successfully learns the first ARP entry, the control plane takes the first packet forwarding information as legitimate and trusted packet forwarding information, and therefore, the first packet forwarding information is moved to the most legitimate and trusted packet forwarding information set, because the packet forwarding information set (for example, white list) corresponding to the legitimate and trusted packet is the largest in CAR, and as can be known from the above discussion, the priority corresponding to the packet forwarding information set is the highest, the first packet forwarding information needs to be moved to the corresponding third packet forwarding information set with the largest CAR.
By the method, the control plane of the PTN equipment intelligently adjusts the message forwarding information in the message forwarding information sets, so that the ability of the PTN equipment to flexibly cope with environmental changes is improved.
By adopting the method for learning ARP entry in the above embodiment of the present invention, a PTN device stores a corresponding relationship between multiple sets of message forwarding information and CARs, and when a forwarding plane of the PTN device does not query a first ARP entry containing first message forwarding information of a first message to be forwarded with respect to the first message to be forwarded, determines a first set of message forwarding information to which the first message to be forwarded belongs, and further determines a first CAR corresponding to the first set of message forwarding information, and the forwarding plane reports a subsequently generated second ARP miss message according to the first CAR, where the second arpmis message is generated by the forwarding plane with respect to a second message to be forwarded, and the second message forwarding information of the second message to be forwarded is the same as the first message forwarding information; and the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded and reports the first ARP miss message to the control plane of the PTN equipment, so that the control plane learns the first ARP table entry. Because the PTN device stores the correspondence between multiple sets of message forwarding information and CARs, that is, different CARs are set for different sets of message forwarding information, the PTN device can flexibly adjust the CAR corresponding to each set of message forwarding information to limit the rate at which the forwarding plane reports arppiss messages for users of different credibility (that is, message forwarding information), thereby avoiding the situation that the same CAR is set for messages of any credibility to cause impact on the CPU of the PTN device, ensuring the security of the control plane of the PTN device, and ensuring the speed at which the control plane of the PTN device learns ARP entries.
Based on the above embodiments, an embodiment of the present invention further provides an example of learning ARP entries, as shown in fig. 3, 3 sets of message forwarding information are maintained in the PTN device: white, grey and black lists.
When a forwarding plane of the PTN equipment receives an IP message, the forwarding plane acquires first message forwarding information (a next hop IP address and a VRF) of the IP message; the forwarding plane inquires a locally stored ARP table entry according to the first message forwarding information, and when the first ARP table entry containing the first message forwarding information is not inquired, the forwarding plane retrieves the first message forwarding information from each stored message forwarding information set; when the first message forwarding information is retrieved from a message forwarding information set (white list), determining the white list as the first message forwarding information set to which the first message forwarding information belongs; the forwarding plane continues to acquire a first CAR corresponding to the white list according to the corresponding relation between the stored multiple message forwarding information sets and the CAR;
the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded, reports the first ARPmis message to the control plane, and reports a second ARP miss message generated subsequently aiming at the message to be forwarded with the first message forwarding information according to the first CAR;
the control plane generates a corresponding ARP list item learning task according to the first ARP miss message, can determine a first priority (high priority) corresponding to a white list according to a corresponding relation between a plurality of stored message forwarding information sets and priorities, and places the ARP list item learning task in a high priority queue;
the control plane processes ARP table item learning tasks according to the high-low sequence of the priority, namely processes the ARP learning tasks in the high-priority queue preferentially; when the control plane processes an ARP table item learning task, an ARP Request (Request) is sent to adjacent PTN equipment of the interval Ethernet through a forwarding plane;
the control plane also generates a second ARP (ARP dummy entry) comprising the first message forwarding information, wherein the aging time of the ARP dummy entry is set aiming at the white list; when the forwarding plane queries the ARP dummy entry aiming at a message to be forwarded, discarding the message to be forwarded;
the control plane may also adaptively adjust the packet forwarding information in the packet forwarding information set, which may specifically refer to the description in step 205 in the foregoing embodiment and is not described here again;
and when the control plane receives an ARP response (relpy) through the adjacent PTN equipment, generating the first ARP table entry according to the ARP response, and deleting the second ARP table entry after the first ARP table entry is generated.
Based on the above embodiment, the present invention further provides a PTN device, which may be the PTN device in fig. 1, and referring to fig. 4, the PTN device 400 includes: a forwarding unit 401 and a control unit 402, wherein,
a forwarding unit 401, configured to obtain first packet forwarding information of a first packet to be forwarded, and according to the first packet forwarding information, not query a first Address Resolution Protocol (ARP) entry that includes the first packet forwarding information; the first message forwarding information is a virtual routing forwarding instance (VRF) and a next hop Internet Protocol (IP) address, and the first ARP table entry is a mapping relation between the first message forwarding information and a Media Access Control (MAC) address;
determining a first message forwarding information set to which the first message forwarding information belongs;
acquiring a first packet forwarding information (CAR) corresponding to a first CAR according to a correspondence between a plurality of stored packet forwarding information sets and a Committed Access Rate (CAR), wherein the first CAR is a number threshold of a first ARP miss message and a second ARP miss message reported to a control unit 402 of the PTN device 400 by the forwarding unit 401 in a set time unit, the second ARP miss message is generated by the forwarding unit 401 for a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding unit 401 for the first packet to be forwarded; and
generating a first ARP miss message for the first to-be-forwarded message, reporting the first ARP miss message to the control unit 402, and reporting a second ARP miss message generated subsequently according to the first CAR;
the control unit 402 is configured to perform learning of the first ARP entry according to the first ARP miss message.
Optionally, when determining the first packet forwarding information set to which the first packet forwarding information belongs, the forwarding unit 401 is specifically configured to:
retrieving the first message forwarding information from a plurality of stored message forwarding information sets;
and when the first message forwarding information is retrieved from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
Optionally, the control unit 402 is specifically configured to:
generating a corresponding ARP table entry learning task according to the first ARP miss message;
determining a first priority corresponding to the first message forwarding information set according to a correspondence between the stored multiple message forwarding information sets and priorities, and taking the first priority as a priority of the control unit 402 for processing the ARP entry learning task;
and processing the ARP table entry learning task according to the first priority to generate the first ARP table entry.
Optionally, when reporting the subsequently generated second ARP miss message according to the first CAR, the forwarding unit 401 is specifically configured to:
when the number of the second ARP miss messages generated by the forwarding unit 401 in the set time unit is less than or equal to the difference between the first CAR and 1, all the generated second ARP miss messages are reported to the control unit 402;
when the number of the second ARP miss messages generated by the forwarding unit 401 in the set time unit is greater than the difference between the first CAR and 1, reporting a part of the generated second ARP miss messages to the control unit 402, where the part of the second ARP miss messages is the difference between the first CAR and 1.
Optionally, the control unit 402 is further configured to:
before generating the first ARP entry, generating a second ARP entry containing the first packet forwarding information, where the second ARP entry is used to instruct the forwarding unit 401 to discard a packet to be forwarded when querying the second ARP entry for the packet to be forwarded, and a first aging time of the second ARP entry is set for the first packet forwarding information set; and
generating a second ARP table entry every time in the subsequent process, prolonging the first aging time of the second ARP table entry for a first time length, deleting the first message forwarding information in the first message forwarding information set until the first aging time after the second ARP table entry is prolonged is greater than or equal to a second aging time set for a second message forwarding information set, and adding the first message forwarding information in the second message forwarding information set; the second ARP entry generated each time in the following is generated after the aging time of the second ARP entry generated last time, and when the control unit 402 receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
Optionally, the control unit 402 is further configured to:
and after the first ARP table entry is generated, deleting the second ARP table entry.
Optionally, the first CAR is not a maximum value of the plurality of CARs included in the correspondence between the plurality of packet forwarding information sets and CARs;
the control unit 402 is further configured to:
and after the first ARP table entry is generated, deleting the first message forwarding information in the second message forwarding information set, and adding the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
The PTN equipment provided by the embodiment of the invention is adopted, because the corresponding relation between a plurality of message forwarding information sets and the CAR is stored in the PTN equipment, namely different CAR is set for different message forwarding information sets, the PTN equipment can flexibly adjust the CAR corresponding to each message forwarding information set, so that the CAR corresponding to the message forwarding information set is used for limiting the rate of the forwarding plane for reporting the ARP miss message for users (namely message forwarding information) with different credibility degrees, the situation that the same CAR is set for the messages with any credibility degree to cause impact on a CPU of the PTN equipment is avoided, the safety of a control plane of the PTN equipment is ensured, and the speed of the control plane of the PTN equipment for learning ARP table entries is also ensured.
It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Based on the above embodiments, an embodiment of the present invention further provides a PTN device, which may be the PTN device 101 in the PTN shown in fig. 1, and is configured to implement the method for learning ARP entry shown in fig. 2, and has the functions of the PTN device 400 shown in fig. 4, referring to fig. 5, where the PTN device 500 includes: a transceiver 501, a processor 502, a bus 503, and a memory 504, wherein,
the transceiver 501, the processor 502 and the memory 504 are connected to each other through the bus 503; the bus 503 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The transceiver 501 is configured to perform communication interaction with a device connected to the PTN device, for example, receive a message, forward the message, and the like.
The processor 502 includes a forwarding plane and a control plane, and is configured to implement the method for learning ARP entry shown in fig. 2, including:
the forwarding plane acquires first message forwarding information of a first message to be forwarded, and does not inquire a first ARP (address resolution protocol) table item containing the first message forwarding information according to the first message forwarding information; the first message forwarding information is VRF and a next hop IP address, and the first ARP table entry is a mapping relation between the first message forwarding information and the MAC address;
the forwarding plane determines a first message forwarding information set to which the first message forwarding information belongs;
the forwarding plane acquires a first packet forwarding information set (CAR) corresponding to the first CAR according to a correspondence relationship between the stored plurality of packet forwarding information sets (CAR), where the first CAR is a number threshold of a first ARP miss message and a second ARP miss message reported to the control plane by the forwarding plane in a set time unit, the second ARP miss message is generated by the processor 502 for a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding plane for the first packet to be forwarded;
the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded, reports the first ARP miss message to the control plane, and reports a second ARP miss message generated subsequently according to the first CAR;
and the control plane learns the first ARP list item according to the first ARP miss message.
Optionally, the determining, by the forwarding plane, a first packet forwarding information set to which the first packet forwarding information belongs includes:
the forwarding plane retrieves the first message forwarding information from a plurality of stored message forwarding information sets;
and when the forwarding plane retrieves the first message forwarding information from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
Optionally, the learning, by the control plane, of the first ARP entry according to the first ARP miss message includes:
the control plane generates a corresponding ARP table item learning task according to the first ARP miss message;
the control plane determines a first priority corresponding to the first message forwarding information set according to the corresponding relation between the stored message forwarding information sets and the priorities, and the first priority is used as the priority of the control plane for processing the ARP table item learning task;
and the control plane processes the ARP table entry learning task according to the first priority to generate a first ARP table entry.
Optionally, the reporting, by the forwarding plane, a second ARP miss message generated subsequently according to the first CAR includes:
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is less than or equal to the difference between the first CAR and 1, the forwarding plane reports all the generated second ARP miss messages to the control plane;
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is larger than the difference between the first CAR and 1, the forwarding plane reports the generated partial second ARP miss messages to the control plane, and the number of the partial second ARP miss messages is the difference between the first CAR and 1.
Optionally, the control plane is further configured to generate a second ARP entry that includes the forwarding information of the first packet before generating the first ARP entry, where the second ARP entry is used to indicate that the forwarding plane discards a packet to be forwarded when querying the second ARP entry for the packet to be forwarded, and a first aging time of the second ARP entry is set for the first packet forwarding information set; and
the control plane generates a second ARP table entry every time in the subsequent process, the first aging time of the second ARP table entry is prolonged for setting a first duration, the first message forwarding information in the first message forwarding information set is deleted when the first aging time after the second ARP table entry is prolonged is larger than or equal to a second aging time set for a second message forwarding information set, and the first message forwarding information is added into the second message forwarding information set; the second ARP table entry generated each time in the following is generated after the aging time of the second ARP table entry generated last time and when the control plane receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
Optionally, the control plane is further configured to delete the second ARP entry after the first ARP entry is generated.
Optionally, the first CAR is not a maximum value of the plurality of CARs included in the correspondence between the plurality of packet forwarding information sets and CARs;
and after the control plane generates the first ARP table entry, deleting the first message forwarding information in the second message forwarding information set, and adding the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
The PTN device 500 also includes a memory 504 for storing programs and the like. In particular, the program may include program code comprising computer operating instructions. The memory 504 may include a Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 502 executes the application program stored in the memory 504 to implement the above-described functions, thereby implementing the method for learning ARP entry shown in fig. 2.
The PTN equipment provided by the embodiment of the invention is adopted, because the corresponding relation between a plurality of message forwarding information sets and the CAR is stored in the PTN equipment, namely different CAR is set for different message forwarding information sets, the PTN equipment can flexibly adjust the CAR corresponding to each message forwarding information set, so that the CAR corresponding to the message forwarding information set is used for limiting the rate of the forwarding plane for reporting the ARP miss message for users (namely message forwarding information) with different credibility degrees, the situation that the same CAR is set for the messages with any credibility degree to cause impact on a CPU of the PTN equipment is avoided, the safety of a control plane of the PTN equipment is ensured, and the speed of the control plane of the PTN equipment for learning ARP table entries is also ensured.
In the method for learning ARP entry and the PTN device provided in the embodiments of the present invention, a corresponding relationship between multiple sets of packet forwarding information and a CAR is stored in the PTN device, when a forwarding plane of the PTN device does not query a first ARP entry containing first packet forwarding information of a first packet to be forwarded with respect to the first packet to be forwarded, a first packet forwarding information set to which the first packet to be forwarded belongs is determined, and a first CAR corresponding to the first packet forwarding information set is further determined, and the forwarding plane reports a subsequently generated second ARP miss message according to the first CAR, where the second ARP miss message is generated by the forwarding plane with respect to a second packet to be forwarded, and the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information; and the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded and reports the first ARP miss message to the control plane of the PTN equipment, so that the control plane learns the first ARP table entry. Because the PTN device stores the correspondence between multiple sets of message forwarding information and CARs, that is, different CARs are set for different sets of message forwarding information, the PTN device can flexibly adjust the CAR corresponding to each set of message forwarding information to limit the rate at which the forwarding plane reports arppiss messages for users of different credibility (that is, message forwarding information), thereby avoiding the situation that the same CAR is set for messages of any credibility to cause impact on the CPU of the PTN device, ensuring the security of the control plane of the PTN device, and ensuring the speed at which the control plane of the PTN device learns ARP entries.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (14)

1. A method for learning ARP entries, comprising:
a forwarding plane of Packet Transport Network (PTN) equipment acquires first message forwarding information of a first message to be forwarded, and does not inquire a first Address Resolution Protocol (ARP) table entry containing the first message forwarding information according to the first message forwarding information; the first message forwarding information is a virtual routing forwarding instance (VRF) and a next hop Internet Protocol (IP) address, and the first ARP table entry is a mapping relation between the first message forwarding information and a Media Access Control (MAC) address;
the forwarding plane determines a first message forwarding information set to which the first message forwarding information belongs;
the forwarding plane acquires a first packet forwarding information set (CAR) corresponding to the first CAR according to a corresponding relation between a plurality of stored packet forwarding information sets and a Committed Access Rate (CAR), wherein the first CAR is a number threshold of a first ARP miss message and a second ARP miss message which are reported to a control plane of the PTN equipment by the forwarding plane in a set time unit, the second ARP miss message is generated by the forwarding plane aiming at a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding plane aiming at the first packet to be forwarded;
the forwarding plane generates a first ARP miss message aiming at the first message to be forwarded, reports the first ARPmis message to the control plane, and reports a second ARP miss message generated subsequently according to the first CAR;
and the control plane learns the first ARP list item according to the first ARP miss message.
2. The method of claim 1, wherein the forwarding plane determining a first set of packet forwarding information to which the first packet forwarding information belongs comprises:
the forwarding plane retrieves the first message forwarding information from a plurality of stored message forwarding information sets;
and when the forwarding plane retrieves the first message forwarding information from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
3. The method of claim 1 wherein said control plane performing learning of said first ARP entry based on said first ARP miss message comprises:
the control plane generates a corresponding ARP table item learning task according to the first ARP miss message;
the control plane determines a first priority corresponding to the first message forwarding information set according to the corresponding relation between the stored message forwarding information sets and the priorities, and the first priority is used as the priority of the control plane for processing the ARP table item learning task;
and the control plane processes the ARP table entry learning task according to the first priority to generate a first ARP table entry.
4. The method according to any of claims 1-3, wherein the forwarding plane reporting a subsequently generated second ARP miss message according to the first CAR, comprising:
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is less than or equal to the difference between the first CAR and 1, the forwarding plane reports all the generated second ARP miss messages to the control plane;
when the number of the second ARP miss messages generated by the forwarding plane in the set time unit is larger than the difference between the first CAR and 1, the forwarding plane reports the generated partial second ARP miss messages to the control plane, and the number of the partial second ARP miss messages is the difference between the first CAR and 1.
5. The method of claim 3, wherein prior to the control plane generating the first ARP entry, the method further comprises:
the control plane generates a second ARP table entry containing the first message forwarding information, the second ARP table entry is used for indicating the forwarding plane to discard a message to be forwarded when the second ARP table entry is inquired for the message to be forwarded, and the first aging time of the second ARP table entry is set for the first message forwarding information set;
the control plane generates a second ARP table entry every time in the subsequent process, the first aging time of the second ARP table entry is prolonged for setting a first duration, the first message forwarding information in the first message forwarding information set is deleted when the first aging time after the second ARP table entry is prolonged is larger than or equal to a second aging time set for a second message forwarding information set, and the first message forwarding information is added into the second message forwarding information set; the second ARP table entry generated each time in the following is generated after the aging time of the second ARP table entry generated last time and when the control plane receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
6. The method of claim 5, wherein after the control plane generates the first ARP entry, the method further comprises:
and the control plane deletes the second ARP table entry.
7. The method of claim 5 or 6, wherein the first CAR is not the largest of a plurality of CARs included in a correspondence of the plurality of sets of packet forwarding information to CARs;
after the control plane generates the first ARP entry, the method further comprises:
and the control plane deletes the first message forwarding information in the second message forwarding information set and adds the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
8. A packet transport network, PTN, device, comprising:
the forwarding unit is used for acquiring first message forwarding information of a first message to be forwarded, and according to the first message forwarding information, a first Address Resolution Protocol (ARP) table entry containing the first message forwarding information is not inquired; the first message forwarding information is a virtual routing forwarding instance (VRF) and a next hop Internet Protocol (IP) address, and the first ARP table entry is a mapping relation between the first message forwarding information and a Media Access Control (MAC) address;
determining a first message forwarding information set to which the first message forwarding information belongs;
acquiring a first packet forwarding information (CAR) corresponding to a first CAR according to a corresponding relation between a plurality of stored packet forwarding information sets and a Committed Access Rate (CAR), wherein the first CAR is a number threshold of a first ARP miss message and a second ARP miss message which are reported to a control unit of the PTN equipment by the forwarding unit in a set time unit, the second ARPmis message is generated by the forwarding unit aiming at a second packet to be forwarded, the second packet forwarding information of the second packet to be forwarded is the same as the first packet forwarding information, and the first ARP miss message is generated by the forwarding unit aiming at the first packet to be forwarded; and
generating a first ARP miss message aiming at the first message to be forwarded, reporting the first ARP miss message to the control unit, and reporting a second ARP miss message generated subsequently according to the first CAR;
and the control unit is used for learning the first ARP list item according to the first ARP miss message.
9. The PTN device according to claim 8, wherein the forwarding unit, when determining the first packet forwarding information set to which the first packet forwarding information belongs, is specifically configured to:
retrieving the first message forwarding information from a plurality of stored message forwarding information sets;
and when the first message forwarding information is retrieved from a message forwarding information set, determining that the message forwarding information set is the first message forwarding information set.
10. The PTN device according to claim 8, characterized in that said control unit is specifically configured to:
generating a corresponding ARP table entry learning task according to the first ARP miss message;
determining a first priority corresponding to the first message forwarding information set according to the corresponding relation between the stored multiple message forwarding information sets and the priorities, and taking the first priority as the priority of the control unit for processing the ARP table item learning task;
and processing the ARP table entry learning task according to the first priority to generate the first ARP table entry.
11. The PTN device according to any one of claims 8 to 10, wherein the forwarding unit, when reporting a subsequently generated second ARP miss message according to the first CAR, is specifically configured to:
when the number of the second ARP miss messages generated by the forwarding unit in the set time unit is less than or equal to the difference between the first CAR and 1, reporting all the generated second ARP miss messages to the control unit;
and when the number of second ARP miss messages generated by the forwarding unit in the set time unit is greater than the difference between the first CAR and 1, reporting a part of the generated second ARP miss messages to the control unit, wherein the number of the part of the second ARP miss messages is the difference between the first CAR and 1.
12. The PTN device according to claim 10, wherein the control unit is further configured to:
before generating the first ARP table entry, generating a second ARP table entry containing the first message forwarding information, where the second ARP table entry is used to indicate that the forwarding unit discards a message to be forwarded when querying the second ARP table entry for the message to be forwarded, and a first aging time of the second ARP table entry is set for the first message forwarding information set; and
generating a second ARP table entry every time in the subsequent process, prolonging the first aging time of the second ARP table entry for a first time length, deleting the first message forwarding information in the first message forwarding information set until the first aging time after the second ARP table entry is prolonged is greater than or equal to a second aging time set for a second message forwarding information set, and adding the first message forwarding information in the second message forwarding information set; the second ARP table entry generated each time in the following is generated after the aging time of the second ARP table entry generated last time and when the control unit receives the second ARP miss message;
the first CAR is larger than a second CAR corresponding to the second message forwarding information set, the first priority is higher than a second priority corresponding to the second message forwarding information set, and a first aging time set for the first message forwarding information set is smaller than a second aging time.
13. The PTN device according to claim 12, wherein the control unit is further configured to:
and after the first ARP table entry is generated, deleting the second ARP table entry.
14. The PTN device according to claim 12 or 13, wherein the first CAR is not the maximum of a plurality of CARs comprised in the correspondence of the plurality of sets of packet forwarding information to CARs;
the control unit is further configured to:
and after the first ARP table entry is generated, deleting the first message forwarding information in the second message forwarding information set, and adding the first message forwarding information in a third message forwarding information set, wherein a third CAR corresponding to the third message forwarding information set is the maximum value in the plurality of CARs.
CN201610286581.9A 2016-04-29 2016-04-29 Method for learning ARP table entry and PTN equipment Active CN107332773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610286581.9A CN107332773B (en) 2016-04-29 2016-04-29 Method for learning ARP table entry and PTN equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610286581.9A CN107332773B (en) 2016-04-29 2016-04-29 Method for learning ARP table entry and PTN equipment

Publications (2)

Publication Number Publication Date
CN107332773A CN107332773A (en) 2017-11-07
CN107332773B true CN107332773B (en) 2020-01-10

Family

ID=60192353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610286581.9A Active CN107332773B (en) 2016-04-29 2016-04-29 Method for learning ARP table entry and PTN equipment

Country Status (1)

Country Link
CN (1) CN107332773B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10764235B2 (en) 2018-03-21 2020-09-01 Huawei Technologies Co., Ltd. Method and system for network access discovery
CN110505176B9 (en) 2018-05-16 2023-04-11 中兴通讯股份有限公司 Method and device for determining and sending message priority, and routing system
CN110365811B (en) * 2019-07-22 2022-03-01 杭州迪普科技股份有限公司 MAC address learning limiting method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179486A (en) * 2006-11-10 2008-05-14 中兴通讯股份有限公司 Computer network data packet forwarding CAR queue management method
CN101478539A (en) * 2008-12-31 2009-07-08 华为技术有限公司 Method and network appliance for preventing network attack
WO2014207412A1 (en) * 2013-06-28 2014-12-31 Orange Method for adapting a link for selecting a frame transmission mode and corresponding wi-fi access point
WO2015196799A1 (en) * 2014-06-24 2015-12-30 中兴通讯股份有限公司 Packet processing method and device, and line card
CN105450527A (en) * 2014-06-05 2016-03-30 华为技术有限公司 Message processing, information transmitting and information receiving method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179486A (en) * 2006-11-10 2008-05-14 中兴通讯股份有限公司 Computer network data packet forwarding CAR queue management method
CN101478539A (en) * 2008-12-31 2009-07-08 华为技术有限公司 Method and network appliance for preventing network attack
WO2014207412A1 (en) * 2013-06-28 2014-12-31 Orange Method for adapting a link for selecting a frame transmission mode and corresponding wi-fi access point
CN105450527A (en) * 2014-06-05 2016-03-30 华为技术有限公司 Message processing, information transmitting and information receiving method and device
WO2015196799A1 (en) * 2014-06-24 2015-12-30 中兴通讯股份有限公司 Packet processing method and device, and line card

Also Published As

Publication number Publication date
CN107332773A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
US10148573B2 (en) Packet processing method, node, and system
US10749794B2 (en) Enhanced error signaling and error handling in a network environment with segment routing
WO2015143944A1 (en) Method for generating forwarding information, controller and service forwarding entity
US8565092B2 (en) Dynamic flow redistribution for head of line blocking avoidance
US20180278522A1 (en) System and method to facilitate content forwarding using bit index explicit replication (bier) in an information-centric networking (icn) environment
US11805077B2 (en) System and method of processing control plane data
US11863459B2 (en) Packet processing method and apparatus
CN108600109B (en) Message forwarding method and device
US9641433B2 (en) Method, routing bridge, and system for sending packet
US10498641B2 (en) Forward entry generating method, forward node, and controller
CN107332773B (en) Method for learning ARP table entry and PTN equipment
CN108965121B (en) Method, host and switch for transmitting data
US8787160B2 (en) Method, apparatus, and system for judging path congestion
CN113556784B (en) Network slice realization method and device and electronic equipment
US9270593B2 (en) Prediction based methods for fast routing of IP flows using communication/network processors
CN108566344B (en) Message processing method and device
WO2016062067A1 (en) User message forwarding control method and processing node
US20180139231A1 (en) Protecting iaps from ddos attacks
CN107147581B (en) Maintenance method and device for routing table entry
CN102045234B (en) Buffering and overtime processing methods of route address mapping information as well as tunnel router
CN108270671B (en) Apparatus for performing service on packet and method thereof
CN106789671B (en) Service message forwarding method and device
CN111698154A (en) Method and device for inhibiting frequent migration of host route
CN105471817A (en) Method, device and system for unloading service flow
CN104270310A (en) Message processing method and device based on RIP

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