CN1809032A - Method of dynamically learning address on MAC layer - Google Patents

Method of dynamically learning address on MAC layer Download PDF

Info

Publication number
CN1809032A
CN1809032A CNA2006100077418A CN200610007741A CN1809032A CN 1809032 A CN1809032 A CN 1809032A CN A2006100077418 A CNA2006100077418 A CN A2006100077418A CN 200610007741 A CN200610007741 A CN 200610007741A CN 1809032 A CN1809032 A CN 1809032A
Authority
CN
China
Prior art keywords
address
network
mac
switch
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2006100077418A
Other languages
Chinese (zh)
Other versions
CN100407704C (en
Inventor
钟凯
刘刀桂
曹雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou Huawei 3Com Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huawei 3Com Technology Co Ltd filed Critical Hangzhou Huawei 3Com Technology Co Ltd
Priority to CN2006100077418A priority Critical patent/CN100407704C/en
Publication of CN1809032A publication Critical patent/CN1809032A/en
Application granted granted Critical
Publication of CN100407704C publication Critical patent/CN100407704C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

This invention discloses one MAC address dynamic study method, which comprises the following steps: the network device sending free address agreement message to other exchanger; the device receives the address to analyze the address message and generate free address source MAC address relative address list. The invention method can dynamically study the closed terminal MAC address study function for upper three layers exchanger, router or other three layers of exchanger connected user MAC address to realize upper message and special user message normal transferring.

Description

The dynamic study method of media access control layer address
Technical field
The present invention relates to media access control layer (MAC) address resolution technology, specially refer to a kind of dynamic study method of MAC Address.
Background technology
Fig. 1 has shown a kind of typical ring network environment.In looped network as shown in Figure 1, for uplink message, at first send to the Layer 2 switch direct-connected with it by being positioned at undermost commercialization or civilian users uplink message with self, send to three-tier switch on the described looped network by this Layer 2 switch by two layers of forwarding, be routed in the core net by three layers of forwarding by described three-tier switch again; And for downlink message, at first the message that will send to certain user by described three-tier switch sends on the looped network and the direct-connected Layer 2 switch of this purpose user by two layers of forwarding, sends to this purpose user by this Layer 2 switch by two layers of forwarding again.
Because being the target MAC (Media Access Control) address according to message, two layers of forwarding being finished by Layer 2 switch or three-tier switch carry out, therefore, in order to realize described two layers of forwarding, the inside of each Layer 2 switch or three-tier switch all needs to safeguard a mac address table, comprise some MAC Address list items in this mac address table, each MAC Address list item is used to write down a MAC Address and a corresponding relation of transmitting port.Described mac address table has been arranged, each Layer 2 switch or three-tier switch are when carrying out two layers of forwarding on the looped network, just can at first search the mac address table of self maintained according to target MAC (Media Access Control) address to be E-Packeted, after in the MAC Address list item of described mac address table record, finding the forwarding port corresponding with this target MAC (Media Access Control) address, again by this port will be to be transmitted message forward, thereby realize two layers of forwarding of described message.If there is not the MAC Address list item of this target MAC (Media Access Control) address correspondence in the mac address table of self maintained, the message that then described Layer 2 switch or three-tier switch needs will be to be transmitted is broadcasted away, to realize message forwarding.
At present, Layer 2 switch or three-tier switch can be set up described mac address table by the method for static configuration or dynamic learning MAC Address.Wherein, described dynamic learning is meant: when Layer 2 switch or three-tier switch receive a message, if there is not the pairing MAC Address list item of this message source MAC Address in the mac address table of self safeguarding, then described Layer 2 switch or three-tier switch just can be set up user's list item in the mac address table of self maintained, write down described source MAC and receive mapping relations between the port of this message.Like this, if this Layer 2 switch or three-tier switch receive the message that target MAC (Media Access Control) address is described source MAC subsequently, just can be according to MAC Address user's list item of being set up with the message that received by forwarding with this source MAC corresponding port.
But, because Layer 2 switch on the looped network or the three-tier switch MAC Address on can acquiring the user network with this switchboard direct connection, can also acquire user's that other switches connect MAC Address by the port on the looped network, thereby the MAC Address sum that needs study usually will reach more than 20,000, and the capacity of the mac address table of each Layer 2 switch or three-tier switch is limited, in the dynamic learning process of MAC Address, mac address table will soon reach the capacity that sets in advance, cause having a lot of MAC Address not acquired, thus cause on the looped network and with user network that Layer 2 switch links to each other in a large amount of broadcasting packets appears.In theory, this problem can be alleviated by the capacity that increases mac address table, and still, the capacity of mac address table is by the bottom chip decision of the network equipment, so the capacity of mac address table can not increase arbitrarily on the one hand; If the capacity of described mac address table is excessive on the other hand, must cause the MAC Address list item that wherein writes down too much, thereby have a strong impact on the performance of two layers of forwarding, therefore, under the network environment of reality, can not solve problem by the method that increases the mac address table capacity.
Consider common dynamic learning to MAC Address can be divided into two classes, one class is the user's MAC address that directly links to each other with this switch, another kind of then is the user's MAC address of acquiring by the looped network upper port that links to each other with other switches, and the second class MAC Address will be far more than first kind MAC Address.Thereby, adopt the method for the MAC address learning function of closed loop upper port to reduce the MAC Address that switch can be acquired at present usually, thereby address the above problem.
But this method also can cause the performance of system and seriously influence.Make a concrete analysis of as follows: it is professional that the business on the looped network can be divided into the professional and following ring of ring, and the so-called ring business that goes up is meant that the user issues the message of three-tier switch by the Layer 2 switch on the looped network.Because in said method, switch on the looped network has been closed the MAC address learning function of ring upper port, therefore, Layer 2 switch on the looped network will can't be learnt the MAC Address of three-tier switch all the time, thereby cause the Layer 2 switch on the looped network to broadcast processing to all uplink messages, along with increasing of broadcasting packet, the performance of system will be influenced seriously.Can further take the method for static configuration three-tier switch MAC Address to solve this problem, but when looped network switches, do not have corresponding mechanism can dynamically change the outbound port that the Layer 2 switch uplink message is transmitted at present, can't normally carry out thereby cause looped network to switch.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of dynamic study method of MAC Address, switch in the assurance network is after the MAC address learning function of having closed the network upper port, the user's that still can dynamically learn three-tier switch, the router on the looped network or link to each other MAC Address with other Layer 2 switch, thus realize two layers of forwarding.
According to an aspect of the present invention, described MAC Address dynamic study method comprises:
The network equipment in A, the network regularly other network equipment in network sends free ARP message;
B, after described other network equipments receive described gratuitous ARP packet, resolve described gratuitous ARP packet, and the generation MAC Address list item corresponding with source MAC in the described gratuitous ARP.
Described parsing gratuitous ARP packet of step B and the operation that generates described MAC Address list item are finished by upper layer software (applications), mainly comprise:
B1, extract source IP address and purpose IP address in the received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if unanimity then illustrate that received message is a gratuitous ARP packet, execution in step B2 then; Otherwise, finish;
B2, extract institute and receive source MAC in the gratuitous ARP packet, according to source MAC that is extracted and the port that receives described gratuitous ARP packet, generation MAC Address list item writes down the corresponding relation of described source MAC and described port.
Described network is a looped network, and the described network equipment comprises three-layer network appliance and two-layer network device.
The ring upper port that all-network equipment on the looped network is set belongs to administrative vlan VLAN;
Before described step B2, further comprise: whether belong to Management VLAN according to the source port that sends described gratuitous ARP packet and judge that whether the transmitting terminal of this gratuitous ARP packet is the three-layer network appliance in the network, if, execution in step B2 then; Otherwise, finish.
Described method further comprises: static configuration can issue the VLAN of dynamic MAC address list item;
The described generation of the step B MAC Address list item corresponding with source MAC in the described gratuitous ARP comprises: the corresponding VLAN that disposes generate with described gratuitous ARP in the corresponding MAC Address list item of source MAC.
The network equipment in the described network is three-tier switch or the router in the network; Other network equipments in the described network are the Layer 2 switch in the network.
The source IP address of described gratuitous ARP packet and purpose IP address are the virtual interface IP address of this three-tier switch or router, and source MAC is the virtual interface MAC Address of this three-tier switch or router, and target MAC (Media Access Control) address is a broadcast address.
The network equipment in the described network is a Layer 2 switch in the network; Other network equipments in the described network are other Layer 2 switch in the network.
The source IP address of described gratuitous ARP packet and purpose IP address are invalid IP address, and source MAC is a user's directly linking to each other with this Layer 2 switch a MAC Address, and target MAC (Media Access Control) address is a broadcast address.
The described network equipment sends to be determined according to the quantity of the network equipment in the network and the traffic carrying capacity of network the opportunity of gratuitous ARP packet.
According to another aspect of the present invention, the dynamic study method of the media access control layer MAC Address of three-tier switch on the looped network comprises:
Three-tier switch on A, the looped network regularly Layer 2 switch on looped network sends free ARP message, source IP address in this gratuitous ARP packet and purpose IP address are the virtual interface IP address of this three-tier switch, source MAC is the virtual interface MAC Address of this three-tier switch, and target MAC (Media Access Control) address is a broadcast address;
After Layer 2 switch on B, the looped network receives message on the looped network, by source IP address and the purpose IP address in its upper layer software (applications) extraction received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if message consistent then that explanation receives is a gratuitous ARP packet, then execution in step C; Otherwise, finish;
C, extract the source MAC in the gratuitous ARP packet of receiving,, generate the MAC Address list item corresponding with described source MAC according to source MAC that is extracted and the port that receives described gratuitous ARP packet.
Described method further comprises: the port of all switches on network that is provided with in the looped network belongs to administrative vlan VLAN, and static configuration can issue the VLAN of dynamic MAC address list item;
Before step C, further comprise: whether belong to Management VLAN according to the source port that sends described gratuitous ARP packet and judge that whether the transmitting terminal of this gratuitous ARP packet is the three-tier switch in the looped network, if, execution in step C then, otherwise, finish;
The described generation of the step C MAC Address list item corresponding with described source MAC comprises: corresponding all VLAN that dispose generate the MAC Address list item corresponding with described source MAC respectively.
According to a further aspect of the invention, with directly link to each other user's the dynamic study method of media access control layer MAC Address of Layer 2 switch, comprising on the looped network:
Layer 2 switch on A, the looped network regularly other Layer 2 switch on looped network sends free ARP message, wherein, source IP address and purpose IP address are invalid IP address, source MAC is and its user's who directly links to each other MAC Address that target MAC (Media Access Control) address is a broadcast address;
After other Layer 2 switch on B, the looped network receive message on the looped network, by source IP address and the purpose IP address in its upper layer software (applications) extraction received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if it is consistent, illustrate that then the message that receives is a gratuitous ARP packet, then execution in step C; Otherwise, finish;
C, extract institute and receive source MAC in the gratuitous ARP packet, according to source MAC that is extracted and the port that receives described gratuitous ARP packet, generation MAC Address list item.
This shows, even the Layer 2 switch of method of the present invention on network closed after the MAC address learning function of online port, still can utilize gratuitous ARP packet dynamically to learn the three-tier switch, router in the network or the user's that directly links to each other with other Layer 2 switch MAC Address, thereby realize the normal clean culture of message between uplink message and the specific user is transmitted.
In addition, because described gratuitous ARP packet is timed sending, even when looped network switches, the outbound port of uplink message also can obtain real-time update.
Description of drawings
Fig. 1 is a kind of typical ring network environment schematic diagram in the prior art;
Fig. 2 is the dynamic study method flow chart of three-tier switch MAC Address on the embodiment of the invention 1 described looped network;
Fig. 3 is the dynamic study method flow chart of the user's that directly links to each other with other Layer 2 switch on the embodiment of the invention 2 described looped networks MAC Address.
Embodiment
For the purpose, technical scheme and the advantage that make invention is clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
Core concept of the present invention is, utilizes the dynamic learning of the user's MAC address that has the network equipment on free address resolution protocol (GratuitousARP) the message realization network now or link to each other with other Layer 2 switch.The network equipment of the present invention can be the network equipment that three-tier switch or router etc. have routing function.
Gratuitous ARP packet is a kind of special ARP request broadcasting packet, and purpose Internet protocol (IP) address that is wherein comprised is identical with former IP address, and all is the virtual interface IP address that sends the switch of this gratuitous ARP packet.The original idea that sends gratuitous ARP packet is to be used for IP address conflict whether occurring in check after the system start-up in same local area network (LAN), and whether before promptly judging in the local area network (LAN) existing device has been configured identical IP address.And in method of the present invention, use gratuitous ARP packet, thereby realize the network equipment on the network or the dynamic learning of the user's MAC address that links to each other with other Layer 2 switch as carrier.Be example with the looped network below, describe method of the present invention in detail in conjunction with the preferred embodiments of the present invention.
Embodiment 1:
Present embodiment utilizes gratuitous ARP packet to realize the dynamic learning of three-tier switch MAC Address on the looped network.The described method of present embodiment mainly may further comprise the steps as shown in Figure 2:
Three-tier switch on A, the looped network regularly Layer 2 switch on looped network sends gratuitous ARP packet, source IP address in this message and purpose IP address are the virtual interface IP address of this three-tier switch, source MAC is the virtual interface MAC Address of this three-tier switch, and target MAC (Media Access Control) address is a broadcast address.
In this step, can determine according to the quantity of switch in the looped network and the traffic carrying capacity of looped network or the like parameter the opportunity of described three-tier switch transmission gratuitous ARP packet.
After Layer 2 switch on B, the looped network receives described gratuitous ARP packet, resolve described gratuitous ARP packet, and generate and issue and the corresponding MAC Address list item of described three-tier switch virtual interface MAC Address according to analysis result.
In above-mentioned steps B, because the target MAC (Media Access Control) address of described gratuitous ARP packet is a broadcast address, Layer 2 switch on the looped network is after receiving described gratuitous ARP packet, also can further the gratuitous ARP packet that is received be forwarded to the downstream Layer 2 switch on the looped network, thereby all Layer 2 switch on the assurance looped network all can receive the gratuitous ARP packet that described three-tier switch sends, and issue and the corresponding MAC Address list item of described three-tier switch virtual interface MAC Address.
After the Layer 2 switch on the looped network issues the MAC Address list item corresponding with described three-tier switch virtual interface MAC Address, owing to write down the MAC Address and the corresponding forwarding port thereof of described three-tier switch in the mac address table of self safeguarding, just can be after receiving user's uplink message, forwarding port by correspondence has forwarded described uplink message, thereby realizes two layers of forwarding to the user uplink message.
In above-mentioned steps B, owing to receive the MAC address learning function that the Layer 2 switch of described gratuitous ARP packet has been closed the ring upper port on the looped network, this Layer 2 switch is the source MAC that can not directly not acquire this message, therefore, this layer 2-switched bottom layer driving need be submitted to received gratuitous ARP packet self upper layer software (applications) and carries out dissection process.
Described dissection process comprises:
B1, extract source IP address and purpose IP address in the received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if unanimity then illustrate that received message is a gratuitous ARP packet, execution in step B2 then; Otherwise, finish;
B2, extract the source MAC in the gratuitous ARP packet of receiving,, generate a MAC Address list item, write down the corresponding relation of described source MAC and described port according to source MAC that is extracted and the port that receives described gratuitous ARP packet.
For prevent with looped network on the direct-connected user network of Layer 2 switch receive above-mentioned broadcasting gratuitous ARP packet, thereby be that the message that three-tier switch sends is carried out mistake parsing by the Layer 2 switch on the looped network also simultaneously in order to prevent that gratuitous ARP packet that user network sends is mistaken as.At above-mentioned described upper layer software (applications) received packet is carried out also should further comprising before the step B2 of dissection process process:
Whether B11, the transmitting terminal of judging the gratuitous ARP packet received are the network equipments on the looped network, if, performing step B2 then; Otherwise, finish.
Because whether described layer 2-switched upper layer software (applications) can't directly be known the transmitting terminal of the gratuitous ARP packet that is received as the network equipment on the looped network, and only can identify the transmit port of described gratuitous ARP packet transmitting terminal by the mode of dividing Virtual Local Area Network, therefore, the described method of present embodiment needs must being set up of ring upper port of all Layer 2 switch of mandatory provision or three-tier switch to belong to a common VLAN, be called Management VLAN, then can not belong to Management VLAN with the port that user network directly links to each other.
Like this, in above-mentioned steps B11, described upper layer software (applications) just can judge whether its transmit port belongs to Management VLAN according to the entrained VLAN of the gratuitous ARP packet that is received sign (ID), thereby whether the transmitting terminal of judging this gratuitous ARP packet is the network equipment on the looped network.
After described looped network has been divided different VLAN, the MAC Address list item that issues in step B also will comprise the VLAN ID that this MAC Address list item is suitable for.Table 1 has shown an example of the MAC Address list item that issues.
MAC Address VLAN ID State Port index Ageing time
00e0-fc00-1123 1 Dynamic-configuration Ethernet0/1 AGING
Table 1
In example as shown in table 1, this MAC Address list item is a dynamic-configuration, and the MAC Address of three-tier switch virtual interface is 00e0-fc00-1123 on the looped network that is write down; VLAN ID under it is 1, is Management VLAN; The port index of the forwarding port corresponding with this MAC Address is Ethernet0/1.Like this, this Layer 2 switch is after receiving the uplink message that target MAC (Media Access Control) address is 00e0-fc00-1123, if receiving the port of this message, also to belong to VLAN ID be 1 VLAN, then just can directly the message that is received be forwarded by port Ethernet 0/1, and need not to broadcast processing.
Yet because Layer 2 switch can not belong to Management VLAN with the port that user network directly links to each other on the looped network, therefore, the VLAN ID of VLAN can not be Management VLAN ID under these ports, therefore, when carrying out two layers of forwarding, though exist and the corresponding MAC address entries of described three-tier switch virtual interface MAC Address in the mac address table, but because the VLAN ID that writes down in this MAC Address list item is the ID of Management VLAN, therefore, still can not correctly transmit by the uplink message that the user sends, and can only broadcast processing according to the unknown unicast message.
Yet it is impossible all issuing a dynamic MAC address list item for each VLAN, because Layer 2 switch can be divided into several thousand VLAN at most, whenever issue a dynamic MAC address list item and all can spend the relatively long time, it also is unallowed once increasing several thousand MAC Address list items simultaneously in mac address table.The method that present embodiment adopts static configuration can issue the VLAN of dynamic MAC address list item solves this problem.The number that can issue the VLAN of dynamic MAC address list item can be determined just individual empirical value, for example 128 according to the performance of switch.Table 2 has shown 128 MAC Address list items that issue.
MAC Address VLAN ID State Port index Ageing time
00e0-fc00-1123 1 Dynamic-configuration Ethernet0/1 AGING
00e0-fc00-1123 2 Dynamic-configuration Ethernet0/1 AGING
00e0-fc00-1123 3 Dynamic-configuration Ethernet0/1 AGING
…… …… …… …… ……
00e0-fc00-1123 128 Dynamic-configuration Ethernet0/1 AGING
Table 2
In example as shown in table 2, if the target MAC (Media Access Control) address of the uplink message that this Layer 2 switch receives is 00e0-fc00-1123, and receive under the port of this message the ID of VLAN and be 1,2,3 ..., 128, then this Layer 2 switch just can directly forward the uplink message that is received by port Ethernet 0/1, and need not to broadcast processing.
Find out thus, the Layer 2 switch of the described method of present embodiment on looped network closed after the MAC address learning function of ring upper port, still can dynamically learn the MAC Address of the three-tier switch virtual interface on the looped network, thereby realize the uplink message clean culture is transmitted.In addition, because described gratuitous ARP packet is timed sending, even when looped network sends switching, the outbound port of uplink message also can obtain real-time update.
Need to prove, though present embodiment described be the learning method of three-tier switch MAC Address on the looped network, use the MAC address learning that said method also can realize having other network equipment of three layers of routing function, for example router or the like.And the described method of present embodiment also is not limited to the network configuration of ring-type, can also be applied in other network configurations.
Embodiment 2:
Because after Layer 2 switch on the looped network was forbidden looped network upper port MAC address learning function, the normal unicast message that originally is directly connected between the different layer 2-switched users was transmitted the broadcasting forwarding that also will become the unknown unicast message.At this moment, if with user network that certain Layer 2 switch directly links to each other in, there is the user's that other Layer 2 switch directly link to each other on one or more user and the looped network service interaction busy,, will causes that flow increases greatly on the looped network so because the increasing of broadcasting packet.
Present embodiment is exactly a method of utilizing the user's who directly links to each other with other Layer 2 switch on the gratuitous ARP packet dynamic learning looped network MAC Address.The described method of present embodiment mainly may further comprise the steps as shown in Figure 3:
Layer 2 switch on a, the looped network regularly other Layer 2 switch on looped network sends gratuitous ARP packet, source IP address in this message and purpose IP address are invalid IP address, 255.255.255.255 for example, source MAC is the user's that directly links to each other with this Layer 2 switch a MAC Address, and target MAC (Media Access Control) address is a broadcast address.
Described Layer 2 switch sends can be determined according to the quantity of switch in the looped network and the traffic carrying capacity of looped network or the like parameter the opportunity of gratuitous ARP packet.
In this step, user's MAC Address can obtain by static configuration.And it is as follows that the source IP address in the message and purpose IP address all are set to the reason of invalid IP address: if the source IP address in the message and purpose IP address are made as the IP address of switch, because the source MAC in the message is not the MAC Address of switch, will cause, three-tier switch mistake occurs on the looped network when setting up the ARP list item according to the gratuitous ARP packet that is received, thereby causes described three-tier switch can not correctly finish three layers of forwarding.And if adopt for example invalid IP address of 255.255.255.255, such gratuitous ARP packet resolved and generate corresponding M AC address list item after will be dropped, and can not influence other business.
After other Layer 2 switch on b, the looped network receives described gratuitous ARP packet, resolve described gratuitous ARP packet, and issue the MAC Address list item corresponding with this user's MAC address according to analysis result.
In above-mentioned steps b, Layer 2 switch on the looped network is after receiving described gratuitous ARP packet, also can further the gratuitous ARP packet that is received be forwarded to the downstream Layer 2 switch on the looped network, thereby other Layer 2 switch of all on the assurance looped network all can receive described gratuitous ARP packet, and generates the MAC Address list item corresponding with this user's MAC address.
In addition, owing to receive the MAC address learning function that the Layer 2 switch of described gratuitous ARP packet has been closed the ring upper port on the looped network, this Layer 2 switch is the source MAC that can not directly not acquire this message, therefore, this layer 2-switched bottom layer driving needs that also received gratuitous ARP packet is submitted to self upper layer software (applications) and carries out dissection process.
Described dissection process comprises:
B1, extract source IP address and purpose IP address in the received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if unanimity then illustrate that received message is a gratuitous ARP packet, execution in step b2 then; Otherwise, finish;
B2, extract the source MAC in the gratuitous ARP packet of receiving,, generate a MAC Address list item, write down the corresponding relation of described source MAC and described port according to source MAC that is extracted and the port that receives described gratuitous ARP packet.
Like this, after having issued the MAC Address list item corresponding with this user's MAC address, the message that mails to this user can carry out two layers of forwarding of clean culture.If all done above-mentioned configuration with the Layer 2 switch that two users directly link to each other, mutual message all can be realized two layers of forwarding of clean culture between these two users, just is equivalent to set up a special line between these two users.
When described looped network is divided into different VLAN, before above-mentioned steps b2, upper layer software (applications) can also judge further whether the port that sends described gratuitous ARP packet belongs to Management VLAN and judge whether this gratuitous ARP packet is to be sent by the network equipment on the looped network, if then continue execution in step b2; Otherwise, finish.
In this case, similar to Example 1, even comprised the MAC Address list item corresponding in the layer 2-switched mac address table with certain user's MAC Address, be different from the VLANID that the MAC Address list item is write down if receive the ID of the affiliated VLAN of port of described message, then still can't realize two layers of forwarding of clean culture.But because the busier user of service interaction all is configured to belong to same VALN usually, therefore, in the present embodiment, this problem is also not obvious.Equally, if the problems referred to above, also can solve by the method that static configuration can issue the VLAN of dynamic MAC address list item.
Find out thus, the Layer 2 switch of the described method of present embodiment on looped network closed after the MAC address learning function of ring upper port, still can dynamically learn with looped network on the user's that directly links to each other of other Layer 2 switch MAC Address, thereby the clean culture that realizes message between the user is transmitted.
Equally, the described method of present embodiment also is not limited to the network configuration of ring-type, can also be applied in other network configurations.

Claims (13)

1, a kind of dynamic study method of media access control layer MAC Address is characterized in that, described method comprises:
The network equipment in A, the network regularly other network equipment in network sends free ARP message;
After B, described other network equipments receive described gratuitous ARP packet, resolve described gratuitous ARP packet, and the generation MAC Address list item corresponding with source MAC in the described gratuitous ARP.
2, method according to claim 1 is characterized in that, described parsing gratuitous ARP packet of step B and the operation that generates described MAC Address list item are finished by upper layer software (applications), mainly comprise:
B1, extract source IP address and purpose IP address in the received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if unanimity then illustrate that received message is a gratuitous ARP packet, execution in step B2 then; Otherwise, finish;
B2, extract institute and receive source MAC in the gratuitous ARP packet, according to source MAC that is extracted and the port that receives described gratuitous ARP packet, generation MAC Address list item writes down the corresponding relation of described source MAC and described port.
3, method as claimed in claim 2 is characterized in that, described network is a looped network, and the described network equipment comprises three-layer network appliance and two-layer network device.
4, method according to claim 3 is characterized in that, described method further comprises: the ring upper port that the all-network equipment on the looped network is set belongs to administrative vlan VLAN;
Before described step B2, further comprise: whether belong to Management VLAN according to the source port that sends described gratuitous ARP packet and judge that whether the transmitting terminal of this gratuitous ARP packet is the three-layer network appliance in the network, if, execution in step B2 then; Otherwise, finish.
5, method according to claim 4 is characterized in that, described method further comprises: static configuration can issue the VLAN of dynamic MAC address list item;
The described generation of the step B MAC Address list item corresponding with source MAC in the described gratuitous ARP comprises: the corresponding VLAN that disposes generate with described gratuitous ARP in the corresponding MAC Address list item of source MAC.
6, method according to claim 1 is characterized in that, the network equipment in the described network is three-tier switch or the router in the network; Other network equipments in the described network are the Layer 2 switch in the network.
7, method according to claim 6, it is characterized in that, the source IP address of described gratuitous ARP packet and purpose IP address are the virtual interface IP address of described three-tier switch or router, source MAC is the virtual interface MAC Address of described three-tier switch or router, and target MAC (Media Access Control) address is a broadcast address.
8, method according to claim 1 is characterized in that, the network equipment in the described network is a Layer 2 switch in the network; Other network equipments in the described network are other Layer 2 switch in the network.
9, method according to claim 8, it is characterized in that, the source IP address of described gratuitous ARP packet and purpose IP address are invalid IP address, and source MAC is a user's directly linking to each other with described Layer 2 switch a MAC Address, and target MAC (Media Access Control) address is a broadcast address.
10, method according to claim 1 is characterized in that, in steps A, the described network equipment sends to be determined according to the quantity of the network equipment in the network and the traffic carrying capacity of network the opportunity of gratuitous ARP packet.
11, the dynamic study method of the media access control layer MAC Address of three-tier switch on a kind of looped network is characterized in that described method comprises:
Three-tier switch on A, the looped network regularly Layer 2 switch on looped network sends free ARP message, source IP address in this gratuitous ARP packet and purpose IP address are the virtual interface IP address of described three-tier switch, source MAC is the virtual interface MAC Address of described three-tier switch, and target MAC (Media Access Control) address is a broadcast address;
After Layer 2 switch on B, the looped network receives message on the looped network, by source IP address and the purpose IP address in its upper layer software (applications) extraction received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if message consistent then that explanation receives is a gratuitous ARP packet, then execution in step C; Otherwise, finish;
C, extract the source MAC in the gratuitous ARP packet of receiving,, generate the MAC Address list item corresponding with described source MAC according to source MAC that is extracted and the port that receives described gratuitous ARP packet.
12, method according to claim 11, it is characterized in that, described method further comprises: the port of all switches on network that is provided with in the looped network belongs to administrative vlan VLAN, and static configuration can issue the VLAN of dynamic MAC address list item;
Before step C, further comprise: whether belong to Management VLAN according to the source port that sends described gratuitous ARP packet and judge that whether the transmitting terminal of this gratuitous ARP packet is the three-tier switch in the looped network, if, execution in step C then, otherwise, finish;
The described generation of the step C MAC Address list item corresponding with described source MAC comprises: corresponding all VLAN that dispose generate the MAC Address list item corresponding with described source MAC respectively.
13, on a kind of dynamic learning looped network with directly link to each other user's the method for media access control layer MAC Address of Layer 2 switch, it is characterized in that described method comprises:
Layer 2 switch on A, the looped network regularly other Layer 2 switch on looped network sends free ARP message, wherein, source IP address and purpose IP address are invalid IP address, source MAC is and its user's who directly links to each other MAC Address that target MAC (Media Access Control) address is a broadcast address;
After other Layer 2 switch on B, the looped network receive message on the looped network, by source IP address and the purpose IP address in its upper layer software (applications) extraction received packet, judge whether the source IP address that is extracted is consistent with purpose IP address, if it is consistent, illustrate that then the message that receives is a gratuitous ARP packet, then execution in step C; Otherwise, finish;
C, extract institute and receive source MAC in the gratuitous ARP packet, according to source MAC that is extracted and the port that receives described gratuitous ARP packet, generation MAC Address list item.
CN2006100077418A 2006-02-20 2006-02-20 Method of dynamically learning address on MAC layer Active CN100407704C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006100077418A CN100407704C (en) 2006-02-20 2006-02-20 Method of dynamically learning address on MAC layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006100077418A CN100407704C (en) 2006-02-20 2006-02-20 Method of dynamically learning address on MAC layer

Publications (2)

Publication Number Publication Date
CN1809032A true CN1809032A (en) 2006-07-26
CN100407704C CN100407704C (en) 2008-07-30

Family

ID=36840725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006100077418A Active CN100407704C (en) 2006-02-20 2006-02-20 Method of dynamically learning address on MAC layer

Country Status (1)

Country Link
CN (1) CN100407704C (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009086757A1 (en) * 2007-12-27 2009-07-16 Huawei Technologies Co., Ltd. Method and device for controlling message forwarding
WO2009149646A1 (en) * 2008-06-13 2009-12-17 华为技术有限公司 Port switching method, network device and network system
CN1968273B (en) * 2006-10-26 2010-08-18 杭州华三通信技术有限公司 IPv6 service supporting method and its switching device
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102164091A (en) * 2011-05-13 2011-08-24 北京星网锐捷网络技术有限公司 Method for building MAC (Media Access Control) address table and provider edge device
WO2012031487A1 (en) * 2010-09-08 2012-03-15 华为技术有限公司 Method for transmitting addresses correspondence relationship in second-layer protocol using link status routing
CN102572013A (en) * 2012-02-16 2012-07-11 神州数码网络(北京)有限公司 Method and system for realizing proxy address resolution protocol (ARP) based on gratuitous ARP
US8289967B2 (en) 2009-04-30 2012-10-16 Huawei Technologies Co., Ltd. Packet forwarding method, device and system
CN102857415A (en) * 2012-09-13 2013-01-02 华为技术有限公司 Routing bridge and device and method for controlling media access control address study
CN106888279A (en) * 2017-03-24 2017-06-23 联想(北京)有限公司 A kind of method and LAN communication system for setting up communication
CN111371668A (en) * 2020-02-26 2020-07-03 平安科技(深圳)有限公司 Periodic transmission method, device, equipment and storage medium based on gratuitous ARP

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346562A (en) * 1999-02-10 2002-04-24 艾利森电话股份有限公司 Utilization of gratuitous address resolution protocol for mobility support
US7234163B1 (en) * 2002-09-16 2007-06-19 Cisco Technology, Inc. Method and apparatus for preventing spoofing of network addresses

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968273B (en) * 2006-10-26 2010-08-18 杭州华三通信技术有限公司 IPv6 service supporting method and its switching device
WO2009086757A1 (en) * 2007-12-27 2009-07-16 Huawei Technologies Co., Ltd. Method and device for controlling message forwarding
CN101217463B (en) * 2007-12-27 2012-04-18 华为技术有限公司 Method and device for controlling message forwarding
WO2009149646A1 (en) * 2008-06-13 2009-12-17 华为技术有限公司 Port switching method, network device and network system
CN101299718B (en) * 2008-06-13 2011-04-13 华为技术有限公司 Port switching method, network equipment and network system
US8289967B2 (en) 2009-04-30 2012-10-16 Huawei Technologies Co., Ltd. Packet forwarding method, device and system
WO2012031487A1 (en) * 2010-09-08 2012-03-15 华为技术有限公司 Method for transmitting addresses correspondence relationship in second-layer protocol using link status routing
CN102404181A (en) * 2010-09-08 2012-04-04 华为技术有限公司 Address corresponding relationship sending method of layer 2 protocol utilizing link state routing
US9749230B2 (en) 2010-09-08 2017-08-29 Huawei Technologies Co., Ltd. Method of sending address correspondence in a second layer protocol of applying link state routing
CN102404181B (en) * 2010-09-08 2014-10-08 华为技术有限公司 Address corresponding relationship sending method of layer 2 protocol utilizing link state routing
CN102158407B (en) * 2011-03-31 2014-07-30 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102164091A (en) * 2011-05-13 2011-08-24 北京星网锐捷网络技术有限公司 Method for building MAC (Media Access Control) address table and provider edge device
CN102164091B (en) * 2011-05-13 2015-01-21 北京星网锐捷网络技术有限公司 Method for building MAC (Media Access Control) address table and provider edge device
CN102572013B (en) * 2012-02-16 2016-08-17 神州数码网络(北京)有限公司 A kind of method and system realizing proxy ARP based on gratuitous ARP
CN102572013A (en) * 2012-02-16 2012-07-11 神州数码网络(北京)有限公司 Method and system for realizing proxy address resolution protocol (ARP) based on gratuitous ARP
CN102857415A (en) * 2012-09-13 2013-01-02 华为技术有限公司 Routing bridge and device and method for controlling media access control address study
CN102857415B (en) * 2012-09-13 2015-04-22 华为技术有限公司 Routing bridge and device and method for controlling media access control address study
CN106888279A (en) * 2017-03-24 2017-06-23 联想(北京)有限公司 A kind of method and LAN communication system for setting up communication
CN111371668A (en) * 2020-02-26 2020-07-03 平安科技(深圳)有限公司 Periodic transmission method, device, equipment and storage medium based on gratuitous ARP

Also Published As

Publication number Publication date
CN100407704C (en) 2008-07-30

Similar Documents

Publication Publication Date Title
CN1809032A (en) Method of dynamically learning address on MAC layer
CN1946041A (en) VLAN polymerizing method, converging exchanger and system based on ARP detector intercept
CN1866904A (en) Method and apparatus for astringing two layer MAC address
CN1741492A (en) Equiment and method for controlling group transmitting data retransmission
CN1852240A (en) Bridge-connection transmitting method
CN1925452A (en) Data transferring system, method and network transferring apparatus
CN101056267A (en) Layer 2 forwarding method and forwarding device
CN1578252A (en) Architecture for bridged Ethernet residential access networks
CN1946062A (en) Method and system for keep-alive conversation table in NAT device
CN101075962A (en) Method and apparatus for realizing DHCP repeater in two-layer network exchanger
CN1859304A (en) Method for realizing neighbour discovery
CN1176532C (en) Automatic building method for realizing specific operation maintenance channel in 3G base station
CN1482769A (en) Master-standby switching and load sharing system and method based on Ethernet access platform
CN101052022A (en) System and method for virtual special net user to access public net
CN1773949A (en) Switching in method for virtual special network and realizing apparatus
CN1878112A (en) Method for realizing virtual LAN aggregation and aggregation exchanger
CN1691629A (en) Method for implementing layer-2 equipment interconnection in resilient packet ring (RPR) based network
CN1297105C (en) Method for implementing multirole main machine based on virtual local network
CN1777150A (en) Method for realizing user-isolated virtual LAN and its network device
CN101043387A (en) Remote mirror-image realization process, remote monitoring aids and system for realizing remote mirror-image
CN1917521A (en) Method and system for realizing load balancing, and load balancing equipment
CN1725730A (en) Method of multilayer VLAN switching
CN1741499A (en) Virtual circuit exchanging method based on MAC studying
CN1835467A (en) Network appiliance and method of realizing service sharing
CN1852234A (en) Method for transmitting message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address