Sharing Ilmu

Sharing for useful things

Configuration InterVLAN Routing / Router On Stick on Cisco Packet Tracer

On vlan network, device in one vlan id with another vlan id can’t be connected each other. It can connected with same vlan only.  To can be connected, we can use InterVLAN router. intervlan routing also called as router on stick (ROS).  Requires router device and sub-interface router as their respective network gateways.  Intervlan routing requires trunking protocol ISL or 802.1Q.

The following is the topologi :

 

Configure IP Address PC0 :

Configure IP Address PC1 :

 

Create vlan10 and vlan20 on switch device :

SW(config)#vlan 10
SW(config-vlan)#name ADMIN
SW(config-vlan)#exit
SW(config)#vlan 20
SW(config-vlan)#name IT
SW(config-vlan)#exit
SW(config)#

 

Assgin access port on switch for vlan10 and vlan20 :

SW(config)#int fa0/2
SW(config-if)#switchport mode access
SW(config-if)#switchport access vlan 10
SW(config-if)#exit
SW(config)#int fa0/3
SW(config-if)#switchport mode access
SW(config-if)#switchport access vlan 20
SW(config-if)#exit
SW(config)#

Assign trunk port on switch :

SW(config)#int fa0/1
SW(config-if)#switchport mode trunk
SW(config-if)#exit

Test connection from PC0 to PC1. It can’t be connected.

 

Enable interface router G0/0/0 :

MyRouter(config)#int g0/0/0
MyRouter(config-if)#no shutdown
MyRouter(config-if)#exit
MyRouter(config)#

 

Configure Router On Stick and configure ip address.

Writing format is int g0/0/0.VlanID

Encapsulation writing format is encapsulation dot1Q/ISL vlanID

MyRouter(config)#int g0/0/0.10
MyRouter(config-subif)#encapsulation dot1Q 10
MyRouter(config-subif)#ip address 192.168.10.1 255.255.255.0
MyRouter(config-subif)#exit
MyRouter(config)#
MyRouter(config)#int g0/0/0.20
MyRouter(config-subif)#encapsulation dot1Q 20
MyRouter(config-subif)#ip address 192.168.20.1 255.255.255.0
MyRouter(config-subif)#exit

 

Now From PC0 test connection to the gateway ip and to network vlan 20.

Connection between different VLAN network with ROS is successfull.

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>