Setup Cisco router on a stick

Configuration vlan interfaces on switch

interface vlan 172
ip address 172.168.1.253 255.255.255.0
exit

interface vlan 192
ip address 192.168.1.253 255.255.255.0
exit

interface van 10
ip address 10.0.0.253 255.255.255.0
exit

Setup trunk from Switch to router

SW1(config)# interface Gix/x/x
SW1(config-if)# description "trunk to router"
SW1(config-if)# switchport mode trunk
SW1(config-if)# spanning-tree portfast trunk

Configuration on router

R1# conf t
R1(config)# interface Gi0/x
R1(config-if)# no ip address
R1(config-if)# duplex auto
R1(config-if)# speed auto

R1(config-if)# interface gigabitethernet0/x.172
R1(config-subif)# encapsulation dot1q 172 //match vlan
R1(config-subif)# ip address 172.168.0.252 255.255.255.0
R1(config-subif)# ip nat inside

R1(config-subif)# interface gigabitethernet0/x.192
R1(config-subif)# encapsulation dot1q 192 //match vlan
R1(config-subif)# ip address 192.168.2.252 255.255.255.0
R1(config-subif)# ip nat inside

Done. Check your inter-vlan routing

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top