×

Configuring VLAN1 as a Management VLAN on a Cisco Switch

In this article, we’ll go through how to properly configure VLAN1 as the management VLAN on a Cisco Switch, assign it an IP address, and set up a trunk connection with a router.

Network Topology

Switch (management) → IP: 10.90.90.1

Router (gateway) → IP: 10.90.90.254

Connection between them: trunk

1. Switch Configuration

Enter global configuration mode:

en <- Enabling EXEC privilege mode 
conf t <- (Entering Configuration Mode < On the Terminal)

VLAN1 Management

interface vlan 1
ip address 10.90.90.1 255.255.255.0
no shutdown

Default Gateway

ip default-gateway 10.90.90.254

Trunk Port (example: e0/1)

interface Ethernet0/1
switchport mode trunk
switchport trunk allowed vlan 1

Other Ports (set to access VLAN1)

interface range gigabitEthernet0/2 - 24
switchport mode access
switchport access vlan 1

2. Router Configuration

If using a sub-interface:

interface gigabitEthernet0/0.1
encapsulation dot1q 1 native
ip address 10.90.90.254 255.255.255.0
no shutdown

If the router does not use sub-interfaces, simply assign the IP directly:

interface gigabitEthernet0/0
ip address 10.90.90.254 255.255.255.0
no shutdown

Connectivity Test

On the switch:

ping 10.90.90.254

On the router:

ping 10.90.90.1

If the pings are successful, the configuration is correct.

Optional Feature: Enabling Telnet and SSH on the Switch

Create a Local User

username admin privilege 15 secret <StrongPassword123>

Replace <StrongPassword123> to yours.
Optional, change <admin> to something what you like.

Enable VTY Lines (Telnet/SSH Access)

line vty 0 4
login local
transport input telnet ssh

Configure Domain and SSH Keys

ip domain-name mylab.local
crypto key generate rsa modulus 2048
ip ssh version 2
Connectivity Test
telnet 10.90.90.1
ssh admin@10.90.90.1

Congratilations! Remote management is enabled using Telnet and SSH.