Cisco IOS SSH, Routing, VLANs, and Troubleshooting
ciscosshroutingvlanstroubleshooting
This article builds on Cisco IOS Device and Interface Configuration. Use a lab topology and documentation-only addresses while learning.
Enable SSH
configure terminal
ip domain name lab.example
crypto key generate rsa modulus 2048
ip ssh version 2
username admin privilege 15 secret <strong-admin-secret>
line vty 0 4
login local
transport input ssh
end
Confirm that the device has a reachable management address before testing ssh -l admin 192.0.2.1. Keep Telnet disabled.
Static routing
configure terminal
ip route 198.51.100.0 255.255.255.0 192.0.2.2
end
The next hop must be reachable through an active interface. Check the routing table and route selection:
show ip route
show ip route 198.51.100.0
VLAN and access port
On a switch, a simple access-port example is:
configure terminal
vlan 20
name USERS
interface gigabitEthernet 0/2
switchport mode access
switchport access vlan 20
spanning-tree portfast
end
Use spanning-tree portfast only on ports connected to end devices, not switch-to-switch links. Trunk and inter-VLAN routing design requires the matching configuration on the peer.
Troubleshoot in layers
show interfaces status
show ip interface brief
show vlan brief
show mac address-table dynamic
show arp
ping 192.0.2.2
traceroute 198.51.100.10
Check physical state, VLAN membership, addressing, routing, ACLs, and the destination service in that order. Save only after the complete path works.