03-27-2012 09:36 AM - edited 03-07-2019 05:48 AM
hi:
today i was asked a question about router-on-a-stick. it is quite interesting.
the situation is like this , two PCs connect to each other via a switch, and a router is connected on another side of switch( typical router on a stick setup)
pc0 ip:1.1.1.1/24 vlan10
pc0 gateway:1.1.1.254
pc1 ip:1.1.1.2/24 vlan20
pc1 gateway:1.1.1.1.254
router f0/0:1.1.1.254/24
pc0 is a part of vlan 10 and pc1 is a part of vlan 20 and they share the same gateway.
in this case how do i make pc1 communicate with pc0 ? is it even doable ? if so how do i do this?
thanks in advance.
03-27-2012 09:52 AM
This is bad design. It is not advisable to share a subnet across vlans.
Cisco recommends to stick to one subnet per vlan.
-Vijay
03-27-2012 06:17 PM
thanks.
03-27-2012 11:19 AM
Both are in the same subnet but in 2 different layer 2 vlans. Change vlan on one pc to match the other seeing that the address range is in the same in both vlans. Can't imagine why you would want to have the setup in your drawing .
03-27-2012 06:20 PM
i just wanted to know if it is doable. i know this kind of setup is insane though. thanks
03-27-2012 01:18 PM
Hi Dannan,
As gentlemen have said - there is something wrong. First of all you should use one subnet per vlan and second thing is that this is not how you setup Router-On-A-Stick.
Router-On-A-Stick would have for example 2 subinterfaces - one for vlan 10, another for vlan 20. Both vlans would have been in different subnets. Something like this:
Router:
for vlan 10
fa0.0/10
encapsulation dot1q 10
ip address 1.1.1.254 /24
for vlan 20
fa0.0/20
encapsulation dot1q 20
ip address 1.1.2.254 /24
PCs
for vlan 10
ip address 1.1.1.1 /24
default gateway 1.1.1.254
for vlan 20
ip address 1.1.2.1 /24
default gateway 1.1.2.254
Best regards,
Jan
03-27-2012 06:17 PM
thanks
03-28-2012 03:08 AM
Hi,
I think the question is insane but there is a solution. We had once tried routing this way on a Cisco 6500 and used routing between two different VRF's. dont quite recall much but i guess it is possible. As for a CCNA kinda question, not possible.
Cheers
Rustom BIllimoria.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide