cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
963
Views
6
Helpful
9
Replies

VLSM question

Ch Teo
Level 1
Level 1

Hi Cisco Community,

I am a student currently studying and is a bit confuse with the VLSM thingy. So seeking advise from the community.

My mini assignment requires me design a network using VLSM and the given ip address is 182.25.4.0 /24

1. Sales: 26 host

2. Engineering: 16 host

3. Servers: 15 host (needs to be on a separate subnet)

4. Admin: 7 host

Am i doing the VLSM correctly as shown below?

Sales 182.25.4.0 /26 255.255.255.192
Engineering 182.25.4.32 /26 255.255.255.192
Servers 182.25.4.64 /27 255.255.255.224
Admin 182.25.4.96 /28 255.255.255.240
3 Accepted Solutions

Accepted Solutions

M02@rt37
VIP
VIP

Hello @Ch Teo 

Calculations are good, but you could use /27 for Sales, engineering and servers. /29 for admin is sufficient also. But choosing a slightly larger subnet size allows for potential future growth in each subnet.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

RedNectar
VIP
VIP

Hi @Ch Teo ,

Do a google search for subnetting without tears to find an easy way to think about subnets.  The key to understanding subnets is that they only come in a limited number of sizes, each one twice the size of the previous one.

And of course, you also have to remember that every subnet needs a network address and a broadcast address, so the maximum host count is always 2 less than the subnet size.

Mask (or prefix) length Subnet size maximum hosts=Subnet size-2
/32 1 (2^0) NA
/31 2 (2^1) 0 (unless using RFC 2031 which allows 2)
/30 4 (2^2)
/29 8 (2^3) 6
/28 16 (2^4) 14
/27 32 (2^5) 30
/26 64 (2^6) 62
/25 128 (2^(32-mask_length)=2^7) 126
/24 256 (2^(32-mask_length)=2^8) 254
/23 512 (2^(32-mask_length)=2^9) 510
/22 1024 (2^(32-mask_length)=2^10) 1022
... ... ... 
/2 2^30 2^30-2
/1 2^31 2^31-1

So in your case, you have two subnets that won't quite fit into a /28 (size=16) so will have to have a /27 (size=32)

1. Sales: 26 host - needs a /27

2. Engineering: 16 host - needs a /27 

3. Servers: 15 host (needs to be on a separate subnet) - needs a /27 

4. Admin: 7 host - needs a /28

As to how to allocate these, imagine your original182.25.4.0/24 allocation is a pie.  You can cut the pie in half, and continue cutting each half-pie piece in half and so on until you get the required number of slices of the right size.  It is easier if you start with the biggest pieces.  A search for rednectar's "IP Pie" will probably find you a powerpoint presentation I used to use that has an example.

So cutting the pie - starting with the biggest slices

Sales will take the first 32 IPs from 182.25.4.0 to 182.25.4.31 (/27)

Engineering will take the next 32 from 182.25.4.32 to 182.25.4.63 (/27)

Servers, the next 32 from 182.25.4.64 to 182.25.4.95 (/27)

Admin only needs 16 - so give them 182.25.4.96 to 182.25.4.111 (/28)


[Later] I note others have suggested that for "real world" applications, you may want to consider making the subnets a little bigger to allow for suture expansion.  Although this is true, I'd like to point out that my answer was to the question asked - which was an assignment question. So to get full marks for your assignment (at least if I was marking it) you'd need to give an answer that has three /27 assignments and on one /28

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

What @RedNectar describes, would be the way to approach VLSM for an exam question.

But, as M02@rt37 mentions (real world), you might want to keep possible growth in mind.  For example, 26 hosts will fit into a /27, but this leave only 4 available IPs.  Also, are one of these host IPs for the gateway IP?  Or, if you were going to use HSRP, you would need 3 router IPs.

BTW, It's very annoying, to need to expand a subnet's address space allocation.

Also (real world), you may want to plan for on-going allocations and deallocations of address space.  Often this isn't well taught, but consider, for example, if you allocated x.x.x.0/30, besides, of course, being unable to allocate x.x.x.0/24, you could also not allocate x.x.x.0/25..29 (and some larger size address blocks too).  So, in larger networks, you might set aside address blocks for certain /# allocations.  For instance, x.x.x.x/24 might be set aside strictly for /30 allocations.

View solution in original post

9 Replies 9

M02@rt37
VIP
VIP

Hello @Ch Teo 

Calculations are good, but you could use /27 for Sales, engineering and servers. /29 for admin is sufficient also. But choosing a slightly larger subnet size allows for potential future growth in each subnet.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

"/29 for admin is sufficient also."

Are you sure?

RedNectar
VIP
VIP

Hi @Ch Teo ,

Do a google search for subnetting without tears to find an easy way to think about subnets.  The key to understanding subnets is that they only come in a limited number of sizes, each one twice the size of the previous one.

And of course, you also have to remember that every subnet needs a network address and a broadcast address, so the maximum host count is always 2 less than the subnet size.

Mask (or prefix) length Subnet size maximum hosts=Subnet size-2
/32 1 (2^0) NA
/31 2 (2^1) 0 (unless using RFC 2031 which allows 2)
/30 4 (2^2)
/29 8 (2^3) 6
/28 16 (2^4) 14
/27 32 (2^5) 30
/26 64 (2^6) 62
/25 128 (2^(32-mask_length)=2^7) 126
/24 256 (2^(32-mask_length)=2^8) 254
/23 512 (2^(32-mask_length)=2^9) 510
/22 1024 (2^(32-mask_length)=2^10) 1022
... ... ... 
/2 2^30 2^30-2
/1 2^31 2^31-1

So in your case, you have two subnets that won't quite fit into a /28 (size=16) so will have to have a /27 (size=32)

1. Sales: 26 host - needs a /27

2. Engineering: 16 host - needs a /27 

3. Servers: 15 host (needs to be on a separate subnet) - needs a /27 

4. Admin: 7 host - needs a /28

As to how to allocate these, imagine your original182.25.4.0/24 allocation is a pie.  You can cut the pie in half, and continue cutting each half-pie piece in half and so on until you get the required number of slices of the right size.  It is easier if you start with the biggest pieces.  A search for rednectar's "IP Pie" will probably find you a powerpoint presentation I used to use that has an example.

So cutting the pie - starting with the biggest slices

Sales will take the first 32 IPs from 182.25.4.0 to 182.25.4.31 (/27)

Engineering will take the next 32 from 182.25.4.32 to 182.25.4.63 (/27)

Servers, the next 32 from 182.25.4.64 to 182.25.4.95 (/27)

Admin only needs 16 - so give them 182.25.4.96 to 182.25.4.111 (/28)


[Later] I note others have suggested that for "real world" applications, you may want to consider making the subnets a little bigger to allow for suture expansion.  Although this is true, I'd like to point out that my answer was to the question asked - which was an assignment question. So to get full marks for your assignment (at least if I was marking it) you'd need to give an answer that has three /27 assignments and on one /28

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

"I'd like to point out that my answer was to the question asked - which was an assignment question. So to get full marks for your assignment (at least if I was marking it) you'd need to give an answer that has three /27 assignments and on one /28"

Agreed!  Which is why I explicitly noted what you recommended would be the way to approach an exam.

However, possibly other readers might assume exam answers are the answers in all cases.  So, I believe it worthwhile to note "real world" isn't always an exam answer.

Joseph W. Doherty
Hall of Fame
Hall of Fame

What @RedNectar describes, would be the way to approach VLSM for an exam question.

But, as M02@rt37 mentions (real world), you might want to keep possible growth in mind.  For example, 26 hosts will fit into a /27, but this leave only 4 available IPs.  Also, are one of these host IPs for the gateway IP?  Or, if you were going to use HSRP, you would need 3 router IPs.

BTW, It's very annoying, to need to expand a subnet's address space allocation.

Also (real world), you may want to plan for on-going allocations and deallocations of address space.  Often this isn't well taught, but consider, for example, if you allocated x.x.x.0/30, besides, of course, being unable to allocate x.x.x.0/24, you could also not allocate x.x.x.0/25..29 (and some larger size address blocks too).  So, in larger networks, you might set aside address blocks for certain /# allocations.  For instance, x.x.x.x/24 might be set aside strictly for /30 allocations.

Gopinath_Pigili
Spotlight
Spotlight

Hello  Ch Teo,

you can start VLSM from higher requirement to lower requirement....

The thing is Network ID and Broadcast ID is exceptional....

Sales - 26 hosts -Block size 32 (also called as magic number) - 182.25.4.0 /27

Engineering - 16 hosts -Block size 16, but we can't use first and last  we will get only 14 ip addresses. so we  should consider for this also Block size 32 - 182.25.4.32/27

Servers - 15 hosts  -Block size 16 but we can't use first and last  we will get only 14 ip addresses. so we  should consider for this also Block size 32 - 182.25.4.64/27

Admin - 7 hosts - Block size 8-but we can't use first and last  we will get only 6 ip addresses. so we  should consider for this  Block size 16- 182.25.4.80/28

Best regards
******* If This Helps, Please Rate *******

 

 

 

You're sure about your two /28s and /29 recommendations?

 

Thanks for asking me....

I edited....just now...

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

BTW, as @RedNectar correctly noted, except for /31s, we set two addresses (first and last), within an address block, aside.  Generally the high address is used for broadcasts, but why is the lowest address also not used for host addresses?

When I first asked this myself, I recall (?) the answer was to preclude "confusion" between a host address and the network address.  This didn't make sense to me (I'm not going to into why not - laugh, consider it a student exercise).

Digging deeper into IP, I recall (?) finding in the very beginning of IP, at first, there wasn't consensus on what should be the broadcast address, i.e. a host address of all zeros or all ones.  (Perhaps much like what host address should be used for gateway?)

So, if either first or last host address might be used for broadcast, both were not used for ordinary host addressing.

Now where this becomes important, now a days, can a host zero address be used?  If so, each network has one more host IP it can use, which would change the answers for Servers and Admin networks.

This possibility is why I questioned some of the allocation suggestions.  However, for an exam, or student assignment, I would expect not using both first and last address block IPs would still be expected.

@Ch Teo this issue/question might be posed to your instructor.

Review Cisco Networking for a $25 gift card