Skip to main content

VLSM (Variable Length Subnet Masks)

More
15 years 7 months ago #27697 by NeoTech
Hi S0lo, i think i get what you're saying but im not sure how that explains how you can get say only 2 hosts out of a subnet that allows for 30 (/27) without wasting addresses.

An example of this would be if you have a /27 subnet across an autonamous system and want to save some addresses for expansion by cutting out the wasted addresses from a serial link between routers.

How is this achieved and what happens to the addresses that arnt used? :S

What you described looks more like supernetting to me. ie. defining an address to route packets to multiple logical networks.

Could anyone venture perhaps a binary level explaination?
Thanks again.


Neo
Tech
More
15 years 7 months ago #27700 by NeoTech
AHAH! i think i have it! lol. Its so simple now i see it. I see why your explaination looked like a supernet route, because in a way it is.

Heres how i see it...

If you subnet the class C address 192.168.0.0 with a /25 mask, you will have networks 192.168.0.0 and 192.168.0.128.

Now suppose you didnt want to waste all the addresses in network 192.168.0.128 because it only contained say 2 routers on a serial link...

You can further subnet that subnet by giving the routers serial interfaces the addresses 192.168.0.129 and 192.168.0.130 and mask of /30.

The subnet the routers are linked on will still receive any message sent to the 192.168.0.0 network (as that is effectively a supernet route to both halfs of the subnet /25 which also contains the /30 sub-subnet, lol).

And if im not mistaken, if you do this on any router that isnt configured to support VLSM you will effectively put the 2 routers on an entirely different subnet altogether.

If anyone reading is still confused, follow this and convert each address to binary, comparing them to their bit masks, it will soon sink in. Surely im not the only one that has had trouble with this!

Thanks for your help S0lo, and please correct me if i am mistaken!
:D


Neo
Tech
More
15 years 7 months ago #27701 by unlight
Ha, I typed this and then I saw you answered your questions, this might help someone..

> If you enter a different subnet mask for another part of the
> network, arnt you effectively putting that part on a different
> subnet?

Yes, say you subnet a /24 into two /25's for each fast ethernet connection on your router you will have two unique /25 routes in your route table. (even if you subnet into two /25's on the SAME interface you get two unique routes for two unique networks)

Which answers another question, there are no new commands when using these subnets, just more network statements in router config mode UNLESS you use a large enough network statement which subsume the addressing on all interfaces.

i.e. the two unique interfaces with the two contiguous /25's above could be setup in OSPF with one network command with a /24 mask.

> How is this achieved and what happens to the addresses that
> arnt used? :S

I understand your outlined scenario as this - we are to set up a point-to-point WAN link with R1 and R2. Our ISP has allocated us a /27, but obviously we don't want to use all those addresses when only two are going to be used to connect the routers together?

Say we have 192.168.1.0/27, usable range 192.168.1.1 - 192.168.1.30 We just make it into a /30, 192.168.1.0/30

Now, we can assign 192.168.1.1/30 to R1 and 192.168.1.2/30 to R2.

ISP SIDE .1
WAN Link
.2 YOUR SIDE

What happens to 192.168.1.5-192.168.1.31? What ever you want! You might use NAT with the .2 address for your 10 local machines or you might decide you want the machines hanging of R2 on your side to have unique public addresses.

Thus, we need a subnet to accommodate 10 address, that would be a /28 (14 usable host addresses). Now, we can't obviously use 192.168.1.0/28, because that conflicts with our original 192.168.1.0/30. The next valid block of /28's starts at 192.168.1.16/28

ISP SIDE .1
WAN Link
.2 YOUR SIDE .17-.30

And you still have addresses 192.168.1.5 - 192.168.15 to do what ever you want with. There is very little you can do with the leftovers which is why network design with VLSM takes a little thought before you start madly allocating like I did.

I spose it is a type of Supernetting if it helps you to think about it. However I /think/ the term is strictly reserved for summarizing classful address blocks. In our case, it is more like route summarization, your ISP doesn't care how you subnet your addresses, you could have 8 /30's - but they won't add each /30 to their route table they will simply know that all addresses belonging in 192.168.1.0/27 are reachable via that WAN link...
More
15 years 7 months ago #27703 by NeoTech
Hey unlight, nice to see you.

Thanks for the input, it made a good read! And im sure it will help anyone that stumbles upon this little thread. I dont think this is covered enough in the tutorials section as it can be a tricky concept when you first encounter it.

Sorry about figuring it out before you had a chance to post but i couldnt help thinking about it as i was typing, i wound up getting a writing pad out and doing some binary calculations and then it finally sunk in, LOL.

As for the supernetting / route summerisation thing, i just meant it is the same concept as most packets directed towards a subnet are likely to be examined by the sub-subnet.

You havent made many posts considering you have been on almost 2 years. You sure sound like you know what you're talking about though :). Hopefully i'll see you around the boards.
:D


Neo
Tech
More
15 years 7 months ago #27744 by S0lo
NeoTech, reading what you wrote quickly I think you've captured the whole idea.

The important thing to remember when configuring basic routing in VLSM is NOT to define overlapping subnets any where in your network. So as for your example, if you define 192.168.0.128/25 on an interface and advertise it. Then that whole IP range (from 192.168.0.129 to 192.168.0.254) is reserved for that segment. You can NOT take part of it (like 192.168.0.128/30) and define it any where else in your network (otherwise you will have problems). If you want to do this, you have to slice the 192.168.0.128/25 into smaller subnets, say like /26 or /27 and assign the higher portions of it (say 192.168.0.192/26) for the first interface such that it doesn't overlap with the 192.168.0.128/30 you want to use.

I hope this doesn't confuse.

Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
More
15 years 7 months ago #27745 by NeoTech
Right i think i get what you mean, its a structured approach and you have to subnet each network bit according to what is defined on the router before it.
ie. /26 can be subnetted further on any other routers that are connected to it provided the addresses arn't in use anywhere else on the subnet.
As with all networking, no 2 nodes can have an identical address.

But as to my understanding, a subnetted subnet still carries the first part of the subnets address, so if you have 192.168.1.0 and 192.168.1.128. then you subnet the 128 network to a /26 and have a 192.168.1.192 network (sheesh lol) you could still have other subnets that are ofshoots of the original network as 192.168.2.0 and 192.168.3.0 and subnet those further in the same way. I now understand why this is so useful! lol. and anyone that has grasped subnetting should see the advantage to this.

Thanks again S0Lo!


Neo
Tech
Time to create page: 0.139 seconds