CN113542130A - Method and device for processing address table items - Google Patents
Method and device for processing address table items Download PDFInfo
- Publication number
- CN113542130A CN113542130A CN202110828890.5A CN202110828890A CN113542130A CN 113542130 A CN113542130 A CN 113542130A CN 202110828890 A CN202110828890 A CN 202110828890A CN 113542130 A CN113542130 A CN 113542130A
- Authority
- CN
- China
- Prior art keywords
- aging time
- address table
- mac address
- aging
- current
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000032683 aging Effects 0.000 claims abstract description 309
- 230000002431 foraging effect Effects 0.000 claims description 2
- 230000006399 behavior Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 238000003672 processing method Methods 0.000 description 7
- 230000006855 networking Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000001105 regulatory effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000002245 particle Substances 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The application provides a method and a device for processing an address table entry, wherein the method is applied to network equipment which is configured with an MAC address table, and the method comprises the following steps: when the network equipment starts an MAC address table entry elastic aging mode, acquiring the number ratio of the current MAC address table entry number in the MAC address table; judging whether the number ratio exceeds a preset ratio threshold value; if the current MAC address table item is not exceeded, calculating first aging time of the current MAC address table item, and setting the first aging time as the aging time of the current MAC address table item; if the current MAC address table item is not aged, the second aging time of the current MAC address table item is calculated, and the second aging time is set as the aging time of the current MAC address table item; wherein the first aging time is greater than the second aging time.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing an address table entry.
Background
Under the environment of big data and large flow, the exchanger network can provide a fast and stable data forwarding technology, and how to improve the efficiency of flow forwarding is also the bottleneck of the current exchanger network.
At present, after traffic enters a switch network, the switch network can forward the traffic through a two-layer forwarding technology. That is, the switch network divides the forwarding behavior of the data packet into three forwarding behaviors according to the destination Media Access Control Address (MAC) included in the data packet. For example, unknown unicast forwarding behavior, broadcast forwarding behavior, and known unicast forwarding behavior. For a data packet with a definite destination MAC, if the known unicast forwarding behavior can be fully utilized, the efficiency of two-layer traffic forwarding can be quickly improved.
In the process of forwarding the data message by using the known unicast forwarding behavior, the output interface of the switch is obtained by searching the MAC address table, and the data message is forwarded by the obtained output interface. Because the number of MAC address table entries learned by the switch is limited, each MAC address table entry sets a MAC address table entry aging time. And when the aging time corresponding to the MAC address table entry arrives, deleting the MAC address table entry so as to save the MAC address table.
The setting of the MAC address table entry aging time includes two types. I.e., a fixed aging time type or a non-aging time type. The aging time of the MAC address table entry is configured into a fixed aging time type, and the method is suitable for a multi-user forwarding scene, so that the switch can be ensured to age some unusual MAC address table entries in time, resources are released for the switch to learn a new MAC address, and the follow-up data message forwarding is guided conveniently. The mode that the aging time of the MAC address table entry is configured into the non-aging time type (or longer aging time) is suitable for the scene with less user number, thus ensuring that the MAC address is not aged prematurely to cause unknown unicast and broadcast forwarding and generate flow redundancy.
In the existing switch network, the number of users accessing the switch network is complicated and changeable, and in the scheme for configuring the aging time of the MAC address table entry, because the setting type of the aging time of the MAC address table entry is single and unchanged, the aging time of the MAC address table entry cannot be intelligently configured, which will cause traffic forwarding redundancy and is not beneficial to the stability of the switch.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for processing an address table entry, so as to solve the problem that the aging time of the MAC address table entry cannot be intelligently configured in the existing scheme for configuring the aging time of the MAC address table entry, which results in redundant traffic forwarding and is not favorable for the stability of the switch.
In a first aspect, the present application provides a method for processing an address table entry, where the method is applied to a network device, and the network device has a configured MAC address table, and the method includes:
when the network equipment starts an MAC address table entry elastic aging mode, acquiring the number ratio of the current MAC address table entry number in the MAC address table;
judging whether the number ratio exceeds a preset ratio threshold value;
if the current MAC address table item is not exceeded, calculating first aging time of the current MAC address table item, and setting the first aging time as the aging time of the current MAC address table item;
if the current MAC address table item is not aged, the second aging time of the current MAC address table item is calculated, and the second aging time is set as the aging time of the current MAC address table item;
wherein the first aging time is greater than the second aging time.
In a second aspect, the present application provides an apparatus for processing an address table entry, where the apparatus is applied to a network device, and the network device has configured a MAC address table, and the apparatus includes:
an obtaining unit, configured to obtain a number ratio of a current MAC address table entry number in the MAC address table to a number in the MAC address table after the network device has started an MAC address table entry elastic aging mode;
the first judgment unit is used for judging whether the number ratio exceeds a preset ratio threshold value;
the setting unit is used for calculating first aging time of a current MAC address table item and setting the first aging time as the aging time of the current MAC address table item if the first aging time does not exceed the first aging time;
the setting unit is further configured to, if the second aging time exceeds the first aging time, calculate a second aging time of the current MAC address table entry, and set the second aging time as the aging time of the current MAC address table entry;
wherein the first aging time is greater than the second aging time.
In a third aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the first aspect of the present application.
Therefore, by applying the processing method and the processing device for the address table items, when the network equipment starts the elastic aging mode of the MAC address table items, the network equipment obtains the number ratio of the current MAC address table items in the MAC address table to the MAC address table; the network equipment judges whether the number ratio exceeds a preset ratio threshold; if the first aging time does not exceed the first aging time, the network equipment calculates the first aging time of the MAC address table item, and sets the first aging time as the aging time of the current MAC address table item; if the number of the MAC address table entries exceeds the preset number, the network equipment calculates second aging time of the MAC address table entries, and sets the second aging time as the aging time of the current MAC address table entries; wherein the first aging time is greater than the second aging time.
Therefore, the switch can set different aging time for the MAC address table items according to the number proportion of the current MAC address table item number in the current MAC address table in the MAC address table, so that the number of the MAC address table items stored in the MAC address table in the switch can be intelligently regulated and controlled in a complex and changeable networking, and the two-layer flow forwarding efficiency and the stability of network equipment are effectively improved. The problem that the flow forwarding redundancy is caused and the stability of the switch is not facilitated due to the fact that intelligent configuration of the aging time of the MAC address table entry cannot be achieved in the existing scheme for configuring the aging time of the MAC address table entry is solved.
Drawings
Fig. 1 is a flowchart of a method for processing an address table entry according to an embodiment of the present application;
fig. 2 is a structural diagram of a processing apparatus for address table entries according to an embodiment of the present application;
fig. 3 is a hardware structure of a network device according to an embodiment of the present disclosure.
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 corresponding 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.
The following describes in detail a processing method of an address table entry provided in the embodiment of the present application. Referring to fig. 1, fig. 1 is a flowchart of a processing method for an address table entry according to an embodiment of the present application. The method is applied to a network device, which may be specifically a device for supporting two-layer MAC forwarding, such as a switch, a router, and the like.
Specifically, the network device starts an elastic aging mode of the MAC address table entries, and the switch obtains the number ratio of the number of the MAC address table entries currently stored in the local MAC address table in the MAC address table.
For example, the maximum number of the MAC address table entries stored in the MAC address table is 100, and the current number of the MAC address table entries is 20, the number of the network devices acquired is 20%; the maximum number of the MAC address table entries stored in the MAC address table is 200, and the number of the current MAC address table entries is 150, so that the number of the network equipment is 75%;
and step 120, judging whether the number ratio exceeds a preset ratio threshold value.
Specifically, after the network device obtains the number of the MAC address table entries currently stored in the local MAC address table, it determines whether the number ratio exceeds a preset ratio threshold. If not, the network device executes step 130; if so, the network device performs step 140.
In the embodiment of the present application, the duty ratio threshold may be specifically 60%. According to the foregoing example, in one example, the percentage of the number is 20% and the percentage threshold is 60%. At this time, if the number occupancy does not exceed the occupancy threshold, step 130 is executed. In another example, the number percentage is 75% and the percentage threshold is 60%. At this time, if the number ratio exceeds the number threshold, step 140 is executed.
It will be appreciated that the duty ratio threshold may be set according to actual network conditions, again without limiting the specific values.
Specifically, according to the judgment in step 120, if the number percentage does not exceed the percentage threshold, the network device calculates a first aging time of the current MAC address table entry, and sets the first aging time as the aging time of the current MAC address table entry.
Further, the specific process of calculating the first aging time by the network device is as follows: the network equipment acquires a configured aging time elastic interval, wherein the aging time elastic interval comprises first boundary aging time and second boundary aging time, the first boundary aging time is the minimum aging time, and the second boundary aging time is the maximum aging time. And the network equipment performs subtraction processing on the maximum aging time and the minimum aging time to obtain a time difference value. And the network equipment multiplies the time difference value by the number ratio to obtain the ratio multiplier number. And the network equipment takes the difference value between the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
For example, the configured aging time elastic interval is [10s, 600s ], wherein the minimum aging time is 10s, and the maximum aging time is 600 s. From the above step 110, the number of the cells is 20%. The first aging time is specifically: 600-20%, (600-10) ═ 482 s.
According to the judgment, if the number ratio does not exceed the ratio threshold, the number of the MAC address table entries currently stored in the MAC address table of the network equipment is less, and the network equipment can still learn other MAC address table entries. According to the calculation mode, the network equipment obtains first aging time, and sets the aging time of the current MAC address table entry as the first aging time.
It can be understood that the aging time of the current MAC address table entry is set to be longer, which is convenient for the subsequent data packets with the same MAC address to be forwarded through the known unicast forwarding behavior, thereby effectively avoiding the MAC address from being aged prematurely and performing the flooding processing through the unknown unicast forwarding behavior.
Specifically, according to the judgment in step 120, if the number ratio exceeds the ratio threshold, the network device calculates the second aging time of the current MAC address table entry, and sets the second aging time as the aging time of the current MAC address table entry.
In an embodiment of the present application, the first aging time is greater than the second aging time.
Further, the specific process of the network device calculating the second aging time is as follows: the network equipment acquires a configured aging time elastic interval, wherein the aging time elastic interval comprises first boundary aging time and second boundary aging time, the first boundary aging time is the minimum aging time, and the second boundary aging time is the maximum aging time. And the network equipment performs subtraction processing on the maximum aging time and the minimum aging time to obtain a time difference value. And the network equipment multiplies the time difference value by the number ratio to obtain the ratio multiplier number. And the network equipment takes the difference value between the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
For example, the configured aging time elastic interval is [10s, 600s ], wherein the minimum aging time is 10s, and the maximum aging time is 600 s. From the above step 110, the ratio of the number of the particles is 75%. The second aging time is specifically: 600-75%, (600-10) ═ 157.5 s.
According to the judgment, if the number ratio exceeds the ratio threshold, the number of the MAC address table entries currently stored in the MAC address table of the network equipment is large, and the switch cannot learn other MAC address table entries due to the residual resources in the MAC address table. According to the above calculation method, the network device sets the aging time of the current MAC address table entry to the second aging time.
It can be understood that the aging time of the current MAC address table entry is set to be shorter, which is convenient for the switch to age the MAC address table entry learned earlier, and release resources for learning other MAC address table entries and guiding the forwarding of subsequent data messages.
Therefore, by applying the processing device for the address table items provided by the application, after the network equipment starts the elastic aging mode of the MAC address table items, the network equipment obtains the number of the current MAC address table items in the MAC address table in proportion; the network equipment judges whether the number ratio exceeds a preset ratio threshold; if the first aging time does not exceed the first aging time, the network equipment calculates the first aging time of the MAC address table item, and sets the first aging time as the aging time of the current MAC address table item; if the number of the MAC address table entries exceeds the preset number, the network equipment calculates second aging time of the MAC address table entries, and sets the second aging time as the aging time of the current MAC address table entries; wherein the first aging time is greater than the second aging time.
Therefore, the switch can set different aging time for the MAC address table items according to the number proportion of the current MAC address table item number in the current MAC address table in the MAC address table, so that the number of the MAC address table items stored in the MAC address table in the switch can be intelligently regulated and controlled in a complex and changeable networking, and the two-layer flow forwarding efficiency and the stability of network equipment are effectively improved. The problem that the flow forwarding redundancy is caused and the stability of the switch is not facilitated due to the fact that intelligent configuration of the aging time of the MAC address table entry cannot be achieved in the existing scheme for configuring the aging time of the MAC address table entry is solved.
Optionally, in this embodiment of the present application, a process of setting, by the network device, a third aging time for the current MAC address table entry is further included.
Specifically, according to the judgment in step 120, if the number ratio exceeds the ratio threshold and the number of the current MAC address table entries is equal to the maximum number of the MAC address table entries stored in the MAC address table, the network device calculates a third aging time of the current MAC address table entries, and sets the third aging time as the aging time of the MAC address table entries.
In an embodiment of the present application, the third aging time may not be greater than the second aging time.
Further, the specific process of calculating the third aging time by the network device is as follows: the network equipment acquires a configured aging time elastic interval, wherein the aging time elastic interval comprises first boundary aging time and second boundary aging time, the first boundary aging time is the minimum aging time, and the second boundary aging time is the maximum aging time. And the network equipment performs subtraction processing on the maximum aging time and the minimum aging time to obtain a time difference value. And the network equipment multiplies the time difference value by the number ratio to obtain the ratio multiplier number. And the network equipment takes the difference value between the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
For example, the configured aging time elastic interval is [10s, 600s ], wherein the minimum aging time is 10s, and the maximum aging time is 600 s. As can be seen from the above, the ratio of the number of the active carbon particles is 100%. The third aging time is specifically: 600-.
According to the judgment, if the number ratio exceeds the ratio threshold and the number of the current MAC address table entries is equal to the maximum number of the MAC address table entries stored in the MAC address table, the fact that no resource exists in the MAC address table indicates that the network equipment cannot learn other MAC address table entries. According to the foregoing calculation manner, the network device may set the aging time of the current MAC address table entry to the third aging time.
It can be understood that the aging time of the current MAC address table entry is set to be shorter, which is convenient for the network device to age the MAC address table entry learned at an earlier time, and release resources for learning other MAC address table entries and guiding the forwarding of subsequent data messages.
Optionally, in this embodiment of the present application, the network device further performs an aging process on the current MAC address table entry according to the first aging time, the second aging time, or the third aging time. It is understood that the network device may refer to the existing table entry aging process for aging the current MAC address table entry, and will not be repeated here.
Optionally, in this embodiment of the present application, after performing aging processing on the current MAC address table entry, the network device further performs the following process.
Specifically, the network device judges whether an elastic aging period of the MAC address table entry is reached; if yes, the network equipment obtains the number of the current MAC address table items in the MAC address table, wherein the number of the current MAC address table items in the MAC address table accounts for the number of the current MAC address table items in the MAC address table, and the steps 120 to 140 are repeatedly executed; if not, the network device performs aging processing on the current MAC address table entry according to the first aging time, the second aging time or the third aging time.
Further, the MAC address table entry elastic aging period may be set according to the current networking environment, for example, the MAC address table entry elastic aging period is set to 3 min.
Optionally, in this embodiment of the present application, when the network device does not start the MAC address table entry elastic aging mode, the network device obtains a fourth aging time configured for the current MAC address table entry; and according to the fourth aging time, the network equipment performs aging treatment on the current MAC address table entry.
It is to be understood that the administrator may configure the fourth aging time of the MAC address table entry in the network device in advance, and the fourth aging time may refer to the fixed aging time type or the non-aging time type described in the background.
Based on the same inventive concept, the embodiment of the present application further provides a processing apparatus for address table entries corresponding to the processing method for address table entries. Referring to fig. 2, fig. 2 is a structural diagram of a processing device for address table entries according to an embodiment of the present application. The device is applied to network equipment which is configured with a MAC address table, and comprises the following steps:
an obtaining unit 210, configured to obtain a ratio of the number of current MAC address table entries in the MAC address table to the number of current MAC address table entries in the MAC address table after the network device has started the MAC address table entry elastic aging mode;
a first determining unit 220, configured to determine whether the number occupancy exceeds a preset occupancy threshold;
a setting unit 230, configured to calculate a first aging time of a current MAC address table entry if the first aging time does not exceed the first aging time, and set the first aging time as the aging time of the current MAC address table entry;
the setting unit 230 is further configured to, if the second aging time exceeds the second aging time, calculate a second aging time of the current MAC address table entry, and set the second aging time as the aging time of the current MAC address table entry;
wherein the first aging time is greater than the second aging time.
Optionally, the setting unit 230 is further configured to, if the number of the current MAC address table entries exceeds the maximum number of MAC address table entries stored in the MAC address table, calculate a third aging time of the current MAC address table entry, and set the third aging time as the aging time of the current MAC address table entry;
wherein the third aging time is not greater than the second aging time.
Optionally, the setting unit 230 is specifically configured to obtain a configured aging time elastic interval, where the aging time elastic interval includes a first boundary aging time and a second boundary aging time, where the first boundary aging time is a minimum aging time, and the second boundary aging time is a maximum aging time;
subtracting the maximum aging time from the minimum aging time to obtain a time difference value;
multiplying the time difference value by the number ratio to obtain a ratio multiplier number;
and taking the difference value of the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
Optionally, the apparatus further comprises: an aging unit (not shown in the figure), configured to perform an aging process on the current MAC address table entry according to the first aging time, the second aging time, or the third aging time.
Optionally, the apparatus further comprises: a second judging unit (not shown in the figure) for judging whether the MAC address table entry elastic aging period has been reached;
the obtaining unit 210 is further configured to, if the number of the current MAC address table entries in the MAC address table is reached, obtain a number ratio of the current MAC address table entries in the MAC address table;
the aging unit (not shown in the figure) is further configured to, if the current MAC address table entry is not reached, perform aging processing on the current MAC address table entry according to the first aging time, the second aging time, or the third aging time.
Therefore, by applying the processing device for the address table items provided by the application, after the network equipment starts the elastic aging mode of the MAC address table items, the network equipment obtains the number of the current MAC address table items in the MAC address table in proportion; the network equipment judges whether the number ratio exceeds a preset ratio threshold; if the first aging time does not exceed the first aging time, the network equipment calculates the first aging time of the MAC address table item, and sets the first aging time as the aging time of the current MAC address table item; if the number of the MAC address table entries exceeds the preset number, the network equipment calculates second aging time of the MAC address table entries, and sets the second aging time as the aging time of the current MAC address table entries; wherein the first aging time is greater than the second aging time.
Therefore, the switch can set different aging time for the MAC address table items according to the number proportion of the current MAC address table item number in the current MAC address table in the MAC address table, so that the number of the MAC address table items stored in the MAC address table in the switch can be intelligently regulated and controlled in a complex and changeable networking, and the two-layer flow forwarding efficiency and the stability of network equipment are effectively improved. The problem that the flow forwarding redundancy is caused and the stability of the switch is not facilitated due to the fact that intelligent configuration of the aging time of the MAC address table entry cannot be achieved in the existing scheme for configuring the aging time of the MAC address table entry is solved.
Based on the same inventive concept, the embodiment of the present application further provides a network device, as shown in fig. 3, including a processor 310, a transceiver 320, and a machine-readable storage medium 330, where the machine-readable storage medium 330 stores machine-executable instructions capable of being executed by the processor 310, and the processor 310 is caused by the machine-executable instructions to perform the processing method of the address table entry provided in the embodiment of the present application. The aforementioned processing device for the address table entry shown in fig. 2 can be implemented by using the hardware structure of the network device shown in fig. 3.
The computer-readable storage medium 330 may include a Random Access Memory (RAM) or a Non-volatile Memory (NVM), such as at least one disk Memory. Optionally, the computer-readable storage medium 330 may also be at least one memory device located remotely from the processor 310.
The Processor 310 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; the Integrated Circuit can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the embodiment of the present application, the processor 310 is caused by machine executable instructions by reading the machine executable instructions stored in the machine readable storage medium 330, so as to implement the processing method of the address table entry described in the foregoing embodiment of the present application, which is executed by the processor 310 itself and the call transceiver 320.
In addition, the embodiment of the present application provides a machine-readable storage medium 330, where the machine-readable storage medium 330 stores machine-executable instructions, and when the machine-executable instructions are called and executed by the processor 310, the machine-executable instructions cause the processor 310 itself and the call transceiver 320 to perform the processing method of the address table entry described in the embodiment of the present application.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
For the embodiments of the processing apparatus of the address table entry and the machine-readable storage medium, since the contents of the related method are substantially similar to those of the foregoing method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
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. A method for processing address table entries, the method being applied to a network device, the network device having configured a MAC address table, the method comprising:
when the network equipment starts an MAC address table entry elastic aging mode, acquiring the number ratio of the current MAC address table entry number in the MAC address table;
judging whether the number ratio exceeds a preset ratio threshold value;
if the current MAC address table item is not exceeded, calculating first aging time of the current MAC address table item, and setting the first aging time as the aging time of the current MAC address table item;
if the current MAC address table item is not aged, the second aging time of the current MAC address table item is calculated, and the second aging time is set as the aging time of the current MAC address table item;
wherein the first aging time is greater than the second aging time.
2. The method of claim 1, further comprising:
if the number of the current MAC address table entries is larger than the maximum number of the MAC address table entries stored in the MAC address table, calculating third aging time of the current MAC address table entries, and setting the third aging time as the aging time of the current MAC address table entries;
wherein the third aging time is not greater than the second aging time.
3. The method according to claim 1 or 2, wherein calculating the aging time of the current MAC address table entry specifically includes:
acquiring a configured aging time elastic interval, wherein the aging time elastic interval comprises a first boundary aging time and a second boundary aging time, the first boundary aging time is a minimum aging time, and the second boundary aging time is a maximum aging time;
subtracting the maximum aging time from the minimum aging time to obtain a time difference value;
multiplying the time difference value by the number ratio to obtain a ratio multiplier number;
and taking the difference value of the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
4. The method of claim 3, further comprising:
and according to the first aging time, the second aging time or the third aging time, aging the current MAC address table entry.
5. The method of claim 4, further comprising:
judging whether the elastic aging period of the MAC address table entry is reached;
if so, acquiring the number ratio of the current MAC address table entry number in the MAC address table to the MAC address table;
and if not, carrying out aging treatment on the current MAC address table entry according to the first aging time, the second aging time or the third aging time.
6. An apparatus for processing an address table entry, the apparatus being applied to a network device, the network device having configured a MAC address table, the apparatus comprising:
an obtaining unit, configured to obtain a number ratio of a current MAC address table entry number in the MAC address table to a number in the MAC address table after the network device has started an MAC address table entry elastic aging mode;
the first judgment unit is used for judging whether the number ratio exceeds a preset ratio threshold value;
the setting unit is used for calculating first aging time of a current MAC address table item and setting the first aging time as the aging time of the current MAC address table item if the first aging time does not exceed the first aging time;
the setting unit is further configured to, if the second aging time exceeds the first aging time, calculate a second aging time of the current MAC address table entry, and set the second aging time as the aging time of the current MAC address table entry;
wherein the first aging time is greater than the second aging time.
7. The apparatus of claim 6, wherein the setting unit is further configured to calculate a third aging time of the current MAC address table entry and set the third aging time as the aging time of the current MAC address table entry if the number of the current MAC address table entries exceeds and is equal to the maximum number of MAC address table entries stored in the MAC address table;
wherein the third aging time is not greater than the second aging time.
8. The apparatus according to claim 6 or 7, wherein the setting unit is specifically configured to obtain a configured aging time elastic interval, where the aging time elastic interval includes a first boundary aging time and a second boundary aging time, where the first boundary aging time is a minimum aging time, and the second boundary aging time is a maximum aging time;
subtracting the maximum aging time from the minimum aging time to obtain a time difference value;
multiplying the time difference value by the number ratio to obtain a ratio multiplier number;
and taking the difference value of the maximum aging time and the number of the occupied multiplying units as the aging time of the current MAC address table entry.
9. The apparatus of claim 8, further comprising:
and the aging unit is used for aging the current MAC address table entry according to the first aging time, the second aging time or the third aging time.
10. The apparatus of claim 9, further comprising:
the second judgment unit is used for judging whether the elastic aging period of the MAC address table item is reached;
the obtaining unit is further configured to, if the current number of the MAC address table entries in the MAC address table is reached, obtain a number ratio of the current number of the MAC address table entries in the MAC address table;
the aging unit is further configured to, if the current MAC address table entry does not reach the first aging time, or the second aging time, or the third aging time, perform aging processing on the current MAC address table entry.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110828890.5A CN113542130B (en) | 2021-07-22 | 2021-07-22 | Address table item processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110828890.5A CN113542130B (en) | 2021-07-22 | 2021-07-22 | Address table item processing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113542130A true CN113542130A (en) | 2021-10-22 |
| CN113542130B CN113542130B (en) | 2023-07-14 |
Family
ID=78120377
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110828890.5A Active CN113542130B (en) | 2021-07-22 | 2021-07-22 | Address table item processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113542130B (en) |
Citations (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101110720A (en) * | 2007-08-24 | 2008-01-23 | 中兴通讯股份有限公司 | A method for testing the aging time of media access control address table |
| CN101702680A (en) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | Aging method, device and communication equipment of media accessing control address |
| WO2012034408A1 (en) * | 2010-09-17 | 2012-03-22 | 中兴通讯股份有限公司 | Method and system for processing media access control address aging |
| US8155150B1 (en) * | 2009-03-11 | 2012-04-10 | Juniper Networks, Inc. | Cooperative MAC learning/aging in highly distributed forwarding system |
| JP2012100136A (en) * | 2010-11-04 | 2012-05-24 | Nec Commun Syst Ltd | Frame transfer apparatus, frame transfer method, and frame transfer program |
| US20130182721A1 (en) * | 2011-11-22 | 2013-07-18 | Huawei Technologies Co., Ltd. | Method and apparatus for managing mac address table |
| CN104333520A (en) * | 2014-11-28 | 2015-02-04 | 上海斐讯数据通信技术有限公司 | Method for controlling interchanger MAC address table dual-ageing time |
| CN104660526A (en) * | 2013-11-22 | 2015-05-27 | 华为技术有限公司 | MAC item learning method and device |
| CN105591903A (en) * | 2015-09-16 | 2016-05-18 | 杭州华三通信技术有限公司 | Message forwarding method and device |
| CN105634999A (en) * | 2014-11-05 | 2016-06-01 | 北京东土科技股份有限公司 | Aging method and device for medium access control address |
| US9369372B1 (en) * | 2013-03-13 | 2016-06-14 | Altera Corporation | Methods for network forwarding database flushing |
| CN105959430A (en) * | 2016-05-31 | 2016-09-21 | 深圳市风云实业有限公司 | Switcher MAC address aging method |
| WO2016201843A1 (en) * | 2015-06-18 | 2016-12-22 | 中兴通讯股份有限公司 | Control method and apparatus for mac address learning |
| CN106330652A (en) * | 2015-06-30 | 2017-01-11 | 中兴通讯股份有限公司 | Learning method and device of MAC address in virtual local area network of switch |
| CN108712449A (en) * | 2018-07-12 | 2018-10-26 | 新华三技术有限公司 | Prevent the method, apparatus and electronic equipment of MAC Address extensive aggression |
| CN109218456A (en) * | 2017-07-06 | 2019-01-15 | 北京华为数字技术有限公司 | The processing method and processing device of the ageing time of mac address table |
| CN112866435A (en) * | 2021-02-23 | 2021-05-28 | 中国联合网络通信集团有限公司 | MAC address aging processing method and equipment |
-
2021
- 2021-07-22 CN CN202110828890.5A patent/CN113542130B/en active Active
Patent Citations (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101110720A (en) * | 2007-08-24 | 2008-01-23 | 中兴通讯股份有限公司 | A method for testing the aging time of media access control address table |
| US8155150B1 (en) * | 2009-03-11 | 2012-04-10 | Juniper Networks, Inc. | Cooperative MAC learning/aging in highly distributed forwarding system |
| CN101702680A (en) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | Aging method, device and communication equipment of media accessing control address |
| WO2012034408A1 (en) * | 2010-09-17 | 2012-03-22 | 中兴通讯股份有限公司 | Method and system for processing media access control address aging |
| JP2012100136A (en) * | 2010-11-04 | 2012-05-24 | Nec Commun Syst Ltd | Frame transfer apparatus, frame transfer method, and frame transfer program |
| US20130182721A1 (en) * | 2011-11-22 | 2013-07-18 | Huawei Technologies Co., Ltd. | Method and apparatus for managing mac address table |
| US9369372B1 (en) * | 2013-03-13 | 2016-06-14 | Altera Corporation | Methods for network forwarding database flushing |
| CN104660526A (en) * | 2013-11-22 | 2015-05-27 | 华为技术有限公司 | MAC item learning method and device |
| CN105634999A (en) * | 2014-11-05 | 2016-06-01 | 北京东土科技股份有限公司 | Aging method and device for medium access control address |
| CN104333520A (en) * | 2014-11-28 | 2015-02-04 | 上海斐讯数据通信技术有限公司 | Method for controlling interchanger MAC address table dual-ageing time |
| WO2016201843A1 (en) * | 2015-06-18 | 2016-12-22 | 中兴通讯股份有限公司 | Control method and apparatus for mac address learning |
| CN106330712A (en) * | 2015-06-18 | 2017-01-11 | 中兴通讯股份有限公司 | MAC address learning control method and device |
| CN106330652A (en) * | 2015-06-30 | 2017-01-11 | 中兴通讯股份有限公司 | Learning method and device of MAC address in virtual local area network of switch |
| CN105591903A (en) * | 2015-09-16 | 2016-05-18 | 杭州华三通信技术有限公司 | Message forwarding method and device |
| CN105959430A (en) * | 2016-05-31 | 2016-09-21 | 深圳市风云实业有限公司 | Switcher MAC address aging method |
| CN109218456A (en) * | 2017-07-06 | 2019-01-15 | 北京华为数字技术有限公司 | The processing method and processing device of the ageing time of mac address table |
| CN108712449A (en) * | 2018-07-12 | 2018-10-26 | 新华三技术有限公司 | Prevent the method, apparatus and electronic equipment of MAC Address extensive aggression |
| CN112866435A (en) * | 2021-02-23 | 2021-05-28 | 中国联合网络通信集团有限公司 | MAC address aging processing method and equipment |
Non-Patent Citations (6)
| Title |
|---|
| 于翔等: "基于FPGA的MAC层地址表设计与仿真", 《计算机工程与设计》 * |
| 于翔等: "基于FPGA的MAC层地址表设计与仿真", 《计算机工程与设计》, no. 01, 16 January 2013 (2013-01-16) * |
| 李松: "电信IPTV故障的处理案例分析", 《湖南邮电职业技术学院学报》 * |
| 李松: "电信IPTV故障的处理案例分析", 《湖南邮电职业技术学院学报》, no. 04, 15 December 2014 (2014-12-15) * |
| 蒋友等: "二层交换机中MAC地址的学习、查找和老化方法", 《软件导刊》 * |
| 蒋友等: "二层交换机中MAC地址的学习、查找和老化方法", 《软件导刊》, no. 20, 20 October 2005 (2005-10-20) * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113542130B (en) | 2023-07-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12284081B2 (en) | Network service management method, device, and system | |
| US11323336B2 (en) | Network slice management method and device | |
| CN104468407B (en) | Realize the method and apparatus of business platform resource elasticity distribution | |
| US8619799B1 (en) | Methods and apparatus for improving idle mode performance using deep packet inspection (DPI) idle mode agent | |
| US12063594B2 (en) | Method, device, and system for deploying network slice | |
| US10181999B2 (en) | Optimizing information related to a route and/or a next hop for multicast traffic | |
| US10116554B2 (en) | Data flow processing method and apparatus | |
| CN110677873A (en) | A method and device for transmitting service data | |
| CN112367197A (en) | Network equipment migration method and device | |
| EP3310093A1 (en) | Traffic control method and apparatus | |
| WO2011110104A1 (en) | Access method, device and system for terminals | |
| CN108781215B (en) | Network service implementation method, service controller and communication system | |
| CN104618956A (en) | Method and device for controlling cell | |
| US20240396807A1 (en) | Controlling start timing of network load prediction | |
| CN113542130A (en) | Method and device for processing address table items | |
| CN102573018B (en) | Electricity-saving method and device for mobile terminal | |
| CN100563173C (en) | Method and device for aging original flow, network flow exporter and network flow system | |
| CN104349465B (en) | The establishing method and device of wireless network doze output | |
| CN110740450B (en) | Network cell capacity expansion method and device | |
| EP4683285A1 (en) | Cloud platform control method and apparatus, and device | |
| CN110620811B (en) | ONU management method and system under vOLT cluster architecture | |
| CN116319624B (en) | A message processing method, device, equipment and storage medium | |
| CN114390089A (en) | API gateway load balancing method and API gateway | |
| WO2022267811A1 (en) | Quick-return measurement task processing method and apparatus, and storage medium and electronic apparatus | |
| Abbas et al. | Delay bounded spray and wait in delay tolerant networks |
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 |