Command Line Reference
Interface Configuration
Logical Interfaces
20 min
vlan interface vlan interface please refer to docid\ qprgny3rjshvxgopfrvkb lag interface lag interface please refer to docid\ q53ou9z9gtxn5zjxycqpm sub interface sub interface sub interface status view sub interface status view table 1 sub interface status view table 1 sub interface status view true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type show sub interface \[ethernet show sub interface \[ethernet interface name subinterface number ] \[command] show sub interface \[ ethernet interface name subinterface number ] \[purpose] display information about the status of subinterfaces \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] privileged user view \[use cases] sonic# show sub interface sub port interface speed mtu vlan admin type \ 0/0 2 25g 9100 2 up 802 1q encapsulation show {ip|ipv6} interfaces show {ip|ipv6} interfaces \[command] show { ip | ipv6 } interfaces \[purpose] display ip address configuration of subinterfaces \[view] privileged user view \[use cases] sonic# show ip interfaces interface master ipv4 address/mask admin/oper bgp neighbor neighbor ip \ 0/0 2 2 0 0 1/24 up/down n/a n/a 0/48 199 0 3 1/24 up/up n/a n/a 0/52 199 0 7 1/24 up/up n/a n/a loopback0 10 1 0 34/32 up/up n/a n/a mgmt 10 250 0 138/24 up/up n/a n/a sub interface config sub interface config table 2 subinterface config table 2 subinterface config true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type interface {ethernet|link aggregation} interface name subinterface number \[command] interface {ethernet|link aggregation} interface name subinterface number \[purpose] create a subinterface \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] global configuration view \[notes] run command no interface {ethernet|link aggregation} interface name subinterface number to delete the subinterface \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/1 1 sonic(config if 0/1 1)# show this ! interface ethernet 0/1 1 sonic(config)# no interface ethernet 0/1 1 mtu mtu \[command] mtu mtu \[purpose] configure the mtu value on a subinterface \[parameters] true 112,549#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] subinterface configuration view \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/1 1 sonic(config if 0/1 1)# mtu 2000 sonic(config if 0/1 1)# show this ! interface ethernet 0/1 1 mtu 2000 shutdown shutdown \[command] shutdown \[purpose] bring the subinterface down administratively \[view] subinterface configuration view \[notes] run command no shutdown to bring the sub interface up administratively \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/1 1 sonic(config if 0/1 1)# shutdown sonic(config if 0/1 1)# show this ! interface ethernet 0/1 1 shutdown ip address { ip address { a b c d/m | a b/m } \[secondary] \[command] ip address { a b c d/m | a b/m } \[ secondary ] \[purpose] configure ip address for the subinterface \[parameters] true 121,540#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[view] subinterface configuration view \[notes] ipv4 address with subnet mask /32 is not allowed to be configured addresses with subnet mask /31 is allowed in other subnet masks, addresses with the host portion all zeros or all ones are not allowed ipv6 address with subnet mask /127 or /128 is not allowed to be configured in other subnet masks, addresses with the host portion all zeros are not allowed, but all ones are allowed run command no ip address { a b c d/m | a b/m } \[ secondary ]to delete ip address configuration of the subinterface \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/2 2 sonic(config if 0/2 2)# ip address 3 3 3 6/24 sonic(config if 0/2 2)# show this ! interface ethernet 0/2 2 ip address 3 3 3 6/24 mac address mac address hh\ hh\ hh\ hh\ hh\ hh \[command] mac address hh\ hh\ hh\ hh\ hh\ hh \[purpose] specify a mac address to the subinterface \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] subinterface configuration view \[notes] the default is the mac of the switch run command no mac address to restore the mac of the sub interface to default \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/2 2 sonic(config if 0/2 2)# mac address 18 17 25 37 67\ af sonic(config if 0/2 2)# show this ! interface ethernet 0/2 2 mac address 18 17 25 37 67\ af loopback loopback loopback view loopback view table 3 loopback view table 3 loopback view true 221,440#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type show {ip|ipv6} interfaces show {ip|ipv6} interfaces \[command] show { ip | ipv6 } interfaces \[purpose] display ip address configuration of loopback interfaces \[view] privileged user view \[use cases] sonic# show ip interfaces interface master ipv4 address/mask admin/oper bgp neighbor neighbor ip \ 0/48 199 0 3 1/24 up/up n/a n/a 0/52 199 0 7 1/24 up/up n/a n/a 0/72 10 72 0 1/24 up/up n/a n/a loopback0 10 1 0 34/32 up/up n/a n/a mgmt 10 250 0 138/24 up/up n/a n/a loopback config loopback config table 4 loopback config table 4 loopback config true 271,390#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type interface loopback interface loopback loopback id \[command] interface loopback loopback id \[purpose] enter loopback interface configuration view \[parameters] true 141,520#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] global configuration view \[notes] loopback0 has been created by default and cannot be deleted run command no interface loopback loopback id to delete loopback interface \[use cases] sonic# configure terminal sonic(config)# interface loopback 1 sonic(config loif 1)# show this ! interface loopback 1 ip address { ip address { a b c d/m | a b/m } \[command] ip address { a b c d/m | a b/m } \[purpose] configure ip address for the loopback interface \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] loopback interface configuration view \[notes] run command no ip address { a b c d/m | a b/m } to delete ip address configuration of the loopback interface \[use cases] sonic# configure terminal sonic(config)# interface loopback 2 sonic(config loif 2)# ip address 3 3 3 6/24 sonic(config loif 2)# show this ! interface loopback 2 ip address 3 3 3 6/24
