CN102801575B - Loopback detecting method and device - Google Patents

Loopback detecting method and device Download PDF

Info

Publication number
CN102801575B
CN102801575B CN201110140691.1A CN201110140691A CN102801575B CN 102801575 B CN102801575 B CN 102801575B CN 201110140691 A CN201110140691 A CN 201110140691A CN 102801575 B CN102801575 B CN 102801575B
Authority
CN
China
Prior art keywords
mac address
loopback
address table
service message
identification 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.)
Active
Application number
CN201110140691.1A
Other languages
Chinese (zh)
Other versions
CN102801575A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201110140691.1A priority Critical patent/CN102801575B/en
Priority to PCT/CN2012/075810 priority patent/WO2012163233A1/en
Publication of CN102801575A publication Critical patent/CN102801575A/en
Application granted granted Critical
Publication of CN102801575B publication Critical patent/CN102801575B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

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

Abstract

The embodiment of the invention provides a loopback detecting method and device. The loopback detecting method comprises the following steps of: writing a source MAC (Media Access Control) address and VLAN (Virtual Local Area Network) identification information, which are included in a received first service message, and identification information of a port receiving the first service message into an MAC address table, and setting a corresponding loopback indication identification in the MAC address table to be a first state; and determining the second service message as a loopback message in conditions that source MAC address and VLAN identification information which are included in a received second service message are the same as the source MAC address and the VLAN identification information which are included in the first service message in the MAC address table, a port for receiving the second service message is different from a port corresponding to the port identification information in the MAC address table, and the loopback indication identification is in the first state. With the adoption of the loopback detecting method and device provided by the embodiment of the invention, the received service message can be accurately determined as the loopback message, so that the accuracy and the reliability of loopback detection can be improved.

Description

Loop detection method and device
Technical field
The embodiment of the present invention relates to the communication technology, particularly relates to a kind of loop detection method and device.
Background technology
In ethernet networks, may there is loopback in the port of transmission node.In prior art, transmission node can control the detection messages of (Media Access Control is called for short MAC) address by structure particular media access, carry out the loopback detection of port.
But, due to the address that above-mentioned particular mac address may be also subscriber equipment or other transmission nodes, therefore, the detection messages of transmission node may be caused to be identified as service message by other transmission nodes extract, or the service message of subscriber equipment or other transmission nodes is identified as detection messages by this transmission node and extracts, thus reduce accuracy and the reliability of loopback detection.In addition, because above-mentioned detection messages can take certain network bandwidth, so when network busy, the transmission of detection messages may normally be carried out by traffic affecting.
Summary of the invention
The embodiment of the present invention provides a kind of loop detection method and device, in order to improve accuracy and the reliability of loopback detection, and ensures normally the carrying out of business.
Embodiments provide a kind of loop detection method, comprising:
By the source MAC that comprises in the first service message received and VLAN identification information, and receive the port identification information of described first service message, write mac address table, and in described mac address table, the loopback sign of correspondence is set to the first state;
If the source MAC comprised in the second service message received is identical with VLAN identification information with the source MAC comprised in described first service message in described mac address table with VLAN identification information, and the port the receiving described second service message port corresponding from the described port identification information in described mac address table is different, and described loopback sign is described first state, then determine that described second service message is loopback message.
The embodiment of the present invention additionally provides a kind of loopback detection device, comprising:
Unit, for the source MAC that will comprise in the receive first service message and VLAN identification information, and receive the port identification information of the first port of described first service message, write mac address table, and in described mac address table, the loopback sign of correspondence is set to the first state;
Determining unit, if identical with VLAN identification information with the source MAC comprised in described first service message in described mac address table with VLAN identification information for the source MAC comprised in the second service message of receiving, and the port the receiving described second service message port corresponding from the described port identification information in described mac address table is different, and described loopback sign is described first state, then determine that described second service message is loopback message.
As shown from the above technical solution, the embodiment of the present invention is by service message learning process, the loopback sign of correspondence is set to the first state, thus make in follow-up service message processing procedure, loopback sign that can be corresponding according to the message received accurately determines whether this message is loopback message, thus improves accuracy and the reliability of loopback detection.In addition, owing to not introducing extra detection messages, so the bandwidth of network additionally can not be taken, thus can not normally carry out by traffic affecting.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the loop detection method that Fig. 1 provides for one embodiment of the invention;
The structural representation of the loopback detection device that Fig. 2 provides for another embodiment of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of the loop detection method that Fig. 1 provides for one embodiment of the invention, as shown in Figure 1, the loop detection method of the present embodiment can comprise:
101, by the source MAC that comprises in the first service message received and VLAN identification information, and receive the port identification information of above-mentioned first service message, write mac address table, and in above-mentioned mac address table, the loopback sign of correspondence is set to the first state;
If the source MAC comprised in 102 the second service messages received is identical with VLAN identification information with the source MAC comprised in above-mentioned first service message in above-mentioned mac address table with VLAN identification information, and the port the receiving above-mentioned second service message port corresponding from the above-mentioned port identification information in above-mentioned mac address table is different, and above-mentioned loopback sign is the first state, then determine that above-mentioned second service message is loopback message.
Be understandable that: whether the loopback sign in the present embodiment can not directly indicate message to be loopback message, but need whether the loopback sign corresponding in mac address table according to the message received is the first state, can determine that this message is loopback message.
In the present embodiment 101 and 102 executive agent can be transmission node.After transmission node determination service message is loopback message, user can be notified by the mode of alarm, network exist loopback, investigates in time in order to reminding user.Further, transmission node can also abandon loopback message further, impacts network in order to avoid this loopback message.
Further, after 101, in the Preset Time pre-set (such as: 100ms), in above-mentioned mac address table, above-mentioned loopback sign can also be set to the second state.Particularly, above-mentioned Preset Time can be arranged according to actual needs, such as: the migration situation considering position of host machine, according to the executeaaafunction of host migration, can determine the number range that this Preset Time is concrete.So, after above-mentioned loopback sign is set to the second state by transmission node in above-mentioned mac address table, if the source MAC comprised in the second service message that transmission node receives is identical with VLAN identification information with the source MAC comprised in above-mentioned first service message in above-mentioned mac address table with VLAN identification information, and the port the receiving above-mentioned second service message port corresponding from the above-mentioned port identification information in above-mentioned mac address table is different, but, because now above-mentioned loopback sign is the second state, so then can illustrate it is that position of host machine has carried out normal migration, transmission node re-executes 101, carry out the learning process of service message.
Alternatively, the loopback sign of correspondence is set to the first state by transmission node in mac address table, can be specifically, the value of the loopback sign of correspondence can be set to 1 by transmission node in mac address table, and namely the loopback sign of correspondence can be set to SM set mode by transmission node in mac address table; Correspondingly, above-mentioned loopback sign is set to the second state by transmission node in mac address table, can be specifically, the value of above-mentioned loopback sign can be set to 0 by transmission node in mac address table, and namely the loopback sign of correspondence can be set to non-SM set mode by transmission node in mac address table.Vice versa.
In the present embodiment, by in service message learning process, the loopback sign of correspondence is set to SM set mode, thus make in follow-up service message processing procedure, loopback sign that can be corresponding according to the message received accurately determines whether this message is loopback message, thus improves accuracy and the reliability of loopback detection.In addition, owing to not introducing extra detection messages, so the bandwidth of network additionally can not be taken, thus can not normally carry out by traffic affecting.
It should be noted that: for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
The structural representation of the loopback detection device that Fig. 2 provides for another embodiment of the present invention, as shown in Figure 2, the loopback detection device of the present embodiment can comprise unit 21 and determining unit 22.Wherein, unit 21 is for the source MAC that will comprise in the receive first service message and VLAN identification information, and receive the port identification information of the first port of above-mentioned first service message, write mac address table, and in above-mentioned mac address table, the loopback sign of correspondence is set to the first state; If determining unit 22 is identical with VLAN identification information with the source MAC comprised in above-mentioned first service message in above-mentioned mac address table with VLAN identification information for the source MAC comprised in the second service message of receiving, and the port the receiving above-mentioned second service message port corresponding from the above-mentioned port identification information in above-mentioned mac address table is different, and above-mentioned loopback sign is above-mentioned first state, then determine that above-mentioned second service message is loopback message.
The loopback detection device that method in the embodiment that above-mentioned Fig. 1 is corresponding can be provided by the present embodiment realizes.
Further, the unit 21 in the present embodiment can also be further used in the Preset Time pre-set, and in above-mentioned mac address table, above-mentioned loopback sign is set to the second state.
Alternatively, the loopback sign of correspondence is set to the first state by unit 21 in mac address table, can be specifically, the value of the loopback sign of correspondence can be set to 1 by unit 21 in mac address table, and namely the loopback sign of correspondence can be set to SM set mode by unit 21 in mac address table; Correspondingly, above-mentioned loopback sign is set to the second state by unit 21 in mac address table, can be specifically, the value of above-mentioned loopback sign can be set to 0 by unit 21 in mac address table, and namely the loopback sign of correspondence can be set to non-SM set mode by unit 21 in mac address table.Vice versa.
In the present embodiment, by unit in service message learning process, the loopback sign of correspondence is set to SM set mode, thus make determining unit in follow-up service message processing procedure, loopback sign that can be corresponding according to the message received accurately determines whether this message is loopback message, thus improves accuracy and the reliability of loopback detection.In addition, owing to not introducing extra detection messages, so the bandwidth of network additionally can not be taken, thus can not normally carry out by traffic affecting.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or transmission node etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (6)

1. a loop detection method, is characterized in that, comprising:
By the source MAC that comprises in the first service message received and VLAN identification information, and receive the port identification information of described first service message, write mac address table, and in described mac address table, the loopback sign of correspondence is set to the first state;
If the source MAC comprised in the second service message received is identical with VLAN identification information with the source MAC comprised in described first service message in described mac address table with VLAN identification information, and the port the receiving described second service message port corresponding from the described port identification information in described mac address table is different, and described loopback sign is described first state, then determine that described second service message is loopback message;
Describedly in described mac address table, the loopback sign of correspondence is set to the first state, also comprises afterwards:
In the Preset Time pre-set, in described mac address table, described loopback sign is set to the second state.
2. method according to claim 1, is characterized in that, describedly in described mac address table, the loopback sign of correspondence is set to the first state, comprising:
In described mac address table, the value of the loopback sign of correspondence is set to 1; Or
In described mac address table, the value of the loopback sign of correspondence is set to 0.
3. method according to claim 1, is characterized in that, describedly in described mac address table, described loopback sign is set to the second state, comprising:
In described mac address table, the value of described loopback sign is set to 0; Or
In described mac address table, the value of described loopback sign is set to 1.
4. a loopback detection device, is characterized in that, comprising:
Unit, for the source MAC that will comprise in the receive first service message and VLAN identification information, and receive the port identification information of the first port of described first service message, write mac address table, and in described mac address table, the loopback sign of correspondence is set to the first state;
Determining unit, if identical with VLAN identification information with the source MAC comprised in described first service message in described mac address table with VLAN identification information for the source MAC comprised in the second service message of receiving, and the port the receiving described second service message port corresponding from the described port identification information in described mac address table is different, and described loopback sign is described first state, then determine that described second service message is loopback message;
Described loopback sign, also in the Preset Time pre-set, is set to the second state by described unit in described mac address table.
5. device according to claim 4, is characterized in that, described unit specifically for
By the source MAC that comprises in the first service message received and VLAN identification information, and receive the port identification information of the first port of described first service message, write mac address table, and in described mac address table, the value of the loopback sign of correspondence is set to 1; Or
By the source MAC that comprises in the first service message received and VLAN identification information, and receive the port identification information of the first port of described first service message, write mac address table, and in described mac address table, the value of the loopback sign of correspondence is set to 0.
6. device according to claim 4, is characterized in that, described unit concrete also for
In the Preset Time pre-set, in described mac address table, the value of described loopback sign is set to 0; Or
In the Preset Time pre-set, in described mac address table, the value of described loopback sign is set to 1.
CN201110140691.1A 2011-05-27 2011-05-27 Loopback detecting method and device Active CN102801575B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110140691.1A CN102801575B (en) 2011-05-27 2011-05-27 Loopback detecting method and device
PCT/CN2012/075810 WO2012163233A1 (en) 2011-05-27 2012-05-21 Loopback detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110140691.1A CN102801575B (en) 2011-05-27 2011-05-27 Loopback detecting method and device

Publications (2)

Publication Number Publication Date
CN102801575A CN102801575A (en) 2012-11-28
CN102801575B true CN102801575B (en) 2015-04-08

Family

ID=47200548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110140691.1A Active CN102801575B (en) 2011-05-27 2011-05-27 Loopback detecting method and device

Country Status (2)

Country Link
CN (1) CN102801575B (en)
WO (1) WO2012163233A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457797B (en) * 2013-08-29 2016-12-28 杭州华三通信技术有限公司 The detection method of a kind of RCPU port effectiveness and equipment
TWI514821B (en) * 2014-02-26 2015-12-21 Accton Technology Corp Network devices and loopback detection methods
US9660896B2 (en) 2014-09-04 2017-05-23 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
CN106549821B (en) * 2015-09-23 2021-01-01 华为技术有限公司 Network loop detection method and controller
CN107800581B (en) * 2016-09-01 2022-03-18 中兴通讯股份有限公司 Two-layer network and loopback detection method thereof
CN107171952B (en) * 2017-04-06 2019-10-11 烽火通信科技股份有限公司 A kind of method and apparatus for realizing anti-ring in VPLS

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
CN101102236A (en) * 2007-08-27 2008-01-09 杭州华三通信技术有限公司 Method and device for detecting loop
CN101179455A (en) * 2007-12-07 2008-05-14 中兴通讯股份有限公司 Method and system for implementing VLAN based port loop detection
CN101404599A (en) * 2008-11-12 2009-04-08 华为技术有限公司 Network fault detection method, primary device, slave device, control terminal and system
JP4297437B2 (en) * 2004-08-25 2009-07-15 日本電信電話株式会社 Method and program for detecting loop of bridge device, and bridge device
CN102045218A (en) * 2010-12-07 2011-05-04 成都市华为赛门铁克科技有限公司 Loop detection method and firewall device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7515530B2 (en) * 2004-03-25 2009-04-07 Alcatel-Lucent Usa Inc. Detecting loops between network devices by monitoring MAC moves
US20100020809A1 (en) * 2008-07-25 2010-01-28 Micrel, Inc. True Ring Networks Using Tag VLAN Filtering
CN101707538B (en) * 2009-11-25 2011-09-14 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4297437B2 (en) * 2004-08-25 2009-07-15 日本電信電話株式会社 Method and program for detecting loop of bridge device, and bridge device
CN1988476A (en) * 2006-12-19 2007-06-27 武汉烽火网络有限责任公司 Method and device for self adaptive quick loop detection and loop blocking
CN101102236A (en) * 2007-08-27 2008-01-09 杭州华三通信技术有限公司 Method and device for detecting loop
CN101179455A (en) * 2007-12-07 2008-05-14 中兴通讯股份有限公司 Method and system for implementing VLAN based port loop detection
CN101404599A (en) * 2008-11-12 2009-04-08 华为技术有限公司 Network fault detection method, primary device, slave device, control terminal and system
CN102045218A (en) * 2010-12-07 2011-05-04 成都市华为赛门铁克科技有限公司 Loop detection method and firewall device

Also Published As

Publication number Publication date
WO2012163233A1 (en) 2012-12-06
CN102801575A (en) 2012-11-28

Similar Documents

Publication Publication Date Title
CN102801575B (en) Loopback detecting method and device
CN104170323A (en) Fault handling method, device and system based on network function virtualization
CN107911249B (en) Method, device and equipment for sending command line of network equipment
CN103401726A (en) Network path detecting method, device and system
CN105786405A (en) Online upgrading method, device and system
CN108289034A (en) A kind of fault discovery method and apparatus
CN110096413A (en) A kind of disk localization method, system and electronic equipment and storage medium
CN105740122A (en) Method and system for monitoring mobile phone memory leak
CN102571416A (en) Positioning method and device for virtual machine
CN105243042A (en) Data burning method and data burning apparatus
CN105373450A (en) Data backup method and apparatus
CN104796336A (en) Methods and devices for configuring and issuing Open Flow items
CN102334315B (en) Port blocking-up method and route equipement
CN104954190A (en) Method and device for detecting faults of application server
CN104660780A (en) Electronic equipment and control method thereof
CN106708445B (en) Link selecting method and device
CN104598243A (en) Multi-user application program management method and device applied to intelligent terminal
CN105511767A (en) Information processing method, device and system
CN104486401A (en) Partitioned data control method and system
CN108199980A (en) The action listener method and monitoring system of exchange chip
CN102523221B (en) Detection method of data message and network safety detection device
CN103178997A (en) Same MAC (Media Access Control) address detection method and device based on LLDP (Link Layer Discovery Protocol)
CN104184628A (en) Looped network detection method in network, network equipment and looped network detection system
CN106933858A (en) Page source statistic method and view controller
CN103580953A (en) Method and devices for detecting faults

Legal Events

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