Command Line Reference
Ethernet Switching
LLDP Configuration
7 min
lldp configuration lldp configuration show lldp neighbors show lldp neighbors \[command] show lldp neighbors interface name show lldp table \[purpose] show lldp neighbors \[parameter] parameter description interface name interface name \[view] system view \[use cases] sonic# show lldp neighbors \ lldp neighbors \ interface ethernet1, via lldp, rid 78, time 0 day, 08 17 51 chassis chassisid local 60\ eb 5a 01 1c\ eb sysname leaf 4 sz sysdescr cx204y 48gt m ac debian gnu/linux 9 (stretch) 5 10 34 103 aarch64 mgmtip 172 18 0 1 mgmtiface 10 mgmtip fe80 9013\ e0ff\ fe83\ e51e mgmtiface 6 capability bridge, on capability router, on port portid ifname ethernet16 portdescr ethernet16 ttl 8 mfs 9216 pmd autoneg supported no, enabled no mau oper type 10basetfd utp mau, full duplex mode vlan 202, pvid yes vlan202 vlan 4094, pvid no vlan4094 \ show lldp ports med policy show lldp ports med policy \[command] show lldp ports med policy \[purpose] display interface lldp med configuration policy \[view] system view \[use cases] sonic# show lldp ports med policy + + + + + + + \| ports | application | vlan | tagged | priority | dscp | +============+===============+========+==========+============+========+ \| ethernet20 | voice | 20 | na | na | na | + + + + + + + lldp enable lldp enable \[command] lldp enable no lldp enable \[purpose] enable lldp \[view] system configuration view \[use cases] sonic(config)# lldp enable lldp mgmt ip lldp mgmt ip a b c d \[command] lldp mgmt ip a b c d \[purpose] configure the management ip address of lldp \[view] system configuration view \[usage scenario] configuring a management address is useful for clearly identifying a device, aiding in network topology mapping, and facilitating network management when there's a need to advertise a specific management address to neighbors, this command is used for configuration \[notes] the management address is carried in the management address tlv field of lldp packets, uniquely identifying a device by default, it is set to the ip address of the management interface if the management interface address is not configured, it will default to the docker container's internal address \[use cases] sonic(config)# lldp mgmt ip 10 1 0 15 lldp port id subtype lldp port id subtype \[command] lldp port id subtype {macaddress|ifname} \[purpose] configure the interface id type of lldp \[parameter] parameter description macaddress mac address ifname interface name \[view] system configuration view \[usage scenario] in the lldp table, the interface ip used in the mode is the device's interface name to clearly identify interconnected devices, you can configure the interface id type as a mac address by default, the interface id type is set to "ifname " \[use cases] sonic(config)# lldp port id subtype macaddress
