Movatterモバイル変換


[0]ホーム

URL:


CN105450432A - Method for positioning port connection error and associated equipment - Google Patents

Method for positioning port connection error and associated equipment
Download PDF

Info

Publication number
CN105450432A
CN105450432ACN201410375463.6ACN201410375463ACN105450432ACN 105450432 ACN105450432 ACN 105450432ACN 201410375463 ACN201410375463 ACN 201410375463ACN 105450432 ACN105450432 ACN 105450432A
Authority
CN
China
Prior art keywords
port
tlv
identifier
mib
local system
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
CN201410375463.6A
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.)
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 LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN201410375463.6ApriorityCriticalpatent/CN105450432A/en
Priority to PCT/CN2015/085123prioritypatent/WO2016015606A1/en
Publication of CN105450432ApublicationCriticalpatent/CN105450432A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供一种用于定位端口连接错误的方法和相关设备,涉及通信领域,在某些场景中有助于高效定位端口的物理连接发生错误。具体方案为:第一设备的第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB,而后第一设备的第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB,第一设备在确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同时,第一设备确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。本发明用于对端口物理连接错误进行定位。

Embodiments of the present invention provide a method and related equipment for locating port connection errors, which relate to the communication field and are helpful in efficiently locating physical connection errors of ports in certain scenarios. The specific solution is: the first port of the first device sends the local system management information base MIB of the first port to the second port of the second device, and then the third port of the first device receives the first MIB sent by the second port of the second device. The local system MIB of a port, when the first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device, the first device determines that the physical connection between the first port and the second device occurs Error or there is an error in the physical connection of the third port to the second device. The invention is used for locating the port physical connection error.

Description

Translated fromChinese
一种用于定位端口连接错误的方法和相关设备A method and related equipment for locating port connection errors

技术领域technical field

本发明涉及通信领域,尤其涉及一种用于定位端口连接错误的方法和相关设备。The invention relates to the communication field, in particular to a method for locating port connection errors and related equipment.

背景技术Background technique

对于现网的一些网络设备,在进行光纤连接施工时可能会出现端口的物理连接发生错误的情况。端口的物理连接发生错误的情况可以是出现鸳鸯线。如图1所示,A设备包括端口1、端口2和端口3,B设备包括端口1'、端口2'和端口3'。正确的端口连接情况是端口1的TX与端口1'的RX连接。端口1的RX与端口1'的TX连接。但是如果出现端口2的RX与端口3'的TX连接,端口3的RX与端口2'的TX连接的情况,就出现了鸳鸯线。鸳鸯线的存在可能导致通信出现故障。进而导致业务流量无法转发。For some network devices on the existing network, errors in the physical connection of the ports may occur during the construction of optical fiber connections. An error in the physical connection of the port can be a mandarin duck line. As shown in FIG. 1, the A device includes port 1, port 2 and port 3, and the B device includes port 1', port 2' and port 3'. The correct port connection is that the TX of port 1 is connected with the RX of port 1'. RX of port 1 is connected to TX of port 1'. However, if the RX of port 2 is connected to the TX of port 3', and the RX of port 3 is connected to the TX of port 2', a mandarin duck line will appear. The presence of mandarin duck lines may cause communication failures. As a result, service traffic cannot be forwarded.

链路层发现协议(LinkLayerDiscoveryProtocol,LLDP)提供了一种标准的链路层发现方式。第一设备和第二设备的每个端口独立维护本地系统管理信息库(managementinformationbase,MIB)和远端系统MIB。第一设备每个端口可以周期性地将第一设备的主要能力、管理地址、设备标识、端口标识等信息组织成不同的类型/长度/值(Type/Length/Value,TLV),并封装在LLDP报文中。第一设备的端口可以将LLDP报文发送至与第一设备的端口直连的第二设备的端口。第二设备是第一设备的邻居设备。第二设备会对收到的LLDP报文及其携带的TLV进行有效性检查,并将接收到的第一设备的本地系统MIB保存为第二设备的端口的远端系统MIB。一旦邻居第二设备的端口的LLDP本地系统MIB或LLDP远端系统MIB发生变化,该邻居第二设备的端口就会发送LLDP告警,指示该第二设备的端口的物理连接出现问题。Link Layer Discovery Protocol (LinkLayerDiscoveryProtocol, LLDP) provides a standard link layer discovery method. Each port of the first device and the second device independently maintains a local system management information base (management information base, MIB) and a remote system MIB. Each port of the first device can periodically organize information such as the main capabilities of the first device, management addresses, device identifiers, and port identifiers into different types/lengths/values (Type/Length/Value, TLV), and encapsulate them in in LLDP packets. The port of the first device may send the LLDP packet to the port of the second device directly connected to the port of the first device. The second device is a neighbor device of the first device. The second device will check the validity of the received LLDP message and the TLV carried by it, and save the received local system MIB of the first device as the remote system MIB of the port of the second device. Once the LLDP local system MIB or LLDP remote system MIB of the port of the neighboring second device changes, the port of the neighboring second device will send an LLDP alarm, indicating that there is a problem with the physical connection of the port of the second device.

上述通过LLDP协议确定端口的物理连接是否出现问题的方法,在某些场景中不能够高效地定位端口的物理连接是否发生错误。譬如,进行光纤连接施工时出现了鸳鸯线,网络设备的端口的TX能够发送光信号,并且端口的RX能够接收光信号,端口物理连接发送错误的问题不能被发现。因此,不能及时定位端口的物理连接是否发生错误。The above-mentioned method of determining whether there is a problem with the physical connection of the port through the LLDP protocol cannot efficiently locate whether an error occurs in the physical connection of the port in some scenarios. For example, when a mandarin duck line appears during the construction of optical fiber connection, the TX of the port of the network equipment can send optical signals, and the RX of the port can receive optical signals, and the problem of sending errors in the physical connection of the ports cannot be found. Therefore, whether an error occurs in the physical connection of the port cannot be located in time.

发明内容Contents of the invention

本发明的实施例提供一种用于定位端口连接错误的方法和相关设备,在某些场景中有助于高效定位端口的物理连接发生错误。Embodiments of the present invention provide a method and related equipment for locating port connection errors, which are helpful for efficiently locating physical connection errors of ports in some scenarios.

为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:

第一方面提供了一种用于定位端口连接错误的方法,包括:The first aspect provides a method for locating port connection errors, including:

第一设备的第一端口向第二设备的第二端口发送所述第一端口的本地系统管理信息库MIB;The first port of the first device sends the local system management information base MIB of the first port to the second port of the second device;

所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB;The third port of the first device receives the local system MIB of the first port sent by the second port of the second device;

所述第一设备确定所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB不同;The first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device;

所述第一设备基于所述第三端口的本地系统MIB与所述第一端口的本地MIB系统不同确定所述第一端口与所述第二设备的物理连接发生错误或者所述第三端口与所述第二设备的物理连接发生错误。The first device determines, based on that the local system MIB of the third port is different from the local MIB system of the first port, that an error occurs in the physical connection between the first port and the second device or that the third port and the An error has occurred in the physical connection of the second device.

结合第一方面,在第一方面的第一种可能的实现方式中,所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB还包括:所述第一设备的第三端口接收所述第二设备的第二端口发送的标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB;With reference to the first aspect, in a first possible implementation manner of the first aspect, the third port of the first device receives the local system MIB of the first port sent by the second port of the second device and further The method includes: the third port of the first device receives the identification information sent by the second port of the second device, and the identification information is used to identify that the local system MIB of the first port sent by the second device is a remote system MIB for a port of the second device;

所述第一设备确定所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB不同具体包括:The determining by the first device that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device specifically includes:

所述第一设备基于所述标识信息的指示比较所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB;The first device compares the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;

所述第一设备基于所述比较的结果确定所述第三端口的本地系统MIB与所述第一端口的本地系统MIB不同。The first device determines that the local system MIB of the third port is different from the local system MIB of the first port based on a result of the comparison.

结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB具体包括:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the third port of the first device receives the The local system MIB of the first port specifically includes:

所述第一设备的第三端口接收所述第二设备的第二端口发送的链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。The third port of the first device receives the Link Layer Discovery Protocol LLDP message sent by the second port of the second device, and the LLDP message carries the local system MIB of the first port and the identification information.

结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。With reference to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the LLDP packet includes a first TLV and a second TLV, and the identification information includes The value of the type field in the first TLV and the value of the type field in the second TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the second TLV The value of the type field in indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port The value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is the first in the remote system MIB of the port of the second device The identifier of the device, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the first port in the remote system MIB of the port of the second device An identifier for a port.

结合第一方面至第一方面的第三种可能的实现方式中的任一种,在第一方面的第四种可能的实现方式中,所述第一设备向管理设备发送错误告警,所述错误告警携带所述第一端口的标识或所述第三端口的标识,所述错误告警中的所述第一端口的标识用于标识所述第一端口与所述第二设备的物理连接发生错误,所述错误告警中的所述第三端口的标识用于标识所述第三端口与所述第二设备的物理连接发生错误。With reference to any one of the first aspect to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the first device sends an error alarm to the management device, and the The error alarm carries the identifier of the first port or the identifier of the third port, and the identifier of the first port in the error alarm is used to identify that the physical connection between the first port and the second device occurs error, the identifier of the third port in the error alarm is used to identify that an error occurs in the physical connection between the third port and the second device.

第二方面,提供了一种用于定位端口连接错误的方法,包括:In the second aspect, a method for locating port connection errors is provided, including:

第二设备的第二端口接收第一设备的第一端口发送的所述第一端口的本地系统管理信息库MIB;The second port of the second device receives the local system management information base MIB of the first port sent by the first port of the first device;

所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB。The second port of the second device sends the local system MIB of the first port to the third port of the first device.

结合第二方面,在第二方面的第一种可能的实现方式中,所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB还包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, sending the local system MIB of the first port to the third port of the first device by the second port of the second device further includes :

所述第二设备的第二端口向所述第一设备的第三端口发送标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB。The second port of the second device sends identification information to the third port of the first device, where the identification information is used to identify that the local system MIB of the first port sent by the second device is the first The remote system MIB for the port of the second device.

结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB包括:With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the second port of the second device sends the first A port's local system MIB includes:

所述第二设备的第二端口向所述第一设备的第三端口发送链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。The second port of the second device sends a link layer discovery protocol LLDP message to the third port of the first device, and the LLDP message carries the local system MIB of the first port and the identification information .

结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。With reference to the second possible implementation of the second aspect, in a third possible implementation of the second aspect, the LLDP packet includes the first TLV and the second TLV, and the identification information includes The value of the type field in the first TLV and the value of the type field in the second TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the second TLV The value of the type field in indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port The value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is the first in the remote system MIB of the port of the second device The identifier of the device, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the first port in the remote system MIB of the port of the second device An identifier for a port.

第三方面,提供了一种第一设备,所述第一设备包括第一端口和第三端口,包括:In a third aspect, a first device is provided, and the first device includes a first port and a third port, including:

发送单元,用于通过所述第一端口向第二设备的第二端口发送所述第一端口的本地系统管理信息库MIB;a sending unit, configured to send the local system management information base MIB of the first port to the second port of the second device through the first port;

接收单元,用于通过所述第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB;a receiving unit, configured to receive the local system MIB of the first port sent by the second port of the second device through the third port;

确定单元,用于确定所述第三端口的本地系统MIB与所述接收单元接收的所述第二设备发送的所述第一端口的本地系统MIB不同;a determining unit, configured to determine that the local system MIB of the third port is different from the local system MIB of the first port received by the receiving unit and sent by the second device;

所述确定单元,还用于基于所述第三端口的本地系统MIB与所述第一端口的本地MIB系统不同确定所述第一端口与所述第二设备的物理连接发生错误或者所述第三端口与所述第二设备的物理连接发生错误。The determining unit is further configured to determine, based on that the local system MIB of the third port is different from the local MIB system of the first port, that an error occurs in the physical connection between the first port and the second device or that the first port An error occurs in the physical connection between the three ports and the second device.

结合第三方面,在第三方面的第一种可能的实现方式中,所述接收单元,还用于通过所述第三端口接收所述第二设备的第二端口发送的标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB;With reference to the third aspect, in a first possible implementation manner of the third aspect, the receiving unit is further configured to receive, through the third port, the identification information sent by the second port of the second device, the The identification information is used to identify that the local system MIB of the first port sent by the second device is the remote system MIB of the port of the second device;

所述确定单元具体用于:The determining unit is specifically used for:

基于所述标识信息的指示比较所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB;comparing the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;

基于所述比较的结果确定所述第三端口的本地系统MIB与所述第一端口的本地系统MIB不同。It is determined based on a result of the comparison that the local system MIB of the third port is different from the local system MIB of the first port.

结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述接收单元用于:通过所述第三端口接收所述第二设备的第二端口发送的链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the receiving unit is configured to: receive the second port of the second device through the third port A Link Layer Discovery Protocol LLDP message is sent, where the LLDP message carries the local system MIB of the first port and the identification information.

结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。With reference to the second possible implementation of the third aspect, in a third possible implementation of the third aspect, the LLDP packet includes a first TLV and a second TLV, and the identification information includes The value of the type field in the first TLV and the value of the type field in the second TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the second TLV The value of the type field in indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port The value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is the first in the remote system MIB of the port of the second device The identifier of the device, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the first port in the remote system MIB of the port of the second device An identifier for a port.

结合第三方面至第三方面的第三种可能的实现方式中的任一种,在第三方面的第四种可能的实现方式中,所述发送单元还用于:With reference to any one of the third aspect to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the sending unit is further configured to:

向管理设备发送错误告警,所述错误告警携带所述第一端口的标识或所述第三端口的标识,所述错误告警中的所述第一端口的标识用于标识所述第一端口与所述第二设备的物理连接发生错误,所述错误告警中的所述第三端口的标识用于标识所述第三端口与所述第二设备的物理连接发生错误。sending an error alarm to the management device, where the error alarm carries the identifier of the first port or the identifier of the third port, and the identifier of the first port in the error alarm is used to identify the first port and An error occurs in the physical connection of the second device, and the identifier of the third port in the error alarm is used to identify that an error occurs in the physical connection between the third port and the second device.

第四方面,提供了一种第二设备,所述第二设备包括第二端口,包括:In a fourth aspect, a second device is provided, and the second device includes a second port, including:

接收单元,用于通过所述第二端口接收第一设备的第一端口发送的所述第一端口的本地系统管理信息库MIB;a receiving unit, configured to receive the local system management information base MIB of the first port sent by the first port of the first device through the second port;

发送单元,用于通过所述第二端口向所述第一设备的第三端口发送所述接收单元接收的所述第一端口的本地系统MIB。a sending unit, configured to send the local system MIB of the first port received by the receiving unit to a third port of the first device through the second port.

结合第四方面,在第四方面的第一种可能的实现方式中,所述发送单元还用于:通过所述第二端口向所述第一设备的第三端口发送标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the sending unit is further configured to: send identification information to a third port of the first device through the second port, the identification The information is used to identify that the local system MIB of the first port sent by the second device is the remote system MIB of the port of the second device.

结合第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述发送单元用于:通过所述第二端口向所述第一设备的第三端口发送链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the sending unit is configured to: send a message to the third port of the first device through the second port Sending a Link Layer Discovery Protocol LLDP message, where the LLDP message carries the local system MIB of the first port and the identification information.

结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。With reference to the second possible implementation of the fourth aspect, in a third possible implementation of the fourth aspect, the LLDP packet includes the first TLV and the second TLV, and the identification information includes The value of the type field in the first TLV and the value of the type field in the second TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the second TLV The value of the type field in indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port The value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is the first in the remote system MIB of the port of the second device The identifier of the device, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the first port in the remote system MIB of the port of the second device An identifier for a port.

本发明实施例提供一种用于定位端口连接错误的方法和相关设备,第一设备的第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB,而后第一设备的第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB,第一设备在确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同时,第一设备确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。上述技术方案有助于高效定位端口的物理连接发生错误。Embodiments of the present invention provide a method and related equipment for locating port connection errors. The first port of the first device sends the local system management information base MIB of the first port to the second port of the second device, and then the first device The third port of the second device receives the local system MIB of the first port sent by the second port of the second device, and when the first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device, The first device determines that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device. The technical solution above is helpful for efficiently locating errors in the physical connections of the ports.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为一种网络设备的端口的物理连接发生错误示意图;Fig. 1 is a schematic diagram of an error occurring in the physical connection of a port of a network device;

图2为本发明实施例提供的一种用于定位端口连接错误的方法流程示意图;FIG. 2 is a schematic flowchart of a method for locating port connection errors provided by an embodiment of the present invention;

图3为本发明实施例提供的另一种用于定位端口连接错误的方法流程示意图;FIG. 3 is a schematic flowchart of another method for locating port connection errors provided by an embodiment of the present invention;

图4为本发明实施例提供的又一种用于定位端口连接错误的方法流程示意图;FIG. 4 is a schematic flowchart of another method for locating port connection errors provided by an embodiment of the present invention;

图5为本发明实施例提供的一种第一设备框架图;FIG. 5 is a frame diagram of a first device provided by an embodiment of the present invention;

图6为本发明实施例提供的一种第二设备框架图;FIG. 6 is a frame diagram of a second device provided by an embodiment of the present invention;

图7为本发明实施例提供的一种第一设备框架图;FIG. 7 is a frame diagram of a first device provided by an embodiment of the present invention;

图8为本发明实施例提供的一种第二设备框架图。Fig. 8 is a frame diagram of a second device provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

如果没有相反的说明,本申请涉及的设备可以是路由器。本申请中提及的端口是指物理端口。所述端口可以是光口。所述光口可以是以太网接口。所述光口可以包括光调制解调器。所述光口可以包括发送端(TX)和接收端(RX)。所述发送端可以对应一个光纤,所述接收端可以对应另一个光纤。If there is no indication to the contrary, the equipment involved in this application may be a router. Ports mentioned in this application refer to physical ports. The port may be an optical port. The optical port may be an Ethernet interface. The optical port may include an optical modem. The optical port may include a transmitting end (TX) and a receiving end (RX). The sending end may correspond to one optical fiber, and the receiving end may correspond to another optical fiber.

本申请涉及的MIB可以是LLDPMIB。本申请涉及的本地系统MIB(英文:localsystemMIB)具体可以是LLDPlocalsystemMIB。本申请涉及的远端系统MIB(英文:remotesystemMIB)具体可以是LLDPremotesystemMIB。关于上述技术术语,可以参考IEEEP802.1AB-REV/D6.0。例如,可以参考IEEEP802.1AB-REV/D6.0中的11.LLDPMIBdefinitions。The MIB involved in this application may be LLDPMIB. The local system MIB (English: localsystem MIB) involved in this application may specifically be the LLDP localsystem MIB. The remote system MIB (English: remotesystem MIB) involved in this application may specifically be LLDPremotesystemMIB. For the above technical terms, refer to IEEEEP802.1AB-REV/D6.0. For example, refer to 11.LLDPMIBdefinitions in IEEEEP802.1AB-REV/D6.0.

本申请涉及的端口的本地系统MIB是端口所属的设备生成的,并且能够通过该端口发送至邻居设备的MIB。邻居设备的端口接收到所述端口的本地系统MIB,可以将所述端口的本地系统MIB保存为所述邻居设备的端口的远端MIB。所述邻居设备可以是LLDP邻居。The local system MIB of the port involved in this application is generated by the device to which the port belongs, and can be sent to the MIB of the neighbor device through the port. The port of the neighboring device receives the local system MIB of the port, and may save the local system MIB of the port as the remote MIB of the port of the neighboring device. The neighbor devices may be LLDP neighbors.

本申请涉及的端口的远端系统MIB是端口接收邻居设备发送的所述邻居设备的本地系统MIB后,所述端口所属的设备将所述邻居设备的本地系统MIB保存为所述端口的远端系统MIB。所述邻居设备可以是LLDP邻居。The remote system MIB of the port involved in this application means that after the port receives the local system MIB of the neighbor device sent by the neighbor device, the device to which the port belongs saves the local system MIB of the neighbor device as the remote port of the port System MIBs. The neighbor devices may be LLDP neighbors.

本发明实施例提供的技术方案可以应用在通过光纤连接的网络设备中,例如该网络设备可以为路由器等转发设备。例如,A设备与B设备之间通过光纤连接。A设备包括端口1、端口2和端口3,B设备包括端口1'、端口2'和端口3'。端口1与端口1'一一对应,端口2与端口2'一一对应,端口3和端口3'一一对应。每个端口的发纤与对端端口的收纤连接,也就是,端口连接无误的情况应该是端口1的TX与端口1'的RX连接,端口1的RX与端口1'的TX连接。以此类推。图1出现了鸳鸯线的情况。端口2的RX与端口3'的TX连接,端口3的RX与端口2'的TX连接。也就是说,图1中没有实现端口2与端口2'一一对应。图1中也没有实现端口3与端口3'一一对应。上述情况可能导致业务无法正常转发。The technical solutions provided by the embodiments of the present invention can be applied to network devices connected through optical fibers, for example, the network devices can be forwarding devices such as routers. For example, device A is connected to device B through an optical fiber. The A device includes port 1, port 2, and port 3, and the B device includes port 1', port 2', and port 3'. Port 1 is in one-to-one correspondence with port 1', port 2 is in one-to-one correspondence with port 2', and port 3 is in one-to-one correspondence with port 3'. The sending fiber of each port is connected to the receiving fiber of the opposite port, that is, if the port connection is correct, the TX of port 1 should be connected to the RX of port 1', and the RX of port 1 should be connected to the TX of port 1'. and so on. Figure 1 shows the situation of mandarin duck line. The RX of port 2 is connected to the TX of port 3', and the RX of port 3 is connected to the TX of port 2'. That is to say, there is no one-to-one correspondence between port 2 and port 2' in FIG. 1 . In Fig. 1, there is no one-to-one correspondence between port 3 and port 3'. The above situation may cause the normal forwarding of services.

实施例一Embodiment one

本发明实施例提供一种用于定位端口连接错误的方法,参见图2,其步骤包括:An embodiment of the present invention provides a method for locating port connection errors, referring to Figure 2, the steps include:

101、第一设备的第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB。101. The first port of the first device sends the local system management information base MIB of the first port to the second port of the second device.

举例来说,在链路层发现协议LLDP中,每个设备的每个端口均有一个本地系统MIB和远端系统MIB,并且每个端口独立维护自己的本地系统MIB和远端系统MIB。其中,“管理信息”就是指在因特网的网管框架中被管对象的集合。被管对象必须维持可供管理程序读写的若干控制和状态信息。这些被管对象构成了一个虚拟的信息存储器,所以才称为管理信息库MIB。MIB是一个数据库,它代表了某个设备或服务的一套可管理对象。For example, in the link layer discovery protocol LLDP, each port of each device has a local system MIB and a remote system MIB, and each port independently maintains its own local system MIB and remote system MIB. Wherein, "management information" refers to a collection of managed objects in the network management framework of the Internet. A managed object must maintain certain control and state information that can be read and written by the hypervisor. These managed objects constitute a virtual information storage, so it is called the management information base MIB. MIB is a database that represents a set of manageable objects for a certain device or service.

举例来说,对于一个端口来说,其本地系统MIB存储的是端口的本地MIB,为待发送给对端设备的端口的信息,远端MIB存储的是与该端口连接的对端设备的端口的MIB,也即远端MIB存储的是从对端设备的端口接收到的信息。MIB可以包括设备ID,端口ID、系统名称、系统描述、端口描述、设备能力和网络管理地址等。For example, for a port, its local system MIB stores the local MIB of the port, which is the port information to be sent to the peer device, and the remote MIB stores the port of the peer device connected to the port The MIB, that is, the remote MIB stores the information received from the port of the peer device. MIB can include device ID, port ID, system name, system description, port description, device capability and network management address, etc.

具体的,应用LLDP,第一设备的第一端口向第二设备的第二端口发送第一端口的本地系统MIB的实现方式可以为:第一设备的第一端口向第二设备的第二端口发送第一LLDP报文,该第一LLDP报文携带第一端口的本地系统MIB。Specifically, by applying LLDP, the first port of the first device sends the local system MIB of the first port to the second port of the second device in the following manner: the first port of the first device sends the second port of the second device Send a first LLDP packet, where the first LLDP packet carries the local system MIB of the first port.

102、第一设备的第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB。102. The third port of the first device receives the local system MIB of the first port sent by the second port of the second device.

当第二设备的第二端口接收到第一设备的第一端口发送的第一LLDP报文以后,第二设备建立远端MIB,即第二设备将第一LLDP报文携带的第一端口的本地系统MIB保存为第二端口的远端系统MIB,以存储第一设备的第一端口发送过来的第一端口的本地系统MIB。After the second port of the second device receives the first LLDP message sent by the first port of the first device, the second device establishes a remote MIB, that is, the second device carries the first LLDP message of the first port The local system MIB is saved as the remote system MIB of the second port to store the local system MIB of the first port sent from the first port of the first device.

而后,第二设备的第二端口通过第二LLDP报文向第一设备返回第一端口的本地系统MIB,同时,第二LLDP报文携带标识信息,该标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB。Then, the second port of the second device returns the local system MIB of the first port to the first device through the second LLDP message, and at the same time, the second LLDP message carries identification information, and the identification information is used to identify the MIB sent by the second device. The local system MIB of the first port is the remote system MIB of the port of the second device.

具体来说,所述第二设备的端口可以是所述第二端口。Specifically, the port of the second device may be the second port.

举例来说,该第二LLDP报文可以包括第一TLV和第二TLV,标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,第一TLV中的类型字段的值指示第一TLV中的信息串字段携带的是设备的标识,第二TLV中的类型字段的值指示第二TLV中的信息串字段携带的是端口的标识,第二设备的端口的远端系统MIB包括第一设备的标识以及第一端口的标识,第一TLV中的类型字段的值用于标识第二设备发送的第一设备的标识是第二设备的端口的远端系统MIB中的第一设备的标识(ChassisID),第二TLV中的类型字段的值用于标识第二设备发送的第一端口的标识是第二设备的端口的远端系统MIB中的第一端口的标识(PortID)。For example, the second LLDP packet may include a first TLV and a second TLV, the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV, and the type field in the first TLV The value indicates that the information string field in the first TLV carries the identifier of the device, the value of the type field in the second TLV indicates that the information string field in the second TLV carries the identifier of the port, and the remote port of the second device The end system MIB includes the identifier of the first device and the identifier of the first port, and the value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is in the remote system MIB of the port of the second device The identifier (ChassisID) of the first device, the value of the type field in the second TLV is used to identify the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device (PortID).

具体来说,所述第一TLV中的信息串字段携带的设备的标识可以是所述第一设备的标识。所述第二TLV中的信息串字段携带的端口的标识可以是所述第一端口的标识。Specifically, the device identifier carried in the information string field in the first TLV may be the first device identifier. The port identifier carried in the information string field in the second TLV may be the identifier of the first port.

这是由于,在现有的LLDP报文中,定义了9种TLV,TLV类型字段的值使用了0-8,用以表示发送端发送的本地系统MIB,这样,可以通过扩展两种TLV,其TLV类型字段的值可以为9和10,TLV类型字段的值为9表示发送端发送的是端口的远端系统MIB中的设备标识,TLV类型字段的值为10表示发送端发送的是端口的远端系统MIB中的端口标识。这样,第一设备的第三端口就可以根据该标识信息识别出接收到的MIB来自于对端设备也即第二设备的端口的远端系统MIB。这里的TLV类型字段的值为9的TLV可以携带的是第一设备的标识,TLV类型字段的值为10的TLV可以携带的是第一端口的标识。This is because, in the existing LLDP message, 9 kinds of TLV are defined, and the value of the TLV type field uses 0-8 to indicate the local system MIB sent by the sender. In this way, by extending the two TLVs, The value of the TLV type field can be 9 or 10. The value of the TLV type field is 9, indicating that the sender sends the device identifier in the remote system MIB of the port, and the value of the TLV type field is 10, indicating that the sender sends the port The port ID in the remote system MIB. In this way, the third port of the first device can recognize, according to the identification information, that the received MIB comes from the peer device, that is, the remote system MIB of the port of the second device. Here, the TLV with the value of 9 in the TLV type field may carry the identifier of the first device, and the TLV with the value of 10 in the TLV type field may carry the identifier of the first port.

103、第一设备确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同。103. The first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device.

如果第一设备的第三端口接收到第二设备发送的第一端口的本地系统MIB以及标识信息,根据该标识信息获知该第一端口的本地系统MIB来自于第二设备的端口的远端系统MIB,于是,第一设备就基于该标识信息的指示比较第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB,根据比较结果确定第三端口的本地系统MIB与第一端口的本地系统MIB是否相同。If the third port of the first device receives the local system MIB and the identification information of the first port sent by the second device, it is learned from the identification information that the local system MIB of the first port comes from the remote system of the port of the second device MIB, then, based on the indication of the identification information, the first device compares the local system MIB of the third port with the local system MIB of the first port sent by the second device, and determines the difference between the local system MIB of the third port and the first port according to the comparison result. Whether the local system MIBs of the ports are the same.

举例来说,这里的第一端口的本地系统MIB可以包括第一设备的标识和第一端口的标识,第三端口的本地系统MIB可以包括第一设备的标识和第三端口的标识。也就是说,在比较时可以将设备的标识和端口的标识进行比对,以确认是否相同。For example, the local system MIB of the first port may include the identifier of the first device and the identifier of the first port, and the local system MIB of the third port may include the identifier of the first device and the identifier of the third port. That is to say, during comparison, the identification of the device and the identification of the port can be compared to confirm whether they are the same.

104、第一设备基于第三端口的本地系统MIB与第一端口的本地MIB系统不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。104. The first device determines that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device based on the difference between the local system MIB of the third port and the local MIB system of the first port.

当第一设备的第一端口向第二设备的第二端口发送了第一端口的本地系统MIB时,说明第一设备的第一端口的TX与第二设备的第二端口的RX连接,按照设备的物理连接无误的情况,第一设备的第一端口的RX需要连接第二设备的第二端口的TX,也就是说,应该是第二设备的第二端口将从第一设备接收到的第一端口的本地系统MIB回传至第一设备的第一端口,而如果第二设备的第二端口的TX物理连接错误至了第一设备的第三端口的RX,当第三端口接收到第二设备回传的第一端口的本地系统MIB时,第三端口将第三端口的本地系统与接收到的第一端口的本地系统MIB进行比较发现不同,第三端口就确认第一端口与第二设备的物理连接发生错误,或者是第三端口与第二设备的物理连接发生错误。When the first port of the first device sends the local system MIB of the first port to the second port of the second device, it means that the TX of the first port of the first device is connected with the RX of the second port of the second device, according to If the physical connection of the device is correct, the RX of the first port of the first device needs to be connected to the TX of the second port of the second device, that is, it should be the second port of the second device that will receive from the first device The local system MIB of the first port is returned to the first port of the first device, and if the TX physical connection of the second port of the second device is incorrectly connected to the RX of the third port of the first device, when the third port receives When the second device returns the local system MIB of the first port, the third port compares the local system of the third port with the received local system MIB of the first port and finds that they are different, and the third port confirms that the An error occurs in the physical connection of the second device, or an error occurs in the physical connection between the third port and the second device.

其中,物理连接发生错误是指设备的某一端口与对端设备的某一端口的TX或RX连接错误。Wherein, a physical connection error refers to a TX or RX connection error between a certain port of the device and a certain port of the peer device.

在第一设备确认第一端口或第三端口的物理连接发生错误的情况下,第一设备可以向管理设备发送错误告警,该错误告警携带第一端口的标识或第三端口的标识,错误告警中的第一端口的标识用于标识第一端口与第二设备的物理连接发生错误,错误告警中的第三端口的标识用于标识第三端口与第二设备的物理连接发生错误。When the first device confirms that an error occurs in the physical connection of the first port or the third port, the first device may send an error alarm to the management device, the error alarm carries the identity of the first port or the identity of the third port, and the error alarm The identifier of the first port in the error alarm is used to identify an error in the physical connection between the first port and the second device, and the identifier of the third port in the error alarm is used to identify an error in the physical connection between the third port and the second device.

由于每个设备的每个端口都是独立的接收、发送信息的,所以每个发生物理连接错误的端口可以独立地发送一个错误告警,这样,出现鸳鸯线这种物理连接错误所涉及到的四个端口,均可以独立发送一个错误告警。Since each port of each device receives and sends information independently, each port where a physical connection error occurs can independently send an error alarm. Each port can independently send an error alarm.

本发明实施例提供一种用于定位端口连接错误的方法,第一设备的第一端口向第二设备的第二端口发送第一端口的本地系统MIB,第一设备的第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB,而后当第一设备确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同时,第一设备确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误,这样通过将第一端口的本地系统MIB回传至第一设备的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a method for locating port connection errors. The first port of the first device sends the local system MIB of the first port to the second port of the second device, and the third port of the first device receives the second The local system MIB of the first port sent by the second port of the device, and then when the first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device, the first device determines that the first port The physical connection between the port and the second device is incorrect, or the physical connection between the third port and the second device is incorrect. In this way, the local system MIB of the first port is sent back to the first device, which helps to locate the port efficiently. An error occurred in the physical connection.

实施例二Embodiment two

以实施例一中第一设备的对端设备第二设备为执行主体,本发明实施例提供另一种用于定位端口连接错误的方法。参见图3,其步骤包括:Taking the second device as the peer device of the first device in Embodiment 1 as the execution subject, this embodiment of the present invention provides another method for locating port connection errors. Referring to Figure 3, the steps include:

201、第二设备的第二端口接收第一设备的第一端口发送的第一端口的本地系统MIB。201. The second port of the second device receives the local system MIB of the first port sent by the first port of the first device.

第二设备的第二端口在接收到第一端口的本地系统MIB后,可以将第一端口的本地系统MIB保存为第二端口的远端系统MIB。After receiving the local system MIB of the first port, the second port of the second device may save the local system MIB of the first port as the remote system MIB of the second port.

202、第二设备的第二端口向第一设备的第三端口发送第一端口的本地系统MIB。202. The second port of the second device sends the local system MIB of the first port to the third port of the first device.

第二设备在将接收到的第一端口的本地系统MIB保存为第二端口的远端系统MIB后,可以依据远端系统MIB中保存的第一端口的本地系统MIB向第一设备的第三端口发送第一端口的本地系统MIB,使得第一设备的第三端口在接收到第一端口的本地系统MIB后,可以基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。After the second device saves the received local system MIB of the first port as the remote system MIB of the second port, it can send the data to the third port of the first device according to the local system MIB of the first port saved in the remote system MIB The port sends the local system MIB of the first port, so that after receiving the local system MIB of the first port, the third port of the first device can determine the second port based on the difference between the local system MIB of the third port and the local system MIB of the first port. An error occurs in the physical connection between a port and the second device or an error occurs in the physical connection between the third port and the second device.

其中,在第二设备的第二端口向第一设备的第三端口发送第一端口的本地系统MIB的同时,第二设备的第二端口向第一设备的第三端口发送标识信息,标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB。所述第二设备的端口具体可以是所述第二端口。这样可以指示第三端口根据接收到第一端口的本地系统MIB与第三端口的本地系统MIB进行比较,以确认是否相同来确认第三端口或第一端口是否发生物理连接错误。Wherein, when the second port of the second device sends the local system MIB of the first port to the third port of the first device, the second port of the second device sends identification information to the third port of the first device, and the identification information The local system MIB used to identify the first port sent by the second device is the remote system MIB of the port of the second device. The port of the second device may specifically be the second port. In this way, the third port may be instructed to compare the received local system MIB of the first port with the local system MIB of the third port to confirm whether they are the same to determine whether a physical connection error occurs on the third port or the first port.

本实施例中第一设备和第二设备的具体实现方式可以参见实施例一中的说明过程,这里不再赘述。For the specific implementation manners of the first device and the second device in this embodiment, reference may be made to the description process in Embodiment 1, which will not be repeated here.

本发明实施例提供一种用于定位端口连接错误的方法,第二设备的第二端口接收第一设备的第一端口发送的第一端口的本地系统MIB,然后第二设备的第二端口向第一设备的第三端口发送第一端口的本地系统MIB,使得第一设备基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误,这样通过将第一端口的本地系统MIB回传至第一设备的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a method for locating port connection errors. The second port of the second device receives the local system MIB of the first port sent by the first port of the first device, and then the second port of the second device sends The third port of the first device sends the local system MIB of the first port, so that the first device determines that an error occurs in the physical connection between the first port and the second device based on the difference between the local system MIB of the third port and the local system MIB of the first port. Or an error occurs in the physical connection between the third port and the second device. In this way, the local system MIB of the first port is returned to the first device, which helps to efficiently locate the error in the physical connection of the port.

实施例三Embodiment Three

本发明实施例提供一种用于定位端口连接错误的方法,参见图1所示的鸳鸯线错误连接,以实施例一和实施例二中的第一设备为图1中的A设备,第二设备为图1中的B设备进行说明,第一端口以A设备的端口2为例,第三端口以A设备的端口3为例,第二端口以B设备的端口2'为例进行说明,参见图4,其步骤包括:The embodiment of the present invention provides a method for locating port connection errors. Refer to the error connection of the mandarin duck line shown in Figure 1. The first device in Embodiment 1 and Embodiment 2 is the A device in The device is the B device in Figure 1. The first port takes port 2 of the A device as an example, the third port takes the port 3 of the A device as an example, and the second port takes the port 2' of the B device as an example. Referring to Figure 4, the steps include:

301、A设备的端口2通过第一LLDP报文向B设备的端口2'发送A设备的端口2的本地系统MIB。301. Port 2 of device A sends the local system MIB of port 2 of device A to port 2' of device B through the first LLDP packet.

其中,第一LLDP报文格式可以如下表1所示:Wherein, the format of the first LLDP packet may be as shown in Table 1 below:

表1Table 1

其中,链路层发现协议数据单元(LinkLayerDiscoveryProtocolDataUnit,LLDPDU)目前定义了9种TLV来携带端口发送的本地系统MIB,其TLV类型字段的值使用了0-8。而在发送一个LLDP报文时,一个LLDP报文中至少包含以下4种:ChassisIDTLV、PortIDTLV、TimetoliveTLV和EndofLLDPDUTLV。Among them, the Link Layer Discovery Protocol Data Unit (LinkLayerDiscoveryProtocolDataUnit, LLDPDU) currently defines 9 kinds of TLVs to carry the local system MIB sent by the port, and the value of the TLV type field uses 0-8. When sending an LLDP message, an LLDP message contains at least the following four types: ChassisIDTLV, PortIDTLV, TimetoliveTLV and EndofLLDPDUTLV.

其中,TimetoliveTLV的类型字段的值为3,用来设置远端MIB库的老化时间。例如,光纤物理连接无误的情况下,A设备的端口2周期性的通过组播报文将本地系统MIB发送给B设备的端口2',B设备的端口2'将收到的A设备的端口2发送的本地系统MIB存入B设备的端口2'的远端系统MIB,如果B设备的端口2'超过预定的老化时间没有收到A设备的端口2发来的端口2的本地系统MIB,则B设备的端口2'就清除掉上一次存入远端系统MIB中端口2的本地系统MIB。Wherein, the value of the type field of TimetoliveTLV is 3, which is used to set the aging time of the remote MIB library. For example, if the physical fiber connection is correct, port 2 of device A periodically sends the local system MIB to port 2' of device B through multicast packets, and port 2' of device B will receive the MIB of port 2 of device A. 2 The local system MIB sent is stored in the remote system MIB of port 2' of device B. If port 2' of device B exceeds the predetermined aging time and does not receive the local system MIB of port 2 sent by port 2 of device A, Then the port 2' of the B device clears the local system MIB stored in the port 2 of the remote system MIB last time.

EndofLLDPDUTLV的类型字段的值为0,用来表示一个LLDPDU的结束。LLDPDU数据块中有多个TLV,最后一个TLV的类型字段的值为0,代表该TLV为EndofLLDPDUTLV,表示一个LLDPDU的结束。The value of the type field of EndofLLDPDUTLV is 0, which is used to indicate the end of an LLDPDU. There are multiple TLVs in the LLDPDU data block, and the value of the type field of the last TLV is 0, indicating that the TLV is EndofLLDPDUTLV, indicating the end of an LLDPDU.

ChassisIDTLV,该TLV类型字段的值是1,表示该TLV的信息串字段携带的是设备标识。ChassisIDTLV的格式可以如下表2所示:ChassisIDTLV, the value of the TLV type field is 1, indicating that the information string field of this TLV carries the device identifier. The format of the ChassisIDTLV can be shown in Table 2 below:

表2Table 2

目前,TLV中的类型字段的值是1表示LLDP报文携带的是设备的端口的本地系统MIB中的设备的标识,也可以称为框架标识。其中,ChassisIDsubtype,一般为4,表示设备的标识是通过媒体访问控制(MediumAccessControl,MAC)地址来标识的。因此,表2中的ChassisID就可以为MAC地址。Currently, the value of the type field in the TLV is 1, indicating that the LLDP packet carries the device identifier in the local system MIB of the port of the device, which may also be called a frame identifier. Wherein, the ChassisIDsubtype is generally 4, indicating that the identifier of the device is identified by a Medium Access Control (MAC) address. Therefore, the ChassisID in Table 2 can be a MAC address.

PortIDTLV,TLV类型字段的值可以为2,表示该TLV携带的是端口标识,该TLV的格式可以如下表3所示:PortIDTLV, the value of the TLV type field can be 2, indicating that the TLV carries a port identifier, and the format of the TLV can be shown in Table 3 below:

表3table 3

其中,TLV类型字段的值是2表示LLDP报文的TLV信息串字段携带的是端口的本地系统MIB中的端口的标识。PortIDsubtype,一般为5,表示端口的标识通过端口的名称来识别的。Wherein, the value of the TLV type field is 2, indicating that the TLV information string field of the LLDP message carries the port identifier in the local system MIB of the port. PortIDsubtype, generally 5, indicates that the identification of the port is identified by the name of the port.

302、B设备的端口2'在收到A设备的端口2的本地系统MIB后,将A设备的端口2的本地系统MIB保存到端口2'的远端系统MIB。302. After receiving the local system MIB of port 2 of device A, port 2' of device B saves the local system MIB of port 2 of device A to the remote system MIB of port 2'.

在图1中,A设备的端口2的TX连接的是B设备的端口2'的RX,所以A设备发送的第一LLDP报文由B设备的端口2'接收到,B设备的端口2'就将接收到的A设备的端口2的本地系统MIB添加到端口2'的远端系统MIB。In Figure 1, TX on port 2 of device A is connected to RX on port 2' of device B, so the first LLDP packet sent by device A is received by port 2' of device B, and port 2' of device B Add the received local system MIB of port 2 of A device to the remote system MIB of port 2'.

303、B设备的端口2'通过第二LLDP报文向A设备发送端口2的本地系统MIB。303. Port 2' of device B sends the local system MIB of port 2 to device A through the second LLDP packet.

B设备的端口2'在保存了从A设备接收到的端口2的本地系统MIB后,B设备从B设备的端口2'的远端系统MIB中再获取A设备的端口2的本地系统MIB,并发送至A设备。其中,B设备获取的A设备的端口2的本地系统MIB可以包括A设备的端口2的设备的标识和端口的标识。After port 2' of device B saves the local system MIB of port 2 received from device A, device B obtains the local system MIB of port 2 of device A from the remote system MIB of port 2' of device B. And send to A device. Wherein, the local system MIB of the port 2 of the A device acquired by the B device may include the device identifier and the port identifier of the port 2 of the A device.

B设备在发送A设备的端口2的本地系统MIB的同时,为了标识出是从B设备的端口2'的远端系统MIB中获取的,需要同时发送一标识信息。具体方式为:第二LLDP报文中包括第一TLV和第二TLV,第一TLV和第二TLV为扩展后的TLV,第一TLV可以为扩展的ChassisIDTLV,第二TLV可以为扩展的PortIDTLV,标识信息可以包括扩展的ChassisIDTLV中的类型字段的值以及扩展的PortIDTLV中的类型字段的值,例如,扩展的ChassisIDTLV中的类型字段的值可以为9,扩展的PortIDTLV中的类型字段的值可以为10。While sending the local system MIB of port 2 of the A device, the B device needs to send identification information at the same time in order to identify that it is obtained from the remote system MIB of the port 2' of the B device. The specific method is: the second LLDP message includes the first TLV and the second TLV, the first TLV and the second TLV are extended TLVs, the first TLV may be an extended ChassisIDTLV, and the second TLV may be an extended PortIDTLV, The identification information may include the value of the Type field in the extended ChassisIDTLV and the value of the Type field in the extended PortIDTLV, for example, the value of the Type field in the extended ChassisIDTLV may be 9, and the value of the Type field in the extended PortIDTLV may be 10.

其中,扩展的ChassisIDTLV中的TLVtype=9,可以指示该扩展的ChassisIDTLV中的信息串字段携带的是设备的标识,用于标识B设备发送的A设备的标识是B设备的端口的远端系统MIB中的A设备的标识,扩展的PortIDTLV中的TLVtype=10,可以指示该扩展的PortIDTLV中的信息串字段携带的是端口的标识,用于标识B设备发送的端口2的标识是B设备的端口的远端系统MIB中的端口2的标识。Among them, TLVtype=9 in the extended ChassisIDTLV can indicate that the information string field in the extended ChassisIDTLV carries the identifier of the device, which is used to identify that the identifier of the A device sent by the B device is the remote system MIB of the port of the B device The identifier of the A device in the extended PortIDTLV, the TLVtype=10 in the extended PortIDTLV can indicate that the information string field in the extended PortIDTLV carries the identifier of the port, and is used to identify the identifier of the port 2 sent by the B device is the port of the B device The ID of port 2 in the remote system MIB.

这样一来,一个扩展的LLDP报文中至少包含以下4种:扩展的ChassisIDTLV、扩展的PortIDTLV、TimetoliveTLV和EndofLLDPDUTLV。其中TimetoliveTLV和EndofLLDPDUTLV和步骤301中的相同。In this way, an extended LLDP message contains at least the following four types: extended ChassisIDTLV, extended PortIDTLV, TimetoliveTLV and EndofLLDPDUTLV. The TimetoliveTLV and EndofLLDPDUTLV are the same as those in step 301.

扩展的ChassisIDTLV的格式和内容可以如下表4所示:The format and content of the extended ChassisIDTLV may be as shown in Table 4 below:

表4Table 4

扩展的PortIDTLV的格式和内容可以如下表5所示:The format and content of the extended PortIDTLV may be shown in Table 5 below:

表5table 5

304、A设备的端口3收到B设备的端口2'发送的第二LLDP报文后,根据标识信息识别出第二LLDP报文携带的为B设备的端口的远端系统MIB。304. After receiving the second LLDP packet sent by port 2' of device B, port 3 of device A identifies the remote system MIB of the port of device B carried in the second LLDP packet according to the identification information.

由于B设备的端口2'的TX错误连接到了A设备端口3的RX上,因此,B设备端口2'向A设备返回第二LLDP报文时就发送到了A设备的端口3上。A设备的端口3根据第二LLDP报文中扩展的TLV,发现其中一TLV的类型值为9,得知该TLV携带的是B设备的端口的远端系统MIB中的ChassisID,并通过另一TLV的类型值为10,得知该TLV携带的是B设备的端口的远端系统MIB中的PortID,于是,A设备的端口3根据扩展后的TLV获知A设备接收到的第二LLDP报文是用来确认端口连接是否正确的,而不是B设备的端口的本地系统MIB,不需要对接收到的MIB信息进行存储。Since the TX of the port 2' of the B device is incorrectly connected to the RX of the port 3 of the A device, when the port 2' of the B device returns the second LLDP message to the A device, it is sent to the port 3 of the A device. According to the extended TLV in the second LLDP packet, port 3 of device A finds that the type value of one of the TLVs is 9, and learns that this TLV carries the ChassisID in the remote system MIB of the port of device B, and passes another The type value of the TLV is 10. It is known that the TLV carries the PortID in the remote system MIB of the port of the device B. Therefore, the port 3 of the device A obtains the second LLDP packet received by the device A according to the extended TLV. It is used to confirm whether the port connection is correct, not the local system MIB of the port of the B device, and does not need to store the received MIB information.

305、A设备端口3提取通过第二LLDP报文携带的远端系统MIB中A设备的端口2的本地系统MIB中的ChassisID和PortID,与端口3的本地系统MIB中的ChassisID和PortID进行比对,若两者不同,则端口3确定端口的物理连接发生错误,并向网络管理设备发送告警。305. Port 3 of device A extracts the ChassisID and PortID in the local system MIB of port 2 of device A in the remote system MIB carried by the second LLDP message, and compares it with the ChassisID and PortID in the local system MIB of port 3 , if the two are different, port 3 determines that an error occurs in the physical connection of the port, and sends an alarm to the network management device.

由于B设备返回的第二LLDP报文携带来自B设备的端口的远端系统MIB,该远端系统MIB包括A设备的端口2发给端口2'的端口2的本地系统MIB。A设备的端口3根据标识信息识别出第二LLDP报文携带的为B设备的端口的远端系统MIB后,提取第二LLDP报文携带的端口的远端系统MIB中的ChassisID和PortID,该远端系统MIB中的ChassisID和PortID是A设备的端口2的本地系统MIB中的ChassisID和PortID,A设备的端口3通过将接收到的A设备的端口2的本地系统MIB中的ChassisID和PortID与端口3的本地系统MIB中的ChassisID和PortID进行比对,发现两者不同,这样,A设备的端口3就确认端口物理连接有误,向网络管理设备发送告警。Since the second LLDP packet returned by the B device carries the remote system MIB from the port of the B device, the remote system MIB includes the local system MIB sent from the port 2 of the A device to the port 2'. After port 3 of device A identifies the remote system MIB of the port of device B carried in the second LLDP packet according to the identification information, it extracts the ChassisID and PortID in the remote system MIB of the port carried in the second LLDP packet, and the The ChassisID and PortID in the remote system MIB are the ChassisID and PortID in the local system MIB of port 2 of device A, and port 3 of device A combines the received ChassisID and PortID in the local system MIB of port 2 of device A with The ChassisID and PortID in the local system MIB of port 3 are compared and found to be different. In this way, port 3 of device A confirms that the physical connection of the port is incorrect and sends an alarm to the network management device.

其中,该错误告警可以携带端口2的标识或端口3的标识,错误告警中的端口2的标识用于标识端口2与B设备的物理连接发生错误,错误告警中的端口3的标识用于标识端口3与B设备的物理连接发生错误。Wherein, the error alarm can carry the identification of port 2 or port 3, the identification of port 2 in the error alarm is used to identify the physical connection error between port 2 and B equipment, and the identification of port 3 in the error alarm is used to identify There is an error in the physical connection of port 3 to the B-device.

由于每个设备的每个端口都是独立的接收、发送信息的,所以每个物理连接错误的端口可以独立地上报一个告警,出现鸳鸯线连接错误所涉及到的四个端口,就可以独立上报告警。Since each port of each device receives and sends information independently, each port with a physical connection error can report an alarm independently, and the four ports involved in the connection error of the mandarin duck line can be reported independently. Report to the police.

这种通过本端接收到对端的本地系统MIB信息,本端将对端的本地系统MIB信息添加到本端的端口的远端系统MIB后,再将远端系统MIB通过扩展的TLV发送给对端,让对端确认端口连接是否错误的过程,可以及时准确地确定端口物理连接错误的位置。After the local end receives the local system MIB information of the peer end, the local end adds the local system MIB information of the peer end to the remote system MIB of the port of the local end, and then sends the remote system MIB to the peer end through the extended TLV. The process of allowing the peer to confirm whether the port connection is wrong can promptly and accurately determine the location of the wrong physical connection of the port.

本发明实施例提供一种用于定位端口连接错误的方法,A设备的端口2通过第一LLDP报文向B设备的端口2'发送A设备的端口2的本地系统MIB,B设备的端口2'将A设备的端口2的本地系统MIB保存到端口2'的远端系统MIB,B设备的端口2'通过第二LLDP报文向A设备发送端口2的本地系统MIB,A设备的端口3收到B设备的端口2'发送的第二LLDP报文后,根据标识信息识别出第二LLDP报文携带的为B设备的端口的远端系统MIB,A设备端口3提取通过第二LLDP报文携带的远端系统MIB中A设备的端口2的本地系统MIB中的ChassisID和PortID,与端口3的本地系统MIB中的ChassisID和PortID进行比对,若两者不同,则端口3确定端口的物理连接发生错误,并向网络管理设备发送告警,有助于高效定位端口的物理连接发生错误。The embodiment of the present invention provides a method for locating port connection errors. Port 2 of A device sends the local system MIB of port 2 of A device to port 2' of B device through the first LLDP message, and port 2 of B device 'Save the local system MIB of port 2 of device A to the remote system MIB of port 2', port 2 of device B' sends the local system MIB of port 2 to device A through the second LLDP message, and port 3 of device A After receiving the second LLDP packet sent by port 2' of device B, it identifies the remote system MIB carried by the second LLDP packet as the port of device B according to the identification information, and port 3 of device A extracts the MIB of the port through the second LLDP packet. Compare the ChassisID and PortID in the local system MIB of port 2 of A device in the remote system MIB carried in the document with the ChassisID and PortID in the local system MIB of port 3. If the two are different, port 3 determines the port ID. An error occurs in the physical connection, and an alarm is sent to the network management device, which helps to efficiently locate the error in the physical connection of the port.

实施例四Embodiment four

本发明实施例提供一种第一设备04。所述第一设备04可以用于执行实施例一提供的方法。如图5所示,包括:An embodiment of the present invention provides a first device 04 . The first device 04 may be used to execute the method provided in the first embodiment. As shown in Figure 5, including:

发送单元041,用于通过第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB;A sending unit 041, configured to send the local system management information base MIB of the first port to the second port of the second device through the first port;

接收单元042,用于通过第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB;A receiving unit 042, configured to receive the local system MIB of the first port sent by the second port of the second device through the third port;

确定单元043,用于确定第三端口的本地系统MIB与所述接收单元042接收的第二设备发送的第一端口的本地系统MIB不同;A determining unit 043, configured to determine that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device received by the receiving unit 042;

确定单元043,还用于基于第三端口的本地系统MIB与第一端口的本地MIB系统不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。The determining unit 043 is further configured to determine, based on the difference between the local system MIB of the third port and the local MIB system of the first port, that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device .

可选的,接收单元042,还用于通过第三端口接收第二设备的第二端口发送的标识信息,标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB;Optionally, the receiving unit 042 is further configured to receive, through the third port, the identification information sent by the second port of the second device, where the identification information is used to identify that the local system MIB of the first port sent by the second device belongs to the second device. The remote system MIB of the port;

确定单元043具体用于:The determination unit 043 is specifically used for:

基于标识信息的指示比较第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB;comparing the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;

基于比较的结果确定第三端口的本地系统MIB与第一端口的本地系统MIB不同。It is determined based on the result of the comparison that the local system MIB of the third port is different from the local system MIB of the first port.

上述技术方案中,所述第二设备的端口具体可以是所述第二端口。In the above technical solution, the port of the second device may specifically be the second port.

可选的,接收单元042用于:通过第三端口接收第二设备的第二端口发送的链路层发现协议LLDP报文,LLDP报文中携带第一端口的本地系统MIB以及标识信息。Optionally, the receiving unit 042 is configured to: receive the link layer discovery protocol LLDP message sent by the second port of the second device through the third port, and the LLDP message carries the local system MIB and identification information of the first port.

可选的,LLDP报文包括第一TLV和第二TLV,标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,第一TLV中的类型字段的值指示第一TLV中的信息串字段携带的是设备的标识,第二TLV中的类型字段的值指示第二TLV中的信息串字段携带的是端口的标识,第二设备的端口的远端系统MIB包括第一设备的标识以及第一端口的标识,第一TLV中的类型字段的值用于标识第二设备发送的第一设备的标识是第二设备的端口的远端系统MIB中的第一设备的标识,第二TLV中的类型字段的值用于标识第二设备发送的第一端口的标识是第二设备的端口的远端系统MIB中的第一端口的标识。Optionally, the LLDP packet includes the first TLV and the second TLV, the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV, and the value of the type field in the first TLV indicates that the The information string field in the first TLV carries the identifier of the device, the value of the type field in the second TLV indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes The identifier of the first device and the identifier of the first port, the value of the type field in the first TLV is used to identify the first device in the remote system MIB that the identifier of the first device sent by the second device is the port of the second device The value of the type field in the second TLV is used to identify that the first port identifier sent by the second device is the first port identifier in the remote system MIB of the port of the second device.

上述技术方案中,所述第一TLV中的信息串字段携带的设备的标识具体可以是所述第一设备的标识。所述第二TLV中的信息串字段携带的端口的标识具体可以是所述第一端口的标识。In the above technical solution, the device identifier carried in the information string field in the first TLV may be specifically the identifier of the first device. The port identifier carried in the information string field in the second TLV may specifically be the identifier of the first port.

可选的,发送单元041还用于:Optionally, the sending unit 041 is also used for:

向管理设备发送错误告警,错误告警携带第一端口的标识或第三端口的标识,错误告警中的第一端口的标识用于标识第一端口与第二设备的物理连接发生错误,错误告警中的第三端口的标识用于标识第三端口与第二设备的物理连接发生错误。Send an error alarm to the management device. The error alarm carries the identification of the first port or the identification of the third port. The identification of the first port in the error alarm is used to identify an error in the physical connection between the first port and the second device. The identifier of the third port is used to identify that an error occurs in the physical connection between the third port and the second device.

本发明实施例中各单元所涉及的设备的具体实现方式可以参见图1值图3所示的实施方式。For specific implementation manners of devices involved in each unit in the embodiment of the present invention, reference may be made to the implementation manners shown in FIG. 1 and FIG. 3 .

本发明实施例提供一种第一设备,包括:发送单元、接收单元和确定单元。其中发送单元,用于通过第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB;接收单元,用于通过第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB;确定单元,用于确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同;确定单元,还用于基于第三端口的本地系统MIB与第一端口的本地MIB系统不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。这样通过将对端的本地系统MIB信息发回给对端进行确认的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a first device, including: a sending unit, a receiving unit, and a determining unit. The sending unit is configured to send the local system management information base MIB of the first port to the second port of the second device through the first port; the receiving unit is configured to receive the first port sent by the second port of the second device through the third port. The local system MIB of a port; the determination unit is used to determine that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device; the determination unit is also used for the local system MIB based on the third port and The local MIB systems of the first port are different, and it is determined that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device. In this way, by sending back the local system MIB information of the peer end to the peer end for confirmation, it is helpful to efficiently locate the physical connection error of the port.

实施例五Embodiment five

本发明实施例提供一种第二设备05。所述第二设备05可以用于执行实施例二提供的方法。如图6所示,包括:An embodiment of the present invention provides a second device 05 . The second device 05 may be used to execute the method provided in Embodiment 2. As shown in Figure 6, including:

接收单元051,用于通过第二端口接收第一设备的第一端口发送的第一端口的本地系统管理信息库MIB;The receiving unit 051 is configured to receive the local system management information base MIB of the first port sent by the first port of the first device through the second port;

发送单元052,用于通过第二端口向第一设备的第三端口发送所述接收单元接收的第一端口的本地系统MIB。The sending unit 052 is configured to send the local system MIB of the first port received by the receiving unit to the third port of the first device through the second port.

第一设备可以基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。The first device may determine that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device based on the difference between the local system MIB of the third port and the local system MIB of the first port.

其中,第二设备05接收到第一端口的本地系统管理信息库MIB后,将第一端口的本地系统管理信息库MIB保存为第二端口的远端系统MIB。Wherein, after receiving the local system MIB of the first port, the second device 05 saves the local system MIB of the first port as the remote system MIB of the second port.

可选的,发送单元052还用于:通过第二端口向第一设备的第三端口发送标识信息,标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB。Optionally, the sending unit 052 is further configured to: send identification information to the third port of the first device through the second port, where the identification information is used to identify that the local system MIB of the first port sent by the second device is the port of the second device remote system MIB.

上述技术方案中,所述第二设备的端口具体可以是所述第二端口。所述第一TLV中的信息串字段携带的设备的标识具体可以是所述第一设备的标识。所述第二TLV中的信息串字段携带的端口的标识具体可以是所述第一端口的标识。In the above technical solution, the port of the second device may specifically be the second port. The device identifier carried in the information string field in the first TLV may specifically be the identifier of the first device. The port identifier carried in the information string field in the second TLV may specifically be the identifier of the first port.

可选的,发送单元052用于:通过第二端口向第一设备的第三端口发送链路层发现协议LLDP报文,LLDP报文中携带第一端口的本地系统MIB以及标识信息。Optionally, the sending unit 052 is configured to: send a Link Layer Discovery Protocol LLDP message to the third port of the first device through the second port, where the LLDP message carries the local system MIB and identification information of the first port.

可选的,LLDP报文包括第一TLV和第二TLV,标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,第一TLV中的类型字段的值指示第一TLV中的信息串字段携带的是设备的标识,第二TLV中的类型字段的值指示第二TLV中的信息串字段携带的是端口的标识,第二设备的端口的远端系统MIB包括第一设备的标识以及第一端口的标识,第一TLV中的类型字段的值用于标识第二设备发送的第一设备的标识是第二设备的端口的远端系统MIB中的第一设备的标识,第二TLV中的类型字段的值用于标识第二设备发送的第一端口的标识是第二设备的端口的远端系统MIB中的第一端口的标识。Optionally, the LLDP packet includes the first TLV and the second TLV, the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV, and the value of the type field in the first TLV indicates that the The information string field in the first TLV carries the identifier of the device, the value of the type field in the second TLV indicates that the information string field in the second TLV carries the identifier of the port, and the remote system MIB of the port of the second device includes The identifier of the first device and the identifier of the first port, the value of the type field in the first TLV is used to identify the first device in the remote system MIB that the identifier of the first device sent by the second device is the port of the second device The value of the type field in the second TLV is used to identify that the first port identifier sent by the second device is the first port identifier in the remote system MIB of the port of the second device.

上述技术方案中,所述第二设备的端口具体可以是所述第二端口。In the above technical solution, the port of the second device may specifically be the second port.

本发明实施例中各单元所涉及的设备的具体实现方式可以参见图1值图3所示的实施方式。For specific implementation manners of devices involved in each unit in the embodiment of the present invention, reference may be made to the implementation manners shown in FIG. 1 and FIG. 3 .

本发明实施例提供一种第二设备,包括:接收单元和发送单元。其中,接收单元,用于通过第二端口接收第一设备的第一端口发送的第一端口的本地系统管理信息库MIB;发送单元,用于通过第二端口向第一设备的第三端口发送第一端口的本地系统MIB,第一设备基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误,这样通过将对端的MIB信息发回给对端进行确认的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a second device, including: a receiving unit and a sending unit. Wherein, the receiving unit is used to receive the local system management information base MIB of the first port sent by the first port of the first device through the second port; the sending unit is used to send the MIB to the third port of the first device through the second port Based on the local system MIB of the first port, the first device determines that an error occurs in the physical connection between the first port and the second device or that the physical connection between the third port and the second device is different based on the difference between the local system MIB of the third port and the local system MIB of the first port. If a physical connection error occurs, the MIB information of the peer end is sent back to the peer end for confirmation, which helps to efficiently locate the physical connection error of the port.

实施例六Embodiment six

本发明实施例提供一种第一设备06。第一设备06可以用于执行实施例一提供的方法。参见图7,包括:总线061、连接到总线061的存储器062、发射器063、接收器064和处理器065,其中,该存储器062用于存储指令和数据;发射器063用于通过第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB;接收器064用于通过第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB;处理器065用于确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同;处理器065还用于基于第三端口的本地系统MIB与第一端口的本地MIB系统不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。An embodiment of the present invention provides a first device 06 . The first device 06 may be used to execute the method provided in Embodiment 1. Referring to Fig. 7, comprise: bus 061, be connected to the memory 062 of bus 061, transmitter 063, receiver 064 and processor 065, wherein, this memory 062 is used for storing order and data; Transmitter 063 is used for through the first port Send the local system MIB of the first port to the second port of the second device; the receiver 064 is used to receive the local system MIB of the first port sent by the second port of the second device through the third port; the processor 065 It is used to determine that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device; the processor 065 is also used to determine the second An error occurs in the physical connection between a port and the second device or an error occurs in the physical connection between the third port and the second device.

在本发明实施例中,可选的,接收器064,还可以用于通过第三端口接收第二设备的第二端口发送的标识信息,标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB;In this embodiment of the present invention, optionally, the receiver 064 can also be used to receive the identification information sent by the second port of the second device through the third port, and the identification information is used to identify the information sent by the first port sent by the second device. the local system MIB is the remote system MIB of the port of the second device;

处理器065可以具体用于:Processor 065 can be specifically used for:

基于标识信息的指示比较第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB;comparing the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;

基于比较的结果确定第三端口的本地系统MIB与第一端口的本地系统MIB不同。It is determined based on the result of the comparison that the local system MIB of the third port is different from the local system MIB of the first port.

在本发明实施例中,可选的,接收器064可以用于:通过第三端口接收第二设备的第二端口发送的链路层发现协议LLDP报文,LLDP报文中携带第一端口的本地系统MIB以及标识信息。In this embodiment of the present invention, optionally, the receiver 064 may be configured to: receive the Link Layer Discovery Protocol LLDP message sent by the second port of the second device through the third port, and the LLDP message carries the LLDP message of the first port. Local system MIB and identification information.

在本发明实施例中,可选的,LLDP报文包括第一TLV和第二TLV,标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,第一TLV中的类型字段的值指示第一TLV中的信息串字段携带的是设备的标识,第二TLV中的类型字段的值指示第二TLV中的信息串字段携带的是端口的标识,第二设备的端口的远端系统MIB包括第一设备的标识以及第一端口的标识,第一TLV中的类型字段的值用于标识第二设备发送的第一设备的标识是第二设备的端口的远端系统MIB中的第一设备的标识,第二TLV中的类型字段的值用于标识第二设备发送的第一端口的标识是第二设备的端口的远端系统MIB中的第一端口的标识。In this embodiment of the present invention, optionally, the LLDP packet includes the first TLV and the second TLV, the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV, and the value of the type field in the first TLV The value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the value of the type field in the second TLV indicates that the information string field in the second TLV carries the identifier of the port. The remote system MIB of the port includes the identifier of the first device and the identifier of the first port, and the value of the type field in the first TLV is used to identify that the identifier of the first device sent by the second device is the remote end of the port of the second device The identifier of the first device in the system MIB, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device .

在本发明实施例中,可选的,发射器064还用于:In the embodiment of the present invention, optionally, the transmitter 064 is also used for:

向管理设备发送错误告警,错误告警携带第一端口的标识或第三端口的标识,错误告警中的第一端口的标识用于标识第一端口与第二设备的物理连接发生错误,错误告警中的第三端口的标识用于标识第三端口与第二设备的物理连接发生错误。Send an error alarm to the management device. The error alarm carries the identification of the first port or the identification of the third port. The identification of the first port in the error alarm is used to identify an error in the physical connection between the first port and the second device. The identifier of the third port is used to identify that an error occurs in the physical connection between the third port and the second device.

本发明实施例中所涉及的设备的具体实现方式可以参见图1值图3所示的实施方式。For the specific implementation manner of the device involved in the embodiment of the present invention, reference may be made to the implementation manner shown in FIG. 1 to FIG. 3 .

本发明实施例提供一种第一设备,包括:总线、连接到总线的存储器、发射器、接收器和处理器,其中,该存储器用于存储指令和数据;发射器用于通过第一端口向第二设备的第二端口发送第一端口的本地系统管理信息库MIB;接收器用于通过第三端口接收第二设备的第二端口发送的第一端口的本地系统MIB;处理器用于确定第三端口的本地系统MIB与第二设备发送的第一端口的本地系统MIB不同;处理器还用于基于第三端口的本地系统MIB与第一端口的本地MIB系统不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。这样通过将对端的MIB信息发回给对端进行确认的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a first device, including: a bus, a memory connected to the bus, a transmitter, a receiver, and a processor, wherein the memory is used to store instructions and data; The second port of the second device sends the local system MIB of the first port; the receiver is used to receive the local system MIB of the first port sent by the second port of the second device through the third port; the processor is used to determine the third port The local system MIB of the first port is different from the local system MIB of the first port sent by the second device; the processor is also used to determine the first port and the second device based on the difference between the local system MIB of the third port and the local MIB system of the first port An error occurs in the physical connection or an error occurs in the physical connection between the third port and the second device. In this way, by sending back the MIB information of the peer end to the peer end for confirmation, it is helpful to efficiently locate the physical connection error of the port.

实施例七Embodiment seven

本发明实施例提供一种第二设备07。第二设备07可以用于执行实施例二提供的方法。参见图8,包括:总线071、连接到总线071的存储器072、接收器073、和发射器074,其中,该存储器072用于存储指令和数据;接收器073用于通过第二端口接收第一设备的第一端口发送的第一端口的本地系统管理信息库MIB;发射器074用于通过第二端口向第一设备的第三端口发送第一端口的本地系统MIB。An embodiment of the present invention provides a second device 07 . The second device 07 may be used to execute the method provided in Embodiment 2. Referring to FIG. 8 , it includes: a bus 071, a memory 072 connected to the bus 071, a receiver 073, and a transmitter 074, wherein the memory 072 is used to store instructions and data; the receiver 073 is used to receive the first The first port of the device sends the local system MIB of the first port; the transmitter 074 is configured to send the local system MIB of the first port to the third port of the first device through the second port.

而后,第一设备可以基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误。Then, the first device may determine that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device based on the difference between the local system MIB of the third port and the local system MIB of the first port.

其中,第二设备接收到第一端口的本地系统管理信息库MIB后,可以将第一端口的本地系统管理信息库MIB保存为第二端口的远端系统MIB。Wherein, after receiving the local system MIB of the first port, the second device may save the local system MIB of the first port as the remote system MIB of the second port.

在本发明实施例中,可选的,发射器074还用于:通过第二端口向第一设备的第三端口发送标识信息,标识信息用于标识第二设备发送的第一端口的本地系统MIB是第二设备的端口的远端系统MIB。In this embodiment of the present invention, optionally, the transmitter 074 is also used to: send identification information to the third port of the first device through the second port, and the identification information is used to identify the local system of the first port sent by the second device The MIB is the remote system MIB for the port of the second device.

在本发明实施例中,可选的,发射器074用于:通过第二端口向第一设备的第三端口发送链路层发现协议LLDP报文,LLDP报文中携带第一端口的本地系统MIB以及标识信息。In this embodiment of the present invention, optionally, the transmitter 074 is configured to: send a Link Layer Discovery Protocol LLDP message to the third port of the first device through the second port, and the LLDP message carries the local system address of the first port. MIB and identification information.

在本实施例中,可选的,LLDP报文包括第一TLV和第二TLV,标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,第一TLV中的类型字段的值指示第一TLV中的信息串字段携带的是设备的标识,第二TLV中的类型字段的值指示第二TLV中的信息串字段携带的是端口的标识,第二设备的端口的远端系统MIB包括第一设备的标识以及第一端口的标识,第一TLV中的类型字段的值用于标识第二设备发送的第一设备的标识是第二设备的端口的远端系统MIB中的第一设备的标识,第二TLV中的类型字段的值用于标识第二设备发送的第一端口的标识是第二设备的端口的远端系统MIB中的第一端口的标识。In this embodiment, optionally, the LLDP packet includes the first TLV and the second TLV, the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV, and the value of the type field in the first TLV The value of the type field indicates that the information string field in the first TLV carries the identifier of the device, the value of the type field in the second TLV indicates that the information string field in the second TLV carries the identifier of the port, and the port of the second device The remote system MIB of the remote system includes the identifier of the first device and the identifier of the first port, and the value of the type field in the first TLV is used to identify the remote system whose identifier of the first device sent by the second device is the port of the second device The identifier of the first device in the MIB, the value of the type field in the second TLV is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device.

本发明实施例中所涉及的设备的具体实现方式可以参见图1值图3所示的实施方式。For the specific implementation manner of the device involved in the embodiment of the present invention, reference may be made to the implementation manner shown in FIG. 1 to FIG. 3 .

本发明实施例提供一种第二设备,包括:总线、连接到总线的存储器、接收器、和发射器,其中,该存储器用于存储指令和数据;接收器用于通过第二端口接收第一设备的第一端口发送的第一端口的本地系统管理信息库MIB;发射器用于通过第二端口向第一设备的第三端口发送第一端口的本地系统MIB,使得第一设备可以基于第三端口的本地系统MIB与第一端口的本地系统MIB不同确定第一端口与第二设备的物理连接发生错误或者第三端口与第二设备的物理连接发生错误,这样通过将对端的MIB信息发回给对端进行确认的方式,有助于高效定位端口的物理连接发生错误。An embodiment of the present invention provides a second device, including: a bus, a memory connected to the bus, a receiver, and a transmitter, wherein the memory is used to store instructions and data; the receiver is used to receive the first device through the second port The local system MIB of the first port sent by the first port of the first port; the transmitter is used to send the local system MIB of the first port to the third port of the first device through the second port, so that the first device can be based on the third port If the local system MIB of the first port is different from the local system MIB of the first port, it is determined that an error occurs in the physical connection between the first port and the second device or that an error occurs in the physical connection between the third port and the second device, so that by sending the MIB information of the opposite end to the The way of confirming by the peer helps to efficiently locate the physical connection error of the port.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

另外,在本发明各个实施例中的设备和系统中,各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。且上述的各单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, in the devices and systems in various embodiments of the present invention, each functional unit may be integrated into one processing unit, each unit may be physically included separately, or two or more units may be integrated into one unit. Moreover, each of the above-mentioned units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software functional units.

实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:U盘、移动硬盘、只读存储器(ReadOnlyMemory,简称ROM)、随机存取存储器(RandomAccessMemory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。All or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, the steps including the above-mentioned method embodiments are executed; The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ReadOnlyMemory, ROM for short), random access memory (RandomAccessMemory, RAM for short), magnetic disk or optical disk, and various media that can store program codes.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (18)

Translated fromChinese
1.一种用于定位端口连接错误的方法,其特征在于,包括:1. A method for positioning port connection errors, characterized in that, comprising:第一设备的第一端口向第二设备的第二端口发送所述第一端口的本地系统管理信息库MIB;The first port of the first device sends the local system management information base MIB of the first port to the second port of the second device;所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB;The third port of the first device receives the local system MIB of the first port sent by the second port of the second device;所述第一设备确定所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB不同;The first device determines that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device;所述第一设备基于所述第三端口的本地系统MIB与所述第一端口的本地MIB系统不同确定所述第一端口与所述第二设备的物理连接发生错误或者所述第三端口与所述第二设备的物理连接发生错误。The first device determines, based on that the local system MIB of the third port is different from the local MIB system of the first port, that an error occurs in the physical connection between the first port and the second device or that the third port and the An error has occurred in the physical connection of the second device.2.根据权利要求1所述的方法,其特征在于,所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB还包括:所述第一设备的第三端口接收所述第二设备的第二端口发送的标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB;2. The method according to claim 1, wherein the receiving, by the third port of the first device, the local system MIB of the first port sent by the second port of the second device further comprises: the The third port of the first device receives the identification information sent by the second port of the second device, where the identification information is used to identify that the local system MIB of the first port sent by the second device is the second The remote system MIB of the port of the device;所述第一设备确定所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB不同具体包括:The determining by the first device that the local system MIB of the third port is different from the local system MIB of the first port sent by the second device specifically includes:所述第一设备基于所述标识信息的指示比较所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB;The first device compares the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;所述第一设备基于所述比较的结果确定所述第三端口的本地系统MIB与所述第一端口的本地系统MIB不同。The first device determines that the local system MIB of the third port is different from the local system MIB of the first port based on a result of the comparison.3.根据权利要求2所述的方法,其特征在于,所述第一设备的第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB具体包括:3. The method according to claim 2, wherein the receiving, by the third port of the first device, the local system MIB of the first port sent by the second port of the second device specifically comprises:所述第一设备的第三端口接收所述第二设备的第二端口发送的链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。The third port of the first device receives the Link Layer Discovery Protocol LLDP message sent by the second port of the second device, and the LLDP message carries the local system MIB of the first port and the identification information.4.根据权利要求3所述的方法,其特征在于,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。4. The method according to claim 3, wherein the LLDP message includes a first TLV and a second TLV, and the identification information includes the value of the type field in the first TLV and the type field in the second TLV The value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the value of the type field in the second TLV indicates the second TLV The information string field in the TLV carries the identifier of the port, the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port, and the type field in the first TLV The value is used to identify the identifier of the first device sent by the second device is the identifier of the first device in the remote system MIB of the port of the second device, and the type in the second TLV The value of the field is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device.5.根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1-4, characterized in that the method further comprises:所述第一设备向管理设备发送错误告警,所述错误告警携带所述第一端口的标识或所述第三端口的标识,所述错误告警中的所述第一端口的标识用于标识所述第一端口与所述第二设备的物理连接发生错误,所述错误告警中的所述第三端口的标识用于标识所述第三端口与所述第二设备的物理连接发生错误。The first device sends an error alarm to the management device, the error alarm carries the identifier of the first port or the identifier of the third port, and the identifier of the first port in the error alarm is used to identify the An error occurs in the physical connection between the first port and the second device, and the identifier of the third port in the error alarm is used to identify that an error occurs in the physical connection between the third port and the second device.6.一种用于定位端口连接错误的方法,其特征在于,包括:6. A method for locating a port connection error, comprising:第二设备的第二端口接收第一设备的第一端口发送的所述第一端口的本地系统管理信息库MIB;The second port of the second device receives the local system management information base MIB of the first port sent by the first port of the first device;所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB。The second port of the second device sends the local system MIB of the first port to the third port of the first device.7.根据权利要求6所述的方法,其特征在于,所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB还包括:7. The method according to claim 6, wherein the sending the local system MIB of the first port by the second port of the second device to the third port of the first device further comprises:所述第二设备的第二端口向所述第一设备的第三端口发送标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB。The second port of the second device sends identification information to the third port of the first device, where the identification information is used to identify that the local system MIB of the first port sent by the second device is the first The remote system MIB for the port of the second device.8.根据权利要求7所述的方法,其特征在于,所述第二设备的第二端口向所述第一设备的第三端口发送所述第一端口的本地系统MIB包括:8. The method according to claim 7, wherein the sending the local system MIB of the first port by the second port of the second device to the third port of the first device comprises:所述第二设备的第二端口向所述第一设备的第三端口发送链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。The second port of the second device sends a link layer discovery protocol LLDP message to the third port of the first device, and the LLDP message carries the local system MIB of the first port and the identification information .9.根据权利要求8所述的方法,其特征在于,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。9. The method according to claim 8, wherein the LLDP message includes a first TLV and a second TLV, and the identification information includes the value of the type field in the first TLV and the type field in the second TLV The value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the value of the type field in the second TLV indicates the second TLV The information string field in the TLV carries the identifier of the port, the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port, and the type field in the first TLV The value is used to identify the identifier of the first device sent by the second device is the identifier of the first device in the remote system MIB of the port of the second device, and the type in the second TLV The value of the field is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device.10.一种第一设备,所述第一设备包括第一端口和第三端口,其特征在于,包括:10. A first device, the first device comprising a first port and a third port, characterized in that comprising:发送单元,用于通过所述第一端口向第二设备的第二端口发送所述第一端口的本地系统管理信息库MIB;a sending unit, configured to send the local system management information base MIB of the first port to the second port of the second device through the first port;接收单元,用于通过所述第三端口接收所述第二设备的第二端口发送的所述第一端口的本地系统MIB;a receiving unit, configured to receive the local system MIB of the first port sent by the second port of the second device through the third port;确定单元,用于确定所述第三端口的本地系统MIB与所述接收单元接收的所述第二设备发送的所述第一端口的本地系统MIB不同;a determining unit, configured to determine that the local system MIB of the third port is different from the local system MIB of the first port received by the receiving unit and sent by the second device;所述确定单元,还用于基于所述第三端口的本地系统MIB与所述第一端口的本地MIB系统不同确定所述第一端口与所述第二设备的物理连接发生错误或者所述第三端口与所述第二设备的物理连接发生错误。The determining unit is further configured to determine, based on that the local system MIB of the third port is different from the local MIB system of the first port, that an error occurs in the physical connection between the first port and the second device or that the first port An error occurs in the physical connection between the three ports and the second device.11.根据权利要求10所述的第一设备,其特征在于,所述接收单元,还用于通过所述第三端口接收所述第二设备的第二端口发送的标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB;11. The first device according to claim 10, wherein the receiving unit is further configured to receive, through the third port, the identification information sent by the second port of the second device, the identification information used to identify that the local system MIB of the first port sent by the second device is a remote system MIB of a port of the second device;所述确定单元具体用于:The determining unit is specifically used for:基于所述标识信息的指示比较所述第三端口的本地系统MIB与所述第二设备发送的所述第一端口的本地系统MIB;comparing the local system MIB of the third port with the local system MIB of the first port sent by the second device based on the indication of the identification information;基于所述比较的结果确定所述第三端口的本地系统MIB与所述第一端口的本地系统MIB不同。It is determined based on a result of the comparison that the local system MIB of the third port is different from the local system MIB of the first port.12.根据权利要求11所述的第一设备,其特征在于,所述接收单元用于:通过所述第三端口接收所述第二设备的第二端口发送的链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。12. The first device according to claim 11, wherein the receiving unit is configured to: receive the link layer discovery protocol LLDP message sent by the second port of the second device through the third port , the LLDP packet carries the local system MIB of the first port and the identification information.13.根据权利要求12所述的第一设备,其特征在于,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。13. The first device according to claim 12, wherein the LLDP packet includes the first TLV and the second TLV, and the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV. The value of the type field in the first TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the value of the type field in the second TLV indicates that the first TLV The information string field in the second TLV carries the identifier of the port, the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port, and the identifier of the first TLV The value of the type field is used to identify that the identifier of the first device sent by the second device is the identifier of the first device in the remote system MIB of the port of the second device, and in the second TLV The value of the type field is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device.14.根据权利要求10-13任一项所述的第一设备,其特征在于,所述发送单元还用于:14. The first device according to any one of claims 10-13, wherein the sending unit is further configured to:向管理设备发送错误告警,所述错误告警携带所述第一端口的标识或所述第三端口的标识,所述错误告警中的所述第一端口的标识用于标识所述第一端口与所述第二设备的物理连接发生错误,所述错误告警中的所述第三端口的标识用于标识所述第三端口与所述第二设备的物理连接发生错误。sending an error alarm to the management device, where the error alarm carries the identifier of the first port or the identifier of the third port, and the identifier of the first port in the error alarm is used to identify the first port and An error occurs in the physical connection of the second device, and the identifier of the third port in the error alarm is used to identify that an error occurs in the physical connection between the third port and the second device.15.一种第二设备,所述第二设备包括第二端口,其特征在于,包括:15. A second device comprising a second port, comprising:接收单元,用于通过所述第二端口接收第一设备的第一端口发送的所述第一端口的本地系统管理信息库MIB;a receiving unit, configured to receive the local system management information base MIB of the first port sent by the first port of the first device through the second port;发送单元,用于通过所述第二端口向所述第一设备的第三端口发送所述接收单元接收的所述第一端口的本地系统MIB。a sending unit, configured to send the local system MIB of the first port received by the receiving unit to a third port of the first device through the second port.16.根据权利要求15所述的第二设备,其特征在于,所述发送单元还用于:通过所述第二端口向所述第一设备的第三端口发送标识信息,所述标识信息用于标识所述第二设备发送的所述第一端口的本地系统MIB是所述第二设备的端口的远端系统MIB。16. The second device according to claim 15, wherein the sending unit is further configured to: send identification information to a third port of the first device through the second port, and the identification information uses The local system MIB of the first port sent by the second device to identify is the remote system MIB of the port of the second device.17.根据权利要求16所述的第二设备,其特征在于,所述发送单元用于:通过所述第二端口向所述第一设备的第三端口发送链路层发现协议LLDP报文,所述LLDP报文中携带所述第一端口的本地系统MIB以及所述标识信息。17. The second device according to claim 16, wherein the sending unit is configured to: send a Link Layer Discovery Protocol LLDP message to a third port of the first device through the second port, The LLDP packet carries the local system MIB of the first port and the identification information.18.根据权利要求17所述的第二设备,其特征在于,所述LLDP报文包括第一TLV和第二TLV,所述标识信息包括第一TLV中的类型字段的值以及第二TLV中的类型字段的值,所述第一TLV中的类型字段的值指示所述第一TLV中的信息串字段携带的是设备的标识,所述第二TLV中的类型字段的值指示所述第二TLV中的信息串字段携带的是端口的标识,所述第二设备的端口的远端系统MIB包括所述第一设备的标识以及所述第一端口的标识,所述第一TLV中的类型字段的值用于标识所述第二设备发送的所述第一设备的标识是所述第二设备的端口的远端系统MIB中的所述第一设备的标识,所述第二TLV中的类型字段的值用于标识所述第二设备发送的所述第一端口的标识是所述第二设备的端口的远端系统MIB中的所述第一端口的标识。18. The second device according to claim 17, wherein the LLDP packet includes the first TLV and the second TLV, and the identification information includes the value of the type field in the first TLV and the value of the type field in the second TLV. The value of the type field in the first TLV, the value of the type field in the first TLV indicates that the information string field in the first TLV carries the identifier of the device, and the value of the type field in the second TLV indicates that the first TLV The information string field in the second TLV carries the identifier of the port, the remote system MIB of the port of the second device includes the identifier of the first device and the identifier of the first port, and the identifier of the first TLV The value of the type field is used to identify that the identifier of the first device sent by the second device is the identifier of the first device in the remote system MIB of the port of the second device, and in the second TLV The value of the type field is used to identify that the identifier of the first port sent by the second device is the identifier of the first port in the remote system MIB of the port of the second device.
CN201410375463.6A2014-07-312014-07-31Method for positioning port connection error and associated equipmentPendingCN105450432A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201410375463.6ACN105450432A (en)2014-07-312014-07-31Method for positioning port connection error and associated equipment
PCT/CN2015/085123WO2016015606A1 (en)2014-07-312015-07-25Method for locating port connection error and related device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410375463.6ACN105450432A (en)2014-07-312014-07-31Method for positioning port connection error and associated equipment

Publications (1)

Publication NumberPublication Date
CN105450432Atrue CN105450432A (en)2016-03-30

Family

ID=55216765

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410375463.6APendingCN105450432A (en)2014-07-312014-07-31Method for positioning port connection error and associated equipment

Country Status (2)

CountryLink
CN (1)CN105450432A (en)
WO (1)WO2016015606A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109542834A (en)*2017-09-222019-03-29杭州华为数字技术有限公司A kind of method and NC chip of determining NC chip connection error
CN109951325A (en)*2019-02-282019-06-28华为技术有限公司 Method and device for checking network cable connection
CN112866118A (en)*2019-11-122021-05-28北京华为数字技术有限公司Method, device and storage medium for detecting port capability information of network equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2021003517A1 (en)*2019-07-102021-01-14Aucentra Therapeutics Pty LtdDerivatives of 4-(imidazo[l,2-a]pyridin-3-yl)-n-(pyridinyl)pyrimidin- 2-amine as therapeutic agents

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101835186A (en)*2010-03-012010-09-15华为技术有限公司 Method, device and base station subsystem for detection of mandarin duck line misconnection
CN102427410A (en)*2011-12-022012-04-25北京星网锐捷网络技术有限公司Method, device and system for processing fiber channel identity, and network equipment
WO2013185842A1 (en)*2012-06-152013-12-19Telefonaktiebolaget L M Ericsson (Publ)Self-configuring transport network
CN103858388A (en)*2013-10-082014-06-11华为技术有限公司Loop detection method and apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP4128974B2 (en)*2004-03-312008-07-30富士通株式会社 Layer 2 loop detection system
CN101834679B (en)*2010-04-262014-08-27福建星网锐捷网络有限公司Port test method, device and system
CN103236941B (en)*2013-04-032015-09-30华为技术有限公司A kind of link discovery method and device
CN103354509B (en)*2013-07-112016-08-31杭州华三通信技术有限公司The acquisition methods of a kind of link connection information and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101835186A (en)*2010-03-012010-09-15华为技术有限公司 Method, device and base station subsystem for detection of mandarin duck line misconnection
CN102427410A (en)*2011-12-022012-04-25北京星网锐捷网络技术有限公司Method, device and system for processing fiber channel identity, and network equipment
WO2013185842A1 (en)*2012-06-152013-12-19Telefonaktiebolaget L M Ericsson (Publ)Self-configuring transport network
CN103858388A (en)*2013-10-082014-06-11华为技术有限公司Loop detection method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109542834A (en)*2017-09-222019-03-29杭州华为数字技术有限公司A kind of method and NC chip of determining NC chip connection error
CN109951325A (en)*2019-02-282019-06-28华为技术有限公司 Method and device for checking network cable connection
CN112866118A (en)*2019-11-122021-05-28北京华为数字技术有限公司Method, device and storage medium for detecting port capability information of network equipment
CN112866118B (en)*2019-11-122022-09-02北京华为数字技术有限公司Method, device and storage medium for detecting port capability information of network equipment

Also Published As

Publication numberPublication date
WO2016015606A1 (en)2016-02-04

Similar Documents

PublicationPublication DateTitle
US20250267063A1 (en)Method and system for network topology enforcement
CN105024855B (en)Distributed type assemblies manage system and method
US20210014158A1 (en)Network Device Management Method and Apparatus, and System
CN104301141B (en)A kind of method, apparatus and system for preserving configuration information
CN107800602A (en)A kind of message processing method, equipment and system
US9883010B2 (en)Method, apparatus, device and system for generating DHCP snooping binding table
US8432833B2 (en)Auto MEP ID assignment within CFM maintenance association
US10855576B2 (en)Information transmission method and device
EP2951953A1 (en)Method of managing zigbee network in the internet of things
CN102647312B (en)A kind of detection method of whole net multicast topology and device
CN104079462B (en)Looped network configures detection method and device
WO2020173424A1 (en)Message processing method, and gateway device
WO2021046565A2 (en)Pce controlled network reliability
CN110011941B (en)Message forwarding method and device
CN105450432A (en)Method for positioning port connection error and associated equipment
US9985862B2 (en)MEP configuration method and network device
CN102571464B (en)Link tracking processing method and system
US9893979B2 (en)Network topology discovery by resolving loops
US9667439B2 (en)Determining connections between disconnected partial trees
CN108259442B (en)Slow protocol message processing method and related device
US10148515B2 (en)Determining connections of non-external network facing ports
CN110945835B (en) Message synchronization method and device
CN102821169B (en)A kind of method that in network, MAC Address list item creates and the network equipment
WO2017118428A1 (en)Method and apparatus for realizing message error detection
CN102932172A (en)Method, equipment and system for detecting Ethernet ring failure node

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20160330


[8]ページ先頭

©2009-2025 Movatter.jp