Command Line Reference
IP Service
IPv4 Configuration
6 min
show ip interface show ip interface \[command] show ip interfaces \[purpose] display the ip address configured for the interface \[view] system view \[use cases] sonic# show ip interfaces interface master ipv4 address/mask admin/oper bgp neighbor neighbor ip \ 0/49 30 11 13 10/30 up/up n/a n/a 0/50 30 11 13 138/30 up/up n/a n/a loopback0 30 11 0 84/32 up/up n/a n/a vlan400 30 11 64 1/32 up/up n/a n/a vlan800 30 11 14 254/32 up/up n/a n/a mgmt mgmt 192 168 1 10/24 up/up n/a n/a ip address ip address \[command] ip address a b c d/m no ip address a b c d/m \[purpose] add an ip address to the interface \[parameter] parameter description a b c d/m ip address with prefix length \[view] interface view \[use cases] sonic# configure terminal sonic(config)# interface ethernet 2 sonic(config if 2)# ip address 3 3 3 6/24 sonic(config if 2)# show this ! interface ethernet 2 ip address 3 3 3 6/24 ip address dhcp alloc ip address dhcp alloc \[command] ip address dhcp alloc \[purpose] enable the device to act as a dhcp client to dynamically obtain an ip address \[view] interface view \[use cases] sonic# configure terminal sonic(config)# interface vlan 10 sonic(config vlanif 10)# ip address dhcp alloc mac address mac address \[command] mac address hh\ hh\ hh\ hh\ hh \ hh no mac address \[purpose] configure mac addresses for layer 3 ports \[parameter] parameter description hh\ hh\ hh\ hh\ hh \ hh mac address \[view] interface view \[notes] by default, all layer 3 interfaces on the device have the same mac address the first 32bits of user defined layer 3 interface mac addresses need to be consistent \[use cases] sonic# configure terminal sonic(config)# interface ethernet 2 sonic(config if 2)# mac address 00 00 00 37 67\ af sonic(config if 2)# show this ! interface ethernet 2 mac address 00 00 00 37 67\ af
