Command Line Reference
Interface Configuration
Management Port
7 min
by default, the management port (mgmt 0) of the switch does not have an ip address when shipped from factory it can automatically obtain ip address through dhcp by connecting the management port to dhcp server on the same network segment at the same time, asternos supports users to manually configure the management port ip, which can only have one ipv4 address and one ipv6 address multiple configurations will be overwritten management port view management port view table 1 management port view table 1 management port view command purpose show interface mgmt display management port configuration show interface mgmt show interface mgmt \[command] show interface mgmt \[purpose] display management port configuration \[view] privileged user view \[use cases] sonic# show interface mgmt management ip address = 10 250 0 138/24 management network default gateway = 10 250 0 254 management port config management port config table 2 management port config table 2 management port config command purpose interface mgmt 0 enter management port configuration view ip address a b c d/m \[ gw a b c d ] configure or modify the ipv4 address and gateway of the management port ipv6 address \[ a b/m gw a b ] configure or modify the ipv6 address and gateway of the management port interface mgmt 0 interface mgmt 0 \[command] interface mgmt 0 \[purpose] enter management port configuration view \[view] global configuration view \[use cases] sonic# configure terminal sonic(config)# interface mgmt 0 ip address ip address a b c d/m \[gw a b c d ] \[command] ip address a b c d/m \[ gw a b c d ] \[purpose] configure or modify the ipv4 address and gateway of mgmt \[parameters] parameter description a b c d/m ipv4 address with prefix length a b c d (optional) ipv4 gateway address without prefix length \[view] management port 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 run command no ip address a b c d/m \[ gw a b c d ] to delete ipv4 address configuration of mgmt \[use cases] sonic# configure terminal sonic(config)# interface mgmt 0 sonic(config mgmt 0)# ip address 10 250 0 103/24 gw 10 250 0 254 ipv6 address \[ ipv6 address \[ a b/m gw a b ] \[command] ipv6 address a b/m \[ gw a b ] \[purpose] configure or modify the ipv6 address and gateway of mgmt \[parameters] parameter description a b/m ipv6 address with prefix length a b (optional) ipv6 gateway address without prefix length \[view] management port configuration view \[notes] 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 \[ gw a b c d ] to delete ipv6 address configuration of mgmt \[use cases] sonic# configure terminal sonic(config)# interface mgmt 0 sonic(config mgmt 0)# ipv6 address 2013 138/64 gw 2013 1
