Mac address information synchronous method, equipment and storage medium
Technical field
The present invention relates to fields of communication technology, are situated between more particularly to a kind of mac address information synchronous method, equipment and storage
Matter.
Background technique
The introducing of the expansion and virtualization of data center (including server, storage and network) scale, brings physics and sets
Standby increase, while the exponential increase of virtual facility is brought, so as to cause MAC Address (Media Access Control/
Medium Access Control, physical address) consumption steeply rise.
For the current MAC Address increasingly problem, IEEE (Institute of Electrical and
Electronics Engineers, Institute of Electrical and Electric Engineers) normal structure proposes a kind of the general of local mac address
It reads, i.e., MAC Address is no longer globally unique 48 bit address under some network environments, but a kind of address of localization.
A kind of scheme from statement is provided in the prior art thus, that is, needs to apply the equipment of MAC Address, strategically
It gives and oneself distributes a MAC, then carry out statement notice to network, if not receiving the message of conflict, which can be incited somebody to action
MAC Address of the statement MAC Address as itself.In order to improve statement efficiency, the network equipment meeting of proximal edge is leaned in a network
Setting agency, for judging whether there is MAC Address conflict.If needing to declare notice message continuation without address conflict
It forwards in a network.
But if edge proxies equipment does not detect conflict, then throw away and need to be sent to the whole network and detected, increases so complete
The broadcasting packet of net.Operation in this way, particularly under the scene of the access great amount of terminals such as Internet of Things, is used for for big network
Declare MAC Address broadcasting packet will explosive growth, serious situation will affect the forward efficiency of network.In addition such side
Formula can make the process of application IP addresses also become veryer long, and also bring uncontrollable wind for the safety of terminal
Danger.
Summary of the invention
In order to overcome drawbacks described above, the technical problem to be solved in the present invention is to provide a kind of mac address information synchronous method,
Equipment and storage medium obtain the efficiency of MAC Address to improve equipment.
In order to solve the above technical problems, one of present invention mac address information synchronous method, is used for the first MAC Address
Collision detection device, which comprises
When confirmation Adds User side MAC Address, the user side mac address information is stored in this equipment;And
MAC Address synchronization message is sent to the second MAC Address collision detection device, to update in second MAC Address
The network side mac address information stored in collision detection device.
In order to solve the above technical problems, one of present invention mac address information synchronizer, including memory and processing
Device;The memory is stored with mac address information synchronous computer program;The computer program is executed by the processor
When, to perform the steps of
When confirmation Adds User side MAC Address, the user side mac address information is stored in this equipment;And to MAC
Address conflict detection device sends MAC Address synchronization message, to update the net stored in the MAC Address collision-detection means
Network side mac address information.
In order to solve the above technical problems, one of present invention computer readable storage medium, is stored with mac address information
Synchronous computer program;When the computer program is executed by least one processor, to realize any one as described above
The step of method.
The present invention has the beneficial effect that:
Method, apparatus and storage medium in the present invention, by MAC Address from the agent equipment or clothes in statement scheme
The synchronization that mac address information is carried out between business device realizes the quick of MAC Address to realize the quick collision detection of MAC Address
Distribution, while the flow of broadcasting packet in network is greatly reduced, the efficiency that equipment finally obtains MAC is improved, entirety is improved
The availability and efficiency of scheme.
Detailed description of the invention
Fig. 1 is a kind of flow chart of mac address information synchronous method in the embodiment of the present invention;
Fig. 2 is a kind of optional network diagram using mac address information synchronous method in the embodiment of the present invention;
Fig. 3-1,3-2 are the form schematic diagrams of MAC Address data in MAC Address synchronization message in the embodiment of the present invention;
Fig. 4 is a kind of optional network diagram using mac address information synchronous method in the embodiment of the present invention;
Fig. 5 is a kind of optional network diagram using mac address information synchronous method in the embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of mac address information synchronizing device in the embodiment of the present invention.
Specific embodiment
In order to solve problems in the prior art, the present invention provides a kind of mac address information synchronous method, equipment and storages
Medium, below in conjunction with attached drawing and embodiment, the present invention will be described in further detail.It should be appreciated that described herein
Specific examples are only used to explain the present invention, does not limit the present invention.
Embodiment one
As shown in Figure 1, the embodiment of the present invention provides a kind of mac address information synchronous method, it to be used for the first MAC Address conflict
Detection device, which comprises
S101 stores the user side mac address information in this equipment when confirmation Adds User side MAC Address;
S102, sending MAC Address synchronization message to the second MAC Address collision detection device, (embodiment of the present invention can letter
Claim address synchronization message), to update the network side mac address information stored in the second MAC Address collision detection device.
The embodiment of the present invention by confirm Add User side MAC Address when, store the user side MAC in this equipment
Address information, and MAC Address synchronization message is sent to the second MAC Address collision detection device, to update in the 2nd MAC
The network side mac address information stored in the collision detection device of location;Same principle is receiving the second MAC Address collision detection
When the MAC Address synchronization message of equipment, MAC Address synchronization message updates the network side MAC of this equipment storage based on the received
Location information, thus by MAC Address from carrying out mac address information between the agent equipment or server in statement scheme
It is synchronous, to realize the quick collision detection of MAC Address, realize the quick distribution of MAC Address, while being greatly reduced in network
The flow of broadcasting packet improves the efficiency that equipment finally obtains MAC, improves the availability and efficiency of overall plan.
Further, the method can also include:
When receiving the MAC Address synchronization message of the second MAC Address collision detection device, MAC based on the received
The network side mac address information of address synchronization this equipment of information updating storage.
The prefixes such as " first ", " second " for distinguishing equipment are used in the embodiment of the present invention only for being conducive to this
The explanation of invention itself does not have specific meaning.
MAC Address collision detection device is that MAC Address collision detection agency and/or MAC Address rush in the embodiment of the present invention
Prominent detection service device.
In order to keep description of the invention clearer, with MAC Address collision detection agency's (abbreviation generation in the embodiment of the present invention
Reason or agent equipment) for, briefly explain the existing scheme from statement.Detailed process is as follows:
When equipment will be from statement MAC Address, equipment can send the registration message of MAC Address first, and registration message includes
One is used for the message id of the unique identification message, and the MAC Address block for needing to register.
Equipment saves the corresponding relationship of message id and inbound port after receiving registration message, carries out to the MAC Address of statement
It checks: judging whether the MAC Address conflict with this equipment, if there is conflict, then send conflict failed message;If do not rushed
It is prominent, then forward the registration message or the registration message that terminates.
If being provided with agency for the network equipment, needs to check and declared the MAC Address being registered in this equipment: if
The MAC Address that statement is not preserved in this equipment, then by the message registration of the registration message in this equipment, and and receiving port
Mapping relations are kept, continue to forward the registration message to other ports;If finding the MAC Address for having statement in this equipment,
The equipment needs to return a conflict failed message, and no longer forwards the registration to disappear to the port that the MAC Address with conflict maps
Breath.If this equipment is not provided with agency, the registration message directly is forwarded to other ports.
Conflict failed message includes one and the consistent message id of registration message that receives, and has the MAC Address of conflict
Block.
When equipment receives conflict failed message, then according to message id and there is the MAC Address block content of conflict to reselect MAC
Address block, and change message and retransmit registration message;If do not conflicted, the statement message of MAC Address can be sent.Statement
Message includes a unique message id, and the MAC Address block for needing to declare.
Equipment receives statement message, is stored in the MAC Address in message is according to circumstances declared in this equipment, and according to connecing
The MAC Address statement message and inbound port that receive update the forwarding table of this equipment.
Therefore edge proxies equipment does not detect conflict in the prior art, then throws away and need to be sent to the whole network and detected, in this way
Increase the broadcasting packet of the whole network.Operation in this way is for big network, particularly with the field of the access great amount of terminals such as Internet of Things
Under scape, for declare MAC Address broadcasting packet will explosive growth, serious situation will affect the forward efficiency of network.
In addition such mode can make the process of application IP addresses also become veryer long, and the safety of terminal is also brought not
Controllable risk.
And the embodiment of the present invention carries out collision detection to device mac address to improve the efficiency that equipment obtains MAC Address
Agency carry out data synchronization, allow agency between can shared information so that by proximal edge agency to conflict detect as early as possible simultaneously
Answer is made in time, so that improving equipment finally obtains the efficiency of MAC, and the safety of network can be improved.
On the basis of the above embodiments, it is further proposed that the variant embodiment of above-described embodiment.
Optionally, the user side mac address information and the network side mac address information are stored in initialized data base
In;
In the MAC Address for receiving registration, conflict inspection is carried out to the MAC Address of the registration in the database
It surveys.
Optionally, the method can also include:
When the first MAC Address detection device receives user side MAC Address statement message, if the statement message
In the user side mac address information that stores of user side MAC Address and this equipment and network side mac address information do not conflict, then
Confirm the side MAC Address that Adds User;If conflict, sends MAC Address collision message.
For example, having MAC Address collision detection agency in network settings, i.e., to the MAC Address received in existing statement scheme
The MAC Address registered in registration message carries out judging whether there is conflict, then sends MAC Address conflict if there is conflict and disappears
Breath;If it does not exist, then logon message continuation is forwarded in a network.It will be in statement message after receiving statement message
MAC Address preserves.The broadcasting packet that such case will lead to network is excessive, occupies a large amount of Internet resources.The present invention is real
It applies example and synchronizes the mac address information used got by declaring message between agency, to guarantee more to lean on
The agency of nearly user side can faster response MAC Address registration message.
Data synchronization, information sharing in the embodiment of the present invention between agency include: the direct synchronization between 1. agencies;2.
All agencies pass through and the synchronization between agency is realized in the interaction of server;3. the synchronization between server is (if there is multiple clothes
Business device).
No matter synchronous agency or server are needed, and the system architecture for needing MAC Address synchronous may include: database
(i.e. mac address information local data base) and synchronization module.
Wherein mac address information local data base is used to store by declaring the MAC Address and its that information authentication passes through
The MAC Address that his remote data base synchronizes;Synchronization module runs LAAP (local mac address distributorship agreement), according to local
Database mac address information, which changes, sends synchronization message, updates local data base according to MAC Address in the synchronization message received,
Guarantee that the database at synchronous both ends is consistent.
Network composition, will as shown in Figure 1, each agent equipment receives the statement message of MAC Address in the embodiment of the present invention
The MAC Address is stored in the MAC Address database of this agent equipment.The synchronous process of MAC Address is as follows:
Step 11.S1, S2, S4 declare the MAC that message has got itself by MAC Address registration message and MAC Address
Address, and the agent equipment B1 (the first MAC Address collision detection device) that these MAC Address are all connected by it is stored in
In local mac address database.
When there is these newly-increased user side MAC Address in the local mac address database of B1, then agent equipment B1 is to complete
Network sends MAC Address synchronization message, and the TLV in synchronization message is with being used to carry the user side MAC increased newly on this agent equipment
Location, specific format can there are two types of: a kind of is synchronous one group of MAC Address as shown in figure 3-1, is a continuous MAC Address sky
Between;Another kind is discrete MAC Address block as shown in figure 3-2, and the inside indicates occupied MAC Address and the address
Occupied time point.Same mode, agent equipment B2 (the second MAC Address collision detection device) disappear also by the registration of S3
Breath and statement message save the MAC Address of S3 in local mac address data.For the newly-increased address S3, B2 is sent out toward the whole network
Send MAC Address synchronization message.
Step 12. agent equipment B1 receives the MAC Address synchronization message of B2, the MAC Address that can will be noticed in synchronization message
It saves in the database, as network side MAC Address.Similarly, B2 has received the MAC Address synchronization message of B1, disappears according to synchronizing
MAC Address in breath is stored in local data, as network side MAC Address.
Hereafter step 13. agent equipment B1, B2 receive MAC Address registration message again, can check local mac address number first
According to library, identical MAC Address has been checked whether, if there is the MAC Address of conflict, then send MAC Address collision message and set to source
It is standby;Otherwise agent equipment terminates the MAC Address registration message.
It is optionally, described to send MAC Address synchronization message to the second MAC Address collision detection device, comprising:
Before not learning the MAC Address collision detection device topology to network, synchronizes and disappear to MAC Address described in Web broadcast
Breath;
After learning the MAC Address collision detection device topology to network, to the second MAC Address collision detection device
Unicast mac address synchronization message.
Optionally, the method may include:
The MAC Address synchronization message of periodic receipt the second MAC Address collision detection device broadcast.The embodiment of the present invention can
Effectively to confirm the second MAC Address collision detection device also in network topology.
The embodiment of the present invention also supports the MAC Address synchronization message timing cycle of agent equipment to send, and can be used for finding not
Same agent equipment neighbours.Network topology is as shown in Figure 1, each agent equipment B1, B2 are having found that they, can be complete each other before neighbours
Net broadcast transmission synchronization message, it is ensured that oneself can be found, and MAC Address synchronization message destination address at this time is broadcast address,
Source address is the address of this equipment.
After B1 receives the address synchronization message of B2, this agent equipment of B2 neighbours are arrived in study.For example, sending synchronization message
Reach three predetermined period times, if not receiving the MAC Address synchronization message of new agent equipment again, illustrated topology
Stablize.Agent equipment B1 learns the agent equipment topology to network, so that B2 be set as to the neighbours of oneself, in subsequent transmission
In MAC Address synchronization message, by the address of B2 address as a purpose, realize that unicast is sent, to effectively reduce MAC in network
Address broadcast message amount, so that forwarded efficiency greatly improves.
Optionally, when the first MAC Address collision detection device and the second MAC Address collision detection device pass through
When MAC Address server connects, the method can also include:
MAC Address synchronization message is sent to the MAC Address server, so that the MAC Address server is by the MAC
Address synchronization message sends the second MAC Address collision detection device;
The MAC Address synchronization message of the second MAC Address collision detection device is obtained from the MAC Address server.
It is synchronized for example, scheme involved in the embodiment of the present invention not only contains the MAC Address between agent equipment, but also
The MAC Address further comprised between agent equipment and MAC Address server is synchronous.Wherein the server is to be exclusively used in MAC Address
Distribution and MAC Address collision detection.Network connection as shown in figure 4, wherein agent equipment B1, B2 and a MAC Address service
Device connection.The synchronous detailed process of MAC Address is as follows:
For step 21.B1 by S1, the MAC Address statement message of S2, S4 have got the MAC Address of user side.
Step 22.B1 has newly-increased user side MAC Address, then the MAC Address server S actively connected to it is sent
The synchronization message of MAC Address.
Step 23. server S receives the synchronization message of MAC Address, after getting newly-increased MAC Address, can increase these newly
MAC Address be put into synchronization message, be sent to other agent equipments, such as B2.
Optionally, the received MAC Address synchronization message is carried declares in the second MAC Address collision detection device
MAC Address data;
It is described when receiving the MAC Address synchronization message of the second MAC Address collision detection device, MAC based on the received
The network side mac address information of address synchronization this equipment of information updating storage, comprising:
When receiving the MAC Address synchronization message of the second MAC Address collision detection device, by received MAC
The MAC Address data carried in the synchronization message of location save as in the network side mac address information of this equipment.
Wherein, the format of the MAC Address data is continuous MAC Address space or is discrete MAC Address block.
Optionally, the received MAC Address synchronization message also carries the second MAC Address collision detection device and receives MAC
The first receiving time (such as timestamp information) of address statement message;
The method also includes:
Exist in the user side mac address information for detecting this equipment and conflicts with the received MAC Address synchronization message
MAC Address data when, judge the sequencing of the first receiving time and the second receiving time;It will be received according to judgement result
MAC Address data are saved in network side mac address information;Second receiving time is the first MAC Address conflict inspection
Measurement equipment receives the time of the MAC Address statement message of the conflict.
Specifically, the sequencing of judgement first receiving time and the second receiving time;According to determining result by institute
The MAC Address data stated in received mac address information are saved in network side mac address information, may include:
If second receiving time earlier than or be equal to first receiving time, not network side MAC Address believe
The MAC Address data of the conflict are saved in breath;
If first receiving time earlier than second receiving time, by the MAC Address data of the conflict from
Customer Premises Network mac address information transfer is stored into network side mac address information, and modifies the MAC Address number of the conflict
According to receiving time information.
For example, network diagram is as shown in figure 5, B2 and B1, B4 are connected on the same LAN, S4 is sent at this time MAC
Message is declared due to being broadcasting packet in location, can be received by B1 agency and B2 agency, the MAC Address of S4 can all be used as user side at this time
MAC Address is stored in the local data base of B1 and B2, but since they receive this address time difference, so existing local
The time of database is different.B1, B2 are not aware that there are such conflicts at this time, and the address of S4 is passed through MAC respectively
Address synchronization message is mutually noticed, but B1, B2 save network side MAC Address arrive local data base when, if there is conflict, then can
Check opposite timestamp, the preservation of morning reselection time is in the local database.
Here by taking B2 as an example:
1.B2 have received B1 and sent include S4 MAC Address synchronization message;
2. finding the MAC Address for having preserved S4 above B2 when being stored in local data base;
3. after clashing, B2 checks the time of S4 in the time stamp T 5 and B1 synchronization message of the address S4 in local data base
T3 is stabbed, if T5 is not revised earlier than T3, to local data base;If T5 is later than T3, the corresponding address S4 can be revised as
The relevant information of S4 in synchronization message, such as the address time stamp of S4 in local data base is changed to T3, and using S4 as net
Network side MAC Address.
Optionally, global agent equipment and local agent equipment can be divided into scheme involved in the embodiment of the present invention.
Only global agent equipment will do it the synchronization of MAC Address in the embodiment of the present invention.
Neighbours' discovery is mutually carried out between global agent equipment, after receiving the statement message of MAC Address, statement can be disappeared
MAC Address in breath saves in the local database, and the newly-increased MAC Address is advertised to others entirely by synchronization message
Office agent equipment neighbours, while and terminate the MAC Address statement message, no longer do further diffusion.And Local agent is set
For standby, do not have synchronizing function, will not synchronize, but the Local agent equipment will continue to forward received MAC Address
Message is declared to the whole network.
In order to improve the efficiency that equipment obtains MAC Address in the embodiment of the present invention, collision detection is carried out to device mac address
Agency carry out data synchronization, allow agency between can shared information so that by proximal edge agency to conflict detect as early as possible simultaneously
Answer is made in time, so that improving equipment finally obtains the efficiency of MAC, and the safety of network can be improved.
Wherein, data synchronization, the information sharing between agency include: the direct synchronization between 1. agencies;2. all agencies
Pass through the synchronization between the interaction realization agency of server;3. the synchronization between server (if there is multiple servers)
No matter synchronous agency or server are needed, and the synchronous system architecture of MAC Address may include: database: i.e.
Mac address information local data base;Synchronization module.Wherein mac address information local data base is for storing through statement message
The MAC Address that the MAC Address being verified and other remote data bases synchronize;Synchronization module runs LAAP (local mac
Address assignment protocol), it is changed according to local data base mac address information and sends synchronization message, according in the synchronization message received
MAC Address updates local data base, guarantees that the database at synchronous both ends is consistent.
Meanwhile in order to can be reduced broadcasting packet, LAAP agreement can carry out neighbours' discovery by periodic sync messages, work as hair
After having showed neighbours' topology, the synchronization message that the synchronization message of broadcast becomes unicast is sent, different agencies is sent respectively to and sets
Standby neighbours.
Agent equipment receives MAC Address statement message authentication and accesses to new MAC Address, saves in the local database, hair
Synchronization message is sent, the MAC Address of these new additions is carried in synchronization message;If not increasing MAC Address newly, in synchronization message
MAC Address is sky.
The synchronization module of agent equipment or server receives synchronization message, according to the MAC Address carried in synchronization message
It saves in the local database.
Thus when agent equipment or server receive the MAC Address that statement equipment is sent and declare message, it can be from local
Conflict is detected in database.
Embodiment two
As shown in fig. 6, the embodiment of the present invention provides a kind of mac address information synchronizer, which is characterized in that the equipment
Including memory 60 and processor 62;The memory is stored with mac address information synchronous computer program;The computer journey
When sequence is executed by the processor, to perform the steps of
When confirmation Adds User side MAC Address, the user side mac address information is stored in this equipment;And to MAC
Address conflict detection device sends MAC Address synchronization message, to update the net stored in the MAC Address collision-detection means
Network side mac address information.
The embodiment of the present invention by confirm Add User side MAC Address when, store the user side MAC in this equipment
Address information, and MAC Address synchronization message is sent to the second MAC Address collision detection device, to update in the 2nd MAC
The network side mac address information stored in the collision detection device of location;Based on the same principle, receiving the second MAC Address conflict
When the MAC Address synchronization message of detection device, MAC Address synchronization message updates the network side of this equipment storage based on the received
Mac address information, thus by carrying out MAC Address between the agent equipment or server in statement scheme to MAC Address
The synchronization of information is realized the quick distribution of MAC Address, is greatly reduced simultaneously to realize the quick collision detection of MAC Address
The flow of broadcasting packet in network improves the efficiency that equipment finally obtains MAC, improves the availability and efficiency of overall plan.
It should be noted that in the embodiment of the present invention MAC Address collision-detection means and mac address information synchronize set
It is standby to belong to same physical entity, herein just to being conducive to explanation of the invention.
Optionally, it when the computer program is executed by the processor, also performs the steps of
When receiving the MAC Address synchronization message of the MAC Address collision-detection means, MAC Address based on the received
Synchronization message updates the network side mac address information of this equipment storage.
It is optionally, described to send MAC Address synchronization message to MAC Address collision-detection means, comprising:
Before not learning the MAC Address collision-detection means topology to network, synchronizes and disappear to MAC Address described in Web broadcast
Breath;
After learning the MAC Address collision-detection means topology to network, filled to the MAC Address collision detection of the network
Set unicast mac address synchronization message.
Optionally, it when the computer program is executed by the processor, also performs the steps of
The MAC Address synchronization message of the broadcast of MAC Address collision-detection means described in periodic receipt.
Optionally, the MAC Address collision detection device is that MAC Address collision detection agency and/or MAC Address conflict are examined
Survey server;The MAC Address collision-detection means are MAC Address collision detection agency and/or MAC Address collision detection service
Device.
Optionally, when the MAC Address collision detection device and the MAC Address collision-detection means pass through MAC Address
When server connects, when the computer program is executed by the processor, also perform the steps of
MAC Address synchronization message is sent to the MAC Address server, so that the MAC Address server is by the MAC
Address synchronization message sends the MAC Address collision-detection means;
The MAC Address synchronization message of the MAC Address collision-detection means is obtained from the MAC Address server.
Optionally, it when the computer program is executed by the processor, also performs the steps of
The user side mac address information and the network side mac address information are stored in initialized data base;
In the MAC Address for receiving registration, conflict inspection is carried out to the MAC Address of the registration in the database
It surveys.
Optionally, it when the computer program is executed by the processor, also performs the steps of
When the first MAC Address detection device receives user side MAC Address statement message, if the statement message
In the user side mac address information that stores of user side MAC Address and this equipment and network side mac address information do not conflict, then
Confirm the side MAC Address that Adds User.
Optionally, the MAC Address synchronization message carries the MAC Address declared in the MAC Address collision-detection means
Data;
It is described in the MAC Address synchronization message for receiving MAC Address collision-detection means, MAC Address based on the received
Synchronization message updates the network side mac address information of this equipment storage, comprising:
It is when receiving the MAC Address synchronization message of the MAC Address collision-detection means, received MAC Address is same
The MAC Address data carried in step message are saved in network side mac address information.
Wherein, the format of the MAC Address data is continuous MAC Address space or is discrete MAC Address block.
Optionally, the received MAC Address synchronization message also carries MAC Address collision-detection means and receives MAC Address
Declare the first receiving time of message;
When the computer program is executed by the processor, also perform the steps of
Exist in the user side mac address information for detecting this equipment and is rushed with the received MAC Address synchronization message
When prominent MAC Address data, the sequencing of the first receiving time and the second receiving time is judged;It will be described according to judgement result
MAC Address data are saved in network side mac address information in received mac address information;Second receiving time is institute
State the time that the first MAC Address collision detection device receives the MAC Address statement message of the conflict.
Specifically, the sequencing of judgement first receiving time and the second receiving time;According to determining result by institute
The MAC Address data stated in received mac address information are saved in network side mac address information, comprising:
If second receiving time earlier than or be equal to first receiving time, not network side MAC Address believe
The MAC Address data of the conflict are saved in breath;
If first receiving time earlier than second receiving time, by the MAC Address data of the conflict from
Customer Premises Network mac address information transfer is stored into network side address information, and modifies the time of the MAC Address of the conflict
Information.
Embodiment three
The embodiment of the present invention provides a kind of computer readable storage medium, and the storage medium is stored with mac address information
Synchronous computer program;It is any as described in embodiment one to realize when the computer program is executed by least one processor
The step of one method.
Specifically, to perform the steps of
When confirmation Adds User side MAC Address, the user side mac address information is stored in this equipment;And to MAC
Address conflict detection device sends MAC Address synchronization message, to update the net stored in the MAC Address collision-detection means
Network side mac address information.
The embodiment of the present invention by confirm Add User side MAC Address when, store the user side MAC in this equipment
Address information, and MAC Address synchronization message is sent to the second MAC Address collision detection device, to update in the 2nd MAC
The network side mac address information stored in the collision detection device of location;In the MAC for receiving the second MAC Address collision detection device
When address synchronization message, MAC Address synchronization message updates the network side mac address information of this equipment storage based on the received, from
And by the synchronization to MAC Address from progress mac address information between the agent equipment or server in statement scheme, thus
The quick collision detection for realizing MAC Address, realizes the quick distribution of MAC Address, while broadcasting packet in network is greatly reduced
Flow, improve equipment and finally obtain the efficiency of MAC, improve the availability and efficiency of overall plan.
It should be noted that in the embodiment of the present invention MAC Address collision-detection means and mac address information synchronize set
It is standby to belong to same physical entity, herein just to being conducive to explanation of the invention.
Optionally, the method can also include:
When receiving the MAC Address synchronization message of the MAC Address collision-detection means, MAC Address based on the received
Synchronization message updates the network side mac address information of this equipment storage.
It is optionally, described to send MAC Address synchronization message to MAC Address collision-detection means, comprising:
Before not learning the MAC Address collision-detection means topology to network, synchronizes and disappear to MAC Address described in Web broadcast
Breath;
After learning the MAC Address collision-detection means topology to network, to the MAC Address collision-detection means unicast
MAC Address synchronization message.
Wherein, MAC Address collision-detection means topology of the study to network, comprising:
MAC Address synchronization message based on the broadcast of MAC Address collision-detection means described in periodic receipt carries out neighbours' hair
It is existing, thus MAC Address collision-detection means topology of the study to network.
Optionally, the MAC Address collision detection device is that MAC Address collision detection agency and/or MAC Address conflict are examined
Survey server;The MAC Address collision-detection means are MAC Address collision detection agency and/or MAC Address collision detection service
Device.
Optionally, when the MAC Address collision detection device and the MAC Address collision-detection means pass through MAC Address
When server connects, when the computer program is executed by the processor, also perform the steps of
MAC Address synchronization message is sent to the MAC Address server, so that the MAC Address server is by the MAC
Address synchronization message sends the MAC Address collision-detection means;
The MAC Address synchronization message of the MAC Address collision-detection means is obtained from the MAC Address server.
Optionally, it when the computer program is executed by the processor, also performs the steps of
The user side mac address information and the network side mac address information are stored in initialized data base;
In the MAC Address for receiving registration, conflict inspection is carried out to the MAC Address of the registration in the database
It surveys.
Optionally, it when the computer program is executed by the processor, also performs the steps of
When the first MAC Address detection device receives user side MAC Address statement message, if the statement message
In the user side mac address information that stores of user side MAC Address and this equipment and network side mac address information do not conflict, then
Confirm the side MAC Address that Adds User.
Optionally, the received MAC Address synchronization message carrying is declared in the MAC Address collision-detection means
MAC Address data;
It is described in the MAC Address synchronization message for receiving MAC Address collision-detection means, MAC Address based on the received
Synchronization message updates the network side mac address information of this equipment storage, comprising:
It is when receiving the MAC Address synchronization message of the MAC Address collision-detection means, received MAC Address is same
The MAC Address data carried in step message are saved in network side mac address information.
Wherein, the format of the MAC Address data is continuous MAC Address space or is discrete MAC Address block.
Optionally, the received MAC Address synchronization message also carries MAC Address collision-detection means and receives MAC Address
Declare the first receiving time of message;
When the computer program is executed by the processor, also perform the steps of
Exist in the user side mac address information for detecting this equipment and is rushed with the received MAC Address synchronization message
When prominent MAC Address data, the sequencing of the first receiving time and the second receiving time is judged;It will be described according to judgement result
MAC Address data are saved in network side mac address information in received mac address information;Second receiving time is institute
State the time that the first MAC Address collision detection device receives the MAC Address statement message of the conflict.
Specifically, the sequencing of judgement first receiving time and the second receiving time;According to determining result by institute
The MAC Address data stated in received mac address information are saved in network side mac address information, comprising:
If second receiving time earlier than or be equal to first receiving time, not network side MAC Address believe
The MAC Address data of the conflict are saved in breath;
If first receiving time earlier than second receiving time, by the MAC Address data of the conflict from
Customer Premises Network mac address information transfer is stored into network side address information, and modifies the time of the MAC Address of the conflict
Information.
Computer readable storage medium can be RAM memory, flash memory, ROM memory, EPROM in the embodiment of the present invention
Memory, eeprom memory, register, hard disk, mobile hard disk, CD-ROM or any other form known in the art
Storage medium.A kind of storage medium lotus root can be connected to processor, thus enable a processor to from the read information,
And information can be written to the storage medium;Or the storage medium can be the component part of processor.Processor and storage are situated between
Matter can be located in specific integrated circuit.
Although those skilled in the art can not depart from the present invention generally This application describes particular example of the invention
Variant of the invention is designed on the basis of thought.Those skilled in the art are not taking off under the inspiration that the technology of the present invention is conceived
On the basis of the content of present invention, various improvement can also be made to the present invention, this still falls within the scope and spirit of the invention.