VLAN Router Sub-Interface IP Question

bankintherollbankintheroll Posts: 121Member
I set up 3 routers, each with its own switch, and 2 devices connected to each switch. I put 1 device from each network in VLAN 20, and the other device from each network in VLAN 30.

Then I set up the sub interfaces FA0/0.20 and FA0/0.30 on each router. Can you make the IP addresses for int FA0/0.20 all the same (192.168.20.1)? Or would you have to make 192.168.20.1 for R1, 192.168.20.2 for R2, and 192.168.20.3 for R3?

I'm wondering because, if you ping the local router from one of the devices, and the subinterface IPs are the same (192.168.20.1) on all the routers, how would it know which gateway to ping?

Comments

  • late_collisionlate_collision Posts: 146Member
    I'm having trouble visualizing your topology, but the more important question is, when is it acceptable to have duplicate IP addresses on a network?
  • bankintherollbankintheroll Posts: 121Member
    Sorry, I should have sent a picture. Here it is from Packet Tracer.


  • omi2123omi2123 Posts: 189Member
    if u r using ROAS then however many VLANs traffic will route from the router, the router has to have that many sub-interfaces configured.....
  • fredrikjjfredrikjj Posts: 879Member
    Routing is going to be broken in that topology. Consider for example PC2 (192.168.30.151) trying to reach PC4 (192.168.30.152). When PC2 pings 192.168.30.152 that computer compares the destination address with its subnet mask and concludes that PC4 should be on the same local network. It never even reaches the default gateway.
  • fredrikjjfredrikjj Posts: 879Member
    It actually could 'work', but you would have to do some weird stuff. Basically, you would have to redistribute a static host route on each router for each destination and then rely on proxy arp or a static arp entry to get the mac address for your default gw... I think.
Sign In or Register to comment.