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 true 330,294#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type 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 true 117,175#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 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] true 143,304#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 150,229#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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
