VLSM Fundamentals: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= '''VLSM Fundamentals''' = | = '''VLSM Fundamentals''' = | ||
== | == '''Objective''' == | ||
:The | :This is a guide explaining the basic fundamentals to subnetting your network into subnets using VLSM. The level of complexity of the subject is appropriate for the network technician student studying the Network Fundamentals course in the Network Academy CCNA Exploration curriculum. It is my desire to give that student a quick way to determine their VLSM IP plan and to help increase their basic subnetting skills. Learning some of the simple steps to VLSM subnetting will be a valuable tool to use as the student progresses towards their CCNA certifications. VLSM/CIDR subneting techniques are essential to your ability to plan, design, implement, operate, and troubleshoot network technologies. | ||
== | == '''Definitions''' == | ||
:'''VLSM''': Variable-length Subnet Masks, is simply a method used to divide a network into subnets and conserve the use of IP address. | |||
:'''CIDR''': Classless Inter-Domain Routing, uses Variable-length Subnet Masks to define routes. | |||
: | :'''N''': Network bits taken from the Host portion of the IP address and are reserved to define the subnets. These Bits are turned on or equal to 1 from the left to the right. | ||
:'''H''': Host bits are the remaining portion of the IP address which is not defined to the network. The more Network bits you use the less available Hosts there are for the subnet. | |||
: | :'''Network of subnet address''': The beginning address of each subnet. Can be determined by using the ANDing process. | ||
: | |||
:'''Broadcast address''': The highest IP address in a subnet before entering the next network. | |||
:'''Network increment''': Size of the increase between the starting network boundary . | |||
: | :'''Block size''': Another term for Network increment. | ||
: | |||
:: | :'''Interesting Octet''': IP address octet which is being subnetted. This will be the octet of the subnet mask that is not 0's or 255. | ||
== | = '''Routing Protocol information''' = | ||
:'''Classful Routing''': Neither '''RIPv1''' nor '''IGRP''' routing protocols contain a field to hold the subnet routing information, so the subnet information is dropped by the router. If a router is running RIP, with a subnet mask of a certain value, it will assume that all of the interfaces within the classful address space have the same subnet mask. If you happen to configure different subnet masks (VLSM) on a network running '''RIP''' or '''IGRP''', that network just will not work. | |||
:'''Classless Routing''': These routing protocols do support subnet information advertisement. '''RIPv2''', '''EIGRP''' and '''OSPF''' are protocols that will work with VLSM. Therefore, the networks running these protocols will efficiently use the available address space. VLSM networks, with have different subnet masks can be running on different interfaces on a router. | |||
= '''Subnetting Basics''' = | |||
:When designing your network using '''VLSM''' you must already have the basics of subnetting classful networks. No matter what class a networks is in it is using the same subnet mask. A subnet mask is a 32-bit value which will allow the receiver of IP packets to determine the network portions of the IP address from the host portion. It is important that you can determine the subnet masks quickly and accurately. The subnet mask is composed of 1's and 0's. The 1's will signify the network or the subnet address. | |||
:There are many different ways to subnet a network, but regardless of the address class there are some similarities. | |||
:Remember that subnet bits start from the left to the right and do not skip over any bits. Observe and identify the most interesting octet of the subnet mask. In that octet you will be able to determine the subnet mask and the CICR values that represent that subnet mask. | |||
: | :Using this chart you may be able to determine your subnet mask and the CIDR notation for each class. | ||
::Class A addresses have '''8''' bits on for network and 24 bits for hosts. Default subnet mask is 255.0.0.0 with CIDR of '''/8''' | |||
::Class B addresses have '''16''' bits on for network and 16 bits for hosts. Default subnet mask is 255.255.0.0 with CIDR of '''/16''' | |||
::Class C addresses have '''24''' bits on for network and 8 bits for hosts. Default subnet mask is 255.255.255.0 with CIDR of '''/24''' | |||
:Add the number of binary bit borrowed to the default subnet mask for the class your address is in to create your CIDR notation. | |||
:Place your Decimal representation in the interesting octet of the subnet mask to create the mask for the subnet. | |||
{| | |||
! | |||
! | |||
! | |||
! CIDR/Default Subnet Mask Table | |||
|- | |||
! | |||
! | |||
! | |||
! | |||
! Class A | |||
! Class B | |||
! Class C | |||
! | |||
|- | |||
! Binary (N/H) | |||
! Decimal | |||
! Block size | |||
! Interesting Octet | |||
! (2nd octet) | |||
! (3rd octet) | |||
! (4th octet) | |||
|- | |||
|00000000 | |||
|= 0 | |||
|256 | |||
| | |||
|/8 | |||
|/16 | |||
|/24 | |||
|- | |||
|10000000 | |||
|= 128 | |||
|128 | |||
| | |||
|/9 | |||
|/17 | |||
|/25 | |||
|- | |||
|11000000 | |||
|= 192 | |||
|64 | |||
| | |||
|/10 | |||
|/18 | |||
|/26 | |||
|- | |||
|11100000 | |||
|= 224 | |||
|32 | |||
| | |||
|/11 | |||
|/19 | |||
|/27 | |||
|- | |||
|11110000 | |||
|= 240 | |||
|16 | |||
| | |||
|/12 | |||
|/20 | |||
|/28 | |||
|- | |||
|11111000 | |||
|= 248 | |||
|8 | |||
| | |||
|/13 | |||
|/21 | |||
|/29 | |||
|- | |||
|11111100 | |||
|= 252 | |||
|4 | |||
| | |||
|/14 | |||
|/22 | |||
|/30 | |||
|- | |||
|11111110 | |||
|= 254 | |||
|2 | |||
| | |||
|/15 | |||
|/23 | |||
|- | |||
|11111111 | |||
|= 255 | |||
|1 | |||
|- | |||
|} | |||
: | |||
=== '''Subnetting in your head (5 questions)''' === | |||
:: 1. How many subnets? '''2^N''' | |||
:: 2. How many hosts per subnet? '''2^H - 2''' | |||
:: 3. What are the valid subnets? Network increment is equal to 256 - subnet mask = Block size. Starting at 0, each network address can be | |||
:: found by adding the block to the previous subnet address. | |||
:: 4. What is the broadcast address for each subnet? It is alway all 1's, which is decimal 255. This is 1 less than each subnet address. | |||
:: 5. What are the valid hosts in each subnet? '''2^H - 2''', Always the addresses between the subnet address and the broadcast address. | |||
:: Ex. | |||
:: IP address: 192.168.10.0 /25 | |||
:: Subnet mask: 255.255.255.128 | |||
:: | |||
:: 1. How many subnets? 2^1 = 2. | |||
:: 2. How many hosts per subnet? 2^7 - 2 = 126 Hosts | |||
:: 3. What are the valid subnets? 256 - 128 = 128. Subnet address are 0 and 128. | |||
:: 4. What is the broadcast address for each subnet? 127 and 255. | |||
:: 5. What are the valid hosts? For subnet 0, 1 through 126 and subnet 128, 129 through 254. | |||
=== '''IP Subnet-zero''' === | |||
::This command allows you to use the first and the last subnet in your network design. Cisco has turned this command on by default starting with Cisco IOS version 12.x and later. If it is turned off for some reason, you can re-enable it manually in your configuration otherwise you have to use the formula of 2^N - 2 to identify the number of networks. | |||
:: The following charts show the difference in how wasteful Classful networks are verses the more efficient Classless VLSM network. | |||
:: | |||
:: Network 198.168.10.0 | |||
:: Mask 255.255.255.240 (/28) | |||
:: Networks 2^4 = 16 | |||
:: Hosts/subnet 2^4 - 2 = 14 | |||
:: Ex: Classful network | |||
:: | |||
:: Network Classful subnets Subnet masks Addresses needed IP address usage | |||
:: ------- --------------- -------------- --------------- ------------------ | |||
:: 1. 198.168.10.0 /28 255.255.255.240 LAN1-25 Hosts Not enough addresses | |||
:: 2. 198.168.10.16 /28 255.255.255.240 LAN2-12 Hosts 4 addresses not used | |||
:: 3. 198.168.10.32 /28 255.255.255.240 Lan3-6 Hosts 10 addresses not used | |||
:: 4. 198.168.10.48 /28 255.255.255.240 Wan1-2 IPs 12 addresses not used | |||
:: 5. 198.168.10.64 /28 255.255.255.240 LAN4-10 Hosts 6 addresses not used | |||
:: *Network 1 does not have enough IP address available to assign to the number of hosts existing. The other networks all have excess IP address. | |||
:: Ex: Classless network design | |||
:: | |||
:: Network Classful subnets Subnet masks Addresses needed IP address usage | |||
:: ------- --------------- ------------- -------------- --------------------- | |||
:: 1. 198.168.10.0 /27 255.255.255.192 LAN1-25 Hosts 30 addresses available | |||
:: 2. 198.168.10.32 /28 255.255.255.240 12 Hosts 2 addresses not used | |||
:: 3. 198.168.10.48 /28 255.255.255.240 10 Hosts 4 addresses not used | |||
:: 4. 198.168.10.64 /29 255.255.255.248 6 Hosts All addresses used | |||
:: 5. 198.168.10.72 /30 255.255.255.252 2 Hosts All addresses used | |||
:: *Network 1 now has enough IP address for the number of host. Network 2 & 3 have more efficiency. Networks 4 & 5 are full. The networks have the right amount of address space to assign, but there is still addresses available for future expansion of additional LANs and WANs. | |||
= '''Implementing VLSM networks''' = | |||
:The fundamental goal of VLSM subnetting is to preserve IP addresses on a local network by subdividing the network Host bits into smaller and more efficient subnetworks. | |||
:VLSM is the most efficient use of the number of Hosts in an address class. | |||
:There are multiple solutions possible when subnetting you network and they may all be correct. It would be your decision as to how you want to subdivide your address space. | |||
:Your network addresses should make sense when planning for current networks and for future growth. Be careful that you do not crossover into the | |||
next subnet because incorrect IP addressing and assignment of subnet masks will will cause problems with connectivity when implemented. | |||
== Steps to create IP plan using VLSM == | |||
:1. First know how to determine your Block sizes and how to create Subnet Masks from the charts. | |||
::Calculating these quickly is a valuable tool to use when creating VLSM subnetworks and are the same numbers used when subnetting. | |||
:2. Then create a VLSM table and worksheet. Use these to visually check that you do not accidentally overlap networks. See items below. | |||
:3. Then determine how many H bits are needed to be borrowed in order to provide enough Hosts on the the largest network. | |||
::You cannot use the Network bits of the IP address. VLSM is confined to borrowing the Host bits, moving from the left to the right. | |||
::Use the CIDR subnetting techniques explained above. | |||
:4. Choose the subnet mask which defines the rest of the remaining subnets. | |||
::Repeat step until you have configured all the necessary subnets. | |||
:5. Determine the network numbers for the serial links. | |||
::Keep in mind the the largest subnet mask you can assign is /30, regardless of the address class, because you have to save at least two address for hosts. | |||
:: VLSM subnet worksheet | |||
:: Ex. | |||
:: 192.168.10.0 | |||
:: | |||
:: Network Host Block Subnet Mask | |||
:: ---------- ---------- ---------- ---------- ---------- | |||
:: A 14 16 /28 240 | |||
:: B 30 32 /27 224 | |||
:: C 20 32 /27 224 | |||
:: D 6 8 /29 248 | |||
:: E 2 4 /30 252 | |||
:: F 2 4 /30 252 | |||
:: G 2 4 /30 252 | |||
:: H 2 4 /30 252 | |||
:: VLSM worksheet | |||
:: ------------------------------------------- | |||
:: 0 - | |||
:: 4 - | |||
:: 8 ---------------------------------------- | |||
:: 12 - D - 192.168.10.8 /29 | |||
:: 16 ---------------------------------------- | |||
:: 20 - | |||
:: 24 - D - 192.168.10.16 /28 | |||
:: 28 - | |||
:: 32 ---------------------------------------- | |||
:: 36 - | |||
:: 40 - | |||
:: 44 - | |||
:: 48 - D - 192.168.10.32 /27 | |||
:: 52 - | |||
:: 56 - | |||
:: 60 - | |||
:: 64 ---------------------------------------- | |||
:: 68 - | |||
:: 72 - | |||
:: 76 - | |||
:: 80 - D - 192.168.10.64 /27 | |||
:: 84 - | |||
:: 88 - | |||
:: 92 - | |||
:: 96 ---------------------------------------- | |||
:: D - 192.168.10.96 /30 | |||
:: 100 ---------------------------------------- | |||
:: D - 192.168.10.100 /30 | |||
:: 104 ---------------------------------------- | |||
:: D - 192.168.10.104 /30 | |||
:: 108 ---------------------------------------- | |||
:: D - 192.168.10.108 /30 | |||
:: 112 ---------------------------------------- | |||
:: . . . | |||
:: 128 - | |||
:: . . . | |||
:: 144 - | |||
:: . . . | |||
:: 160 - | |||
:: . . . | |||
:: 176 - | |||
:: . . . | |||
:: 192 - | |||
:: . . . | |||
:: 208 - | |||
:: . . . | |||
:: 224 - | |||
:: . . . | |||
:: 240 - | |||
:: . . . | |||
:: 256 - | |||
:Look back over your plan see that no numbers are used twice and that all subnets in the network are assigned with the greatest amount of efficiency. The least amount of IP address are wasted on the serial links and there is room for future expansion if needed. | |||
:Now you have completed your IP plan and have enjoyed the power and flexibility of '''VLSM'''! |
Latest revision as of 21:24, 11 May 2011
VLSM Fundamentals
Objective
- This is a guide explaining the basic fundamentals to subnetting your network into subnets using VLSM. The level of complexity of the subject is appropriate for the network technician student studying the Network Fundamentals course in the Network Academy CCNA Exploration curriculum. It is my desire to give that student a quick way to determine their VLSM IP plan and to help increase their basic subnetting skills. Learning some of the simple steps to VLSM subnetting will be a valuable tool to use as the student progresses towards their CCNA certifications. VLSM/CIDR subneting techniques are essential to your ability to plan, design, implement, operate, and troubleshoot network technologies.
Definitions
- VLSM: Variable-length Subnet Masks, is simply a method used to divide a network into subnets and conserve the use of IP address.
- CIDR: Classless Inter-Domain Routing, uses Variable-length Subnet Masks to define routes.
- N: Network bits taken from the Host portion of the IP address and are reserved to define the subnets. These Bits are turned on or equal to 1 from the left to the right.
- H: Host bits are the remaining portion of the IP address which is not defined to the network. The more Network bits you use the less available Hosts there are for the subnet.
- Network of subnet address: The beginning address of each subnet. Can be determined by using the ANDing process.
- Broadcast address: The highest IP address in a subnet before entering the next network.
- Network increment: Size of the increase between the starting network boundary .
- Block size: Another term for Network increment.
- Interesting Octet: IP address octet which is being subnetted. This will be the octet of the subnet mask that is not 0's or 255.
Routing Protocol information
- Classful Routing: Neither RIPv1 nor IGRP routing protocols contain a field to hold the subnet routing information, so the subnet information is dropped by the router. If a router is running RIP, with a subnet mask of a certain value, it will assume that all of the interfaces within the classful address space have the same subnet mask. If you happen to configure different subnet masks (VLSM) on a network running RIP or IGRP, that network just will not work.
- Classless Routing: These routing protocols do support subnet information advertisement. RIPv2, EIGRP and OSPF are protocols that will work with VLSM. Therefore, the networks running these protocols will efficiently use the available address space. VLSM networks, with have different subnet masks can be running on different interfaces on a router.
Subnetting Basics
- When designing your network using VLSM you must already have the basics of subnetting classful networks. No matter what class a networks is in it is using the same subnet mask. A subnet mask is a 32-bit value which will allow the receiver of IP packets to determine the network portions of the IP address from the host portion. It is important that you can determine the subnet masks quickly and accurately. The subnet mask is composed of 1's and 0's. The 1's will signify the network or the subnet address.
- There are many different ways to subnet a network, but regardless of the address class there are some similarities.
- Remember that subnet bits start from the left to the right and do not skip over any bits. Observe and identify the most interesting octet of the subnet mask. In that octet you will be able to determine the subnet mask and the CICR values that represent that subnet mask.
- Using this chart you may be able to determine your subnet mask and the CIDR notation for each class.
- Class A addresses have 8 bits on for network and 24 bits for hosts. Default subnet mask is 255.0.0.0 with CIDR of /8
- Class B addresses have 16 bits on for network and 16 bits for hosts. Default subnet mask is 255.255.0.0 with CIDR of /16
- Class C addresses have 24 bits on for network and 8 bits for hosts. Default subnet mask is 255.255.255.0 with CIDR of /24
- Add the number of binary bit borrowed to the default subnet mask for the class your address is in to create your CIDR notation.
- Place your Decimal representation in the interesting octet of the subnet mask to create the mask for the subnet.
CIDR/Default Subnet Mask Table | |||||||
---|---|---|---|---|---|---|---|
Class A | Class B | Class C | |||||
Binary (N/H) | Decimal | Block size | Interesting Octet | (2nd octet) | (3rd octet) | (4th octet) | |
00000000 | = 0 | 256 | /8 | /16 | /24 | ||
10000000 | = 128 | 128 | /9 | /17 | /25 | ||
11000000 | = 192 | 64 | /10 | /18 | /26 | ||
11100000 | = 224 | 32 | /11 | /19 | /27 | ||
11110000 | = 240 | 16 | /12 | /20 | /28 | ||
11111000 | = 248 | 8 | /13 | /21 | /29 | ||
11111100 | = 252 | 4 | /14 | /22 | /30 | ||
11111110 | = 254 | 2 | /15 | /23 | |||
11111111 | = 255 | 1 |
Subnetting in your head (5 questions)
- 1. How many subnets? 2^N
- 2. How many hosts per subnet? 2^H - 2
- 3. What are the valid subnets? Network increment is equal to 256 - subnet mask = Block size. Starting at 0, each network address can be
- found by adding the block to the previous subnet address.
- 4. What is the broadcast address for each subnet? It is alway all 1's, which is decimal 255. This is 1 less than each subnet address.
- 5. What are the valid hosts in each subnet? 2^H - 2, Always the addresses between the subnet address and the broadcast address.
- Ex.
- IP address: 192.168.10.0 /25
- Subnet mask: 255.255.255.128
- 1. How many subnets? 2^1 = 2.
- 2. How many hosts per subnet? 2^7 - 2 = 126 Hosts
- 3. What are the valid subnets? 256 - 128 = 128. Subnet address are 0 and 128.
- 4. What is the broadcast address for each subnet? 127 and 255.
- 5. What are the valid hosts? For subnet 0, 1 through 126 and subnet 128, 129 through 254.
IP Subnet-zero
- This command allows you to use the first and the last subnet in your network design. Cisco has turned this command on by default starting with Cisco IOS version 12.x and later. If it is turned off for some reason, you can re-enable it manually in your configuration otherwise you have to use the formula of 2^N - 2 to identify the number of networks.
- The following charts show the difference in how wasteful Classful networks are verses the more efficient Classless VLSM network.
- Network 198.168.10.0
- Mask 255.255.255.240 (/28)
- Networks 2^4 = 16
- Hosts/subnet 2^4 - 2 = 14
- Ex: Classful network
- Network Classful subnets Subnet masks Addresses needed IP address usage
- ------- --------------- -------------- --------------- ------------------
- 1. 198.168.10.0 /28 255.255.255.240 LAN1-25 Hosts Not enough addresses
- 2. 198.168.10.16 /28 255.255.255.240 LAN2-12 Hosts 4 addresses not used
- 3. 198.168.10.32 /28 255.255.255.240 Lan3-6 Hosts 10 addresses not used
- 4. 198.168.10.48 /28 255.255.255.240 Wan1-2 IPs 12 addresses not used
- 5. 198.168.10.64 /28 255.255.255.240 LAN4-10 Hosts 6 addresses not used
- *Network 1 does not have enough IP address available to assign to the number of hosts existing. The other networks all have excess IP address.
- Ex: Classless network design
- Network Classful subnets Subnet masks Addresses needed IP address usage
- ------- --------------- ------------- -------------- ---------------------
- 1. 198.168.10.0 /27 255.255.255.192 LAN1-25 Hosts 30 addresses available
- 2. 198.168.10.32 /28 255.255.255.240 12 Hosts 2 addresses not used
- 3. 198.168.10.48 /28 255.255.255.240 10 Hosts 4 addresses not used
- 4. 198.168.10.64 /29 255.255.255.248 6 Hosts All addresses used
- 5. 198.168.10.72 /30 255.255.255.252 2 Hosts All addresses used
- *Network 1 now has enough IP address for the number of host. Network 2 & 3 have more efficiency. Networks 4 & 5 are full. The networks have the right amount of address space to assign, but there is still addresses available for future expansion of additional LANs and WANs.
Implementing VLSM networks
- The fundamental goal of VLSM subnetting is to preserve IP addresses on a local network by subdividing the network Host bits into smaller and more efficient subnetworks.
- VLSM is the most efficient use of the number of Hosts in an address class.
- There are multiple solutions possible when subnetting you network and they may all be correct. It would be your decision as to how you want to subdivide your address space.
- Your network addresses should make sense when planning for current networks and for future growth. Be careful that you do not crossover into the
next subnet because incorrect IP addressing and assignment of subnet masks will will cause problems with connectivity when implemented.
Steps to create IP plan using VLSM
- 1. First know how to determine your Block sizes and how to create Subnet Masks from the charts.
- Calculating these quickly is a valuable tool to use when creating VLSM subnetworks and are the same numbers used when subnetting.
- 2. Then create a VLSM table and worksheet. Use these to visually check that you do not accidentally overlap networks. See items below.
- 3. Then determine how many H bits are needed to be borrowed in order to provide enough Hosts on the the largest network.
- You cannot use the Network bits of the IP address. VLSM is confined to borrowing the Host bits, moving from the left to the right.
- Use the CIDR subnetting techniques explained above.
- 4. Choose the subnet mask which defines the rest of the remaining subnets.
- Repeat step until you have configured all the necessary subnets.
- 5. Determine the network numbers for the serial links.
- Keep in mind the the largest subnet mask you can assign is /30, regardless of the address class, because you have to save at least two address for hosts.
- VLSM subnet worksheet
- Ex.
- 192.168.10.0
- Network Host Block Subnet Mask
- ---------- ---------- ---------- ---------- ----------
- A 14 16 /28 240
- B 30 32 /27 224
- C 20 32 /27 224
- D 6 8 /29 248
- E 2 4 /30 252
- F 2 4 /30 252
- G 2 4 /30 252
- H 2 4 /30 252
- VLSM worksheet
- -------------------------------------------
- 0 -
- 4 -
- 8 ----------------------------------------
- 12 - D - 192.168.10.8 /29
- 16 ----------------------------------------
- 20 -
- 24 - D - 192.168.10.16 /28
- 28 -
- 32 ----------------------------------------
- 36 -
- 40 -
- 44 -
- 48 - D - 192.168.10.32 /27
- 52 -
- 56 -
- 60 -
- 64 ----------------------------------------
- 68 -
- 72 -
- 76 -
- 80 - D - 192.168.10.64 /27
- 84 -
- 88 -
- 92 -
- 96 ----------------------------------------
- D - 192.168.10.96 /30
- 100 ----------------------------------------
- D - 192.168.10.100 /30
- 104 ----------------------------------------
- D - 192.168.10.104 /30
- 108 ----------------------------------------
- D - 192.168.10.108 /30
- 112 ----------------------------------------
- . . .
- 128 -
- . . .
- 144 -
- . . .
- 160 -
- . . .
- 176 -
- . . .
- 192 -
- . . .
- 208 -
- . . .
- 224 -
- . . .
- 240 -
- . . .
- 256 -
- Look back over your plan see that no numbers are used twice and that all subnets in the network are assigned with the greatest amount of efficiency. The least amount of IP address are wasted on the serial links and there is room for future expansion if needed.
- Now you have completed your IP plan and have enjoyed the power and flexibility of VLSM!