Configuring the management interface
Prerequisites
- A connection to the console port.
Procedure
-
Switch to the management interface context with the command
interface mgmt
. -
Enable the management interface with the command
no shutdown
. -
Define how the management interface will obtain its IP address. Use the command
ip dhcp
to automatically obtain an address from a DHCP server on the network. Or, assign a static IPv4 or IPv6 address, default gateway, and DNS server with the commandsip static
,default-gateway
, andnameserver
.
Examples
This example enables the management interface with dynamic addressing:
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