CCNA Router on a stick/VLAN routing
ROAS(Router on a stick) with multiple VLAN routing. I used copy/paste for the commands to save time. All the commands used are below:
PC1:
ip 192.168.10.1 255.255.255.0 192.168.10.254
save
PC2:
ip 192.168.20.1 255.255.255.0 192.168.20.254
save
PC3:
ip 192.168.30.1 255.255.255.0 192.168.30.254
save
Router config:
enable
configure terminal
interface gigabitethernet 0/0
no shut
interface gigabitethernet 0/0.10
encap dot1q 10
ip add 192.168.10.254 255.255.255.0
interface gigabitethernet 0/0.20
encap dot1q 20
ip add 192.168.20.254 255.255.255.0
interface gigabitethernet 0/0.30
encap dot1q 30
ip add 192.168.30.254 255.255.255.0
end
Switch config:
enable
configure terminal
interface gigabitethernet 0/0
switchport mode access
switchport access vlan 10
interface gigabitethernet 0/1
switchport mode access
switchport access vlan 20
interface gigabitethernet 0/2
switchport mode access
switchport access vlan 30
interface gigabitethernet 2/0
switchport trunk encap dot1q
switchport mode trunk
end
ccna