0

Is it possible to have interVLAN routing with router on a stick topology, but with remote sites communicating via OSPF? In the diagram below, I can ping PC1 from PC0. What I want is to ping PC2 and PC3 from PC0 with OSPF.

I can manage this with writing static routes but no chance with OSPF. Adjacency is set up but routers can not learn other's VLANs.

What would be the problem?

Thanks in advance, enter image description here

1 Answer 1

4

No. You cannot have the same subnet on different VLANs.

Consider the router on the left receives a packet for 192.168.2.5. Does it forward to the subnet on the left, or the subnet on the right?

You can change the subnets on one side to 192.168.3.0 and 192.168.4.0, for example.

BTW, your question really has nothing to do with OSPF or any other routing protocol.

4
  • Dear Mr. Trunk, thank you for your reply. If I change the subnets on one side as you proposed, wouldn't I have 4 VLANs instead of 2? I can only have 2 VLANs in the project, let's say. My solution is to subnet these 2 networks with /25 mask so that I can stay in the same IP block without increasing the VLAN number. VLAN10 PC0 - 192.168.1.10/25 VLAN20 PC1 - 192.168.1.10/25 VLAN10 PC2 - 192.168.1.129/25 VLAN20 PC3 - 192.168.1.129/25 Do you think it is logical? I am a beginner, sorry if I express myself not in a correct way.
    – D.D
    Mar 3 at 5:52
  • 1
    If I change the subnets on one side as you proposed, wouldn't I have 4 VLANs instead of 2? You already have four VLANs. The VLAN tag is only meaningful to the switch and stops at a layer 3 device. So VLAN 10 on the left is different than VLAN 10 on the right. You can use any subnets you want as long as they are unique.
    – Ron Trunk
    Mar 3 at 13:13
  • I realized your point just after I posted my comment. Thank you so much!
    – D.D
    Mar 3 at 14:27
  • 1
    Please consider accepting my answer so it doesn't keep popping up in the list.
    – Ron Trunk
    Mar 4 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.