2

I have a big problem with configuring inter vlan.

I have a topology like this :

enter image description here

I don't have routing configured. I want to ping from Router 3 (VLAN 10) , a router 4 (VLAN 20). I know that I have to configure sub interfaces on Router 6, but it is impossible because this two addresses overlaps with 24 subnet mask. What is wrong ?

EDIT

actual topology

enter image description here

5
  • I'm unclear as to what you mean. Router 3 and 4 interfaces are on the same VLAN so pinging from one to the other should be very simple. Do you mean pinging from the PC's behind the router?
    – Goodies
    Jan 19 '15 at 22:49
  • Later yes. Router 3 and 4 are on different VLAN. Router 3 is on VLAN 10 and router 4 on VLAN 20
    – Mat689
    Jan 19 '15 at 22:52
  • That makes no sense. Routers are not "on" VLAN's. Interfaces are. From what I see, Router 6 has an interface with 192.168.1.1. Router 3 has an interface of 192.168.1.2. And Router 4 has an interface of 192.168.1.3. These should all be able to ping one another (assuming the IP's are actually configured and not just labels in packet tracer) without any further configuration. Are you pinging from the router command prompt?
    – Goodies
    Jan 19 '15 at 22:56
  • Routers are configured. When interfaces are both on VLAN 10 I can ping between routers. If one is on VLAN 20, I can't ping
    – Mat689
    Jan 19 '15 at 23:00
  • 1
    That's simply an invalid topology.
    – Goodies
    Jan 19 '15 at 23:14
1

In brief, because a vlan should roughly equate to a subnet. If a destination address is in the same subnet as the source address, it wouldn't want to route it. You switch within subnets but route between them.

For your example to work routers 3 and 4 can't be on the same subnet.

If instead router 3 was 192.168.10.1 and router 4 was 192.168.20.1, they'd be in different subnets and would need routing to be able to communicate. You could put 2 sub interfaces of router 6 - 192.168.10.254 and 192.168.20.254 for example and then add a static default route to each of router 3 and 4 to point to the corresponding subinterface on router 6. That default route says "to get to anything not in my subnet, go through my default gateway at 192.168.10.254" (or 192.168.20.254 for router 4)

7
  • Shouldn't devices connected to one switch be part of one network ?
    – Mat689
    Jan 19 '15 at 23:01
  • If they're all in the same subnet and vlan, yes. But vlans (literally virtual lans) let you say things like "ports 1 through 6 are vlan 69. They can't talk to ports 7 to 22 - they're in vlan 4" Jan 19 '15 at 23:08
  • Now it works, I can ping between routers. I can't fully understand why I need static routing when I have vlans. What is the advantage of having vlans with static routing ?
    – Mat689
    Jan 19 '15 at 23:13
  • That one static route is the same as when you manually configure networking on your computer and give it the default gateway (usually your home wireless router). You're literally saying "if you don't know where to send stuff, send it to X.X.X.X Jan 19 '15 at 23:17
  • The key to it working isn't the fact that it's static, it's the fact that it's the /default/ route. You can actually get your default route dynamically through ospf or eigrp Jan 19 '15 at 23:19
4

You have created an "invalid" network design. You have two VLANs that have the same IP subnet configured on them. You can't configure subinterfaces (as you've discovered) because the router, operating at layer 3, can't distinguish between the two subnets.

Generally speaking, you should have one IP subnet per VLAN and vice versa. Either change the IP subnet on one of your VLANs (you will have to enable routing), or make everything the same VLAN.

3
  • Not to add to the confusion, but VRF would allow it, but that's a subject about as far over his head as the moon. (I see this all the time in "cloud infrastructure")
    – Ricky
    Jan 20 '15 at 0:43
  • 1
    @RickyBeam I think you would agree that the point is not to find some way to bend a router to make it work, but rather to point out the problem he's gotten himself into.
    – Ron Trunk
    Jan 20 '15 at 0:48
  • True. But as a Professional Cat Herder™, I always see complex solutions. (I'm not insane, so I don't actually build them.)
    – Ricky
    Jan 20 '15 at 1:01

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.