CN105791048A - Loopback detection method and device and network equipment containing the device - Google Patents

Loopback detection method and device and network equipment containing the device Download PDF

Info

Publication number
CN105791048A
CN105791048A CN201610115618.1A CN201610115618A CN105791048A CN 105791048 A CN105791048 A CN 105791048A CN 201610115618 A CN201610115618 A CN 201610115618A CN 105791048 A CN105791048 A CN 105791048A
Authority
CN
China
Prior art keywords
port
message
network equipment
loopback
information
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.)
Pending
Application number
CN201610115618.1A
Other languages
Chinese (zh)
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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201610115618.1A priority Critical patent/CN105791048A/en
Publication of CN105791048A publication Critical patent/CN105791048A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/18Loop-free operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/08Learning-based routing, e.g. using neural networks or artificial intelligence

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and device for detecting whether there is loopback on the port of a piece of network equipment, and the network equipment containing the device. The method provided by the invention comprises following steps of sending a message comprising a network equipment MAC address as a source MAC address, a port number and a VLAN serial number, through the port of the network equipment; and comparing the message received at the same port with the sent message, wherein if the source MAC addresses, the port numbers and the VLAN serial numbers of the messages are completely the same, there is the loopback on the port.

Description

Loop detection method, device and comprise the network equipment of this device
Technical field
The present invention relates to computer network field, be specifically related to the loopback detection of the network equipment.
Background technology
In Layer2 switching, addressed by MAC Address and carry out message forwarding.The MAC address learning of two-layer equipment all learns to carry out by source MAC.That is: when port receives the message of a unknown source MAC Address, can this MAC be added on receiving port, in order to follow-up message for the purpose of this MAC Address can directly forward, and namely once learns, repeatedly forwards.
When new source MAC is if it find that this MAC has learnt to two-layer equipment, but source port is different, can revise the source port of original MAC Address, is namely moved on new port by original MAC Address.
Therefore, when link exists loopback situation, finally can find that all of MAC Address in whole double layer network is all moved on the port that there is loopback, cause that double layer network is paralysed.
Below in conjunction with Fig. 1, the loopback impact for the network equipment is described.Fig. 1 illustrates Ethernet switch 10, and wherein E0/1 port is connected to PC20, E0/8 Connection Service device 30.As it can be seen, connect on port E0/7 from ring head 40, there is the situation of loopback with analog port.
When PCping server, start to send an ARP broadcasting packet.After message arrives switch 10, switch 10 can by the MAC address learning of PC to the port E0/1 of switch.Meanwhile, this message can be broadcasted in double layer network, therefore can deliver to the port E0/7 that there is loopback and connect on the port E0/8 of server 30.Owing to there is loopback on port E0/7, then, this message can intact send back on port E0/7.Owing to the source MAC in message is the MAC Address of PC, so, may result in the MAC Address of PC and move on E0/7 from port E0/1, namely switch thinks that this PC has changed port.After the message of the clean culture ARP of server response delivers to switch, according to Layer2 switching principle, find out port by purpose mac addressing, port E0/7 will be found, then message is seen off from port E0/7.So, PC cannot carry out normal communication with server.
Summary of the invention
It is an object of the invention to provide a kind of loopback detection apparatus and method, to detect whether single port exists loopback.
According to one aspect of the present invention, a kind of loop detection method, for the loop back detection of the network equipment, including:
S1, provides the transmission port to this network equipment by the first message, and wherein this first message includes the MAC Address of this network equipment as source MAC, also includes the port numbers of described transmission port and the numbering of VLAN to be detected;
S2, receives the second message from described transmission port;
S3, contrasts the source MAC comprised in described first and second messages, transmitting terminal slogan and VLAN numbering;And
S4, when the described source MAC comprised in described first message with described second message, described port numbers and described VLAN numbering are completely the same, then judges that this transmission port exists loopback.
Further, the method also includes, and when judging that this transmission port exists loopback, the state of this port is set to blocked state.
Further, the method also includes, after the time period of interval one, and repeating said steps S1-S4.
Further, the method also includes, and when judging that described transmission port exists loopback, sends warning information.
Further, the method also includes, and before carrying out described step S1 to S4, the state detecting described port is forwarding state or blocked state.
According to another aspect of the present invention, a kind of loopback detection device, loopback detection for the port of the network equipment, send and detecting device including information, it is connected to the port of this network equipment, wherein this information sends provides the first message to the network equipment port needing detection with detecting device, and receives the second message from this port.Wherein, described first message includes the MAC Address of this network equipment numbering as source MAC, the port numbers of described port and VLAN to be detected, and wherein, the first message provided is contrasted by this detecting device with this second message received.
Wherein, when the source MAC in described first message and described second message, the port numbers sending port and VLAN numbering are completely the same, this information sends and condition setting information is sent to this network equipment by detecting device with warning information.
Wherein, this information sends and repeats intervally to send this first message with detecting device with certain time, receive this second message and contrast this first and second message.
According to another aspect of the invention, a kind of network equipment, it has port, is used for sending and accepting message, and this equipment also includes information as above and sends and detecting device.
Wherein, when this information sends and sends condition setting information to this network equipment with detecting device, the state of described port is configured to blocked state.
According to methods and apparatus of the present invention, send the message containing specific information from the network equipment port, and detect whether to receive the message sent from this port.If the message sent from this port is received by this port again, then under this port, there is loopback.By such mode, it is possible to whether there is loopback under detection network equipment single port, it is to avoid adopt the hardware cost of loopback detection circuit.
Accompanying drawing explanation
Below by the way of clearly understandable, accompanying drawings preferred implementation, above-mentioned characteristic, technical characteristic, advantage and implementation thereof are further described.
Fig. 1 illustrates that the typical network equipment and interface connect.
Fig. 2 is the loopback detection device according to the present invention and the schematic diagram of the network equipment.
Fig. 3 is the flow chart of the method according to the present invention.
Fig. 4 is the format sample of the message related in the present invention.
Drawing reference numeral illustrates:
10 switches, 20PC, 30 servers, 40 from ring head, 100 information sending and receiving devices, 110 first messages, 120 second messages, 200 network equipments, 210 ports.
Detailed description of the invention
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below comparison accompanying drawing is illustrated the specific embodiment of the present invention.It should be evident that the accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings, and obtain other embodiment.
For the loopback detection of network equipment single port, by sending a special message on port, and detect whether this message can return from the port sent, determine whether this port exists loopback situation.
Accordingly, it would be desirable to a sending and receiving device sends described specific message, and receive message from same port, and judge that whether the message sent is consistent with the message of reception.
According to the present invention, as in figure 2 it is shown, information sending and receiving device 100 is for providing the first message 110 to the port 210 of the network equipment 200, and receive the second message 120 from same port 210.
Wherein, in an embodiment of the present invention, this first message 110 includes source MAC, and it is the MAC Address of this network equipment 200.Also include the logic index of the port of this port 210, i.e. port numbering, so can follow the trail of message is from which port send.
It addition, for the port of a network equipment, it is understood that there may be different VLANs (VLAN).Message can in the virtual local area specified broadcast off the net.Between VLANs different under normal circumstances, message not intercommunication.So for different VLANs, message should have the numbering of respective VLAN.Message comprises the numbering of VLAN, it is possible to be there is loopback which virtual local area is off the net.
The MAC Address that the target MAC (Media Access Control) address of message usually all can be broadcasted in any case in this VLAN, thus when ensureing loopback situation occur, message can be transmitted back to this network equipment 200.It is generally broadcast MAC address.
Fig. 4 is illustrated that the format sample of the first and/or second message, wherein,
Dmac field is destination address, is set to 01:80:C2:00:00:05 in this example, and it is the specific purposes MAC Address preset according to communication standard.
SMAC field is source MAC, is set to the MAC Address of this network equipment.
VLAN-TAG field is VLAN tag, is set to 0x8100.
TYPE field is type of message, is set to 0xfffa.
INTERFACE field is the logic index of the ethernet port sending message, namely port numbers.
VLAN-ID field is VLAN numbering, from 1-4095, and the VLAN-ID in VLAN-TAG and remaining unchanged in repeating process when being set to send message.
In an embodiment of the present invention, this information is sent after being sent by port 210 by the first message 110 comprising above-mentioned information with detecting device 100, then receives the second message 120 from this port 210.The relatively source MAC in this first and second message, port numbering and VLAN numbering.When this three is identical, there is loopback in this port 210.
For the message shown in Fig. 4, extract the SMAC field in the message sending and receiving, INTERFACE field and VLAN-ID field respectively, these three field is contrasted.If these three field is identical, then there is loopback in this port.
In other example, it is also possible to additionally contrast the type of message.That is, the first message and the source MAC of the second message, port numbering, type of message and VLAN numbering are contrasted.Such as, the SMAC field in the example shown in Fig. 4, INTERFACE field, VLAN-ID field and TYPE field.
In one example, this information sending and receiving device 100 can be the central processing unit of this network equipment 200.
After determining that port 210 exists loopback, information sending and receiving device 100 sends information to the network equipment 200, so that this port 210 is set to blocked state by forwarding state.Meanwhile, also warning information is sent to this network equipment 200.
This information sending and receiving device 100 can repeat intervally to send with certain time and receive above-mentioned message, because network is in the state changed at any time, it is necessary to be performed continuously over detection.
Further, in one example, before sending this first message, the state of detection port, namely this port is in blocked state or forwarding state.
As shown in Figure 3, it is proposed, according to the invention, loop detection method comprises the following steps.
S1, provides the transmission port to this network equipment by the first message, and wherein this first message includes the MAC Address of this network equipment as source MAC, also includes the port numbers of described transmission port and the numbering of VLAN to be detected.
S2, receives the second message from described transmission port.
S3, contrasts the source MAC comprised in described first and second messages, transmitting terminal slogan and VLAN numbering.
S4, when the described source MAC comprised in described first message with described second message, described port numbers and described VLAN numbering are completely the same, then judges that this transmission port exists loopback.
Which further comprises when port exists loopback, and port status is set to blocked state.
In one embodiment, the method also includes, when port exists loopback, sending warning information.
In one embodiment, before the method is additionally included in this first message of transmission, the state detecting this port is forwarding state or blocked state.
It should be noted that, above-described embodiment all can independent assortment as required.The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (10)

1. a loop detection method, for the loop back detection of the network equipment, including:
S1, provides the transmission port to this network equipment by the first message, and wherein this first message includes the MAC Address of this network equipment as source MAC, also includes the port numbers of described transmission port and the numbering of VLAN to be detected;
S2, receives the second message from described transmission port;
S3, contrasts the source MAC comprised in described first and second messages, transmitting terminal slogan and VLAN numbering;And
S4, when the described source MAC comprised in described first message with described second message, described port numbers and described VLAN numbering are completely the same, then judges that this transmission port exists loopback.
2. loop detection method according to claim 1, it is characterised in that the method also includes, when judging that this transmission port exists loopback, is set to blocked state by the state of this port.
3. loop detection method according to claim 1, it is characterised in that the method also includes, after a time period, repeating said steps S1-S4.
4. loopback detecting method according to claim 1, it is characterised in that the method also includes, when judging that described transmission port exists loopback, sends warning information.
5. loop detection method according to claim 1, it is characterised in that the method also includes, before carrying out described step S1 to S4, the state detecting described port is forwarding state or blocked state.
6. a loopback detection device, loopback detection for the port of the network equipment, it is characterized in that, send and detecting device including information, it is connected to the port of this network equipment, wherein this information sends provides the first message to the network equipment port needing detection with detecting device, and receives the second message from this port
Wherein, described first message includes the MAC Address of this network equipment numbering as source MAC, the port numbers of described port and VLAN to be detected,
Wherein, the first message provided is contrasted by this detecting device with this second message received.
7. loopback detection device according to claim 6, it is characterized in that, when the source MAC in described first message and described second message, the port numbers sending port and VLAN numbering are completely the same, this information sends and condition setting information is sent to this network equipment by detecting device with warning information.
8. loopback detection device according to claim 6, it is characterised in that this information sends and repeats intervally to send this first message with detecting device with certain time, receive this second message and contrast this first and second message.
9. a network equipment, it has port, is used for sending and accepting message, it is characterised in that this equipment also includes the information as described in any one of claim 6-8 and sends and detecting device.
10. the network equipment according to claim 9, it is characterised in that when this information sends and sends condition setting information to this network equipment with detecting device, the state of described port is configured to blocked state.
CN201610115618.1A 2016-03-01 2016-03-01 Loopback detection method and device and network equipment containing the device Pending CN105791048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610115618.1A CN105791048A (en) 2016-03-01 2016-03-01 Loopback detection method and device and network equipment containing the device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610115618.1A CN105791048A (en) 2016-03-01 2016-03-01 Loopback detection method and device and network equipment containing the device

Publications (1)

Publication Number Publication Date
CN105791048A true CN105791048A (en) 2016-07-20

Family

ID=56386828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610115618.1A Pending CN105791048A (en) 2016-03-01 2016-03-01 Loopback detection method and device and network equipment containing the device

Country Status (1)

Country Link
CN (1) CN105791048A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106941634A (en) * 2017-05-18 2017-07-11 烽火通信科技股份有限公司 The method and system of OLT loopback detections in a kind of GPON systems
WO2018040940A1 (en) * 2016-09-01 2018-03-08 中兴通讯股份有限公司 Two-layer network, and loopback detection method of two-layer network
CN111245700A (en) * 2020-01-16 2020-06-05 新华三信息安全技术有限公司 Loop detection method and device
CN111431768A (en) * 2020-03-27 2020-07-17 深圳市三旺通信股份有限公司 Method for detecting and protecting port self-loop
US20210111983A1 (en) * 2014-09-04 2021-04-15 Accedian Networks Inc. System and method for loopback and network loop detection and analysis

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988476A (en) * 2006-12-19 2007-06-27 武汉烽火网络有限责任公司 Method and device for self adaptive quick loop detection and loop blocking
CN101197648A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Self-loop detection method and device used for access network
US20090219821A1 (en) * 2008-02-29 2009-09-03 Kazunori Kamachi Switch apparatus and network system
CN101534226A (en) * 2009-04-14 2009-09-16 杭州华三通信技术有限公司 VLAN-based whole network loop detection method and loop detection equipment
CN104113442A (en) * 2013-04-18 2014-10-22 上海斐讯数据通信技术有限公司 Ethernet loop detection system and method
CN104639392A (en) * 2015-01-04 2015-05-20 武汉中元华电科技股份有限公司 Loop detection method in power system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988476A (en) * 2006-12-19 2007-06-27 武汉烽火网络有限责任公司 Method and device for self adaptive quick loop detection and loop blocking
CN101197648A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Self-loop detection method and device used for access network
US20090219821A1 (en) * 2008-02-29 2009-09-03 Kazunori Kamachi Switch apparatus and network system
CN101534226A (en) * 2009-04-14 2009-09-16 杭州华三通信技术有限公司 VLAN-based whole network loop detection method and loop detection equipment
CN104113442A (en) * 2013-04-18 2014-10-22 上海斐讯数据通信技术有限公司 Ethernet loop detection system and method
CN104639392A (en) * 2015-01-04 2015-05-20 武汉中元华电科技股份有限公司 Loop detection method in power system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210111983A1 (en) * 2014-09-04 2021-04-15 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
US11516108B2 (en) * 2014-09-04 2022-11-29 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
WO2018040940A1 (en) * 2016-09-01 2018-03-08 中兴通讯股份有限公司 Two-layer network, and loopback detection method of two-layer network
CN107800581A (en) * 2016-09-01 2018-03-13 中兴通讯股份有限公司 A kind of loop detection method of double layer network and double layer network
CN107800581B (en) * 2016-09-01 2022-03-18 中兴通讯股份有限公司 Two-layer network and loopback detection method thereof
CN106941634A (en) * 2017-05-18 2017-07-11 烽火通信科技股份有限公司 The method and system of OLT loopback detections in a kind of GPON systems
CN106941634B (en) * 2017-05-18 2020-07-14 烽火通信科技股份有限公司 O L T loopback detection method and system in GPON system
CN111245700A (en) * 2020-01-16 2020-06-05 新华三信息安全技术有限公司 Loop detection method and device
CN111245700B (en) * 2020-01-16 2022-02-22 新华三信息安全技术有限公司 Loop detection method and device
CN111431768A (en) * 2020-03-27 2020-07-17 深圳市三旺通信股份有限公司 Method for detecting and protecting port self-loop
CN111431768B (en) * 2020-03-27 2023-03-28 深圳市三旺通信股份有限公司 Method for detecting and protecting port self-loop

Similar Documents

Publication Publication Date Title
CN105791048A (en) Loopback detection method and device and network equipment containing the device
CN101433029B (en) Methods and systems for selective layer 2 port blocking using layer 2 source addresses
CN100525199C (en) IP management method and apparatus for protecting/blocking specific IP address or specific device on network
CN102413059B (en) Multicast forwarding method based on SPB (Shortest Path Bridging) network and SPBM (MAC-in-MAC SPB) bridge
CN105634857A (en) Link connectivity detecting method and device
CN101471821B (en) Method and apparatus for detecting failure of operator backbone network transmission network
CN103841023A (en) Data forwarding method and device
CN101123531A (en) Convergence method and device based on VPLS dual home full connection network
JP2001111591A5 (en)
CN102946525B (en) Multicast service management device and forwarding device
CN102420762B (en) Message forwarding method, message forwarding system, network equipment and firewall wire card
US20170230231A1 (en) Reofredundancy system based on virtual router redundancy protocol and method thereof
US20190349293A1 (en) Managing Data Frames in Switched Networks
WO2015127643A1 (en) Method and communication node for learning mac address in a layer-2 communication network
CN102347889A (en) Message forwarding method, system and device in H-VPLS (Hierarchical Virtual Private local area network service)
US10476774B2 (en) Selective transmission of bidirectional forwarding detection (BFD) messages for verifying multicast connectivity
CN104144130A (en) Virtual machine system interconnection method and system and access switch
CN104506396A (en) Device all-port Full Mesh performance testing method and system
CN102857399A (en) MAC address deleting method, device and system of VPLS dual homing network
WO2003055180A1 (en) Address duplication detection in a network
EP3579499B1 (en) Vlan reflection
JP5776617B2 (en) Chassis type switch
CN109150711A (en) The pretection switch method, apparatus and storage medium of point-to-multipoint Layer 2 Multicast business
CN105812152B (en) A kind of ethernet ring network failure notification method
CN101309154B (en) Datagram sending method, sending apparatus and transmission 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160720