Step 1. Configure Management Interface
An IP address and subnet mask is configured on the management SVI of the switch from VLAN interface configuration mode. As shown in Figure 1, the interface vlan 99 command is used to enter interface configuration mode. The ip address command is used to configure the IP address. The no shutdown command enables the interface. In this example, VLAN 99 is configured with IP address 172.17.99.11.
The SVI for VLAN 99 will not appear as "up/up" until VLAN 99 is created and there is a device connected to a switch port associated with VLAN 99. To create a VLAN with the vlan_id of 99, and associate it to an interface, use the following commands:
S1(config)# vlan vlan_id
S1(config-vlan)# name vlan_name
S1(config)# end
S1(config)# interface interface_id
S1(config-if)# switchport access vlan vlan_id
Step 2. Configure Default Gateway
The switch should be configured with a default gateway if it will be managed remotely from networks not directly connected. The default gateway is the router the switch is connected to. The switch will forward IP packets with destination IP addresses outside the local network to the default gateway. As shown in Figure 2, R1 is the default gateway for S1. The interface on R1 connected to the switch has IP address 172.17.99.1. This address is the default gateway address for S1.
To configure the default gateway for the switch, use the ip default-gateway command. Enter the IP address of the default gateway. The default gateway is the IP address of the router interface to which the switch is connected. Use the copy running-config startup-config command to back up your configuration.
Step 3. Verify Configuration
As shown in Figure 3, the show ip interface brief command is useful when determining the status of both physical and virtual interfaces. The output shown in the figure confirms that interface VLAN 99 has been configured with an IP address and subnet mask, and Fast Ethernet port F0/18 has been assigned to the VLAN 99 management interface. Both interfaces are now “up/up” and operational.