CN109842694A - A kind of method, the network equipment and the computer readable storage medium of synchronous MAC Address - Google Patents
A kind of method, the network equipment and the computer readable storage medium of synchronous MAC Address Download PDFInfo
- Publication number
- CN109842694A CN109842694A CN201910221668.1A CN201910221668A CN109842694A CN 109842694 A CN109842694 A CN 109842694A CN 201910221668 A CN201910221668 A CN 201910221668A CN 109842694 A CN109842694 A CN 109842694A
- Authority
- CN
- China
- Prior art keywords
- mac address
- equipment
- configuration parameter
- mac
- hit
- 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
Landscapes
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
The embodiment of the present application provides method, the network equipment and the computer readable storage medium of a kind of synchronous MAC Address, is related to field of communication technology.The method is applied to the main equipment in M-LAG, the M-LAG further includes standby equipment, the described method includes: receiving the message of negotiation request that the standby equipment is sent, the current configuration parameter of the standby equipment is carried in the message of negotiation request, according to the configuration parameter received, local configuration parameter and preset configuration parameter negotiation rules, determine the configuration parameter after negotiating, configuration parameter after storing the negotiation, and it is sent to the standby equipment and negotiates response message, the configuration parameter after the negotiation is carried in the negotiation response message, so that the main equipment and the standby equipment carry out MAC Address synchronization process according to the configuration parameter after the negotiation.The consistent of configuration information can be guaranteed using the application, improve the success rate of synchronous MAC Address.
Description
Technical field
This application involves fields of communication technology, more particularly to method, the network equipment and the calculating of a kind of synchronous MAC Address
Machine readable storage medium storing program for executing.
Background technique
Striding equipment link aggregation group (English: Multichassis Link Aggregation Group, referred to as: M-LAG)
It is a kind of mechanism for realizing striding equipment link aggregation, in M-LAG, two equipment are carried out striding equipment link aggregations by technical staff,
To which link reliability has been increased to device level from single-plate grade.Wherein an equipment is as main equipment, another equipment conduct
Standby equipment.Wherein, it is connected between main equipment and standby equipment by aggregation interface (can be described as aggregation interface 1).
In the network of application M-LAG, the network equipment (can be described as aggregation interface by its preconfigured aggregation interface
2) aggregation interface 2 and in M-LAG environment interconnects.Main equipment and standby equipment in M-LAG can be connect by the way that polymerization is added respectively
The interface of mouth 2 carries out secure media accessing to control address (English: Media Access Control, abbreviation: MAC) study, and
It is synchronous that safe MAC is carried out by M-LAG system.
In practical applications, two equipment (i.e. main equipment and standby equipment) for including for M-LAG, technical staff needs hand
The configuration information of the dynamic safe MAC for configuring this two equipment, and guarantee that the configuration information of two equipment is completely the same.Wherein, match
Confidence breath includes the maximum MAC number of aggregation interface, global maximum safe MAC number etc..When configuration information is inconsistent, may lead
Cause safe MAC synchronization failure.For example, with purchasing, equipment exists if maximum MAC number of the HRP-configured master device in aggregation interface 2 is 100
The maximum MAC number of aggregation interface 2 is 200, then for equipment when to main equipment synchronous safety MAC, can synchronize 200, and master sets
The standby maximum MAC number in aggregation interface 2 is 100, it will has 100 safe MAC synchronization failures.
Summary of the invention
In view of this, this application provides method, the network equipment and the computer-readable storage mediums of a kind of synchronous MAC Address
Matter improves the success rate of synchronous MAC Address to guarantee the consistent of configuration information.Specific technical solution is as follows:
In a first aspect, providing a kind of method of synchronous MAC Address, the method is applied to the main equipment in M-LAG, institute
Stating M-LAG further includes standby equipment, which comprises
The message of negotiation request that the standby equipment is sent is received, the standby equipment is carried in the message of negotiation request and works as
Preceding configuration parameter;
According to the configuration parameter received, local configuration parameter and preset configuration parameter negotiation rules, determines and negotiate
Configuration parameter afterwards;
Configuration parameter after storing the negotiation, and sent to the standby equipment and negotiate response message, the negotiation response
Configuration parameter after carrying the negotiation in message, so that the main equipment and the standby equipment are according to matching after the negotiation
It sets parameter and carries out MAC Address synchronization process.
Optionally, the configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and each polymerization
The aging policy of group;
The configuration parameter and preset configuration parameter negotiation rules of configuration parameter, local that the basis receives, determine
Configuration parameter after negotiation, comprising:
The first minimum value in the maximum MAC number of the overall situation received and the local maximum MAC number of the overall situation is determined, by described the
One minimum value is as the maximum MAC number of the overall situation after negotiating;
For each aggregation group, the maximum MAC number and the locally preset aggregation group of the aggregation group received are determined
The second minimum value in maximum MAC number, using second minimum value as the maximum MAC number after the negotiation of the aggregation group;
For each aggregation group, by the aging policy of the aggregation group stored in this equipment, as the aging plan after negotiation
Slightly.
Optionally, the method also includes:
It is the first MAC Address of no flow aging for the aging type being locally stored, when reaching first MAC Address
Sampling period when, detect the hit condition information of first MAC Address, and receive the first state of the standby equipment transmission
Notification packet carries the hit for first MAC Address that the standby equipment detects in the first state notification packet
Whether status information, the hit condition information indicate in present flow rate to include first MAC Address;
According to the hit condition information detected and the hit condition information received, first MAC Address is determined
Hit results;
The first state response message for carrying the hit results of first MAC Address is sent to the standby equipment, and
The continuous miss number of first MAC Address is updated according to the hit results;
When the continuous miss number reaches preset threshold, first MAC Address is deleted.
Optionally, the basis detects hit condition information and the hit condition information received determine described the
The hit results of one MAC Address, comprising:
If in the hit condition information detected and the hit condition information received, there is no indicate in present flow rate
Hit condition information comprising first MAC Address, it is determined that hit results are miss;
If in the hit condition information detected and the hit condition information received, existing indicates to wrap in present flow rate
Hit condition information containing first MAC Address, it is determined that hit results are hit.
Optionally, the continuous miss number that first MAC Address is updated according to the hit results, comprising:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
Optionally, the method also includes:
The more new command of the second MAC Address of user's input is received, the more new command includes the more new state of MAC Address
Information, the more new state information are addition state or deletion state;
Processing is updated to second MAC Address according to the more new command, and sends second to the standby equipment
State advertisement message carries second MAC Address and more new state information in the second state advertisement message.
Optionally, the method also includes:
When receiving the MAC Address that the standby equipment synchronizes, to preset interim MAC by MAC Address storage
In the table of location;
When detecting the flow comprising the third MAC Address in the temporary MAC address table, by the 3rd MAC
Location is issued in driving.
Second aspect, provides a kind of method of synchronous MAC Address, and the method is applied to the standby equipment in M-LAG, institute
Stating M-LAG further includes main equipment, which comprises
To the main equipment message of negotiation request is sent, the standby equipment is carried in the message of negotiation request currently
Configuration parameter, so that configuration parameter and preset configuration of the main equipment according to the configuration parameter, the main equipment received
Parameter negotiation rule, determines the configuration parameter after negotiating;
The negotiation response message that main equipment is sent is received, carries the configuration after the negotiation in the negotiation response message
Parameter;
MAC Address synchronization process is carried out according to the configuration parameter after the negotiation.
Optionally, the configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and each polymerization
The aging policy of group.
Optionally, the method also includes:
It is the first MAC Address of no flow aging for the aging type being locally stored, when reaching first MAC Address
Sampling period when, detect the hit condition information of first MAC Address, the hit condition information indicates in present flow rate
It whether include first MAC Address;
First state notification packet is sent to the main equipment, carries described first in the first state notification packet
The hit condition information of MAC Address;
The first state response message that the main equipment is sent is received, is carried in the first state response message described
The hit results of first MAC Address;
The continuous miss number of first MAC Address is updated according to the hit results;
When the continuous miss number reaches preset threshold, first MAC Address is deleted.
Optionally, the continuous miss number that first MAC Address is updated according to the hit results, comprising:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
Optionally, the method also includes:
The second state advertisement message that the main equipment is sent is received, carries second in the second state advertisement message
MAC Address and more new state information, the more new state information are addition state or deletion state;
According to the more new state information of second MAC Address, processing is updated to second MAC Address.
Optionally, the method also includes:
When receiving the MAC Address that the main equipment synchronizes, to preset interim MAC by MAC Address storage
In the table of location;
When detecting the flow comprising the 4th MAC Address in the temporary MAC address table, by the 4th MAC
Location is issued in driving.
The third aspect, provides a kind of device of synchronous MAC Address, and described device is applied to the main equipment in M-LAG, institute
Stating M-LAG further includes standby equipment, and described device includes:
First receiving module, the message of negotiation request sent for receiving the standby equipment, in the message of negotiation request
Carry the current configuration parameter of the standby equipment;
First determining module, for according to the configuration parameter received, local configuration parameter and preset configuration parameter
Negotiation rules determine the configuration parameter after negotiating;
First sending module for storing the configuration parameter after the negotiation, and sends to the standby equipment and negotiates response
Message carries the configuration parameter after the negotiation in the negotiation response message, so that the main equipment and the standby equipment
MAC Address synchronization process is carried out according to the configuration parameter after the negotiation.
Optionally, the configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and each polymerization
The aging policy of group;
First determining module, is specifically used for:
The first minimum value in the maximum MAC number of the overall situation received and the local maximum MAC number of the overall situation is determined, by described the
One minimum value is as the maximum MAC number of the overall situation after negotiating;
For each aggregation group, the maximum MAC number and the locally preset aggregation group of the aggregation group received are determined
The second minimum value in maximum MAC number, using second minimum value as the maximum MAC number after the negotiation of the aggregation group;
For each aggregation group, by the aging policy of the aggregation group stored in this equipment, as the aging plan after negotiation
Slightly.
Optionally, described device further include:
Second receiving module, for the first MAC Address for the aging type that is locally stored for no flow aging, when reaching
To first MAC Address sampling period when, detect the hit condition information of first MAC Address, and receive described standby
The first state notification packet that equipment is sent, carry in the first state notification packet the standby equipment detect it is described
Comprising the first MAC whether the hit condition information of the first MAC Address, the hit condition information indicate in present flow rate
Location;
Second determining module, for determining according to the hit condition information detected and the hit condition information received
The hit results of first MAC Address;
Update module, for sending the first shape for carrying the hit results of first MAC Address to the standby equipment
State response message, and update according to the hit results the continuous miss number of first MAC Address;
Removing module, for deleting first MAC Address when the continuous miss number reaches preset threshold.
Optionally, second determining module, is specifically used for:
If in the hit condition information detected and the hit condition information received, there is no indicate in present flow rate
Hit condition information comprising first MAC Address, it is determined that hit results are miss;
If in the hit condition information detected and the hit condition information received, existing indicates to wrap in present flow rate
Hit condition information containing first MAC Address, it is determined that hit results are hit.
Optionally, the update module, is specifically used for:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
Optionally, described device further include:
Third receiving module, the more new command of the second MAC Address for receiving user's input, the more new command include
The more new state information of MAC Address, the more new state information are addition state or deletion state;
Second sending module, for being updated processing to second MAC Address according to the more new command, and to institute
It states standby equipment and sends the second state advertisement message, second MAC Address and more is carried in the second state advertisement message
New state information.
Optionally, described device further include:
Memory module, for when receiving the MAC Address that the standby equipment synchronizes, the MAC Address to be stored to pre-
If temporary MAC address table in;
Module is issued, for inciting somebody to action when detecting the flow comprising the third MAC Address in the temporary MAC address table
The third MAC Address is issued in driving.
Fourth aspect, provides a kind of device of synchronous MAC Address, and described device is applied to the standby equipment in M-LAG, institute
Stating M-LAG further includes main equipment, and described device includes:
First sending module carries in the message of negotiation request for sending message of negotiation request to the main equipment
There is a current configuration parameter of the standby equipment, so that the main equipment is matched according to the configuration parameter that receives, the main equipment
Parameter and preset configuration parameter negotiation rules are set, determines the configuration parameter after negotiating;
First receiving module carries in the negotiation response message for receiving the negotiation response message of main equipment transmission
Configuration parameter after having the negotiation;
Synchronization module, for carrying out MAC Address synchronization process according to the configuration parameter after the negotiation.
Optionally, the configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and each polymerization
The aging policy of group.
Optionally, described device further include:
Detection module, for the first MAC Address for the aging type being locally stored for no flow aging, when reaching
When stating the sampling period of the first MAC Address, the hit condition information of first MAC Address, the hit condition information are detected
It indicates in present flow rate whether to include first MAC Address;
Second sending module, for sending first state notification packet, the first state notice report to the main equipment
The hit condition information of first MAC Address is carried in text;
Second receiving module, the first state response message sent for receiving the main equipment, the first state are rung
Answer the hit results that first MAC Address is carried in message;
First update module, for updating the continuous miss number of first MAC Address according to the hit results;
Removing module, for deleting first MAC Address when the continuous miss number reaches preset threshold.
Optionally, first update module, is specifically used for:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
Optionally, described device further include:
Third receiving module, the second state advertisement message sent for receiving the main equipment, second state are logical
It accuses and carries the second MAC Address and more new state information in message, the more new state information is addition state or deletion state;
Second update module, for the more new state information according to second MAC Address, to second MAC Address
It is updated processing.
Optionally, described device further include:
Memory module, for when receiving the MAC Address that the main equipment synchronizes, the MAC Address to be stored to pre-
If temporary MAC address table in;
Module is issued, for inciting somebody to action when detecting the flow comprising the 4th MAC Address in the temporary MAC address table
4th MAC Address is issued in driving.
5th aspect, provides a kind of network equipment, including processor, communication interface, memory and communication bus,
In, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes that first aspect or second aspect are any described
Method and step.
6th aspect, provides a kind of computer readable storage medium, is stored in the computer readable storage medium
Computer program realizes first aspect or second aspect any method step when the computer program is executed by processor
Suddenly.
7th aspect, provides a kind of computer program product comprising instruction, when run on a computer, so that
Computer executes above-mentioned first aspect or any method and step of second aspect.
Therefore, by applying a kind of method, the network equipment and the computer of synchronous MAC Address provided by the embodiments of the present application
Readable storage medium storing program for executing, main equipment receive the message of negotiation request that standby equipment is sent.Wherein, standby set is carried in message of negotiation request
Standby current configuration parameter.Then, main equipment is joined according to the configuration parameter received, local configuration parameter and preset configuration
Number negotiation rules, determine the configuration parameter after negotiating.Later, the configuration parameter after main equipment storage is negotiated, and sent out to standby equipment
Send negotiation response message.Wherein, negotiate to carry the configuration parameter after negotiating in response message, so that main equipment and standby equipment root
MAC Address synchronization process is carried out according to the configuration parameter after negotiation.In this way, main equipment and standby equipment can guarantee the one of configuration information
It causes, improves the success rate of synchronous MAC Address.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent
Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of architecture diagram of network system provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of the method for synchronous MAC Address provided by the embodiments of the present application;
Fig. 3 is a kind of flow chart of the method for synchronous MAC Address provided by the embodiments of the present application;
Fig. 4 is a kind of flow chart of method of the MAC Address without flow aging provided by the embodiments of the present application;
Fig. 5 is a kind of flow chart of method of the MAC Address without flow aging provided by the embodiments of the present application;
Fig. 6 is the flow chart for the method that a kind of MAC Address static state provided by the embodiments of the present application updates;
Fig. 7 is the flow chart for the method that a kind of MAC Address static state provided by the embodiments of the present application updates;
Fig. 8 is a kind of flow chart of the method for synchronous MAC Address provided by the embodiments of the present application;
Fig. 9 is a kind of structural schematic diagram of the device of synchronous MAC Address provided by the embodiments of the present application;
Figure 10 is a kind of structural schematic diagram of the device of synchronous MAC Address provided by the embodiments of the present application;
Figure 11 is a kind of structural schematic diagram of the network equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of method of synchronous MAC Address, and this method can be applied in network system prop up
The network equipment of M-LAG technology is held, the synchronous MAC Address of the network equipment (can pacify for MAC Address through safety certification
Full MAC Address).The network equipment can be the equipment such as router, interchanger.Technical staff can will be more by M-LAG technology
Interface on a network equipment carries out striding equipment link aggregation, to improve link reliability.Meanwhile technical staff can also will be more
Some network equipment is set as main equipment in a network equipment, and sets standby equipment for other network equipments.
Fig. 1 is a kind of architecture diagram of network system provided by the embodiments of the present application.As shown in Figure 1, the network system includes
First network equipment, second network equipment, the third network equipment and the 4th network equipment.Wherein, first network equipment and second
The network equipment constitutes M-LAG.Technical staff creates aggregation group 1 in first network equipment and second network equipment respectively, gathers
2 and aggregation group 3 are combined, aggregation group 2 is created in the third network equipment, aggregation group 3 is created in the 4th network equipment.Then,
Technical staff connects the third interface and the 4th of the first interface of first network equipment and second interface and second network equipment
Mouth is added in aggregation group 1, and the 7th interface of the 5th interface of first network equipment and second network equipment is added to polymerization
In group 2, the 8th interface of the 6th interface of first network equipment and second network equipment is added in aggregation group 3, by third
9th interface of the network equipment and the tenth interface are added in aggregation group 2, by the 11st interface and the tenth of the 4th network equipment
Two interfaces are added in aggregation group 3.The configuration information of first network equipment and second network equipment is also respectively configured in technical staff,
For example, the aging policy etc. of the maximum MAC number of such as each aggregation group and each aggregation group.
Below in conjunction with specific embodiment, to a kind of method progress of synchronous MAC Address provided by the embodiments of the present application
Detailed description, in order to make it easy to understand, the concrete processing procedure of standby equipment is introduced first.As shown in Fig. 2, specific steps
It is as follows.
Step 201, message of negotiation request is sent to main equipment.
Wherein, the standby current configuration parameter of equipment is carried in the message of negotiation request, so that main equipment is according to receiving
Configuration parameter, the configuration parameter of main equipment and preset configuration parameter negotiation rules, determine negotiate after configuration parameter.Configuration
Parameter may include global maximum MAC number, the maximum MAC number of aggregation group and aging policy etc..
In an implementation, the synchronous function of safe MAC is enabled in the aggregation interface of a certain aggregation group of standby equipment as technical staff
After capable of or modifying to the corresponding configuration parameter of the aggregation group, standby equipment, which can actively be sent to main equipment, negotiates request report
Text, main equipment can then receive the message of negotiation request.Wherein, the current configuration ginseng of standby equipment is carried in message of negotiation request
Number, configuration parameter includes global configuration parameter and the current configuration parameter of the aggregation group, if there are multiple poly- in standby equipment
It is combined, then can carry the current configuration parameter of each aggregation group by request message through consultation.Optionally, for standby being set there are multiple
Standby situation, online in multiple standby equipment and after enabling safe MAC synchronizing function, main equipment can receive multiple negotiations request reports
Text.
Main equipment can be negotiated according to the configuration parameter received, the configuration parameter in main equipment and preset configuration parameter
Rule determines the configuration parameter after negotiating.Wherein, extended meeting after the concrete processing procedure of the configuration parameter after the determining negotiation of main equipment
It is described in detail, details are not described herein again.
It optionally, may include the current configuration parameter of multiple aggregation groups in the configuration parameter that message of negotiation request carries.
After main equipment receives the message of negotiation request, for each aggregation group, it can be joined according to the configuration of the aggregation group received
The configuration parameter and preset configuration parameter negotiation rules of the aggregation group in number, main equipment, after the negotiation for determining the aggregation group
Configuration parameter.It is including the configuration parameter of an aggregation group in the configuration parameter that the embodiment of the present application is carried with message of negotiation request
Example is introduced, other situations are similar therewith.
Optionally, configuration parameter may include the maximum MAC number and aging policy of global maximum MAC number, aggregation group.
In an implementation, aging policy may include the global aging type supported (such as without aging type, absolute time elder
Change type, without flow aging type etc.), aggregation group the aging type and the aging type that uses of aggregation group supported.If polymerization
The aging type that group uses is the long aging type of absolute time, then aging policy further includes the aging duration of aggregation group.If polymerization
The aging type that group uses is no flow aging type, then aging policy further includes the ageing time of aggregation group and adopting for aggregation group
The sample period.
In a kind of feasible implementation, message of negotiation request may include type of message (MSG (English: Message)
Type) field, message length (MSGlength) field, test serial number (MSGnum) field, global maximum safe MAC number
(total max secure-mac count) field, global aging type (aging-type support) field supported,
Aging type (aging-type) field that aggregation group mark (group identity) field, aggregation group use, aggregation group
Sampling period (aging-interval) field of ageing time (aging-value) field and aggregation group.In addition, negotiating request
Message can also include other fields (such as device identification field), and the embodiment of the present application is not construed as limiting.It as shown in Table 1, is this
Apply for a kind of example for message of negotiation request that embodiment provides.
Table one
Step 202, the negotiation response message that main equipment is sent is received.
Wherein, negotiate to carry the configuration parameter after negotiating in response message.
In an implementation, main equipment is according to the configuration parameter and preset configuration parameter of the configuration parameter, main equipment received
Negotiation rules after determining the configuration parameter after negotiating, can send the negotiation response message of configuration parameter to standby equipment.Its
In, negotiate to carry the configuration parameter after negotiating in response message.It, can be to this after standby equipment receives the negotiation response message
Negotiate response message to be parsed, the configuration parameter after obtaining the negotiation carried in the negotiation response message.
Step 203, MAC Address synchronization process is carried out according to the configuration parameter after negotiation.
It in an implementation, can be by this after standby equipment obtains the configuration parameter after the negotiation carried in the negotiation response message
The configuration parameter on ground is revised as the configuration parameter after negotiating, to be carried out at MAC Address synchronization according to the configuration parameter after negotiation
Reason and MAC address aging processing.In this way, configuration parameter can be consistent in standby equipment and main equipment, to prevent in MAC
Due to the inconsistent caused various problems of configuration parameter during the synchronization process of location.
Optionally, when main equipment detects that itself configuration parameter changes, main equipment can also be sent out to standby equipment
Notification message is sent, which is used to indicate standby equipment and carries out handling through consultation for configuration parameter.Standby equipment receives the notice and disappears
After breath, step 201 can be executed to main equipment and send message of negotiation request,
The embodiment of the present application also provides a kind of method of synchronous MAC Address, this method is applied to main equipment.Such as Fig. 3 institute
Show, specific step is as follows.
Step 301, the message of negotiation request that standby equipment is sent is received.
Wherein, the standby current configuration parameter of equipment is carried in message of negotiation request.
In an implementation, the synchronous function of safe MAC is enabled in the aggregation interface of a certain aggregation group of standby equipment as technical staff
After capable of or modifying to the corresponding configuration parameter of the aggregation group, standby equipment can send message of negotiation request to main equipment, or
Person, standby equipment can also send message of negotiation request to main equipment after the notification message for receiving main equipment transmission.Wherein,
The standby current configuration parameter of equipment is carried in the message of negotiation request.Wherein, configuration parameter includes global configuration parameter sum
The configuration parameter of the aggregation group.After main equipment receives the message of negotiation request, which can be parsed,
Obtain the configuration parameter current for equipment of message of negotiation request carrying.
Step 302, according to configuration parameter, the local configuration parameter and preset configuration parameter negotiation rules received,
Determine the configuration parameter after negotiating.
In an implementation, configuration parameter negotiation rules can be previously stored in main equipment, which can
To be rule of thumb configured by technical staff.The current configuration of standby equipment that main equipment obtains message of negotiation request carrying is joined
After number, it can be determined according to the configuration parameter, local preset configuration parameter and preset configuration parameter negotiation rules of standby equipment
Configuration parameter after negotiation.
It optionally, include global maximum MAC number, the maximum MAC number of each aggregation group and each aggregation group for configuration parameter
The case where aging policy, it is that main equipment determines the configuration parameter after negotiating the specific process is as follows: determine receive it is global most
The first minimum value in big MAC number and the maximum MAC number of the local overall situation, the first minimum value is maximum as the overall situation after negotiating
MAC number;For each aggregation group, the maximum MAC number for determining the aggregation group received and local preset aggregation group are most
The second minimum value in big MAC number, using the second minimum value as the maximum MAC number after the negotiation of the aggregation group;For each poly-
It is combined, by the aging policy of the aggregation group stored in this equipment, as the aging policy after negotiation.
Wherein, the parameter of aging policy may include the global aging type supported (such as without aging type, absolute duration
Aging type, without flow aging type etc.), aggregation group the aging type and the aging type that uses of aggregation group supported.If poly-
Being combined the aging type used is the long aging type of absolute time, then the parameter of aging policy further includes the aging duration of aggregation group.
If the aging type that aggregation group uses is no flow aging type, when the parameter of aging policy further includes the aging of aggregation group
Between and aggregation group sampling period.
In an implementation, after main equipment gets the standby current configuration parameter of equipment and local configuration parameter, for the overall situation
Maximum MAC number, main equipment can determine the in the maximum MAC number of the overall situation and local preset global maximum MAC number of standby equipment
One minimum value, and using the first minimum value as the maximum MAC number of the overall situation after negotiating.For example, the maximum MAC number of the overall situation of standby equipment is
10000, the maximum MAC number of the overall situation configured in main equipment is 9500, then the maximum MAC number of the overall situation after negotiating is 9500.
For each aggregation group, main equipment can configure in the maximum MAC number of the aggregation group of standby equipment and this equipment
The aggregation group maximum MAC number in, determine the second minimum value.Then, after using the second minimum value as the negotiation of the aggregation group
Maximum MAC number.For example, the maximum MAC number of the aggregation group 2 of standby equipment is 2000, the maximum of the aggregation group 2 configured in main equipment
MAC number is 3000, then the maximum MAC number after the negotiation of aggregation group 2 is 2000.
For each aggregation group, main equipment can gather the aging policy of the aggregation group stored in this equipment as this
Aging policy after the negotiation being combined.For example, being directed to aggregation group 2, the aging type configured in standby equipment is no flow aging, always
The change time is 10 minutes, the sampling period is 1 minute;The aging type configured in main equipment is absolute time aging type, aging
Time is 20 minutes, then the aging type of the aggregation group 2 after negotiating is absolute time aging type, ageing time is 20 minutes.
Optionally, the priority of each aging type can also be previously stored in main equipment.Wherein, each aging type is excellent
First grade can be rule of thumb configured by technical staff.For example, the priority of not aging type is 1, absolute time aging class
Type priority is 2, and the priority of no flow aging type is 3, and the value of priority is bigger, and priority is higher.For each polymerization
Group, main equipment can select the old of highest priority in the aging type for the aggregation group that main equipment and standby equipment are supported
Change type, as the aging type of the aggregation group after negotiation, and by the ageing time of the aggregation group stored in this equipment and
Ageing time and sampling period of the sampling period as the aggregation group after negotiating.
For example, for aggregation group 2, the aging type that main equipment is supported be not aging type, absolute time aging type and
Without flow aging type, the currently used aging type of main equipment is no flow aging type, and ageing time is 10 minutes, sampling
Period is 2 minutes.For the aging type that standby equipment is supported for absolute time aging type and without flow aging type, main equipment is current
The aging type used is no flow aging type, and ageing time is 20 minutes, and the sampling period is 1 minute.Then for aggregation group
2, in aging type that main equipment and standby equipment are supported (i.e. absolute time aging type and without flow aging type), priority
For highest aging type without flow aging type, that is, the aging type of the aggregation group 2 after negotiating is no flow aging type, aging
Time is 10 minutes, and the sampling period is 2 minutes.
Step 303, the configuration parameter after negotiating is stored, and sends the negotiation response message of configuration parameter to standby equipment.
Wherein, negotiate to carry the configuration parameter after negotiating in response message.
In an implementation, after main equipment determines the configuration parameter after negotiating, the configuration parameter after negotiation can be stored in
It stores in equipment, and sends the negotiation response message for carrying the configuration parameter after negotiating to standby equipment, in this way, main equipment and standby
Equipment MAC Address synchronization process can be carried out according to the configuration parameter after negotiation and MAC address aging is handled.Wherein, negotiate to ring
Answer the message format of message can be identical as the message format of message of negotiation request, can not also be identical, the embodiment of the present application is not
It limits.Based on above-mentioned processing, the configuration parameter of main equipment and standby equipment can be consistent, to prevent same in MAC Address
It walks in treatment process due to configuration parameter inconsistent the problem of causing.
Optionally, if main equipment does not receive the negotiation that a certain standby equipment is sent by the aggregation interface of a certain aggregation group
Request message, then main equipment can be determined that the aggregation interface of the aggregation group for equipment is not enabled on safe MAC synchronizing function.Phase
It answers, after main equipment determines the configuration parameter after negotiating, without sending the configuration parameter carried after negotiating to this for equipment
Negotiation response message.
The method of the synchronization MAC Address provided based on the above embodiment, the embodiment of the present application also provides a kind of MAC Address
Method without flow aging, this method can be applied to standby equipment.As shown in figure 4, specific step is as follows.
It step 401, is the first MAC Address of no flow aging for aging type, when the sampling for reaching the first MAC Address
When the period, the hit condition information of the first MAC Address is detected.
Wherein, whether hit condition information indicates in present flow rate to include the first MAC Address.
It in an implementation, is the first MAC Address of no flow aging type for aging type, standby equipment can be according to no stream
The aging type corresponding sampling period is measured, whether include first MAC Address, to obtain first if periodically detecting in present flow rate
The hit condition information of MAC Address.If in present flow rate including the first MAC Address, it is determined that the hit shape of the first MAC Address
State information is hit condition.If not including the first MAC Address in present flow rate, it is determined that the hit condition of the first MAC Address
Information is miss state.
Step 402, first state notification packet is sent to main equipment.
Wherein, the hit condition information of the first MAC Address is carried in first state notification packet.
In an implementation, it after standby equipment obtains the hit condition information of the first MAC Address, can be generated comprising the first MAC
The state advertisement message (i.e. first state notification packet) of location and the hit condition information, then, standby equipment can be to main equipment
Send first state notification packet.
In a kind of feasible implementation, first state notification packet may include type of message (MSG type) word
Section, message length (MSG length) field, safe MAC (secure MAC) field, aggregation group identify (group
Identity) field, safe MAC (secure MAC) virtual LAN (English: Virtual Local Area Network,
Referred to as: VLAN) identification field, priority (priority) field and safe mac state (secure MAC state) field.Its
In, safe mac state field includes miss state, hit condition, addition state and deletes state.In addition, first state is logical
Accusing message can also include other fields (such as device identification field etc.), and the embodiment of the present application is not construed as limiting.As shown in Table 2,
For a kind of example of state advertisement message provided by the embodiments of the present application.
Table two
Wherein, state is added in safe MAC VLAN identification field, precedence field and safe mac state field and is deleted
Except state is synchronous with MAC Address for the update of MAC Address static state, specific process is subsequent to will do it detailed description.
Step 403, the first state response message that main equipment is sent is received.
Wherein, the hit results of the first MAC Address are carried in first state response message.
In an implementation, the hit condition information of main equipment also available first MAC Address, and receiving each standby equipment
It is corresponding according to the first MAC Address after the first state notification packet of the hit condition information for carrying the first MAC Address sent
Each hit condition information, determine the hit results of the first MAC Address.Then, main equipment can be carried to standby equipment transmission
The first state response message of the hit results of first MAC Address.Wherein, main equipment determines according to each hit condition information
The concrete processing procedure of the hit results of one MAC Address, subsequent will do it are discussed in detail.
After standby equipment receives the first state response message of main equipment transmission, can to the first state response message into
Row parsing, obtains the hit results of the first MAC Address carried in the first state response message.
Step 404, the continuous miss number of the first MAC Address is updated according to hit results.
In an implementation, it can star the counter of the continuous miss number for recording the first MAC Address in standby equipment.
It, can be according to hit results more after standby equipment obtains the hit results of the first MAC Address carried in first state response message
The continuous miss number of new first MAC Address.
Optionally, standby equipment updates the treatment process of the continuous miss number of the first MAC Address according to hit results are as follows:
When hit results are miss, the current continuous miss number of the first MAC Address is added 1;When hit results are hit,
By the continuous miss number zero setting of the first MAC Address.
In an implementation, if the hit results of the first MAC Address are miss, illustrate the flow of main equipment and standby equipment
In do not include the first MAC Address, the current continuous miss number of the first MAC Address can be added 1 by standby equipment.If first
The hit results of MAC Address are hit, then illustrate in main equipment and standby equipment in the flow of at least one equipment comprising first
MAC Address, the continuous miss number zero setting that standby equipment can be current by the first MAC Address.
Step 405, when continuous miss number reaches preset threshold, the first MAC Address is deleted.
In an implementation, the continuous miss number that the first MAC Address can be previously stored in standby equipment is corresponding default
Threshold value, the threshold value can be configured by technical staff, or the corresponding ageing time of the first MAC Address and sampling period
Ratio.
For example, the corresponding ageing time of the first MAC Address is 10 minutes, the sampling period is 1 minute, then preset threshold is
(10/1)=10.When the continuous miss number of the first MAC Address reaches 10 times, then determine that the first MAC Address needs for equipment
It is aging, standby equipment can delete the first MAC Address.
In this way, being based on above-mentioned treatment process, may be implemented to safe MAC without flow aging.
A kind of method the embodiment of the present application also provides MAC Address without flow aging, this method are applied to main equipment.Such as
Shown in Fig. 5, specific step is as follows.
It step 501, is the first MAC Address of no flow aging for aging type, when the sampling for reaching the first MAC Address
When the period, the hit condition information of the first MAC Address is detected, and receives the first state notification packet that standby equipment is sent.
Wherein, the hit condition information for the first MAC Address that standby equipment detects is carried in first state notification packet,
Whether hit condition information indicates in present flow rate to include the first MAC Address.
It in an implementation, is the first MAC Address of no flow aging type for aging type, main equipment can be according to no stream
The aging type corresponding sampling period is measured, whether include first MAC Address, to obtain first if periodically detecting in present flow rate
The hit condition information of MAC Address.If in present flow rate including the first MAC Address, it is determined that the hit shape of the first MAC Address
State information is hit condition.If not including the first MAC Address in present flow rate, it is determined that the hit condition of the first MAC Address
Information is miss state.
Meanwhile main equipment can also receive the first state notification packet that standby equipment is sent.Main equipment receives the first shape
After state notification packet, which can be parsed, obtain the first MAC Address that standby equipment detects
Hit condition information.
Step 502, according to the hit condition information detected and the hit condition information received, with determining the first MAC
The hit results of location.
In an implementation, main equipment detects the hit condition information of the first MAC Address, and receives what each standby equipment was sent
After the hit condition information of first MAC Address, it may further determine whether there are the flow of certain equipment with hitting the first MAC
Location.
Optionally, main equipment determine the hit results of the first MAC Address the specific process is as follows: if the life detected
In middle status information and the hit condition information received, there is no the hits indicated in present flow rate comprising the first MAC Address
Status information, it is determined that hit results are miss.If the hit condition information detected and the hit condition received are believed
In breath, there is the hit condition information indicated in present flow rate comprising the first MAC Address, it is determined that hit results are hit.
In an implementation, if in the hit condition information detected and the hit condition information received, there is no indicate
It include the hit condition information (i.e. whole hit condition information are miss state) of the first MAC Address in present flow rate,
The hit results for then determining the first MAC Address are miss.If the hit condition information detected and the hit shape received
In state information, there is hit condition information (the i.e. whole hit condition information indicated in present flow rate comprising the first MAC Address
In, it is hit condition there are at least one hit condition information), it is determined that the hit results of the first MAC Address are hit.
Step 503, the first state response message for carrying the hit results of the first MAC Address is sent to standby equipment, and
The continuous miss number of the first MAC Address is updated according to hit results.
In an implementation, after main equipment determines the hit results of the first MAC Address, first can be carried to standby equipment transmission
The first state response message of the hit results of MAC Address.Wherein, the message format of first state response message can be with first
The message format of state advertisement message is identical.
Meanwhile main equipment can also update the continuous miss of the first MAC Address according to the hit results of the first MAC Address
Number.
Optionally, main equipment updates the continuous miss number of the first MAC Address according to the hit results of the first MAC Address
The specific process is as follows: the current continuous miss number of the first MAC Address is added 1 when hit results are miss.When
When hit results are hit, by the continuous miss number zero setting of the first MAC Address.
In an implementation, if the hit results of the first MAC Address are miss, illustrate that main equipment determines main equipment and standby
The first MAC Address is not included in the flow of equipment, main equipment can add the current continuous miss number of the first MAC Address
1.If the hit results of the first MAC Address are hit, illustrate that main equipment determines at least one in main equipment and standby equipment
It include the first MAC Address, the continuous miss number zero setting that main equipment can be current by the first MAC Address in the flow of equipment.
Step 504, when continuous miss number reaches preset threshold, the first MAC Address is deleted.
In an implementation, the continuous miss number that the first MAC Address can be previously stored in main equipment is corresponding default
Threshold value, the threshold value can be rule of thumb configured by technical staff, or the corresponding ageing time of the first MAC Address and
The ratio in sampling period.
For example, the corresponding ageing time of the first MAC Address is 10 minutes, the sampling period is 1 minute, then preset threshold is
(10/1)=10.When the continuous miss number of the first MAC Address reaches 10 times, then main equipment determines that the first MAC Address needs
It is aging, main equipment can delete the first MAC Address.
In this way, being based on above-mentioned treatment process, may be implemented to safe MAC without flow aging.
The embodiment of the present application also provides a kind of method that MAC Address static state updates, this method is applied to main equipment.Such as figure
Shown in 6, specific step is as follows.
Step 601, the more new command of the second MAC Address of user's input is received.
In an implementation, user can static state adds or deletes peace directly in the aggregation interface of a certain aggregation group of main equipment
Full MAC Address (i.e. the second MAC Address).Correspondingly, the update that main equipment can receive the second MAC Address of user's input refers to
It enables.Wherein, more new command includes the more new state information of MAC Address, and more new state information is addition state or deletion state.
Step 602, processing is updated to the second MAC Address according to more new command, and sends the second state to standby equipment
Notification packet.
Wherein, the second MAC Address and more new state information are carried in the second state advertisement message.
In an implementation, main equipment receive user input the second MAC Address more new command after, can be referred to according to update
More new state information in order is updated processing to the second MAC Address.For example, when more new state information is addition state,
Second MAC Address can be locally stored in main equipment, and when more new state information is deletion state, main equipment can be in local
In the MAC Address of storage, second MAC Address is searched, with then deleting the 2nd MAC.In addition, main equipment can also generate packet
Then the second state advertisement message containing the second MAC Address and more new state information sends the second state advertisement report to standby equipment
Text.Wherein, the message format of the second state advertisement message is identical as the message format of first state notification packet.
Optionally, as user, static state adds or deletes directly in the aggregation interface of a certain aggregation group of a certain standby equipment
When two MAC Address, the third state that standby equipment can send the more new state information for carrying the second MAC Address to main equipment is logical
Accuse message.After main equipment receives the third state notification packet that standby equipment is sent, the third state notification packet can be updated
In more new state information processing is updated to the second MAC Address, at the same time it can also to other for equipment send the third state
Notification packet.Wherein, the second MAC Address and the more new state information are carried in third state notification packet.
In this way, automatic synchronization also may be implemented in the equipment in M-LAG when user adds or deletes MAC Address manually.
The embodiment of the present application also provides a kind of method that MAC Address static state updates, this method is applied to standby equipment.Such as figure
Shown in 7, specific step is as follows.
Step 701, the second state advertisement message that main equipment is sent is received.
Wherein, the second MAC Address and more new state information are carried in the second state advertisement message, more new state information is
Addition state deletes state.
In an implementation, standby equipment receives the second state advertisement message that main equipment is sent.Wherein, the second state advertisement message
In carry the second MAC Address and more new state information, more new state information is addition state or deletes state.Standby equipment receives
After the second state advertisement message that main equipment is sent, which can be parsed, obtain second shape
The second MAC Address and more new state information that state notification packet carries.
Step 702, according to the more new state information of the second MAC Address, processing is updated to the second MAC Address.
In an implementation, after standby equipment obtains the second MAC Address and the more new state information of the second state advertisement message carrying,
Processing can be updated to the second MAC Address according to more new state information.
In this way, automatic synchronization also may be implemented in the equipment in M-LAG when user adds or deletes MAC Address manually.
The embodiment of the present application also provides the synchronous method of another MAC Address, this method is applied to main equipment or standby sets
It is standby.The embodiment of the present application is illustrated so that main equipment receives the synchronous MAC Address of standby equipment as an example, as shown in figure 8, specific step
It is rapid as follows.
Step 801, when receiving the MAC Address that standby equipment synchronizes, by MAC Address storage to preset interim MAC
In address table.
In an implementation, temporary MAC address table can be previously stored in main equipment.The temporary MAC address table can be soft
Part table, including safe MAC (Secure MAC) field, interface index (interface index) field, priority
(priority) the aging type (aging- that field, safe MAC (secure MAC) VLAN identification field, safe MAC are used
Type) field, safe MAC ageing time (aging-value) field, safe MAC sampling period (aging-interval) word
Section, continuous miss number (unhitnum) field and state (state) field.Wherein, mode field can indicate not issue
State issues success status and issues status of fail.As shown in Table 3, for a kind of interim MAC provided by the embodiments of the present application
The example of location table.
Table three
When main equipment receives standby equipment synchronous MAC Address, MAC Address can be stored and arrive the temporary MAC address table
In, and the corresponding state of the MAC Address is set as not issuing.
Step 802, when detecting the flow comprising the third MAC Address in temporary MAC address table, by the 3rd MAC
Location is issued in driving.
It in an implementation, can be with when main equipment detects the flow comprising the third MAC Address in temporary MAC address table
The third MAC Address is issued in driving.If issuing success, 1 is set by the corresponding mode field of third MAC Address
(issuing success) sets 2 (issuing failure) for the corresponding mode field of third MAC Address if issuing failure.
Optionally, when simultaneously multiple MAC Address are issued to driving when, main equipment can according to the priority of MAC Address,
The high MAC Address of priority is preferentially issued to driving.In addition, the MAC Address in interim MAC table is synchronized to standby set by main equipment
When standby, the high MAC Address of priority preferentially can also be synchronized to by standby equipment according to the priority of MAC Address.
In the embodiment of the present application, treatment process when receiving the synchronous MAC Address of main equipment for equipment is similar therewith, this
Application embodiment repeats no more.
It based on above-mentioned treatment process, is established in equipment temporary MAC address table (i.e. software register), and is provided with MAC Address
Priority, after equipment receives synchronous MAC Address, first by these MAC Address storage into software register, then according to above-mentioned
A part of MAC Address is preferentially issued in driving by process, in this way, MAC Address that can be important with priority synchronization, guarantees network
The normal forwarding of flow.Moreover, the above process is based on, even if needing synchronous MAC Address has been more than the threshold value being arranged in driving
(such as maximum MAC number of global maximum MAC number or aggregation group), which also can store will not lose in software register
It loses, and waits and issue driving next time, improve the synchronous success rate of MAC Address.
Based on the same technical idea, as shown in figure 9, the embodiment of the present application also provides a kind of dresses of synchronous MAC Address
It sets, which is applied to the main equipment in M-LAG, and M-LAG further includes standby equipment, which includes:
First receiving module 910 carries in message of negotiation request for receiving the message of negotiation request of standby equipment transmission
The standby current configuration parameter of equipment;
First determining module 920, for according to the configuration parameter received, local configuration parameter and preset configuration ginseng
Number negotiation rules, determine the configuration parameter after negotiating;
First sending module 930 for storing the configuration parameter after negotiating, and sends to standby equipment and negotiates response message,
Negotiate to carry the configuration parameter after negotiating in response message so that main equipment and standby equipment according to the configuration parameter after negotiation into
Row MAC Address synchronization process.
Optionally, configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and the aging of each aggregation group
Strategy;
First determining module 920, is specifically used for:
Determine the first minimum value in the maximum MAC number of the overall situation received and the maximum MAC number of the local overall situation, most by first
Small value is as the maximum MAC number of the overall situation after negotiating;
For each aggregation group, the maximum MAC number and the locally preset aggregation group of the aggregation group received are determined
The second minimum value in maximum MAC number, using the second minimum value as the maximum MAC number after the negotiation of the aggregation group;
For each aggregation group, by the aging policy of the aggregation group stored in this equipment, as the aging plan after negotiation
Slightly.
Optionally, the device further include:
Second receiving module, for the first MAC Address for the aging type that is locally stored for no flow aging, when reaching
To the first MAC Address sampling period when, detect the hit condition information of the first MAC Address, and receive that standby equipment sends the
One state advertisement message carries the hit condition letter for the first MAC Address that standby equipment detects in first state notification packet
Whether breath, hit condition information indicate in present flow rate to include the first MAC Address;
Second determining module, for determining according to the hit condition information detected and the hit condition information received
The hit results of first MAC Address;
Update module, for sending the first state response report for the hit results for carrying the first MAC Address to standby equipment
Text, and according to the continuous miss number of hit results the first MAC Address of update;
Removing module, for deleting the first MAC Address when continuous miss number reaches preset threshold.
Optionally, the second determining module is specifically used for:
If in the hit condition information detected and the hit condition information received, there is no indicate in present flow rate
Hit condition information comprising the first MAC Address, it is determined that hit results are miss;
If in the hit condition information detected and the hit condition information received, existing indicates to wrap in present flow rate
Hit condition information containing the first MAC Address, it is determined that hit results are hit.
Optionally, update module is specifically used for:
When hit results are miss, the continuous miss number of the first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of the first MAC Address.
Optionally, the device further include:
Third receiving module, the more new command of the second MAC Address for receiving user's input, more new command includes MAC
The more new state information of address, more new state information are addition state or deletion state;
Second sending module for being updated processing to the second MAC Address according to more new command, and is sent to standby equipment
Second state advertisement message carries the second MAC Address and more new state information in the second state advertisement message.
Optionally, the device further include:
Memory module, for when receiving the MAC Address that standby equipment synchronizes, MAC Address to be stored to preset interim
In mac address table;
Module is issued, for when detecting the flow comprising the third MAC Address in temporary MAC address table, by third
MAC Address is issued in driving.
Based on the same technical idea, as shown in Figure 10, the embodiment of the present application also provides a kind of dresses of synchronous MAC Address
It sets, which is applied to the standby equipment in M-LAG, and M-LAG further includes main equipment, which includes:
First sending module 1010 carries standby for sending message of negotiation request to main equipment in message of negotiation request
The current configuration parameter of equipment, so that main equipment is according to the configuration parameter of the configuration parameter, main equipment that receive and preset matches
Parameter negotiation rule is set, determines the configuration parameter after negotiating;
First receiving module 1020 is negotiated to carry in response message for receiving the negotiation response message of main equipment transmission
There is the configuration parameter after negotiating;
Synchronization module 1030, for carrying out MAC Address synchronization process according to the configuration parameter after negotiation.
Optionally, configuration parameter includes global maximum MAC number, the maximum MAC number of each aggregation group and each aggregation group
Aging policy.
Optionally, the device further include:
Detection module, for the first MAC Address for the aging type that is locally stored for no flow aging, when reaching the
When the sampling period of one MAC Address, the hit condition information of the first MAC Address is detected, hit condition information indicates present flow rate
In whether include the first MAC Address;
Second sending module carries in first state notification packet for sending first state notification packet to main equipment
There is the hit condition information of the first MAC Address;
Second receiving module, for receiving the first state response message of main equipment transmission, in first state response message
Carry the hit results of the first MAC Address;
First update module, for updating the continuous miss number of the first MAC Address according to hit results;
Removing module, for deleting the first MAC Address when continuous miss number reaches preset threshold.
Optionally, the first update module is specifically used for:
When hit results are miss, the continuous miss number of the first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of the first MAC Address.
Optionally, the device further include:
Third receiving module, for receiving the second state advertisement message of main equipment transmission, in the second state advertisement message
The second MAC Address and more new state information are carried, more new state information is addition state or deletion state;
Second update module is updated the second MAC Address for the more new state information according to the second MAC Address
Processing.
Optionally, the device further include:
Memory module, for when receiving the MAC Address that main equipment synchronizes, MAC Address to be stored to preset interim
In mac address table;
Module is issued, for when detecting the flow comprising the 4th MAC Address in temporary MAC address table, by the 4th
MAC Address is issued in driving.
A kind of device of synchronous MAC Address provided by the embodiments of the present application, main equipment receive the negotiation that standby equipment is sent and ask
Seek message.Wherein, the standby current configuration parameter of equipment is carried in message of negotiation request.Then, main equipment is according to receiving
Configuration parameter, local configuration parameter and preset configuration parameter negotiation rules, determine the configuration parameter after negotiating.Later, main
Configuration parameter after equipment storage negotiation, and sent to standby equipment and negotiate response message.Wherein, negotiate to carry in response message
Configuration parameter after negotiation, so that main equipment and standby equipment carry out MAC Address synchronization process according to the configuration parameter after negotiation.This
Sample, main equipment can guarantee the consistent of configuration information with standby equipment, improve the success rate of synchronous MAC Address.
The embodiment of the present application also provides a kind of network equipments, as shown in figure 11, including processor 1101, communication interface
1102, memory 1103 and communication bus 1104, wherein processor 1101, communication interface 1102, memory 1103 pass through communication
Bus 1104 completes mutual communication,
Memory 1103, for storing computer program;
Processor 1101 when for executing the program stored on memory 1103, realizes that above-mentioned main equipment executes same
The method for walking MAC Address, alternatively, the method for realizing the synchronization MAC Address that above-mentioned standby equipment executes.
The communication bus that the above-mentioned network equipment is mentioned can be Peripheral Component Interconnect standard (English: Peripheral
Component Interconnect, referred to as: PCI) bus or expanding the industrial standard structure (English: Extended Industry
Standard Architecture, referred to as: EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control
Bus processed etc..Only to be indicated with a thick line in figure convenient for indicating, it is not intended that an only bus or a type of total
Line.
Communication interface is for the communication between the above-mentioned network equipment and other equipment.
Memory may include random access memory (English: Random Access Memory, abbreviation: RAM), can also
To include nonvolatile memory (English: Non-Volatile Memory, abbreviation: NVM), for example, at least a disk storage
Device.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (English: Central Processing
Unit, referred to as: CPU), network processing unit (English: Network Processor, referred to as: NP) etc.;It can also be digital signal
Processor (English: Digital Signal Processing, abbreviation: DSP), specific integrated circuit (English: Application
Specific Integrated Circuit, referred to as: ASIC), field programmable gate array (English: Field-
Programmable Gate Array, referred to as: FPGA) either other programmable logic device, discrete gate or transistor logic
Device, discrete hardware components.
Based on the same technical idea, the embodiment of the present application also provides a kind of computer readable storage medium, the meters
Computer program is stored in calculation machine readable storage medium storing program for executing, the computer program realizes any of the above-described institute when being executed by processor
The method and step for the synchronization MAC Address stated.
Based on the same technical idea, the embodiment of the present application also provides a kind of computer program product comprising instruction,
When run on a computer, so that the method that computer executes any of the above-described synchronization MAC Address.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all
Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application
It is interior.
Claims (15)
1. a kind of method of synchronous MAC Address, which is characterized in that the method is applied in striding equipment link aggregation group M-LAG
Main equipment, the M-LAG further includes standby equipment, which comprises
It receives the message of negotiation request that the standby equipment is sent, the standby equipment is carried in the message of negotiation request currently
Configuration parameter;
According to the configuration parameter received, local configuration parameter and preset configuration parameter negotiation rules, determine after negotiating
Configuration parameter;
Configuration parameter after storing the negotiation, and sent to the standby equipment and negotiate response message, the negotiation response message
In carry the configuration parameter after the negotiation so that the main equipment and the standby equipment are joined according to the configuration after the negotiation
Number carries out MAC address synchronization process.
2. the method according to claim 1, wherein the configuration parameter includes global maximum MAC number, each polymerization
The maximum MAC number of group and the aging policy of each aggregation group;
The configuration parameter and preset configuration parameter negotiation rules of configuration parameter, local that the basis receives, determine and negotiate
Configuration parameter afterwards, comprising:
Determine the first minimum value in the maximum MAC number of the overall situation received and the maximum MAC number of the local overall situation, most by described first
Small value is as the maximum MAC number of the overall situation after negotiating;
For each aggregation group, the maximum MAC number of the aggregation group received and the maximum of the local preset aggregation group are determined
The second minimum value in MAC number, using second minimum value as the maximum MAC number after the negotiation of the aggregation group;
For each aggregation group, by the aging policy of the aggregation group stored in this equipment, as the aging policy after negotiation.
3. the method according to claim 1, wherein the method also includes:
It is the first MAC Address of no flow aging for the aging type being locally stored, when reaching adopting for first MAC Address
When the sample period, the hit condition information of first MAC Address is detected, and receives the first state notice that the standby equipment is sent
Message carries the hit condition for first MAC Address that the standby equipment detects in the first state notification packet
Whether information, the hit condition information indicate in present flow rate to include first MAC Address;
According to the hit condition information detected and the hit condition information received, the hit of first MAC Address is determined
As a result;
Send the first state response message for carrying the hit results of first MAC Address to the standby equipment, and according to
The hit results update the continuous miss number of first MAC Address;
When the continuous miss number reaches preset threshold, first MAC Address is deleted.
4. according to the method described in claim 3, it is characterized in that, the hit condition information that detects of the basis and receiving
Hit condition information, determine the hit results of first MAC Address, comprising:
If in the hit condition information detected and the hit condition information received, there is no indicate to include in present flow rate
The hit condition information of first MAC Address, it is determined that hit results are miss;
If in the hit condition information detected and the hit condition information received, existing is indicated in present flow rate comprising institute
State the hit condition information of the first MAC Address, it is determined that hit results are hit.
5. according to the method described in claim 4, it is characterized in that, described update the first MAC according to the hit results
The continuous miss number of address, comprising:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
6. the method according to claim 1, wherein the method also includes:
The more new command of the second MAC Address of user's input is received, the more new command includes that the more new state of MAC Address is believed
Breath, the more new state information are addition state or deletion state;
Processing is updated to second MAC Address according to the more new command, and sends the second state to the standby equipment
Notification packet carries second MAC Address and more new state information in the second state advertisement message.
7. the method according to claim 1, wherein the method also includes:
When receiving the MAC Address that the standby equipment synchronizes, by MAC Address storage to preset temporary MAC address table
In;
It, will be under the third MAC Address when detecting the flow comprising the third MAC Address in the temporary MAC address table
It is sent in driving.
8. a kind of method of synchronous MAC Address, which is characterized in that the method is applied in striding equipment link aggregation group M-LAG
Standby equipment, the M-LAG further includes main equipment, which comprises
Message of negotiation request is sent to the main equipment, carries the current configuration of the standby equipment in the message of negotiation request
Parameter, so that configuration parameter and preset configuration parameter of the main equipment according to the configuration parameter, the main equipment received
Negotiation rules determine the configuration parameter after negotiating;
The negotiation response message that main equipment is sent is received, it is described to negotiate to carry the configuration ginseng after the negotiation in response message
Number;
MAC address synchronization process is carried out according to the configuration parameter after the negotiation.
9. according to the method described in claim 8, it is characterized in that, the configuration parameter includes global maximum MAC number, each polymerization
The maximum MAC number of group and the aging policy of each aggregation group.
10. according to the method described in claim 9, it is characterized in that, the method also includes:
It is the first MAC Address of no flow aging for the aging type being locally stored, when reaching adopting for first MAC Address
When the sample period, detect the hit condition information of first MAC Address, the hit condition information indicate in present flow rate whether
Include first MAC Address;
First state notification packet is sent to the main equipment, carries the first MAC in the first state notification packet
The hit condition information of address;
The first state response message that the main equipment is sent is received, carries described first in the first state response message
The hit results of MAC Address;
The continuous miss number of first MAC Address is updated according to the hit results;
When the continuous miss number reaches preset threshold, first MAC Address is deleted.
11. according to the method described in claim 10, it is characterized in that, described update described first according to the hit results
The continuous miss number of MAC Address, comprising:
When hit results are miss, the continuous miss number of first MAC Address is added 1;
When hit results are hit, by the continuous miss number zero setting of first MAC Address.
12. according to the method described in claim 8, it is characterized in that, the method also includes:
The second state advertisement message that the main equipment is sent is received, carries the 2nd MAC in the second state advertisement message
Address and more new state information, the more new state information are addition state or deletion state;
According to the more new state information of second MAC Address, processing is updated to second MAC Address.
13. according to the method described in claim 8, it is characterized in that, the method also includes:
When receiving the MAC Address that the main equipment synchronizes, by MAC Address storage to preset temporary MAC address table
In;
It, will be under the 4th MAC Address when detecting the flow comprising the 4th MAC Address in the temporary MAC address table
It is sent in driving.
14. a kind of network equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing
Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any institute of claim 1-7 or claim 8-13
The method and step stated.
15. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-7 or claim 8-13 any method when the computer program is executed by processor
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910221668.1A CN109842694B (en) | 2019-03-22 | 2019-03-22 | Method for synchronizing MAC addresses, network equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910221668.1A CN109842694B (en) | 2019-03-22 | 2019-03-22 | Method for synchronizing MAC addresses, network equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109842694A true CN109842694A (en) | 2019-06-04 |
CN109842694B CN109842694B (en) | 2022-02-25 |
Family
ID=66886188
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910221668.1A Active CN109842694B (en) | 2019-03-22 | 2019-03-22 | Method for synchronizing MAC addresses, network equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109842694B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111355823A (en) * | 2020-02-17 | 2020-06-30 | 杭州迪普科技股份有限公司 | Aging processing method and device for MAC address table entry |
CN111682927A (en) * | 2020-04-27 | 2020-09-18 | 浪潮思科网络科技有限公司 | Message synchronization method, device, equipment and medium based on MLAG environment |
CN112929193A (en) * | 2019-12-06 | 2021-06-08 | 华为技术有限公司 | Method and apparatus for configuring aging time of medium access control address |
CN114390023A (en) * | 2021-12-27 | 2022-04-22 | 锐捷网络股份有限公司 | Dynamic address non-aging method and device, electronic equipment and storage medium |
CN114500007A (en) * | 2022-01-07 | 2022-05-13 | 成都市联洲国际技术有限公司 | Implementation method, device, storage medium and terminal equipment of MACsec in M-LAG system |
CN115174468A (en) * | 2022-07-06 | 2022-10-11 | 中国联合网络通信集团有限公司 | Route synchronization method, cross-device link aggregation group, electronic device and medium |
WO2023011317A1 (en) * | 2021-08-02 | 2023-02-09 | 中兴通讯股份有限公司 | Address synchronization method, switches, cross-device link aggregation system, and storage medium |
CN116545914A (en) * | 2023-04-21 | 2023-08-04 | 南京金阵微电子技术有限公司 | Method and system for synchronizing switch chip logic stacking two-layer table items and switch |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120033541A1 (en) * | 2010-08-04 | 2012-02-09 | Alcatel-Lucent Usa Inc. | System and method for transport control protocol in a multi-chassis domain |
CN102388581A (en) * | 2011-06-29 | 2012-03-21 | 华为技术有限公司 | Method, device and system of reference link negotiation |
CN103401782A (en) * | 2013-07-24 | 2013-11-20 | 杭州华三通信技术有限公司 | MAC (Media Access Control) address synchronizing method and equipment |
CN109462515A (en) * | 2018-09-11 | 2019-03-12 | 锐捷网络股份有限公司 | Loop circuit processing method, the network equipment, MLAG networking and storage medium |
-
2019
- 2019-03-22 CN CN201910221668.1A patent/CN109842694B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120033541A1 (en) * | 2010-08-04 | 2012-02-09 | Alcatel-Lucent Usa Inc. | System and method for transport control protocol in a multi-chassis domain |
CN102388581A (en) * | 2011-06-29 | 2012-03-21 | 华为技术有限公司 | Method, device and system of reference link negotiation |
CN103401782A (en) * | 2013-07-24 | 2013-11-20 | 杭州华三通信技术有限公司 | MAC (Media Access Control) address synchronizing method and equipment |
CN109462515A (en) * | 2018-09-11 | 2019-03-12 | 锐捷网络股份有限公司 | Loop circuit processing method, the network equipment, MLAG networking and storage medium |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4054149A4 (en) * | 2019-12-06 | 2022-12-21 | Huawei Technologies Co., Ltd. | Method and apparatus for configuring aging time of media access control address |
CN112929193A (en) * | 2019-12-06 | 2021-06-08 | 华为技术有限公司 | Method and apparatus for configuring aging time of medium access control address |
WO2021110150A1 (en) * | 2019-12-06 | 2021-06-10 | 华为技术有限公司 | Method and apparatus for configuring aging time of media access control address |
CN112929193B (en) * | 2019-12-06 | 2023-02-03 | 华为技术有限公司 | Method and apparatus for configuring aging time of medium access control address |
CN111355823B (en) * | 2020-02-17 | 2023-04-07 | 杭州迪普科技股份有限公司 | Aging processing method and device for MAC address table entry |
CN111355823A (en) * | 2020-02-17 | 2020-06-30 | 杭州迪普科技股份有限公司 | Aging processing method and device for MAC address table entry |
CN111682927A (en) * | 2020-04-27 | 2020-09-18 | 浪潮思科网络科技有限公司 | Message synchronization method, device, equipment and medium based on MLAG environment |
WO2023011317A1 (en) * | 2021-08-02 | 2023-02-09 | 中兴通讯股份有限公司 | Address synchronization method, switches, cross-device link aggregation system, and storage medium |
CN114390023A (en) * | 2021-12-27 | 2022-04-22 | 锐捷网络股份有限公司 | Dynamic address non-aging method and device, electronic equipment and storage medium |
CN114500007A (en) * | 2022-01-07 | 2022-05-13 | 成都市联洲国际技术有限公司 | Implementation method, device, storage medium and terminal equipment of MACsec in M-LAG system |
CN114500007B (en) * | 2022-01-07 | 2023-12-22 | 成都市联洲国际技术有限公司 | Method, device, medium and equipment for realizing MACsec in M-LAG system |
CN115174468A (en) * | 2022-07-06 | 2022-10-11 | 中国联合网络通信集团有限公司 | Route synchronization method, cross-device link aggregation group, electronic device and medium |
CN116545914A (en) * | 2023-04-21 | 2023-08-04 | 南京金阵微电子技术有限公司 | Method and system for synchronizing switch chip logic stacking two-layer table items and switch |
CN116545914B (en) * | 2023-04-21 | 2024-03-29 | 南京金阵微电子技术有限公司 | Method and system for synchronizing switch chip logic stacking two-layer table items and switch |
Also Published As
Publication number | Publication date |
---|---|
CN109842694B (en) | 2022-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109842694A (en) | A kind of method, the network equipment and the computer readable storage medium of synchronous MAC Address | |
CN112702383A (en) | Collecting error grouping information for network policy enforcement | |
CN108322351A (en) | Generate method and apparatus, fault determination method and the device of topological diagram | |
EP2696534B1 (en) | Method and device for monitoring quick path interconnect link | |
US9424221B2 (en) | Automated cabling process for a complex environment | |
TW201543243A (en) | Capability monitoring in a service oriented architecture | |
CN108536476A (en) | The computer implemented method and system of the operating frequency of dynamic optimization server system | |
CN109586959A (en) | A kind of method and device of fault detection | |
CN109525587A (en) | A kind of recognition methods of data packet and device | |
CN109254868A (en) | A kind of file test method and device | |
CN109889411A (en) | A kind of method and device of data transmission | |
CN109756401A (en) | A kind of test method, device, electronic equipment and storage medium | |
CN109391526A (en) | A kind of detection method and device of network loop | |
CN106209918A (en) | The method of a kind of internet security management and terminal | |
US10558513B2 (en) | System management apparatus and system management method | |
CN109039959A (en) | A kind of the consistency judgment method and relevant apparatus of SDN network rule | |
JP2016181795A (en) | Network system and network setting method | |
JP5503600B2 (en) | Failure management system and failure management method | |
CN106302519A (en) | The method of a kind of internet security management and terminal | |
CN108768807B (en) | Virtual-real interconnection method and device for cloud platform | |
US20220342742A1 (en) | Graphical management of big data pipelines | |
US20090158300A1 (en) | Network redundancy check application program management method | |
CN109450765A (en) | A kind of collection method and device of topology information | |
CN109067764A (en) | A kind of method and device for establishing equipment list item | |
TW201629758A (en) | Method for live migrating virtual machine |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230619 Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd. Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466 Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd. |