CN106452874A - Loop ID (Identity) generation method and network system - Google Patents

Loop ID (Identity) generation method and network system Download PDF

Info

Publication number
CN106452874A
CN106452874A CN201610907429.8A CN201610907429A CN106452874A CN 106452874 A CN106452874 A CN 106452874A CN 201610907429 A CN201610907429 A CN 201610907429A CN 106452874 A CN106452874 A CN 106452874A
Authority
CN
China
Prior art keywords
ring
message
network equipment
mac address
network
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
CN201610907429.8A
Other languages
Chinese (zh)
Other versions
CN106452874B (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.)
Kyland Technology Co Ltd
Original Assignee
Kyland 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 Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN201610907429.8A priority Critical patent/CN106452874B/en
Publication of CN106452874A publication Critical patent/CN106452874A/en
Application granted granted Critical
Publication of CN106452874B publication Critical patent/CN106452874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides a loop ID (Identity) generation method and a network system. The loop ID generation method comprises the steps that when the state of a first port which is not in a connected state is changed to the connected state on a first network device of which at least one port is in the connected state, a first network device sends a first loop sensing message of which both source MAC address and destination MAC address are the MAC address of a first network device; each second network device receiving the first loop sensing message sends a second loop sensing message of which source MAC address and destination MAC address are the MAC address of each second network device; and after the first network device receives the first loop sensing message, a first loop ID is calculated according to the MAC address in the first loop sensing message and the MAC addresses in the received second loop sensing messages. According to the loop ID generation method and the network system, the loop ID configuration efficiency is improved, and the loop ID configuration error is reduced.

Description

Ring ID generation method and network system
Technical field
The present invention relates to networking technology area, more particularly to a kind of ring ID generation method and network system.
Background technology
The ring-like network structure of the closure that ring network topology (abbreviation looped network) is made up of multiple network equipments.In order to Improve the reliability of looped network, have multiple looped network redundancy agreements for looped network proposition, such as RPR protocol (Resilient Packet Ring, RPR), annular EPA looped network redundancy technology (DT-RING) etc..Looped network redundancy is assisted When the network equipment or link failure that view enables in looped network, enable an other link and communicated it is ensured that data Message normal transmission.
When setting up looped network, need to identify (Identity, ID) for each network equipments configuration ring in looped network, so that respectively The network equipment carries out the transmission of data message in ring according to ring ID.But at present for the configuration of ring ID, it is only capable of using joining manually The mode put is carried out, and when looped network is larger, allocative efficiency is relatively low, and mistake easily, the normal use of impact looped network.
Content of the invention
The purpose of the embodiment of the present invention is to provide a kind of ring ID generation method and network system, for improving looped network configuration Efficiency, reduces ring ID configuration error.
The present embodiment concrete technical scheme is as follows:
First aspect provides a kind of ring ID generation method, including:
When, on the first network equipment that at least one port is in connection status, being not in the first port of connection status State when being changed into connection status, then described first network equipment sends the first ring detecting message, described first ring detecting message For mac frame message, described first ring detects the source MAC of message and target MAC (Media Access Control) address is described first network equipment MAC Address;
Each receive described first ring detect message second the network equipment send second ring detecting message, described second Ring detecting message is mac frame message, and described second ring detects the source MAC of message and target MAC (Media Access Control) address is described in transmission Second ring detects the MAC Address of second network equipment of message;
Described first network equipment, after receiving described first ring detecting message, is detected in message according to described first ring MAC Address and each second ring of receiving detect MAC Address in message, calculate the first ring ID according to preset algorithm, Described first ring ID be including described first network equipment and receive each second ring detecting message corresponding each second The ID of the looped network of network equipment composition;
Each second network equipment described receive itself transmission second ring detecting message after, according to described first ring MAC Address in detecting message, the second ring itself sending detect MAC Address and other second networks receiving in message The second ring that equipment sends detects the MAC Address in message, calculates described first ring ID according to described preset algorithm.
In the first possible implementation in first aspect, described each receive described first ring and detect the of message After two network equipments send the second ring detecting message, also include:
Each receives the second network equipment startup first timer that described first ring detects message;
Before described first timer time-out, described second network equipment does not retransmit described second ring detecting message.
In the first possible implementation in first aspect, described first network equipment sends the first ring detecting message, Including:
The port being in connection status beyond described first port for the described first network equipment sends described first Ring detects message;
Described each receive described first ring detect message second the network equipment send second ring detecting message, bag Include:
Receive described first ring and detect second network equipment of message at the end receiving described first ring detecting message Mouth sends the second ring detecting message.
In the first possible implementation in first aspect, methods described also includes:
If the first port of described first network equipment and receive described first ring detect message port outside, described First network equipment still has at least one to be in the port of connection status, then be not connected with shape when described first network equipment is in When the second port of state is changed into connection status, described first network equipment in described first port and receives described first ring and detects Observe and predict the port outside literary composition and send the 3rd ring detecting message, described 3rd ring detects source MAC and the target MAC (Media Access Control) address of message It is the MAC Address of described first network equipment;
Each receive described 3rd ring detect message the 3rd the network equipment send Fourth Ring detecting message, the described 4th Ring detecting message is mac frame message, and the source MAC of message is detected at described Fourth Ring and target MAC (Media Access Control) address is described in transmission The MAC Address of the 3rd network equipment of message is detected at Fourth Ring;
Described first network equipment, after receiving described 3rd ring detecting message, is detected in message according to described 3rd ring MAC Address and each Fourth Ring of receiving detect MAC Address in message, calculate the second ring ID according to preset algorithm, Described second ring ID be including described first network equipment and receive each Fourth Ring detecting message corresponding each the 3rd The ID of the looped network of network equipment composition;
Each the 3rd network equipment described receive itself transmission Fourth Ring detecting message after, according to described 3rd ring MAC Address and other the 3rd networks receiving in message are detected in MAC Address in detecting message, the Fourth Ring itself sending The MAC Address in message is detected at the Fourth Ring that equipment sends, and calculates described second ring ID according to described preset algorithm.
In the first possible implementation in first aspect, described first network equipment is detectd receiving described 3rd ring After observing and predicting literary composition, detect the MAC Address in message according to described 3rd ring and detect the MAC in message with each Fourth Ring receiving Address, calculates the second ring ID according to preset algorithm, including:
The MAC Address that each second ring receiving is detected in message by described first network equipment removes, according to residue The MAC Address receiving and itself MAC Address calculate described second ring ID;
Each the 3rd network equipment described receive itself transmission Fourth Ring detecting message after, according to described 3rd ring MAC Address and other the 3rd networks receiving in message are detected in MAC Address in detecting message, the Fourth Ring itself sending The MAC Address in message is detected at the Fourth Ring that equipment sends, and calculates described second ring ID according to described preset algorithm, including:
Each second ring that described first ring receiving is detected message and received by each the 3rd network equipment described MAC Address in detecting message removes, and calculates described second according to the remaining MAC Address receiving and the MAC Address of itself Ring ID.
In the first possible implementation in first aspect, each receives the 3rd net that described 3rd ring detects message After network equipment sends Fourth Ring detecting message, also include:
Each receives the 3rd network equipment startup second timer that described 3rd ring detects message;
Before described second timer time-out, described 3rd network equipment does not retransmit described Fourth Ring detecting message.
Second aspect provides a kind of network system, including:At least two network equipments, described at least two network equipment bags Include first network equipment and at least one second network equipment;
Described first network equipment, for being in the first network equipment of connection status when at least one port, not When being in the state of the first port of connection status and being changed into connection status, then send the first ring detecting message, described first ring is detectd Observing and predicting literary composition is mac frame message, and described first ring detects the source MAC of message and target MAC (Media Access Control) address is described first network The MAC Address of equipment;
Each second network equipment described, for sending the second ring detecting report after receiving described first ring detecting message Literary composition, described second ring detecting message is mac frame message, and the source MAC of described second ring detecting message and target MAC (Media Access Control) address are equal For sending the MAC Address that described second ring detects second network equipment of message;
Described first network equipment, is additionally operable to, after receiving described first ring detecting message, be detectd according to described first ring Observe and predict MAC Address in literary composition and MAC Address that each second ring of receiving is detected in message, calculate the according to preset algorithm One ring ID;Described first ring ID is corresponding with each the second ring detecting message receiving including described first network equipment The ID of the looped network of each second network equipment composition;
Each second network equipment described, is additionally operable to after receiving the described second ring detecting message of itself transmission, root The second ring detect the MAC Address in message according to described first ring, itself sending is detected the MAC Address in message and is received The second ring that other second network equipments send detects the MAC Address in message, calculates described the according to described preset algorithm One ring ID.
In the first possible implementation in second aspect, each second network equipment described, it is additionally operable to sending the Start first timer after two ring detecting messages;Before described first timer time-out, described second network equipment does not retransmit Described second ring detecting message.
In the first possible implementation in second aspect, described network system also includes at least one the 3rd network and sets Standby;
Described first network equipment, if being additionally operable to the first port of described first network equipment and receiving described first ring Outside the port of detecting message, described first network equipment still has the port that at least one is in connection status, then when described When first network equipment is in the second port of not-connected status and is changed into connection status, in described first port with receive described The port that first ring detects message sends the 3rd ring detecting message, and described 3rd ring detects source MAC and purpose MAC of message Address is the MAC Address of described first network equipment;
Each described 3rd network equipment, for sending Fourth Ring detecting report after receiving described 3rd ring detecting message Literary composition, described Fourth Ring detecting message is mac frame message, and the source MAC of described Fourth Ring detecting message and target MAC (Media Access Control) address are equal For sending the MAC Address that the 3rd network equipment of message is detected at described Fourth Ring;
Described first network equipment, is additionally operable to, after receiving described 3rd ring detecting message, be detectd according to described 3rd ring Observe and predict MAC Address in literary composition and MAC Address that each Fourth Ring of receiving is detected in message, calculate the according to preset algorithm Two ring ID, described second ring ID are corresponding each with each Fourth Ring detecting message receiving including described first network equipment The ID of the looped network of individual 3rd network equipment composition;
Each described 3rd network equipment, is additionally operable to after receiving the Fourth Ring detecting message of itself transmission, according to institute State the 3rd ring detect message in MAC Address, itself send Fourth Ring detect message in MAC Address and receive other The MAC Address in message is detected at the Fourth Ring that 3rd network equipment sends, and calculates described second ring according to described preset algorithm ID.
In the first possible implementation in second aspect, described first network equipment, specifically for receiving The MAC Address that each second ring is detected in message removes, according to the remaining MAC Address receiving and the MAC Address meter of itself Calculate described second ring ID;
Each described 3rd network equipment, each with receive specifically for described first ring receiving is detected message The MAC Address that individual second ring is detected in message removes, and is calculated according to the remaining MAC Address receiving and the MAC Address of itself Described second ring ID.
Ring ID generation method provided in an embodiment of the present invention and network system, when at least one port is in connection status First network equipment on, when being not in the state of the first port of connection status and being changed into connection status, send based on mac frame First ring detecting message, the first ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC ground of first network equipment Location, each receives, and the first ring detects the second network equipment transmission source MAC of message and target MAC (Media Access Control) address is itself Second ring of MAC Address detects message so that each network equipment in network all knows the MAC Address of other network equipments, when After first network equipment receives the first ring detecting message of itself transmission, or second network equipment receives itself transmission After second ring detecting message, all can perceive network cyclization, and the MAC Address according to all-network equipment in looped network calculates respectively Ring ID, it is achieved that automatically generating of looped network middle ring ID, improves the efficiency of ring ID configuration, is not likely to produce mistake simultaneously.Certainly, real Apply arbitrary product of the present invention or method must be not necessarily required to reach all the above advantage simultaneously.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, acceptable Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of ring ID generation method embodiment one provided in an embodiment of the present invention;
Fig. 2 is the flow chart of ring ID generation method embodiment two provided in an embodiment of the present invention;
Fig. 3 A to Fig. 3 C is a kind of application schematic diagram of ring ID generation method provided in an embodiment of the present invention;
Fig. 4 A to Fig. 4 C is another kind of application schematic diagram of ring ID generation method provided in an embodiment of the present invention;
Fig. 5 A to Fig. 5 C is another application schematic diagram of ring ID generation method provided in an embodiment of the present invention;
Fig. 6 is the structural representation of network system embodiment one provided in an embodiment of the present invention;
Fig. 7 is the structural representation of network system embodiment two provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
Multiple network equipments in network can be after the ring structure being connected as a closure, by configuring identical ring ID One looped network of composition, there may be multiple looped networks, one of network equipment may reside in multiple looped networks in network.Due to It is only capable of at present by manually being configured in web page or by Command Line Interface (Command-Line Interface, CLI) Method be looped network in each network equipments configuration ring ID, less efficient and error-prone.Therefore the embodiment of the present invention provides one kind Ring ID generation method and network, realize automatically generating of ring ID, very high and not using the ring ID configuration ring ID efficiency automatically generating Mistake can be produced.
Ring network structure is divided into monocyclic and polycyclic two kinds of situations, wherein monocyclic refers to that each network equipment exists only in a ring In net, polycyclic refer at least one network equipment be located at plural looped network in.The embodiment of the present invention will be respectively directed to monocyclic With polycyclic two kinds of different situations, ring ID generation method provided in an embodiment of the present invention is described in detail.
Fig. 1 is the flow chart of ring ID generation method embodiment one provided in an embodiment of the present invention, as shown in figure 1, this enforcement The ring ID generation method that example provides includes:
Step S101, when on the first network equipment that at least one port is in connection status, is not in connection status The state of first port when being changed into connection status, then first network equipment sends the first ring detecting message, the first ring detecting report Literary composition be medium access control (Media Access Control, MAC) frame message, first ring detect message source MAC and Target MAC (Media Access Control) address is the MAC Address of first network equipment.
The ring ID generation method that the present embodiment provides is applied in the looped network of single ring architecture, forms in monocyclic looped network at least Including two network equipments.After the network equipment is connected with each other, just can carry out the transmission of message, between the network equipment Connection can be physical connection or wireless connection, in a word, establish and can carry out between the network equipment after connection The physical communication link of data transfer.As long as can carry out between the network equipment being connected MAC layer message send and Receive.
It is attached by different physical communication ports between the network equipment, and the network equipment can detect port It has been in connection status.For any one of network network equipment, it is referred to as first network equipment, if first network equipment It is connected with other network equipments in network by least one port, now first network equipment is not to except The state of the port connecting is detected, detects whether to be in the port of connection status.
If first network equipment is changed into connection status still not at any one port of connection status, this port is referred to as Single port, then first network equipment start to send the first ring detecting message.First ring detecting message is mac frame message, the first ring Detecting message starts back-propagation successively from the port sending, and is in the network equipment of same double layer network with first network equipment The first ring detecting message will be received, the first ring detects the source MAC of message and target MAC (Media Access Control) address is all configured to first network The MAC Address of equipment.The destination address that i.e. the first ring detects message is first network equipment itself.First ring detecting message is one Plant special message, its purpose is exactly the state in order to detect looped network, and realizes the calculating of ring ID.
Step S102, each receives second network equipment transmission the second ring detecting message that the first ring detects message, the Two ring detecting messages are mac frame message, and the second ring detects the source MAC of message and target MAC (Media Access Control) address is transmission the second ring The MAC Address of second network equipment of detecting message.
The network equipment receiving the first ring detecting message is referred to as second network equipment, second network equipment is receiving First ring detecting message after, a special message will be sent, be referred to as second ring detecting message, second ring detecting message with The structure that first ring detects message is identical, is similarly mac frame message.Second ring detects source MAC and the purpose MAC ground of message Location is the MAC Address sending second network equipment that the second ring detects message.First ring detecting message and the second ring detecting report Literary composition is a kind of similar message, wherein need not carry data, simply all configure the source MAC of message and target MAC (Media Access Control) address For sending the MAC Address of the network equipment of this message.The trigger mechanism that first ring detects message is that the network equipment detects Port outside the port of connection status is changed into sending during connection status, and the trigger mechanism that the second ring detects message is to receive it Send during the first ring detecting message that his network equipment sends.In fact, it is that the network equipment cannot be distinguished by the message that receives One ring detecting message or the second ring detecting message, as long as after the network equipment receives mac frame message, find the source of this message MAC Address is identical with target MAC (Media Access Control) address, and just triggering sends the second ring detecting message that is to say, that the network equipment receives other Transmission the second ring detecting message equally can be triggered after the second ring detecting message that the network equipment sends.Report with sending the second ring detecting The network equipment of literary composition the is located at same double layer network network equipment after connecting can receive the second ring detecting message.
Step S103, first network equipment, after receiving the first ring detecting message, is detected in message according to the first ring MAC Address detects the MAC Address in message with each second ring receiving, and calculates the first ring ID according to preset algorithm, the One ring ID is including first network equipment and each second ring detecting message each the second network equipment group corresponding receiving The ID of the looped network becoming.
Often connect a new network equipment in a network, the new network equipment connecting all will set as new first network Standby, all can trigger execution step S101 and step S102.After the network equipment is connected with each other the ring structure becoming a closure, right In any one of network network equipment, all source MAC will be received and target MAC (Media Access Control) address is the MAC of own MAC address Frame message.This is because the ring structure of closure can make the forwarding by multiple network equipments for the mac frame message that the network equipment sends Central link along closure is transmitted to itself.
Still, if first network equipment receives source MAC and target MAC (Media Access Control) address is taking first network equipment as a example The message of the MAC Address of one network equipment, i.e. the first ring detecting message, then first network equipment can perceive network Cyclization.First network equipment can carry out the calculating of ring ID.Because the network equipment of each new access network is when accessing looped network, At least need two ports to be attached from the different network equipments respectively, then the network equipment in looped network is at least carried out Cross the process of step S101, be at least transmitted across a source MAC and target MAC (Media Access Control) address is the MAC of the MAC Address of itself Frame message, then for first network equipment, the mac frame message that in looped network, each network equipment sends will be received.First net Network equipment can calculate the first ring ID according to the MAC Address of the all-network equipment in looped network, that is, according to receive each the The MAC Address of the MAC Address in two rings detecting messages and first network equipment calculates the first ring ID.
First network equipment can use any one algorithm, calculates the first ring ID according to multiple MAC Address.
Step S104, each second network equipment receive itself transmission second ring detecting message after, according to first Ring detects the MAC Address in message, the MAC Address in the second ring detecting message of itself transmission and other second nets receiving The second ring that network equipment sends detects the MAC Address in message, calculates the first ring ID according to preset algorithm.
Group cyclization ID is in the looped network of the first ring ID, except first network equipment, also has multiple other second networks Equipment, when network cyclization, other each second network equipments also will receive the second ring detecting message of itself transmission, simultaneously Second network equipment also will receive the mac frame message that in looped network, each network equipment sends, that is, can obtain in looped network Each network equipment MAC Address.So second network equipment can be according to other network equipments in the message receiving MAC Address and the MAC Address of itself calculate the first ring ID.Second network equipment adopts and first network equipment identical algorithm meter Calculate the first ring ID.Because first network equipment and second network equipment are all the MAC Address according to all-network equipment in looped network Calculate the first ring ID, and employ identical algorithm, the first ring ID that each network equipment therefore in looped network calculates It is identical.
Any one of looped network network equipment all calculates after the first ring ID according to identical method, you can by the ring of itself ID is configured to the first ring ID, so that the network equipment carries out message transmissions in ring according to the first ring ID.First network equipment and each Second network equipment can carry out the calculating of the first ring ID simultaneously, and that is, step S103 and step S104 can be carried out simultaneously.
The ring ID generation method that the present embodiment provides, when at least one port is in the first network equipment of connection status On, when being not in the state of the first port of connection status and being changed into connection status, send the first ring detecting report based on mac frame Literary composition, the first ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC Address of first network equipment, and each receives First ring detects the second network equipment transmission source MAC of message and target MAC (Media Access Control) address is the second ring of own MAC address Detect message so that each network equipment in network all knows the MAC Address of other network equipments, when first network equipment receives To after the first ring detecting message itself sending, or second network equipment receives the second ring detecting message of itself transmission Afterwards, all can perceive network cyclization, and the MAC Address according to all-network equipment in looped network calculates ring ID it is achieved that ring respectively Automatically generating of net middle ring ID, improves the efficiency of ring ID configuration, is not likely to produce mistake simultaneously.
Further, in the embodiment shown in fig. 1, after step S102, that is, when receive that the first ring detects message the After two network equipments send the second ring detecting message, second network equipment can also start first timer.First timer There is a Preset Time, after starting first timer, before the Preset Time time-out of first timer, this receives the first ring Second network equipment of detecting message does not retransmit the second ring detecting message.Namely when second network equipment sends one time second After ring detecting message, do not retransmit the second ring detecting message within a period of time, even if second network equipment receives the again One ring detecting message or the second ring detecting message, as long as first timer has not timed out, second network equipment does not retransmit second yet Ring detects message.When the network equipment quantity that connects in a network is more, second network equipment in addition to the first ring detects message, It is also possible to receive the second ring detecting message of other network equipments transmission.If second network equipment receives the first ring detecting report After the second ring detecting message that literary composition and other network equipments send, all send the second ring detecting message, the in network can be led to Two ring detecting message amount are excessive, thus taking the excessive network bandwidth.Therefore, send the second ring detecting in second network equipment After message, first timer being started, before first timer time-out, not sending the second ring detecting message again, thus saving The about network bandwidth.
It should be noted that the timing of first timer can not arrange long it is impossible to make second network equipment exist Receive newly connect access network the network equipment send first ring detecting message when, still can not send second ring detecting message. In addition, first network equipment is sending it is also possible to start first timer after the first ring detects message, in first timer time-out Front no longer send the message that source MAC and target MAC (Media Access Control) address are own MAC address.
Further, in the embodiment shown in fig. 1, first network equipment specifically can be in being in beyond first port The port of connection status sends the first ring detecting message.The trigger condition that first network equipment sends the first ring detecting message is first First there is the port being in connection status, then detect again and be in the first port of not-connected status and become connection status. First port is the equal of the latter linked port of first network equipment.So that is, first network equipment detects first After port is changed into connection status, it is not to send the first ring detecting message in the new first port connecting, but connects before The port connecing sends.Because each network equipment eventually forms the ring network structure of a closure, after composition looped network, each network Equipment can detect message by the first ring that the loop configuration of looped network receives the transmission of other network equipments or the second ring is detectd Observe and predict literary composition, therefore, the network equipment, when sending the first ring detecting message, only need to be sent by the port of a connection, The quantity sending message in network so can be reduced.Similarly, receive second network equipment that the first ring detects message Only the second ring detecting message can be sent in the port receiving the first ring detecting message.
Embodiment illustrated in fig. 1 shows in the case of monocyclic, ring ID generation method provided in an embodiment of the present invention.Below again Taking polycyclic situation as a example, ring ID generation method provided in an embodiment of the present invention is illustrated.
Fig. 2 is the flow chart of ring ID generation method embodiment two provided in an embodiment of the present invention, as shown in Fig. 2 this enforcement The ring ID generation method that example provides includes:
Step S201, when on the first network equipment that at least one port is in connection status, is not in connection status The state of first port when being changed into connection status, then first network equipment sends the first ring detecting message, the first ring detecting report Literary composition is mac frame message, and the first ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC ground of first network equipment Location.
Step S202, each receives second network equipment transmission the second ring detecting message that the first ring detects message, the Two ring detecting messages are mac frame message, and the second ring detects the source MAC of message and target MAC (Media Access Control) address is transmission the second ring The MAC Address of second network equipment of detecting message.
Step S203, first network equipment, after receiving the first ring detecting message, is detected in message according to the first ring MAC Address detects the MAC Address in message with each second ring receiving, and calculates the first ring ID according to preset algorithm, the One ring ID is including first network equipment and each second ring detecting message each the second network equipment group corresponding receiving The ID of the looped network becoming.
Step S204, each second network equipment receive itself transmission second ring detecting message after, according to first Ring detects the MAC Address in message, the MAC Address in the second ring detecting message of itself transmission and other second nets receiving The second ring that network equipment sends detects the MAC Address in message, calculates the first ring ID according to preset algorithm.
Step S201 is similar to step S104 with step S101 in embodiment illustrated in fig. 1 to step S2044, that is, in net Set up a looped network in network, and generate the process of ring ID.After having established a looped network in network, resettle new looped network When, if there is no the network equipment sharing in new looped network and the looped network of foundation, then newly looped network set up process and ring ID Generation method can be carried out according to embodiment illustrated in fig. 1.If there is at least one altogether in new looped network and the looped network of foundation The network equipment, then continue executing with the follow-up process in the present embodiment.
Step S205, if the first port of first network equipment and receive outside the port that the first ring detects message, the One network equipment still has at least one to be in the port of connection status, then when first network equipment is in the of not-connected status When Two-port netwerk is changed into connection status, first network equipment is sent out with the port receiving outside the first ring detects message in first port Send the 3rd ring detecting message, the 3rd ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC of first network equipment Address.
Still so that the shared network equipment in new looped network with the looped network of foundation is for first network equipment as a example.If the first net Network equipment has been positioned in the looped network that ring ID is the first ring ID, then the first port of first network equipment is sent out with receiving oneself The port of the first ring detecting message sending broadly falls into the port of the looped network that ring ID is the first ring ID.First network equipment is then connected to When in other looped networks, also it is only capable of using other ports.So first network equipment needs except the first of first network equipment Port and receiving outside the port that the first ring detects message, still has at least one to be in the port of connection status, subsequently examines Survey the port that other are in not-connected status, if first network equipment is changed into connecting still not at any one port of connection status State, this port is referred to as second port, then first network equipment starts to send the 3rd ring detecting message.First network equipment is only Can first port and receive first ring detect message port outside port send the 3rd ring detecting message, this be due to First port already belongs in the looped network that ring ID is the first ring ID it is impossible to add new with the port receiving the first ring detecting message Looped network, lead to ring ID to calculate in order to avoid the network equipment in the looped network of foundation receives the 3rd ring detecting message wrong By mistake, therefore the 3rd ring detecting message can not be sent in above-mentioned port.
3rd ring detecting message is mac frame message, and the 3rd ring detects the source MAC of message and target MAC (Media Access Control) address is all joined It is set to the MAC Address of first network equipment.The destination address that i.e. the 3rd ring detects message is first network equipment itself.With first The network equipment the is located at same double layer network network equipment after connecting can receive the 3rd ring detecting message.3rd ring detecting Message is identical with the first ring detecting message, and its purpose is also for the state of detecting looped network, and realizes the calculating of ring ID.
Step S206, each receives the 3rd network equipment transmission Fourth Ring detecting message that the 3rd ring detects message, the Fourth Ring detecting message is mac frame message, and the source MAC of message is detected at Fourth Ring and target MAC (Media Access Control) address is transmission Fourth Ring The MAC Address of the 3rd network equipment of detecting message.
The 3rd network equipment receiving the 3rd ring detecting message will send a special message, is referred to as Fourth Ring Detecting message, the structure that message is detected at Fourth Ring with the 3rd ring detects message is identical, is similarly mac frame message.Fourth Ring is detected The source MAC of message and target MAC (Media Access Control) address are the MAC Address sending the 3rd network equipment that message is detected at Fourth Ring.The Three ring detecting messages are a kind of similar messages with Fourth Ring detecting message, wherein need not carry data, simply by the source of message MAC Address and target MAC (Media Access Control) address are each configured to send the MAC Address of the 3rd network equipment of this message.3rd ring detecting message Trigger mechanism be the network equipment detect first port and receive first ring detect message port outside, connected shape Port outside the port of state is changed into sending during connection status;The trigger mechanism that message is detected at Fourth Ring is to receive other networks Send during the 3rd ring detecting message that equipment sends.In fact, the message that the network equipment cannot be distinguished by receiving is detectd for the 3rd ring Observe and predict literary composition or Fourth Ring detecting message, as long as after the network equipment receives mac frame message, finding the source MAC of this message Identical with target MAC (Media Access Control) address, just triggering sends Fourth Ring detecting message that is to say, that the 3rd network equipment receives other nets Transmission Fourth Ring detecting message equally can be triggered after the Fourth Ring detecting message that network equipment sends.Detect message with sending Fourth Ring The network equipment connect after be located at same double layer network the network equipment can receive Fourth Ring detecting message.
Step S207, first network equipment, after receiving the 3rd ring detecting message, is detected in message according to the 3rd ring MAC Address detects the MAC Address in message with each Fourth Ring receiving, and calculates the second ring ID according to preset algorithm, the Two ring ID are including first network equipment and each Fourth Ring detecting message each the 3rd network equipment group corresponding receiving The ID of the looped network becoming.
Often be connected a new network equipment in a network with first network equipment, the new network equipment connecting all using as New first network equipment, all can trigger execution step S205 and step S206.Become one and close when the network equipment is connected with each other After the ring structure closing, for any one of network network equipment, all will receive source MAC and target MAC (Media Access Control) address will be The mac frame message of own MAC address.This is because the ring structure of closure can make the mac frame message of network equipment transmission by many The central link along closure that forwards of the individual network equipment is transmitted to itself.
Still, if first network equipment receives source MAC and target MAC (Media Access Control) address is taking first network equipment as a example The message of the MAC Address of one network equipment, i.e. the 3rd ring detecting message, then first network equipment can perceive network Cyclization.First network equipment can carry out the calculating of ring ID.Because the network equipment of each new access network is when accessing looped network, At least need two ports to be attached from the different network equipments respectively, then the network equipment in looped network is at least carried out Cross the process of step S205, be at least transmitted across a source MAC and target MAC (Media Access Control) address be own MAC address MAC Frame message, then for first network equipment, the mac frame message that in looped network, each network equipment sends will be received.First net Network equipment can calculate the second ring ID according to the MAC Address of the all-network equipment in looped network, that is, according to receive each the The MAC Address of the MAC Address in Fourth Ring detecting message and first network equipment calculates the second ring ID.
First network equipment can use any one algorithm, calculates the second ring ID according to multiple MAC Address.
Step S208, each the 3rd network equipment receive itself transmission Fourth Ring detecting message after, according to the 3rd Ring detects the MAC Address in message, the MAC Address in the Fourth Ring detecting message of itself transmission and other the 3rd nets receiving The MAC Address in message is detected at the Fourth Ring that network equipment sends, and calculates the second ring ID according to preset algorithm.
Group cyclization ID is in the looped network of the second ring ID, except first network equipment, also has multiple other 3rd networks Equipment, when network cyclization, other each 3rd network equipments also will receive the Fourth Ring detecting message of itself transmission, simultaneously 3rd network equipment also will receive the mac frame message that in looped network, each network equipment sends, that is, can obtain in looped network Each network equipment MAC Address.So the 3rd network equipment can be according to other network equipments in the message receiving MAC Address and the MAC Address of itself calculate the second ring ID.3rd network equipment adopts and first network equipment identical algorithm meter Calculate the second ring ID.Because first network equipment and the 3rd network equipment are all the MAC Address according to all-network equipment in looped network Calculate the second ring ID, and employ identical algorithm, the second ring ID that each network equipment therefore in looped network calculates It is identical.
Any one of looped network network equipment all calculates after the second ring ID according to identical method, you can by the ring of itself ID is configured to the second ring ID, so that the network equipment carries out message transmissions in ring according to the second ring ID.First network equipment and each 3rd network equipment can carry out the calculating of the second ring ID simultaneously, and that is, step S207 and step S208 can be carried out simultaneously.
Further, first network equipment when calculating the second ring ID, detect by each second ring that can also just receive The MAC Address observing and predicting in literary composition removes, and calculates described second ring according to the remaining MAC Address receiving and the MAC Address of itself ID.MAC Address therein, after receiving each ring detecting message, can be stored by first network equipment, is calculating ring ID When, calculated according to all MAC Address of storage.So for first network equipment, that is, it is in the looped network of the first ring ID, It is in the looped network of the second ring ID, then first network equipment, when calculating the second ring ID, needs to get rid of to be not belonging to second again The MAC Address of the network equipment in the looped network of ring ID.Because first network equipment can receive the of other network equipments transmission Two rings detecting messages and Fourth Ring detecting message, and the second ring detecting message receives when generating the first ring ID, therefore the One network equipment can remove the MAC Address that each second ring receiving is detected in message, according to the MAC ground of remaining storage Location and the MAC Address of itself calculate the second ring ID.Similarly, each the 3rd network equipment will can also connect according to said method The first ring receiving is detected message and is removed with the MAC Address in each the second ring detecting message receiving, and is connect according to remaining The MAC Address receiving and the MAC Address of itself calculate described second ring ID.
The ring ID generation method that the present embodiment provides, in polycyclic ring network structure, if first network equipment has been connected to Ring ID is the looped network of the first ring ID, then when first network equipment be located at the first ring ID looped network in port outside, still have to Few one be in the port of connection status when, then when the second port that first network equipment is in not-connected status is changed into connecting During state, port outside the port in the looped network positioned at the first ring ID for the first network equipment sends and is based on mac frame the 3rd ring Detecting message, the 3rd ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC Address of first network equipment, each Receive the 3rd network equipment transmission source MAC of the 3rd ring detecting message and target MAC (Media Access Control) address is own MAC address Message is detected so that each network equipment in network all knows the MAC Address of other network equipments in Fourth Ring, when first network sets After standby the 3rd ring receiving itself transmission detects message, or the 3rd network equipment receives the Fourth Ring detecting of itself transmission After message, all can perceive network cyclization, and the MAC Address according to all-network equipment in looped network calculates the second ring ID respectively, Achieve the automatically generating of looped network middle ring ID of multiring structure, improve the efficiency of ring ID configuration, be not likely to produce mistake simultaneously.
Further, in the embodiment depicted in figure 2, after step S206, that is, when receive that the 3rd ring detects message the After three network equipments send Fourth Ring detecting message, the 3rd network equipment can also start second timer.Second timer There is a Preset Time, after starting second timer, before the Preset Time time-out of second timer, this receives the 3rd ring 3rd network equipment of detecting message does not retransmit Fourth Ring detecting message.Namely when the 3rd network equipment sends one time the 4th After ring detecting message, do not retransmit detecting message in Fourth Ring within a period of time, even if the 3rd network equipment receives the again Three ring detecting messages or Fourth Ring detecting message, as long as second timer has not timed out, the 3rd network equipment does not retransmit the 4th yet Ring detects message.When the network equipment quantity that connects in a network is more, the 3rd network equipment in addition to the 3rd ring detects message, It is also possible to receive the Fourth Ring detecting message of other network equipments transmission.If the 3rd network equipment receives the 3rd ring detecting report After the Fourth Ring detecting message that literary composition and other network equipments send, all send Fourth Ring detecting message, the in network can be led to Fourth Ring detecting message amount is excessive, thus taking the excessive network bandwidth.Therefore, send Fourth Ring detecting in the 3rd network equipment After message, second timer being started, before second timer time-out, not sending Fourth Ring detecting message again, thus saving The about network bandwidth.
It should be noted that can not arrange long of the timing of second timer is it is impossible to make the network equipment receive When the 3rd ring sending to the network equipment newly connecting access network detects message, still can not send Fourth Ring detecting message.In addition, First network equipment is sending it is also possible to start second timer after the 3rd ring detects message, before second timer time-out not Retransmit source MAC and target MAC (Media Access Control) address is the Fourth Ring detecting message of own MAC address.
Further, in the embodiment depicted in figure 2, first network equipment specifically can be in the first end of first network equipment Mouthful and receive first ring detect message port outside, and outside second port be in connection status port send 3rd ring detecting message.First network equipment sends the 3rd ring and detects the trigger condition of message is first port and receiving first The port that first ring detects message has been connected to the looped network of the first ring ID, and first network equipment has other and is in and connects shape The port of state, then detects again and is in the second port of not-connected status and becomes connection status.Second port is the equal of The latter linked port of one network equipment.So that is, first network equipment detects after second port is changed into connection status, It is not to send the 3rd ring detecting message in the new second port connecting, but in the transmission of the port of connection before.Due to Each network equipment eventually forms the ring network structure of a closure, and after composition looped network, each network equipment can pass through looped network Loop configuration receive other network equipments transmission the 3rd ring detecting message or Fourth Ring detecting message, therefore, network sets During standby the 3rd ring detecting message in transmission, only need to be sent by the port of a connection, so can reduce in network Send the quantity of message.Similarly, the 3rd network equipment receiving the 3rd ring detecting message only can also receive the 3rd The port that ring detects message sends Fourth Ring detecting message.
Fig. 1 and embodiment illustrated in fig. 2 are illustrated to ring ID generation method provided in an embodiment of the present invention, below with two Individual specific embodiment is further elaborated to ring ID generation method provided in an embodiment of the present invention.
Fig. 3 A to Fig. 3 C is a kind of application schematic diagram of ring ID generation method provided in an embodiment of the present invention, as Fig. 3 A institute Show, network equipment A has been connected with network equipment B, at this point for network equipment A and network equipment B, only a port is in Connection status, does not therefore trigger transmission the first ring detecting message.
In figure 3b, network equipment B and network equipment C is attached, then for network equipment B, be provided with and newly connect The port connecing, network equipment B will send the first ring detecting message.The port that network equipment B can only formerly connect, that is, with network The port that device A connects sends the first ring detecting message, and the first ring detects the source MAC of message and target MAC (Media Access Control) address is The MAC Address of network equipment B.Network equipment A will receive first ring detecting message, subsequent network equipment A with network equipment B The port connecting sends the second ring detecting message, and the second ring detects the source MAC of message and target MAC (Media Access Control) address is network and sets The MAC Address of standby A.Due to the network equipment port upon connection, also just can be reported through the configuration process of certain time Literary composition transmission, and above-mentioned message transmission procedure is quickly, therefore, the port being connected between network equipment B and network equipment C is in net When pipeline equipment B receives the second ring detecting message of network equipment A transmission, very maximum probability is not complete to configure, therefore, net The second ring detecting message that network equipment A sends also just very will not be transmitted to network equipment C to maximum probability by network equipment B.Certainly, If the port between network equipment B and network equipment C completes to configure, then network equipment B will forward network to network equipment C The second ring detecting message that device A sends, then triggering is equally connected with network equipment B by network equipment C in network equipment C Port sends the second ring detecting message that source MAC and target MAC (Media Access Control) address are the MAC Address of network equipment C.The network equipment A and network equipment B, after sending the first ring detecting message or the second ring detecting message, can start first timer, then Network equipment A and network equipment B after receiving the second ring detecting message of network equipment C transmission, all without retransmiting first Ring detecting message or the second ring detecting message.
In fig. 3 c, network equipment A and network equipment C is attached, then for network equipment A, be provided with and newly connect The port connecing, MAC Address first ring that transmission source MAC and target MAC (Media Access Control) address are network equipment A is detectd by network equipment A Observe and predict literary composition.The port that network equipment A can only formerly connect, the port being connected with network equipment B sends the first ring detecting report Literary composition.For network equipment C, it may have the port of new connection, network equipment C will send source MAC and target MAC (Media Access Control) address is equal MAC Address first ring detecting message for network equipment C.The port that network equipment C can only formerly connect, that is, with the network equipment The port that B connects sends the first ring detecting message.The first ring detecting message that network equipment A sends is transmitted to by network equipment B Network equipment C, and the first ring detecting message that network equipment C is sent is transmitted to network equipment A;Network is set by network equipment A The first ring detecting message that the network equipment C that standby B forwards sends is transmitted to network equipment C, and network equipment B is turned by network equipment C The first ring detecting message that the network equipment A sending out sends is transmitted to network equipment A.Now network equipment A and network equipment C incites somebody to action Receive source MAC and target MAC (Media Access Control) address is the first ring detecting message of own MAC address, sense cyclization.The network equipment The first ring no matter B first receives network equipment A transmission detects the first ring detecting message that message or network equipment C send, all Triggering is sent the second ring detecting message that source MAC and target MAC (Media Access Control) address are the MAC Address of network equipment B, no matter net Network equipment B sends the second ring detecting message from which port, through the forwarding of other network equipments, network equipment B finally all incite somebody to action Receive the second ring detecting message of oneself transmission, thus cyclization also will be sensed.
After the network equipment A, B, C sense cyclization, the network equipment A, B, C also at least received once other networks and set The first ring detecting message that preparation is sent or the second ring detect message, and now network equipment A, B, C can be calculated using identical respectively Method carries out the calculating of ring ID according to the MAC Address of the network equipment A, B, C, thus completing the generation of ring ID.
Fig. 4 A to Fig. 4 C is another kind of application schematic diagram of ring ID generation method provided in an embodiment of the present invention.According to figure After the method for 3A to Fig. 3 C establishes looped network, if this looped network newly adds network equipment D, as shown in Figure 4 A, disconnect network first to set Standby connection between B and network equipment C, now each network equipment will not judge.
In figure 4b, network equipment B and network equipment D is attached, then for network equipment B, be provided with and newly connect The port connecing, network equipment B will send the first ring detecting message.The port that network equipment B can only formerly connect, that is, with network The port that device A connects sends the first ring detecting message, and the first ring detects the source MAC of message and target MAC (Media Access Control) address is The MAC Address of network equipment B.Network equipment A will receive the first ring detecting message, and forward this message to network equipment C, with Network equipment A sends source MAC in the port being connected with network equipment B and target MAC (Media Access Control) address is network equipment A's afterwards Second ring detecting message of MAC Address.The first ring that network equipment C sends in the network equipment B receiving network equipment A forwarding After detecting message, network equipment C sends source MAC in the port being connected with network equipment A and target MAC (Media Access Control) address is network Second ring detecting message of the MAC Address of equipment C, network equipment A equally will send to network equipment B forwarding network appliance C Second ring detecting message.Due to the network equipment port upon connection, also just can to carry out through the configuration process of certain time Message transmissions, and above-mentioned message transmission procedure is quickly, therefore, the port being connected between network equipment B and network equipment D exists The second ring that network equipment B receives network equipment A transmission detects the second ring detecting message that message and network equipment C send When, very maximum probability is not complete to configure, and therefore, also just very maximum probability ground will not be by network equipment A transmission for network equipment B Second ring detects message and the second ring detecting message of network equipment C transmission is transmitted to network equipment D.Certainly, if network equipment B Port and network equipment D between has completed to configure, then network equipment B will send to network equipment D forwarding network appliance A Second ring detects the second ring detecting message that message and network equipment C send, then triggering is equally set by network equipment D in network Port transmission source MAC that standby D is connected with network equipment B and target MAC (Media Access Control) address are the of the MAC Address of network equipment D Two ring detecting messages.The network equipment A, B, C, after sending the first ring detecting message or the second ring detecting message, can start the One timer, then the network equipment A, B, C after receiving the second ring detecting message of network equipment D transmission, all without sending out again Send the first ring detecting message or the second ring detecting message.
In figure 4 c, network equipment D and network equipment C is attached, then for network equipment D, be provided with and newly connect The port connecing, MAC Address first ring that transmission source MAC and target MAC (Media Access Control) address are network equipment D is detectd by network equipment D Observe and predict literary composition.The port that network equipment D can only formerly connect, the port being connected with network equipment B sends the first ring detecting report Literary composition.For network equipment C, it may have the port of new connection, network equipment C will send source MAC and target MAC (Media Access Control) address is equal MAC Address first ring detecting message for network equipment C.The port that network equipment C can only formerly connect, that is, with the network equipment The port that A connects sends the first ring detecting message.Subsequently each network equipment can carry out the forwarding that the first ring detects message, and Second ring detects the transmission of message, and its concrete grammar is similar with the description corresponding to Fig. 3 C, and here is omitted.In a word, network Device A, B, C, D will receive source MAC and target MAC (Media Access Control) address is the message of own MAC address, thus sensing into Ring, and carry out the calculating of ring ID respectively according to the MAC Address of the network equipment A, B, C, D using identical algorithm, thus completing ring The generation of ID.
Fig. 5 A to Fig. 5 C is another application schematic diagram of ring ID generation method provided in an embodiment of the present invention.Here show again Go out a kind of ring ID generation method of multiring structure looped network, after looped network is established according to the method for Fig. 3 A to Fig. 3 C, add one Individual new network equipment E, makes the network equipment E, B, C form a new looped network.As shown in Figure 5A, network equipment A, B, C be One looped network of composition, because a port can be only positioned in a looped network, therefore when forming new looped network, needs to set in network Standby it is attached by new port between B and network equipment C.For the network equipment B and C although being connected to new port, but It is because, in addition to the new port connecting, the port of other connections of the network equipment B and C all has been located in existing ring, therefore The network equipment B and C sends the 3rd ring detecting message all without triggering.
In figure 5b, network equipment B and network equipment E is attached, then for network equipment B, be provided with and newly connect The port connecing, network equipment B will send the 3rd ring detecting message.Network equipment B only can formerly connect and be not at existing Port in ring, the port being connected with network equipment C sends the 3rd ring detecting message, and the 3rd ring detects the source MAC ground of message Location and target MAC (Media Access Control) address are the MAC Address of network equipment B.Network equipment C will receive the 3rd ring detecting message, subsequent net Network equipment C sends Fourth Ring detecting message in the port that is connected with network equipment B, Fourth Ring detect message source MAC and Target MAC (Media Access Control) address is the MAC Address of network equipment C.Due to the network equipment port upon connection, also will be through certain time Configuration process just can carry out message transmissions, and above-mentioned message transmission procedure is quickly, and therefore, network equipment B and network set When network equipment B receives the Fourth Ring detecting message of network equipment C transmission, very maximum probability is for the port connecting between standby E Do not complete configuration, therefore, the network equipment B Fourth Ring detecting report that also just very network equipment C will not be sent by maximum probability ground Literary composition is transmitted to network equipment E.Certainly, if the port between network equipment B and network equipment E completes to configure, then network sets Message is detected in the Fourth Ring sending to network equipment E forwarding network appliance C by standby B, then network equipment E equally will trigger in net The port that network equipment E is connected with network equipment B sends source MAC and target MAC (Media Access Control) address is the MAC Address of network equipment E Fourth Ring detecting message.Network equipment B and network equipment C send first ring detecting message or the second ring detecting message after, Second timer can be started, then network equipment B and network equipment C detects at the Fourth Ring receiving network equipment E transmission After observing and predicting literary composition, detect message or the second ring detecting message all without retransmiting the first ring.
In figure 5 c, network equipment E and network equipment C is attached, then for network equipment E, be provided with and newly connect The port connecing, MAC Address the 3rd ring that transmission source MAC and target MAC (Media Access Control) address are network equipment E is detectd by network equipment E Observe and predict literary composition.The port that network equipment E can only formerly connect, the port being connected with network equipment B sends the 3rd ring detecting report Literary composition.For network equipment C, it may have the port of new connection, network equipment C will send source MAC and target MAC (Media Access Control) address is equal MAC Address the 3rd ring detecting message for network equipment C.The port that network equipment C can only formerly connect, that is, with the network equipment The port that B connects sends the 3rd ring detecting message.The 3rd ring detecting message that network equipment E sends is transmitted to by network equipment B Network equipment C, and the 3rd ring detecting message that network equipment C is sent is transmitted to network equipment E;Network is set by network equipment E The 3rd ring detecting message that the network equipment C that standby B forwards sends is transmitted to network equipment C, and network equipment B is turned by network equipment C The 3rd ring detecting message that the network equipment E sending out sends is transmitted to network equipment E.Now network equipment E and network equipment C incites somebody to action Receive source MAC and target MAC (Media Access Control) address is the 3rd ring detecting message of own MAC address, sense cyclization.The network equipment The 3rd ring no matter B first receives network equipment E transmission detects the 3rd ring detecting message that message or network equipment C send, all Triggering is sent the Fourth Ring detecting message that source MAC and target MAC (Media Access Control) address are the MAC Address of network equipment B, no matter net Network equipment B sends Fourth Ring detecting message from which port, through the forwarding of other network equipments, network equipment B finally all incite somebody to action Receive the Fourth Ring detecting message of oneself transmission, thus cyclization also will be sensed.
After the network equipment B, C, E sense cyclization, the network equipment B, C, E also at least received once other networks and set Message is detected at the 3rd ring detecting message that preparation is sent or Fourth Ring, and now network equipment B, C, E can be calculated using identical respectively Method carries out the calculating of ring ID according to the MAC Address of the network equipment B, C, E, thus completing the generation of ring ID.In the meter carrying out ring ID During calculation, due to the ring ID calculating of the looped network that the MAC Address of network equipment A forms already engaged in the network equipment A, B, C, and network Also the MAC Address of network equipment A is preserved, therefore, the network equipment B, C are in the ring ID of the ring calculating new composition in equipment B and C When, the MAC Address of network equipment A can be removed, only carry out the calculating of ring ID using the MAC Address of the network equipment B, C, E, and net Only have the MAC Address of the network equipment B, C, E in network equipment E, directly can carry out ring ID by the MAC Address according to the network equipment B, C, E Calculating.
Fig. 6 is the structural representation of network system embodiment one provided in an embodiment of the present invention, as shown in fig. 6, this enforcement The network system that example provides includes:At least two network equipments, at least two network equipments include first network equipment 61 and extremely Few second network equipment 62.
First network equipment 61, for being in the first network equipment 61 of connection status when at least one port, not When being in the state of the first port of connection status and being changed into connection status, then send the first ring detecting message, the first ring detecting report Literary composition is mac frame message, and the first ring detects the source MAC of message and target MAC (Media Access Control) address is the MAC ground of first network equipment 61 Location.
Each second network equipment 62, for sending the second ring detecting message after receiving the first ring detecting message, the Two ring detecting messages are mac frame message, and the second ring detects the source MAC of message and target MAC (Media Access Control) address is transmission the second ring The MAC Address of second network equipment 62 of detecting message.
First network equipment 61, is additionally operable to, after receiving the first ring detecting message, be detected in message according to the first ring MAC Address detects the MAC Address in message with each second ring receiving, and calculates the first ring ID according to preset algorithm;The One ring ID is to set with each second ring detecting message each second network corresponding receiving including first network equipment 61 The ID of the looped network of standby 62 compositions.
Each second network equipment 62, is additionally operable to after receiving the second ring detecting message of itself transmission, according to first Ring detects the MAC Address in message, the MAC Address in the second ring detecting message of itself transmission and other second nets receiving Network sets the MAC Address in the second ring detecting message that 62 preparations are sent, and calculates the first ring ID according to preset algorithm.
The network system that the present embodiment provides is used for realizing the process of the generation method of ring ID shown in Fig. 1, its realize principle and Technique effect is similar to, and here is omitted.
Further, in the embodiment shown in fig. 6, each second network equipment 62, is additionally operable to sending the second ring detecting Start first timer after message;Before first timer time-out, second network equipment 62 does not retransmit the second ring detecting message.
Fig. 7 is the structural representation of network system embodiment two provided in an embodiment of the present invention, as shown in fig. 7, this enforcement The network system that example provides, on the basis of Fig. 6, also includes at least one the 3rd network equipment 63.
First network equipment 61, if being additionally operable to the first port of first network equipment 61 and receiving the first ring detecting message Port outside, first network equipment 61 still has at least one to be in the port of connection status, then when first network equipment 61 When being in the second port of not-connected status and being changed into connection status, in first port with receive the port that the first ring detects message Send the 3rd ring detecting message, the 3rd ring detects the source MAC of message and target MAC (Media Access Control) address is first network equipment 61 MAC Address;
Each the 3rd network equipment 63, for sending Fourth Ring detecting message after receiving the 3rd ring detecting message, the Fourth Ring detecting message is mac frame message, and the source MAC of message is detected at Fourth Ring and target MAC (Media Access Control) address is transmission Fourth Ring The MAC Address of the 3rd network equipment 63 of detecting message;
First network equipment 61, is additionally operable to, after receiving the 3rd ring detecting message, be detected in message according to the 3rd ring MAC Address detects the MAC Address in message with each Fourth Ring receiving, and calculates the second ring ID according to preset algorithm, the Two ring ID are including first network equipment 61 and each Fourth Ring detecting message each the 3rd network equipment corresponding receiving The ID of the looped network of 63 compositions;
Each the 3rd network equipment 63, is additionally operable to after receiving the Fourth Ring detecting message of itself transmission, according to the 3rd Ring detects the MAC Address in message, the MAC Address in the Fourth Ring detecting message of itself transmission and other the 3rd nets receiving The MAC Address in message is detected at the Fourth Ring that network equipment 63 sends, and calculates the second ring ID according to preset algorithm.
The network system that the present embodiment provides is used for realizing the process of the generation method of ring ID shown in Fig. 2, its realize principle and Technique effect is similar to, and here is omitted.
Further, in the embodiment shown in fig. 7, first network equipment 61, specifically for by receive each second The MAC Address that ring is detected in message removes, and calculates described the according to the remaining MAC Address receiving and the MAC Address of itself Two ring ID;Each the 3rd network equipment 63, specifically for by receive described first ring detect message and receive each The MAC Address that second ring is detected in message removes, and calculates institute according to the remaining MAC Address receiving and the MAC Address of itself State the second ring ID.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation are made a distinction with another entity or operation, and not necessarily require or imply these entities or deposit between operating In any this actual relation or order.And, term " inclusion ", "comprising" or its any other variant are intended to Comprising of nonexcludability, wants so that including a series of process of key elements, method, article or equipment and not only including those Element, but also include other key elements being not expressly set out, or also include for this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element that limited by sentence "including a ..." it is not excluded that Also there is other identical element including in the process of described key element, method, article or equipment.
Each embodiment in this specification is all described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Real especially for system For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, referring to embodiment of the method in place of correlation Part illustrate.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.All Any modification, equivalent substitution and improvement made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention Interior.

Claims (10)

1. a kind of ring ID generation method is it is characterised in that include:
When, on the first network equipment that at least one port is in connection status, being not in the shape of the first port of connection status When state is changed into connection status, then described first network equipment sends the first ring detecting message, and described first ring detecting message is to be situated between Matter access control mac frame message, described first ring detects the source MAC of message and target MAC (Media Access Control) address is described first net The MAC Address of network equipment;
Each receives second network equipment transmission the second ring detecting message that described first ring detects message, and described second ring is detectd Observing and predicting literary composition is mac frame message, and described second ring detects the source MAC of message and target MAC (Media Access Control) address is transmission described second Ring detects the MAC Address of second network equipment of message;
Described first network equipment, after receiving described first ring detecting message, is detected in message according to described first ring MAC Address detects the MAC Address in message with each second ring receiving, and calculates the first ring mark according to preset algorithm ID, described first ring ID be including described first network equipment and each second ring detecting message of receiving corresponding each the The ID of the looped network of two network equipment compositions;
Each second network equipment described, after receiving the second ring detecting message of itself transmission, is detected according to described first ring MAC Address in message, the second ring itself sending detect MAC Address and other second network equipments receiving in message The second ring sending detects the MAC Address in message, calculates described first ring ID according to described preset algorithm.
2. method according to claim 1 it is characterised in that described each receive described first ring and detect the of message After two network equipments send the second ring detecting message, also include:
Each receives the second network equipment startup first timer that described first ring detects message;
Before described first timer time-out, described second network equipment does not retransmit described second ring detecting message.
3. method according to claim 1 and 2 is it is characterised in that described first network equipment sends the first ring detecting report Literary composition, including:
The port being in connection status beyond described first port for the described first network equipment sends described first ring and detects Observe and predict literary composition;
Described each receive described first ring detect message second the network equipment send second ring detecting message, including:
Second network equipment receiving described first ring detecting message is sent out in the port receiving described first ring detecting message Send the second ring detecting message.
4. method according to claim 1 and 2 is it is characterised in that also include:
If the first port of described first network equipment and receive described first ring detect message port outside, described first The network equipment still has at least one to be in the port of connection status, then when described first network equipment is in not-connected status When second port is changed into connection status, described first network equipment in described first port and receives described first ring detecting report Port outside literary composition sends the 3rd ring detecting message, and described 3rd ring detects the source MAC of message and target MAC (Media Access Control) address is The MAC Address of described first network equipment;
Each receives the 3rd network equipment transmission Fourth Ring detecting message that described 3rd ring detects message, and described Fourth Ring is detectd Observing and predicting literary composition is mac frame message, and the source MAC of message is detected at described Fourth Ring and target MAC (Media Access Control) address is transmission the described 4th Ring detects the MAC Address of the 3rd network equipment of message;
Described first network equipment, after receiving described 3rd ring detecting message, is detected in message according to described 3rd ring MAC Address detects the MAC Address in message with each Fourth Ring receiving, and calculates the second ring ID, institute according to preset algorithm Stating the second ring ID is including described first network equipment and each Fourth Ring detecting message each the 3rd net corresponding receiving The ID of the looped network of network equipment composition;
Each the 3rd network equipment described, after receiving the Fourth Ring detecting message of itself transmission, is detected according to described 3rd ring MAC Address and other the 3rd network equipments receiving in message are detected in MAC Address in message, the Fourth Ring itself sending The MAC Address in message is detected at the Fourth Ring sending, and calculates described second ring ID according to described preset algorithm.
5. method according to claim 4 is it is characterised in that described first network equipment is detectd receiving described 3rd ring After observing and predicting literary composition, detect the MAC Address in message according to described 3rd ring and detect the MAC in message with each Fourth Ring receiving Address, calculates the second ring ID according to preset algorithm, including:
The MAC Address that each second ring receiving is detected in message by described first network equipment removes, and is connect according to remaining The MAC Address receiving and the MAC Address of itself calculate described second ring ID;
Each the 3rd network equipment described, after receiving the Fourth Ring detecting message of itself transmission, is detected according to described 3rd ring MAC Address and other the 3rd network equipments receiving in message are detected in MAC Address in message, the Fourth Ring itself sending The MAC Address in message is detected at the Fourth Ring sending, and calculates described second ring ID according to described preset algorithm, including:
Described first ring receiving is detected message and each the second ring detecting receiving by each the 3rd network equipment described MAC Address in message removes, and calculates described second ring ID according to the remaining MAC Address receiving and the MAC Address of itself.
6. the method according to claim 4 or 5 detects the of message it is characterised in that each receives described 3rd ring After three network equipments send Fourth Ring detecting message, also include:
Each receives the 3rd network equipment startup second timer that described 3rd ring detects message;
Before described second timer time-out, described 3rd network equipment does not retransmit described Fourth Ring detecting message.
7. a kind of network system is it is characterised in that include:At least two network equipments, described at least two network equipments include First network equipment and at least one second network equipment;
Described first network equipment, for being in the first network equipment of connection status when at least one port, is not in When the state of the first port of connection status is changed into connection status, then send the first ring detecting message, described first ring detecting report Literary composition is medium access control mac frame message, described first ring detects the source MAC of message and target MAC (Media Access Control) address be described The MAC Address of first network equipment;
Each second network equipment described, for sending the second ring detecting message after receiving described first ring detecting message, Described second ring detecting message is mac frame message, and described second ring detects the source MAC of message and target MAC (Media Access Control) address is Send the MAC Address that described second ring detects second network equipment of message;
Described first network equipment, is additionally operable to after receiving described first ring detecting message, according to described first ring detecting report MAC Address in literary composition detects the MAC Address in message with each second ring receiving, and calculates the first ring according to preset algorithm Mark ID;Described first ring ID is corresponding with each the second ring detecting message receiving including described first network equipment The ID of the looped network of each second network equipment composition;
Each second network equipment described, is additionally operable to after receiving the described second ring detecting message of itself transmission, according to institute State first ring detect message in MAC Address, itself send second ring detect message in MAC Address and receive other The second ring that second network equipment sends detects the MAC Address in message, calculates described first ring according to described preset algorithm ID.
8. network system according to claim 7, it is characterised in that each second network equipment described, is additionally operable to sending out Start first timer after sending the second ring detecting message;Before described first timer time-out, described second network equipment is no longer Send described second ring detecting message.
9. the network system according to claim 7 or 8 is it is characterised in that also include at least one the 3rd network equipment;
Described first network equipment, if being additionally operable to the first port of described first network equipment and receiving described first ring detecting Outside the port of message, described first network equipment still has the port that at least one is in connection status, then when described first When the network equipment is in the second port of not-connected status and is changed into connection status, in described first port with receive described first The port that ring detects message sends the 3rd ring detecting message, and described 3rd ring detects source MAC and the target MAC (Media Access Control) address of message It is the MAC Address of described first network equipment;
Each described 3rd network equipment, for sending Fourth Ring detecting message after receiving described 3rd ring detecting message, Described Fourth Ring detecting message is mac frame message, and the source MAC of message is detected at described Fourth Ring and target MAC (Media Access Control) address is Send the MAC Address that the 3rd network equipment of message is detected at described Fourth Ring;
Described first network equipment, is additionally operable to after receiving described 3rd ring detecting message, according to described 3rd ring detecting report MAC Address in literary composition detects the MAC Address in message with each Fourth Ring receiving, and calculates the second ring according to preset algorithm ID, described second ring ID be including described first network equipment and each Fourth Ring detecting message of receiving corresponding each the The ID of the looped network of three network equipment compositions;
Each described 3rd network equipment, is additionally operable to after receiving the Fourth Ring detecting message of itself transmission, according to described the Three rings detect messages in MAC Address, itself send Fourth Ring detect message in MAC Address and receive other the 3rd The MAC Address in message is detected at the Fourth Ring that the network equipment sends, and calculates described second ring ID according to described preset algorithm.
10. network system according to claim 9 is it is characterised in that described first network equipment, specifically for receiving To each second ring detect message in MAC Address remove, according to the remaining MAC Address receiving and itself MAC ground Location calculates described second ring ID;
Each described 3rd network equipment, specifically for by described first ring receiving detect message and receive each the The MAC Address that two rings are detected in message removes, according to the remaining MAC Address receiving and the MAC Address of itself calculate Second ring ID.
CN201610907429.8A 2016-10-18 2016-10-18 Ring ID generation method and network system Active CN106452874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610907429.8A CN106452874B (en) 2016-10-18 2016-10-18 Ring ID generation method and network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610907429.8A CN106452874B (en) 2016-10-18 2016-10-18 Ring ID generation method and network system

Publications (2)

Publication Number Publication Date
CN106452874A true CN106452874A (en) 2017-02-22
CN106452874B CN106452874B (en) 2019-09-24

Family

ID=58176057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610907429.8A Active CN106452874B (en) 2016-10-18 2016-10-18 Ring ID generation method and network system

Country Status (1)

Country Link
CN (1) CN106452874B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852211A (en) * 2006-04-11 2006-10-25 华为技术有限公司 Method and apparatus for eliminating ring ID error report message on ring network
CN101013991A (en) * 2007-02-02 2007-08-08 中国矿业大学 Multi-ring interconnect transmission method of resilient packet ring based on loop identifier router
CN104518933A (en) * 2013-10-02 2015-04-15 Ls产电株式会社 Method for automatically setting ID in UART ring communication
WO2015120581A1 (en) * 2014-02-11 2015-08-20 Telefonaktiebolaget L M Ericsson (Publ) Traffic loop detection in a communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852211A (en) * 2006-04-11 2006-10-25 华为技术有限公司 Method and apparatus for eliminating ring ID error report message on ring network
CN101013991A (en) * 2007-02-02 2007-08-08 中国矿业大学 Multi-ring interconnect transmission method of resilient packet ring based on loop identifier router
CN104518933A (en) * 2013-10-02 2015-04-15 Ls产电株式会社 Method for automatically setting ID in UART ring communication
WO2015120581A1 (en) * 2014-02-11 2015-08-20 Telefonaktiebolaget L M Ericsson (Publ) Traffic loop detection in a communication network

Also Published As

Publication number Publication date
CN106452874B (en) 2019-09-24

Similar Documents

Publication Publication Date Title
CN101252500B (en) Intersect looped network, node and realizing method of random topology intersect looped network
WO2019114437A1 (en) Bier-te network detection method, device, and system
CN102368727B (en) Crossed IP network TRILL network communication method, system thereof and devices
CN106992874A (en) Method and the network equipment for communication
CN102546389B (en) Method and device for flow trusteeship of cross-data center
CN106330727A (en) Method, device and system for establishing link of SDN (Software Defined Network) device
CN103828310B (en) A kind of method of link discovery, system and equipment
CN1964360A (en) A method and device for MAC frame forwarding
CN103354521B (en) The optimization method of a kind of LSP based on LDP renewal and device
CN101557343A (en) Detecting and protecting method of double-layer loop in VRRP topological network
CN105009529B (en) A kind of method and transponder handling message
CN108173691A (en) A kind of method and device of cross-equipment aggregation
CN106464447B (en) Error code information transmitting methods and the network equipment and communication system
CN106375105A (en) Method of determining path fault, controller, switches and system
CN106992931B (en) Switch redundancy backup method based on double-loop and double-loop system
CN104158706A (en) Method and device of loopback detection
CN106385365A (en) Method of realizing cloud platform safety based on openflow table and apparatus thereof
CN106452862A (en) Method and device for determining loop network
CN101483571A (en) RRPP configuring method, system and device
CN104702478B (en) Virtual flow-line forwarding instance processing method and processing device
CN102209035A (en) Traffic forwarding method and devices
CN104125079B (en) A kind of method and device for determining two-node cluster hot backup configuration information
CN103441940A (en) Method and device for switching network device from stand-by state to main state and network device
CN106105129B (en) Topology learning method and apparatus of the Openflow network across traditional IP
CN103227733B (en) A kind of topology discovery method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant