dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
3293
share rss forum feed


Tdcook

@adelphia.net

[Other] Vlsm

Hello. I am looking for someone who actually understands VLSM to explain a few things for me. I have a few major discrepancies which are making it very difficult to understand. When I first learned about VLSM, I understood is as simply a way to more efficiently use subnetted addresses by placing unused host addresses in another subnet. For example, if I took 192.168.0.0 I could subnet it as 192.168.0.0/26 and get 4 subnets with 62 usable hosts each. I then figured that at least on of these subnets would be used for a large group of hosts. The way I understood VLSM was that if I needed, say, 4 subnets with 30 hosts each, I could then split the 192.168.0.64/26 subnet into 192.168.0.64/27 and 192.168.0.96/27. At this point, I believed that I had used up this second original subnet, and would then have to go back and split up the 3rd original subnet. However, I have been told that I do not need to go back and take the rest of my subnets from the 3rd original, but instead, I can continue to subnet under the /27 mask all the way up to 192.168.0.224/27. I was told that after doing this, I could then go and use the 3rd subnet for something else, for example, subnetting it as 192.168.0.128/28 and 192.168.0.144/28. Which one of these methods is correct, or might they both be? The more detail you can add the better, as I will simply return and ask more questions if you don't. Thanks in advance!


dpocoroba
Premium
join:2000-11-14
224.0.0.5
The best way ( at least for me ) to come up with a clean VLSM solution is to draw out a small chart

starting with intervals of 64

0 64 128 192 255
Then add in intervals of 32

0 32 64 96 128 160 192 224 255

You might also find it easier if you add a third set of 16

0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255

Now say you are using the network 172.16.1.0 and you need 4 subnets

A = 48 Host
B = 27 Host
C = 14 Host
D = 4 Host

To figure out what size block and how to get the number of hosts you will need write out your binary numbers

128 64 32 16 8 4 2 1

and take those (block - 2) = number of allowed hosts per block

EX:
a 64 block will allow 62 host
a 8 block will allow 6 host
a 4 block will allow 2 host

Now you can use your chart

For me I like to start with the largest host requirements first.

Now look at the requirements 48 host if you look at the block sizes a 32 is to small so you need to use a 64 block
Now just mark it on your chart
0  16  32  48  64  80  96  112  128  144  160  176  192  208  224  240  255

|---------------|
A

Then look up and add B, you can see B will need a 32 block

0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255

|--------------|
A
|-------|
B

When the chart is done here is what it look like

0 16 32 48 64 80 96 112 120 128 144 160 176 192 208 224 240 255

|--------------|
A
|------|
B
|----|
C
|----|
D
The last bit used under the D block is 120 ( 112 + 8 )

A=172.16.1.0/26 or 255.255.255.192
B=172.16.1.64/24 255.255.255.224
C=172.16.1.96/28 255.255.255.240
D=172.16.1.112/29 255.255.255.248

This will still give you from 121 -> 254 to further subnet.

Here is what using loopbacks to simulate hosts on each network would look like

!
interface Loopback0
ip address 172.16.1.1 255.255.255.192
!
interface Loopback1
ip address 172.16.1.65 255.255.255.224
!
interface Loopback2
ip address 172.16.1.97 255.255.255.240
!
interface Loopback3
ip address 172.16.1.113 255.255.255.248
!

Hopefully this clears your question up a little bit. Your question in general was hard for me to understand :)

--
"Knowledge is contagious, infect"


Tdcook

@adelphia.net
reply to Tdcook
Thank you for taking the time for such a detailed explination. I am going to ask one more question to just make sure I understood it correctly. If I were to take a network address, say, 195.5.5.0, and subnet it a few different times, am I ever going to be able to get more than 254 usable host addresses out of it simply because they would have different subnet masks, or is this still a max, and VLMS is just a way to use as many of these 254 addresses as you can, and prevent groups of them from going to waste because you don't have that many hosts on all your subnets? Wow... That was a long question. Just incase you don't understand that question, let me ask another one that should help me. Can I EVER have two IP addresses that are the same, EXCEPT for a different mask (Ex. 172.16.64.1/27 and 172.16.64.1/30) [I got these two by not stopping at the end number for each original subnet, but continuing to subnet it all the way to the end, so that I has originally subnetted 172.16.0.0 using a 27 bit mask, and the first number comes from the 1's subnet (0.0 - 31.255) however, I did not stop there, but kept subnetting it. This is a little hard to type because I don't understand why or how this could be done myself. Wow... If the first question had everyone a little confused...


Matt3
All noise, no signal.
Premium
join:2003-07-20
Jamestown, NC
kudos:12
TDCook:

No and No.


ccie8122

join:2003-11-20
Bountiful, UT
reply to Tdcook
Not only is the answer to you question "no" as previously answered, but when you subnet up a network, you actually lose addresses.

The reason is this:

Think of 192.168.1.0/24. You have a total of 256 address on that network, from 192.168.1.0 to 192.168.1.255. As you know, only 254 are usable, because .0 is the network address, and .255 is the broadcast address.

Suppose you subnet the beast in half. Now you have subnetworks 192.168.1.0/25 and 192.168.1.128/25. Well now you have two network numbers: .0 and .128 and two bcast addies: .127 and .255. So now you only have 252 usable addies-- 126 on each subnet-- instead of 254.

Take this to the ultimate extreme, and subnet out to /31 and you have 0 usable addresses. Even numbers would all be network numbers, and odd numbers would all be bcast addies.

This is why when you carve up a subnet, as most orgs do, for point-to-point links (e.g. serial links between two routers), they always use /30s. This divides a Class C up into 64 subnets, each with 4 address: a network addy, bcast addy, and 2 usable -- one for the router at each end of the link.

If you think about it, though, with 64 networks, each with 2 usable and 2 unusable addresses, you now have only half of the address space usable in that network. The other 128 addresses are overhead, unusable.

BTW, great answer "Wr T."

HTH

kr

anticowboy

join:2003-10-10
Los Angeles, CA
reply to dpocoroba
In your example, how did you figure the netmasks for each block? You didn't explain that part.


dpocoroba
Premium
join:2000-11-14
224.0.0.5

1 edit
look at your binary chart.

128 64 32 16 8 4 2 1

Now we know the previous 24 bits that will all be on ( class C). So to get a /25 mask mark 128 as being "on"

128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 0 = /25
1 1 0 0 0 0 0 0 = /26 (128 + 64 = .192 mask )
1 1 1 0 0 0 0 0 = /27 = .224

This is why knowing your binary conversions is very important when dealing with networking and especially subnet masks. Hope this clears things up a little its hard to explain by just writing this stuff down. Its not the easiest of concepts to understand by just reading

DP
--
"Knowledge is contagious, infect"

anticowboy

join:2003-10-10
Los Angeles, CA
actually I was just confused about how you came up with how many/which mask bits you need for each block. I understand the conversion of bits to CIDR notation.

And why do you keep using /24 instead of /27? That is confusing.


dpocoroba
Premium
join:2000-11-14
224.0.0.5

1 edit
I see where you are coming from. This chart will tell you everything you need
prefix		mask		hosts		blcok size
/26 192 62 64
/27 224 30 32
/28 240 14 16
/29 248 6 8
/30 252 2 4
Edit:
Fixed the type-o in previous post with the /24

anticowboy

join:2003-10-10
Los Angeles, CA
reply to Tdcook
oh, I see now. Thanks!


Tdcook

@adelphia.net
reply to Tdcook
downloadlab_1_1_4.zip 76,093 bytes
Cisco Lab
(lab_1_1_4.pdf)
Let me thank everyone again for all your help. I am pretty sure I now understand it (and that I have understood it all along). Maybe one of you can help clarify something for me that actually lead to this whole confusion. Take a look at the attached Cisco lab.

In step two, they list 4 Sub-Sub-networks based on Sub-network #1. Why are they listing 4 of them here? Are there not only two of them, the first two listed?


ccie8122

join:2003-11-20
Bountiful, UT
You are correct--sort of.

The lab, while not incorrect, could be a little misleading.

In step one, you really only need one /26 for Perth.

But when you allocate that /26, the largest chunks you would be able to use then are: .0/26, /64.26, and .128/25 (which could be subnetted into two /26s as the lab is doing, but they do not necessarily have to be).

Then in step two, you need a /27 for KL. You chop .64/26 in half to get this; now you have .0/26, .64/27, .96/27 and .128/25 (which again, could be sliced into 2 /26s or 4 /27s, but doesnt have to be).

Incidentally, the lab missed two /27s. Following their pattern, they should have come up with .64/27, .96/27, .128/27, .160/27, .192/27, and .224/27,. They missed the bolded ones--I think they were thinking /26.

I would have just left the .128 as a /25.

In Steps three and four, they carve up .96 to yield a pair of /28s. Again they missed several sub-subnets.

According to their pattern, at the end of step four they should have:

.0/26
.64/27
.96/28
.112/28
.128/28
.144/28
.160/28
.176/28
.192/28
.208/28

.224/28, and
.240/28

Again, they missed the bold ones.

Again, I would have done:

.0/26 Perth
.64/27 KL
.96/28 Syd
.112/28 Sing
.128/25 (usused)

Next, in Step five, you need three /30s for WAN links.

I would start at the end (.252/30) and work back, but using their scheme, you end up with:

.0/26 Perth LAN
.64/27 KL LAN
.96/28 Syd LAN
.112/28 Sing LAN
.128/30 KL-P PTP WAN
.132/30 KL-Syd PTP WAN
.136/30 KL-Sing PTP WAN
.140/30 (unused)
.144/28 (unused)
.160/27 (unused)
.192/26 (unused)

HTH

kr