 | reply to Tdcook
Re: [Other] VlsmThe 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" |
|
 | In your example, how did you figure the netmasks for each block? You didn't explain that part. |
|
 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" |
|
 | 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.  |
|
 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 |
|