LLDP协议介绍:
简单说来,LLDP是一种邻近发现协议。它为以太网网络设备,如交换机、路由器和无线局域网接入点定义了一种标准的方法,使其可以向网络中其他节点公告自身的存在,并保存各个邻近设备的发现信息。例如设备配置和设备识别等详细信息都可以用该协议进行公告。
具体来说,LLDP定义了一个通用公告信息集、一个传输公告的协议和一种用来存储所收到的公告信息的方法。要公告自身信息的设备可以将多条公告信息放在一个局域网数据包内传输,传输的形式为类型长度值(TLV)域。
LLDP应用
服务器上安装lldp之后可以通过lldp确定服务器所连接交换机端口,并且交换机也可以通过lldp确认端口所连接的服务器。
且在服务器交换机连线较复杂时能很快定位服务器及交换机的连接关系!
如下图:
lldptool -t -n -i eth0 -V portDesc;lldptool -t -n -i eth1 -V portDesc
Chassis ID TLV
MAC: f4:b5:2f:5b:f7:80
Port ID TLV
Local: 595
Time to Live TLV
120
System Name TLV
221.180.146.2.SW.CDN
System Description TLV
Juniper Networks, Inc. ex3200-48t , version 12.3R5.7 Build date: 2013-12-18 03:01:12 UTC
System Capabilities TLV
System capabilities: Bridge, Router
Enabled capabilities: Bridge, Router
Port Description TLV
ge-0/0/32.0
MAC/PHY Configuration Status TLV
Auto-negotiation supported and enabled
PMD auto-negotiation capabilities: 0x0001
MAU type: Unknown [0x0000]
Link Aggregation TLV