3.2 Basic Configuration of the Switch
3.2.4 Configuring the switch for remote access
Before you can Telnet to, ping, or globally manage the switch, you need to associate that switch with an IP address and the management VLAN. Although LAN switches are essentially Layer 2 devices, these switches do maintain an IP stack for administrative purposes. Assigning an IP address to the switch associates that switch with the management VLAN, provided the subnet portion of the switch IP address matches the subnet number of the management VLAN.

To assign an IP address on a Cisco IOS software-based switch, follow these steps :

  1. Enter global configuration mode on the switch.
  2. Go to interface VLAN 1 by issuing the command: Switch(config)#interface vlan 1.
  3. Enter the switch IP address with the command: Switch(config-if)#ip address address mask.
  4. If you are accessing your switch via a router, you must configure a default gateway on the switch. This can be done in global configuration mode with the command: Switch(config)#ip default-gateway address.

The show ip interface command displays the IP address and the subnet mask for the device. In the example in Figure , the management interface resides in VLAN1, which is the default management VLAN, and has a subnet mask of 255.255.255.0.

To remove the IP address and subnet mask, enter the no ip address command on the vlan interface.

If the switch is a Catalyst OS set command-based switch, assign the IP address to the in-band logical interface. To assign an IP address to this interface, enter the following command in privileged mode:

Switch>(enable) set interface sc0 address netmask [broadcast address]

When you define the in-band management IP address, you assign the IP address to its associated management VLAN. The number of the VLAN must match the subnet number of the IP address. To associate the in-band logical interface to a specific VLAN, enter the following command in privileged mode:

Switch>(enable) set interface sc0 [vlan]

If you do not specify a VLAN, the system automatically defaults to VLAN1 and the management VLAN.

The show interface command displays the IP address and the subnet mask for the device. In the previous example, the management interface resides in VLAN1 and has a subnet mask of 255.255.255.0.

Interactive Lab Activity  (Flash, 318 kB)
  In this activity, you will learn how to configure basic switch management on the Catalyst 4000.
Interactive Lab Activity  (Flash, 485 kB)
  In this activity, you will learn how to configure basic management on the Catalyst 2900 series access switch.