Command Line Reference
Interface Management
Interface Basic Configuration
20 min
interface basic configuration interface basic configuration show interface description show interface description \[command] show interface description \[purpose] display individual interface description information \[view] system view \[use cases] sonic# show interface description interface oper admin alias description \ ethernet1 up 1000m up up ethernet1 ethernet2 up 1000m up up ethernet2 ethernet3 down 1000m down up ethernet3 ethernet4 up 1000m up up ethernet4 ethernet5 down 1000m down up ethernet5 ethernet6 down 1000m down up ethernet6 ethernet7 down 1000m down up ethernet7 ethernet8 down 1000m down up ethernet8 ethernet9 down 2 5g down up ethernet9 ethernet10 up 1000m up up ethernet10 ethernet11 down 2 5g down up ethernet11 ethernet12 up 2 5g up up ethernet12 ethernet13 down 10g down up ethernet13 ethernet14 up 10g up up ethernet14 ethernet15 up 10g up up ethernet15 ethernet16 up 10g up up ethernet16 show interface transceiver {eeprom|lpmode|presence} show interface transceiver {eeprom|lpmode|presence} \[command] show interface transceiver {eeprom|lpmode|presence} \[purpose] display of optical module information \[parameter] parameter description eeprom display interface transceiver eeprom information lpmode display interface transceiver low power mode presence display module in position information \[view] system view \[use cases] sonic# show interface transceiver eeprom ethernet14 sfp eeprom detected application advertisement n/a connector lc encoding 64b/66b extended identifier gbic/sfp defined by two wire interface id extended rateselect compliance unknown identifier sfp/sfp+/sfp28 length om3(10m) 30 0 nominal bit rate(100mbs) 103 specification compliance 10g ethernet compliance 10gbase sr escon compliance unknown ethernet compliance unknown fibre channel link length intermediate distance (i) fibre channel speed unknown fibre channel transmission media unknown fibre channel transmitter technology shortwave laser w/o ofc (sn) infiniband compliance unknown sfp+cabletechnology unknown sonet compliance codes unknown vendor date code(yyyy mm dd lot) 2018 07 03 vendor name oem vendor oui 00 00 00 vendor pn tssp85b33cdl03 vendor rev a vendor sn stst85s82700095 sonic# show interface transceiver lpmode port low power mode \ ethernet1 off ethernet2 off sonic# show interface transceiver presence port presence \ ethernet1 not present ethernet2 not present show interface port show interface port \[command] show interface port \[ethernet interface name ] \[purpose] display interface details \[view] system view \[use cases] sonic# show interface port ethernet1 is up, line protocol is up hardware is eth interface index is 1 description ipv4 address is 192 168 2 217/24 mode of ipv4 address assignment manual mode of ipv6 address assignment not set ip mtu 9100 bytes linespeed 1 0g input statistics 23794823 packets, 2029335221 octets 63489 multicasts, 680223 broadcasts, 23051111 unicasts 0 error, 0 discarded 0 ipv4packets, 0 ipv4octets 0 ipv6packets, 0 ipv6octets output statistics 14181183 packets, 1219985112 octets 0 multicasts, 0 broadcasts, 14181183 unicasts 0 error, 0 discarded 0 ipv4octets, 0 ipv6octets show interface status show interface status \[command] show interface status \[purpose] show interface status \[view] system view \[use cases] sonic# show interface status interface lanes speed mtu fec alias vlan oper admin type asym pfc \ ethernet1 0 1000m 9100 none ethernet1 routed up up rj45 n/a ethernet2 1 1000m 9100 none ethernet2 routed up up rj45 n/a ethernet3 2 1000m 9100 none ethernet3 routed down up rj45 n/a ethernet4 3 1000m 9100 none ethernet4 routed up up rj45 n/a ethernet5 4 1000m 9100 none ethernet5 routed down up rj45 n/a ethernet6 5 1000m 9100 none ethernet6 routed down up rj45 n/a ethernet7 6 1000m 9100 none ethernet7 routed down up rj45 n/a ethernet8 7 1000m 9100 none ethernet8 routed down up rj45 n/a ethernet9 8 2 5g 9100 none ethernet9 routed down up rj45 n/a ethernet10 9 1000m 9100 none ethernet10 routed up up rj45 n/a ethernet11 10 2 5g 9100 none ethernet11 routed down up rj45 n/a ethernet12 11 2 5g 9100 none ethernet12 routed up up rj45 n/a ethernet13 12 10g 9100 none ethernet13 routed down up n/a n/a ethernet14 13 10g 9100 none ethernet14 routed up up sfp/sfp+/sfp28 n/a ethernet15 14 10g 9100 none ethernet15 routed up up sfp/sfp+/sfp28 n/a ethernet16 15 10g 9100 none ethernet16 routed up up sfp/sfp+/sfp28 n/a show interface status command display description table field field description description lanes internal chip interface id fec interface fec mode alias interface alias oper physical link up/down status of the interface admin enable up/down status for interface business type optical module type show counters interface \[ethernet show counters interface \[ethernet interface name ] \[command] show counters interface \[ethernet interface name ] \[purpose] show interface count \[parameter] parameter description interface name interface name \[view] system view \[use cases] sonic# show counters interface iface state rx ok rx bps rx util rx err rx drp rx ovr tx ok tx bps tx util tx err tx drp tx ovr \ ethernet1 u 23,799,337 6421 08 b/s 0 01% 0 0 0 14,181,350 354 74 b/s 0 00% 0 0 0 ethernet2 u 223 0 00 b/s 0 00% 0 0 0 256 40 79 b/s 0 00% 0 0 0 ethernet3 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet4 u 1,611 0 45 b/s 0 00% 0 0 0 2,838 41 07 b/s 0 00% 0 0 0 ethernet5 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet6 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet7 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet8 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet9 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet10 u 0 0 00 b/s 0 00% 0 0 0 257 40 97 b/s 0 00% 0 0 0 ethernet11 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet12 u 252 0 32 b/s 0 00% 0 0 0 258 40 97 b/s 0 00% 0 0 0 ethernet13 d 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet14 u 0 0 00 b/s 0 00% 0 0 0 0 0 00 b/s 0 00% 0 0 0 ethernet15 u 257 0 28 b/s 0 00% 0 0 0 257 40 97 b/s 0 00% 0 0 0 ethernet16 u 538 33 90 b/s 0 00% 0 0 0 1 0 00 b/s 0 00% 0 0 0 clear counters interface clear counters interface \[command] clear counters interface \[purpose] clear interface count \[view] system view \[use cases] sonic# clear counters interface cleared counters interface ethernet interface ethernet interface name \[command] interface ethernet interface name \[purpose] switch to ethernet view \[parameter] parameter description interface name interface name \[view] system configuration view \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# show this ! interface ethernet 1 shutdown shutdown \[command] shutdown no shutdown \[purpose] shutdown interface \[view] interface view \[usage scenario] when you have made changes to the interface's operational parameters, and the new configuration does not take effect immediately, you can use the "shutdown" and "undo shutdown" commands to disable and re enable the interface to apply the new configuration also, when an interface is idle, it is advisable to use the "shutdown" command to deactivate that interface this helps prevent any issues that may arise due to interference on the interface when it's not in use \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# shutdown sonic(config if 1)# show this ! interface ethernet 1 shutdown speed speed speed \[command] speed speed \[purpose] configure the interface rate \[parameter] parameter description speed rate in mbit selectable 1000/2500/10000 \[view] interface view \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# speed 1000 sonic(config if 1)# show this ! interface ethernet 1 speed 1000 mtu mtu mtu \[command] mtu mtu \[purpose] configure interface mtu \[parameter] parameter description mtu maximum transmission unit, scope 1312~9216 \[view] interface view \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# mtu 2000 sonic(config if 1)# show this ! interface ethernet 1 mtu 2000 startup delay startup delay \[command] startup delay time \[purpose] configure interface delayed start time \[parameter] parameter description time value range 1 300, unit s \[view] interface view \[usage scenario] in unstable network environments, there may be situations where the device cannot obtain an ip address from the expected dhcp server if the device acquires an ip address from another dhcp server, even after network recovery, it may remain unable to obtain an ip address from the desired subnet for an extended period to avoid this scenario, users can specify a delay in port activation time for the device after a reboot, depending on the network conditions \[notes] when the time parameter is configured to 0, it means no delayed start is enabled \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# startup delay 100 description description description \[command] description description no description \[purpose] configure interface description information \[parameter] parameter description description interface description \[view] interface view \[notes] only one description for an interface, which will be overwritten by multiple configurations \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# description abc sonic(config if 1)# show this ! interface ethernet 1 description abc autoneg autoneg \[command] autoneg \[purpose] enable interface speed adaptation \[view] interface view \[usage scenario] the device defaults to enabling interface speed auto negotiation after manually modifying the interface speed, this command can be used to restore the interface speed auto negotiation feature \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# autoneg router interface router interface \[command] router interface no router interface \[purpose] convert a port from a layer 2 interface to a layer 3 interface / disable the layer 3 interface and convert it back to a layer 2 interface \[view] interface view \[usage scenario] the `router interface` command is commonly used to configure layer 3 interfaces on devices when it is necessary to use an interface solely for layer 2 forwarding, such as enabling communication between different vlans without utilizing layer 3 routing functions, the `no router interface` command can be used on the interface to disable the layer 3 functionality of the physical interface this simplifies network configuration, enhances security, and facilitates troubleshooting \[notes] \ before configuring `router interface` on an interface, check if the interface has removed layer 2 configurations such as vlans before converting it to a layer 3 interface \ before deleting `router interface` from an interface, check if the interface has an ip address configured remove the relevant layer 3 configurations first before converting it back to a layer 2 interface \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# router interface sonic(config if 1)# no router interface
