Configuring the management interface
Prerequisites
- A connection to the console port.
Procedure
-
Switch to the management interface context with the command
interface mgmt
. -
By default, the management interface on the management port is enabled. If it was disabled, reenable it with the command
no shutdown
. -
Use the command
ip dhcp
to configure the management interface to automatically obtain an address from a DHCP server on the network (factory default setting). Or, assign a static IPv4 or IPv6 address, default gateway, and DNS server with the commandsip static
,default-gateway
, andnameserver
. -
SSH is enabled by default on the management VRF. If disabled, enable SSH with the command
ssh server vrf mgmt
.
Examples
This example enables the management interface with dynamic addressing using DHCP:
switch(config)# interface mgmt switch(config-if-mgmt)# no shutdown switch(config-if-mgmt)# ip dhcp
This example enables the management interface with static addressing creating the following configuration:
- Sets a static IPv4 address of 198.168.100.10 with a mask of 24 bits.
- Sets the default gateway to 198.168.100.200.
- Sets the DNS server to 198.168.100.201.
switch(config)# interface mgmt switch(config-if-mgmt)# no shutdown switch(config-if-mgmt)# ip static 198.168.100.10/24 switch(config-if-mgmt)# default-gateway 198.168.100.200 switch(config-if-mgmt)# nameserver 198.168.100.201