1

I have multiple vlans on the same network on the switch , how can I configure the IP address for every sub-interface to connect to the router I can't do that it causes overlapping .. what is the solution ?

11
  • What is the overall goal here? May 6, 2017 at 0:05
  • I want to know if there is a way to do that
    – Nina
    May 6, 2017 at 0:07
  • 1
    Routers route between networks, so each router interface must be in a different network. By trying to configure the same network on multiple router interfaces, you will get an error. How is the router supposed to know which interface to use for a packet destined to that network?
    – Ron Maupin
    May 6, 2017 at 15:55
  • I tried to route between two vlans
    – Nina
    May 6, 2017 at 15:58
  • Vlans are layer 2 constructs. There is no concept of routing at layer 2.
    – Ron Trunk
    May 6, 2017 at 17:23

4 Answers 4

2

Short answer : you can't. You either have to make one Vlan ( probably a bad idea) or create multiple IP subnets.

7
  • You mean that Vlans are useful for different subnets?
    – Nina
    May 6, 2017 at 13:10
  • 1
    I'm not sure what you mean, but usually there is one subnet per vlan and vice versa.
    – Ron Trunk
    May 6, 2017 at 13:13
  • Can you explain what you're trying to accomplish?
    – Ron Trunk
    May 6, 2017 at 13:14
  • 2
    No. You use vlans to break up large broadcast domains. You normally assign one IP subnet per vlan
    – Ron Trunk
    May 6, 2017 at 14:25
  • 1
    Yes all host will see all L2 broadcasts
    – Ron Trunk
    May 6, 2017 at 14:50
2

Vlan concept is of reducing the Broadcast domains,So each valn should be in its own subnet. Configure different subnets for each vlan then it will work.

Regards, Harsha D

0
1

The first thing you need to understand is that VLANs are an Ethernet concept. The switch doesn't care too much what kind of higher level traffic is flowing over them.

The second thing you need to understand is that switches have very limited IP functionality. Many only support IP for management purposes, those that do support IP routing usuaully only have very basic routing functionality.

The third thing you need to understand is that overlapping IP blocks are a massive pain in the arse. If you can eliminate them you should do so.


Ok with all that in mind you have overlapping subnets and you can't get rid of them. What to do.

The first thing you need to do is look at the big picture. Figure out what the network looks like. Figure out what your goals are.

  1. Do systems on the different networks need to talk to each other or are you just trying to arrange Internet access.
  2. The subnets overlap but do the host addresses actually clash?

Once you have a picture of what you have and what you need you can start looking for solutions.

If you have overlapping subnets and/or identical default gateways on multiple networks but you don't actually have overlapping host addresses I would look to use a single instance solution on a sufficiently flexible routing platform. Linux will let you assign the same address on multiple interfaces and you can then add /32 routes to send each IP address to the desired interface. If you want hosts on the overlapping subnets to talk to each other you can use proxy arp.

If you do have overlapping host addresses then you probably want to use a solution involving multiple independent instances of the IP stack. Linux calls these instances "network namespaces", the big name router vendors call them "vrfs". Each network can be terminated on it's own instance of the IP stack and then NAT rules applied as neede to translate things to a non-overlapping IP space.

0

It's not feasible to configure multiple Vlans with same network subnets . If there are in process of inter-Vlan routing ip address on Vlan will get overlapped .

To overcome this issue configure different network address for each Vlan.

When sub-interfaces are created in router it means we are creating multiples L3 interface . When L3 interfàce are created ideally should be on different networks to avoid conflict or overlapping.

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.