Skip to content
Ask AI

Management Port

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.

Table 1 Management Port View

CommandPurpose
show interface mgmtDisplay management port configuration.

[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

Table 2 Management Port Config

CommandPurpose
interface mgmt 0Enter 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.

[Command]

interface mgmt 0

[Purpose]

Enter Management Port Configuration View

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# interface mgmt 0

[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]

ParameterDescription
A.B.C.D/MIPv4 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

[Command]

ipv6 address A::B/M [gw A::B]

[Purpose]

Configure or modify the IPv6 address and gateway of mgmt.

[Parameters]

ParameterDescription
A::B/MIPv6 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