Content

| 1.4 |  | Basic Configuration of the Switch |
| 1.4.7 |  | Configure the switch for remote access |

To perform Layer 3 operations such as Telnet, ping, or remote switch management, the switch must have a valid IP address associated with 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-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 accessing the switch across a router, a default gateway on the switch must be configured. This can be done in global configuration mode with the command:

   > Switch(config)#ip default-gateway address

The show 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 a VLAN is not specified, the system automatically defaults to VLAN1 as 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.