1

I am having 2 VLAN
VLAN1 - IP range 192.168.1.100 to 192.168.1.149 subnet 255.255.255.0 i.e. I have 50 host in VLAN1
VLAN2 - IP range 192.168.1.200 to 192.168.1.249 subnet 255.255.255.0 i.e. I have another 50 host in VLAN2

Now I want to communicate in between the above 2 VLAN, for that I can place router with multiple sub interface equal to number of VLAN's i.e. in our case 2. The issue is that same subnet IP cannot be assigned to different sub-interface over the router.

As a solution to this I see many tutorials using complete different set of IP having differing by subnet. But then what is point to subnet, since we already have altered the subnet. That can be done any way even without VLAN.

What is the solution keeping same subnet IP's. Do share some tutorial or configured .cpt file.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 14 '17 at 2:02
1

There's some confusion here.

I suppose you wanted to say :

VLAN1 IP range 192.168.1.100 - 199   
VLAN2 IP range 192.168.1.200 - 299

First the IP range 192.168.1.200 - 299 doesn't exist, an IP address cannot be higher than x.x.x.255. IP addresses are binary numbers, coded on 32 bits. The decimal representation "192.168.1.200" is just that, a representation of a binary number, made to be more conveniently handled by human.

The fourth number in the decimal notation correspond to the last 8 bits in binary. 8 bits in binary give 256 value in decimal, thus 0 -> 255.

Second routing deal with networks / subnetworks, not IP range, and those network are also truly expressed in binary, so they are bound by power of 2 addresses.

192.168.1.100 to 199 doesn't correspond to a network so you can't route this sole specific network range.

192.168.1.0/24 is a network that contains 256 IP addresses and can be divided for example in 4 subnets like

192.168.1.0/26 I.E. 192.168.1.0 to 63
192.168.1.64/26 I.E. 192.168.1.64 to 127
192.168.1.128/26 I.E. 192.168.1.128 to 192.168.1.191
192.179.1.192/26 I.E. 192.168.1.192 to 192.168.1.255

You need to redesign your addressing to fit in actual networks.

You will find more information about subnet in this excellent answer :

How do you calculate the prefix, network, subnet, and host numbers?

Edit
if you want to have 2 VLANs with 50 host in each you can use:

VLAN1 with network 192.168.1.0/26
VLAN2 with network 192.168.1.64/26

On your router you set:

  • VLAN1 interface with IP 192.168.1.1 , subnet mask 255.255.255.192
  • VLAN2 interface with IP 192.168.1.65, subnet mask 255.255.255.192

In the first vlan you can use IP addresses 192.168.1.2 to 192.168.1.62, so 61 possible hosts

In the second vlan you can use IP addresses 192.168.1.66 to 192.168.1.126, so again 61 possible hosts.

Why 61 and not 64?
Well first it's actually 62, since the router IS a host but you usually don't count it as a machine that can be connected in the network.
Second the network address and the broadcast address are reserved and cannot be used by hosts.

Once again you CANNOT decide to have a (sub)network that has an arbitrary number of IP (like 50), it's always a power of 2 size (minus the network and broadcast address).

  • sorry that was a typing mistake, I have updated IP addr to 192.168.1.249. And by ip range I mean I have 50 hosts in each VLAN. – 14mcei Apr 22 '16 at 8:41
  • And if I break down with /26 subnet, then by default all 4 IP set will into different subnet, so those cannot be used if I remove VLAN & router. – 14mcei Apr 22 '16 at 8:43
  • the purpose of routers is to... ..route between (sub)networks, so of course it will works with /26 subnets. I'll edit my answer. – JFL Apr 22 '16 at 8:59
  • well answered @JFL , So I have last question. If we are already dividing by new subnet, that can even be done without VLAN i.e. I can assign 10.0.0.0/8 to say 1st set of hosts 11.0.0.0/8 to 2nd set of hosts. Here no one will be communicate between other set of computers directly without router no even using VLAN. Is it clear ? – 14mcei Apr 22 '16 at 11:51
  • Right there will be no effective communication. However you will merge 2 broadcast domains in a single one, degrading performance. It works but it's not a good practice. – JFL Apr 22 '16 at 11:56
1

You may eventually enable proxy arp on each routers (sub)interface. However some things won't work well with proxy arp enabled. It would make a good transition solution, for the time you renumber your hosts.

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.