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
配置米anagement 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 mgmtswitch(config-if-mgmt)#no shutdownswitch(config-if-mgmt)#ip dhcp
This example enables the management interface with static addressing creating the following configuration:
- Sets a static IPv4 address of198.168.100.10with a mask of24bits.
- Sets the default gateway to198.168.100.200.
- Sets the DNS server to198.168.100.201.
switch(config)#interface mgmtswitch(config-if-mgmt)#no shutdownswitch(config-if-mgmt)#ip static 198.168.100.10/24switch(config-if-mgmt)#default-gateway 198.168.100.200switch(config-if-mgmt)#nameserver 198.168.100.201