使用LLDP查看服务器和交换机的连接关系

1 安装lldpad

yum install -y lldpad

2 启用lldpad

[root@xxxx]# service lldpad start

或者

[root@xxxx]# systemctl start lldpad

3. 开启对应网口的LLDP

[root@xxxx]# lldptool set-lldp -i enp125s0f0 adminStatus=rxtx

adminStatus = rxtx #这样就和网络交换机建立了邻居关系,接下来就可以查询连接的交换机信息了

4. 使用lldptool查看网口与交换机连接状态:

[root@kp-pc1 ~]# lldptool -t -n -i enp125s0f0

Chassis ID TLV

        MAC: e8:bd:d1:03:4c:d0

Port ID TLV

        Ifname: GigabitEthernet0/0/41

Time to Live TLV

        120

Port Description TLV

        GigabitEthernet0/0/41

System Name TLV

        WX-2F.C4.35U-S5700_8

System Description TLV

        S5700-52C-SI

Huawei Versatile Routing Platform Software

VRP (R) software, Version 5.130 (S5700 V200R003C00SPC300)

Copyright (C) 2000-2013 HUAWEI TECH CO., LTD

System Capabilities TLV

        System capabilities:  Bridge

        Enabled capabilities: Bridge

Management Address TLV

        IPv4: 10.192.6.8

        Ifindex: 83

        OID: +[)

Port VLAN ID TLV

        PVID: 54

Port and Protocol VLAN ID TLV

        PVID: 0, not supported, not enabled

VLAN Name TLV

        VID 1: Name VLAN 0001

MAC/PHY Configuration Status TLV

        Auto-negotiation supported and enabled

        PMD auto-negotiation capabilities: 0x7c05

        MAU type: 1000 BaseTFD

Power via MDI TLV

        Port class PD

        PSE MDI power not supported

        PSE pairs not controllable

        PSE Power pair: unkwown [0]

        Power class 1

Link Aggregation TLV

        Aggregation capable

        Currently not aggregated

        Aggregated Port ID: 0

Maximum Frame Size TLV

        1600

LLDP-MED Capabilities TLV

        Device Type:  netcon

        Capabilities: LLDP-MED, Network Policy, Location Identification, Inventory

LLDP-MED Network Policy TLV

        0140016e

LLDP-MED Extended Power-via-MDI TLV

        800002

LLDP-MED Hardware Revision TLV

        VER C

LLDP-MED Firmware Revision TLV

LLDP-MED Software Revision TLV

        Version 5.130 V200R003C00SPC300

LLDP-MED Serial Number TLV

LLDP-MED Manufacturer Name TLV

        HUAWEI TECH CO., LTD

LLDP-MED Model Name TLV

LLDP-MED Asset ID TLV

End of LLDPDU TLV

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。