This is part of a Getting Started series in configuring Cisco switches and routers. The series can be used to help prepare for the CCNA certification. Our last post was on Configuring a Switch Hostname.
When I first started out in networking, I thought management IP addresses had to be configured physically to a switch port. A friendly and approachable engineer educated me on how you can configure that IP address on a virtual interface. I was perplexed at the time but in this post I will help to explain it.
When a switch is first booted up we usually connect to the console port. This is to apply the initial configuration of a switch. To configure a management IP address, we will use one of the VLAN interfaces. This is called an SVI, or switched virtual interface. It is just like configuring an IP address on a physical interface but it’s virtual. When the switch has an active port on which that VLAN is part of, the SVI will become active.
In this example, we configure an IP address on the default VLAN 1.
Switch#configure terminal Switch(config)#interface vlan 1 Switch(if-config)#ip address 192.168.1.1 255.255.255.0 Switch(if-config)#no shutdown
Let’s verify configuration of our management IP address with the show command:
Switch#show ip interface brief
If you plug into one of the interfaces on VLAN 1 and configure your computer on the 192.168.1.0/24 network you should be able to ping 192.168.1.1 and connect to it via SSH or Telnet.
While it appears easy to configure a management IP address on a switch, the hard part is really in the planning of IP address assignments. A management VLAN is dedicated to managing devices. It is also best practice to not use VLAN 1 for regular data traffic or network management. In this example I use VLAN 1 for teaching purposes.