Command Line Reference
Layer 2 Configuration
LLDP
13 min
lldp view lldp view table 1 lldp view table 1 lldp view command purpose show lldp neighbor { summary|interface interface name } display lldp neighbors showlldp local { summary|interface interface name } display lldp configuration show lldp neighbor {summary|interface show lldp neighbor {summary|interface interface name } \[command] show lldp neighbor { summary | interface interface name } \[purpose] display lldp neighbors \[parameters] parameter description interface name interface name (eg 0/1) \[view] privileged user view \[use cases] sonic# show lldp neighbor summary capability codes (r) router, (b) bridge, (o) other localport remotedevice remoteportid capability remoteportdescr \ 0/48 spine 228 c1 br ethernet0 0/60 sonic c6 br ethernet68 0/72 sonic 102 c7 br 0/72 \ total entries displayed 3 sonic# show lldp neighbor interface 0/48 \ lldp neighbors \ interface 0/48 , 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 local {summary|interface show lldp local {summary|interface interface name } \[command] show lldp local { summary | interface interface name } \[purpose] display lldp configuration \[parameters] parameter description interface name interface name (eg 0/1) \[view] privileged user view \[use cases] sonic# show lldp local summary \ global configuration \ configuration transmit delay 30 transmit delay in milliseconds 30000 transmit hold 4 maximum number of neighbors 32 receive mode no pattern for management addresses 10 250 0 171 interface pattern ethernet ,eth0 permanent interface pattern (none) interface pattern for chassis id eth0 override chassis id with (none) override description with sonic software version sonic v3 1r0406p01t08 hwsku cx532p n distribution debian 11 10 kernel 5 10 0 8 2 amd64 override platform with linux override system name with sonic advertise version yes update interface descriptions no promiscuous mode on managed interfaces no disable lldp med inventory yes lldp med fast start mechanism yes lldp med fast start interval 1 source mac for lldp frames on bond slaves local port id tlv subtype for lldp frames unknown agent type unknown \ sonic# show lldp local interface 0/4 \ lldp interfaces \ interface ethernet4, via lldp, time 0 day, 09 11 32 chassis chassisid mac 74\ fe 48 7b 23 1a sysname sonic sysdescr sonic software version sonic v3 1r0406p01t08 hwsku cx532p n distribution debian 11 10 kernel 5 10 0 8 2 amd64 mgmtip 10 250 0 171 mgmtiface 2 capability bridge, on capability router, on capability wlan, off capability station, off port portid local c2 portdescr ethernet4 ttl 120 \ lldp config lldp config table 2 lldp config table 2 lldp config command purpose lldp { enable | disable } enable or disable lldp globally lldp message transmission interval interval time set the lldp message sending interval lldp message transmission hold hold multiplier set the multiplier for lldp messages hold time in neighboring devices lldp port id subtype { local|mac addreess | ifname } set the subtype in lldp messages lldp management address advertisements enable advertise the management ip address in lldp messages lldp capabilities advertisements enable advertise the features supported and enabled by the device in the lldp message lldp admin status { tx | rx | txrx | disable } set the operating mode of lldp for the interface as send only/receive only/send and receive/ not send and receive lldp {enable|disable} lldp {enable|disable} \[command] lldp { enable | disable } \[purpose] enable or disable lldp globally \[view] global configuration view \[use cases] sonic(config)# lldp enable lldp message transmission interval lldp message transmission interval interval time \[command] lldp message transmission interval interval time \[function] set the lldp message sending interval \[parameters] parameter description interval time interval time, range 5 32768 \[view] global configuration view \[use cases] sonic# configure terminal sonic(config)# lldp message transmission interval 10 lldp message transmission hold lldp message transmission hold hold multiplier \[command] lldp message transmission hold hold multiplier \[function] set the multiplier for lldp messages hold time in neighboring devices \[parameters] parameter description hold multiplier multiplier of hold time, range 2 10 \[view] global configuration view \[notes] calculation formula for multiplier of lldp message hold time ttl = min (65535, (interval × hold)) \[use cases] sonic# configure terminal sonic(config)# lldp message transmission hold 10 lldp port id subtype {local|mac addreess|ifname} lldp port id subtype {local|mac addreess|ifname} \[command] lldp port id subtype { local | mac addreess | ifname } \[function] set the subtype in lldp messages \[view] global configuration view \[use cases] sonic# configure terminal sonic(config)# lldp port id subtype local lldp management address advertisements enable lldp management address advertisements enable \[command] lldp management address advertisements enable \[function] advertise the management ip address in lldp messages \[view] global configuration view \[notes] the default configuration is to enable management ip address advertisement run command no lldp management address advertisements enable command to disable the advertisement of management ip address in lldp messages \[use cases] sonic# configure terminal sonic(config)# lldp management address advertisements enable lldp capabilities advertisements enable lldp capabilities advertisements enable \[command] lldp capabilities advertisements enable \[function] advertise the features supported and enabled by the device in the lldp message \[view] global configuration view \[notes] the default configuration is to enable lldp capabilities advertisements run command no lldp capabilities advertisements enable to disable lldp capabilities advertisements \[use cases] sonic# configure terminal sonic(config)# lldp capabilities advertisements enable lldp admin status {tx|rx|txrx|disable} lldp admin status {tx|rx|txrx|disable} \[command] lldp admin status { tx | rx | txrx | disable } \[purpose] set the operating mode of lldp for the interface as send only/receive only/send and receive/not send and receive \[view] physical interface configuration view \[notes] the default mode is txrx \[use cases] sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# lldp admin status rx
