CCNA · Lesson 11 of 13
Management VLAN: Managing Switches over SSH
To configure a switch without walking to it with a console cable, it needs an IP. That IP lives in the management VLAN.
In a nutshell
The management VLAN is a dedicated VLAN for managing devices. The switch gets an IP on an SVI in that VLAN and a gateway so you can SSH into it from other networks.
In this lesson
What is the management VLAN?
A Layer 2 switch does not need an IP to switch frames. But to manage it remotely (SSH, SNMP, syslog) it does. The management VLAN is the VLAN that holds the management IPs of switches, routers and access points.
By default, the management SVI is interface vlan 1. Since VLAN 1 is on every port, it is better to use a dedicated VLAN, for example 99.
Step-by-step configuration
SW1(config)# vlan 99
SW1(config-vlan)# name MANAGEMENT
SW1(config)# interface vlan 99
SW1(config-if)# ip address 192.168.99.11 255.255.255.0
SW1(config-if)# no shutdown
SW1(config)# ip default-gateway 192.168.99.1 ← to answer other networks
Why ip default-gateway?
A Layer 2 switch does not route. If the administrator is on another network (for example 192.168.10.0/24), the switch does not know how to reply. With ip default-gateway you tell it: "anything not on my network, send it to the router". Without it, you could only manage it from VLAN 99 itself.
On a Layer 3 switch with ip routing, ip default-gateway is not used; a default route is used instead (ip route 0.0.0.0 0.0.0.0 ...).
SSH access
SW1(config)# hostname SW1
SW1(config)# ip domain-name company.local
SW1(config)# crypto key generate rsa modulus 2048
SW1(config)# username admin secret Cisco123
SW1(config)# line vty 0 15
SW1(config-line)# login local
SW1(config-line)# transport input ssh ← SSH only, no Telnet
For it to work, check this
- VLAN 99 exists and has at least one active port (a trunk that allows it counts). Otherwise the SVI stays up/down.
- Trunks towards the router allow VLAN 99.
- The router has an IP in VLAN 99 (for example subinterface G0/0.99), which is the gateway.
Best practice
The management VLAN should have no users, and should not be VLAN 1 or the native VLAN.
What you must remember
- The management VLAN holds the management IPs of the devices.
- On a Layer 2 switch: interface vlan 99 + ip address + no shutdown.
- ip default-gateway lets you manage it from other networks.
- Use a dedicated VLAN, different from VLAN 1, the native VLAN and user VLANs.
Check what you learned
4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.