Command Line Reference
Ethernet Switching
LLDP Configuration
8 min
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 table capability codes (r) router, (b) bridge, (o) other localport remotedevice remoteportid capability remoteportdescr \ ethernet15 sonic 32 31 9b 9b 1c 18 br ethernet15 ethernet19 76 server ac 1f 6b 78 00\ af br eno2 ethernet25 sonic g25 br ethernet25 ethernet47 sonic ethernet47 br ethernet47 ethernet50 2 20 1 ethernet15 br ethernet15 ethernet51 sonic ethernet53 br ethernet53 eth0 e4 54\ e8\ ce\ f6 8e \ total entries displayed 7 sonic# show lldp neighbor ethernet15 \ lldp neighbors \ interface ethernet15 , via lldp, rid 1, time 1 day, 08 51 31 chassis chassisid mac 18 17 25 37 65 40 sysname spine 228 sysdescr debian gnu/linux 9 (stretch) linux 4 9 0 14 2 amd64 #1 smp debian 4 9 246 2 (2020 12 17) x86 64 mgmtip 10 250 0 228 mgmtiface 2 capability bridge, on capability router, on capability wlan, off capability station, off port portid local c1 portdescr 0/0 ttl 120 \ 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 \[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 lldp ports med policy lldp ports med policy \[command] lldp ports med policy voice \[vlan vlan id ] \[vlan type {tagged|untagged}] \[priority priority ] \[dscp dscp ] \[purpose] configure interface to publish med tlv \[parameter] parameter description vlan id confgure the vlan id of voice vlan, video vlan priority cos priority dscp dscp priority \[view] interface view \[usage scenario] an lldpdu is the basic unit of communication in the lldp protocol, and all device configuration information to be sent is encapsulated within lldpdus different tlvs are used to transmit or receive information about oneself and neighboring devices by configuring tlvs to be advertised on an interface, you can automatically configure information such as the ip phone vlan and priority associated with devices connected to that interface \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# lldp ports med policy voice vid 100 vlan type tagged priority 1
