Day 23. IPv4 Subnetting and VLSM

CCENT 100-101 ICND1 Exam Topics

Image Identify the appropriate IPv4 addressing scheme using VLSM and summarization to satisfy addressing requirements in a LAN/WAN environment.

Key Topics

By now, you should be able to subnet very quickly. For example, you should be able to quickly answer a question such as If you are given a /16 network, what subnet mask would you use that would maximize the total number of subnets while still providing enough addresses for the largest subnet with 500 hosts? The answer would be 255.255.254.0, or /23. This would give you 128 subnets with 510 usable hosts per subnet. You should be able to calculate this information in very short order.

The CCENT exam promises to contain lots of subnetting and subnetting-related questions. Today we focus on this necessary skill as well as designing addressing schemes using variable-length subnet masking (VLSM) and summarization to optimize your network routing traffic.

Subnetting in Four Steps

Everyone has a preferred method of subnetting. Each teacher will use a slightly different strategy to help students master this crucial skill. Each of the suggested “Study Resources” has a slightly different way of approaching this subject.

The method I prefer can be broken down into four steps:

Step 1. Determine how many bits to borrow based on the host requirements.

Step 2. Determine the new subnet mask.

Step 3. Determine the subnet multiplier.

Step 4. List the subnets including subnetwork address, host range, and broadcast address.

The best way to demonstrate this method is to use an example. Let’s assume that you are given the network address 192.168.1.0 with the default subnet mask 255.255.255.0. The network address and subnet mask can be written as 192.168.1.0/24. The “slash 24” represents the subnet mask in a shorter notation and means that the first 24 bits are network bits.

Let’s further assume that you need 30 hosts per network and want to create as many subnets for the given address space as possible. With these network requirements, let’s subnet the address space.

Determine How Many Bits to Borrow

To determine the number of bits you can borrow, you first must know how many host bits you have to start with. Because the first 24 bits are network bits in our example, the remaining 8 bits are host bits.

Because our requirement specifies 30 host addresses per subnet, we need to first determine the minimum number of host bits to leave. The remaining bits can be borrowed:

Host Bits = Bits Borrowed + Bits Left

To provide enough address space for 30 hosts, we need to leave 5 bits. Use the following formula:

2BL – 2 = number of host addresses

where the exponent BL is bits left in the host portion.

Remember, the “minus 2” is to account for the network and broadcast addresses that cannot be assigned to hosts.

In this example, leaving 5 bits in the host portion will provide the right amount of host addresses:

25 – 2 = 30

Because we have 3 bits remaining in the original host portion, we borrow all these bits to satisfy the requirement to “create as many subnets as possible.” To determine how many subnets we can create, use the following formula:

2BB = number of subnets

where the exponent BB is bits borrowed from the host portion.

In this example, borrowing 3 bits from the host portion will create 8 subnets: 23 = 8.

As shown in Table 23-1, the 3 bits are borrowed from the leftmost bits in the host portion. The highlighted bits in the table show all possible combinations of manipulating the 8 bits borrowed to create the subnets.

Image

Table 23-1 Binary and Decimal Value of the Subnetted Octet

Determine the New Subnet Mask

Notice in Table 23-1 that the network bits now include the 3 borrowed host bits in the last octet. Add these 3 bits to the 24 bits in the original subnet mask and you have a new subnet mask, /27. In decimal format, you turn on the 128, 64, and 32 bits in the last octet for a value of 224. So the new subnet mask is 255.255.255.224.

Determine the Subnet Multiplier

Notice in Table 23-1 that the last octet decimal value increments by 32 with each subnet number. The number 32 is the subnet multiplier. You can quickly find the subnet multiplier using one of two methods:

Image Method 1: Subtract the last nonzero octet of the subnet mask from 256. In this example, the last nonzero octet is 224. So the subnet multiplier is 256 – 224 = 32.

Image Method 2: The decimal value of the last bit borrowed is the subnet multiplier. In this example, we borrowed the 128 bit, the 64 bit, and the 32 bit. The 32 bit is the last bit we borrowed and is, therefore, the subnet multiplier.

By using the subnet multiplier, you no longer have to convert binary subnet bits to decimal.

List the Subnets, Host Ranges, and Broadcast Addresses

Listing the subnets, host ranges, and broadcast addresses helps you see the flow of addresses within one address space. Table 23-2 documents our subnet addressing scheme for the 192.168.1.0/24 address space.

Image

Table 23-2 Subnet Addressing Scheme for 192.168.1.0/24: 30 Hosts Per Subnet

The following are three examples using the four subnetting steps. For brevity, only the first three subnets are listed in Step 4.

Subnetting Example 1

Subnet the address space 172.16.0.0/16 to provide at least 80 host addresses per subnet while creating as many subnets as possible.

1. There are 16 host bits. Leave 7 bits for host addresses (27 – 2 = 126 host addresses per subnet). Borrow the first 9 host bits to create as many subnets as possible (29 = 512 subnets).

2. The original subnet mask is /16, or 255.255.0.0. Turn on the next 9 bits starting in the second octet for a new subnet mask of /25 or 255.255.255.128.

3. The subnet multiplier is 128, which can be found as 256 – 128 = 128 or because the 128 bit is the last bit borrowed.

4. Table 23-3 lists the first three subnets, host ranges, and broadcast addresses.

Image

Table 23-3 Subnet Addressing Scheme for Example 1

Subnetting Example 2

Subnet the address space 172.16.0.0/16 to provide at least 80 subnet addresses.

1. There are 16 host bits. Borrow the first 7 host bits to create at least 80 subnets (27 – 2 = 126 subnets). That leaves 9 bits for host addresses, or 29 – 2 = 510 host addresses per subnet.

2. The original subnet mask is /16, or 255.255.0.0. Turn on the next 7 bits starting in the second octet for a new subnet mask of /23, or 255.255.254.0.

3. The subnet multiplier is 2, which can be found as 256 – 254 = 2 or because the 2 bit is the last bit borrowed.

4. Table 23-4 lists the first three subnets, host ranges, and broadcast addresses.

Image

Table 23-4 Subnet Addressing Scheme for Example 2

Subnetting Example 3

Subnet the address space 172.16.10.0/23 to provide at least 60 host addresses per subnet while creating as many subnets as possible.

1. There are 9 host bits. Leave 6 bits for host addresses (26 – 2 = 62 host addresses per subnet). Borrow the first 3 host bits to create as many subnets as possible (23 = 8 subnets).

2. The original subnet mask is /23, or 255.255.254.0. Turn on the next 3 bits starting with the last bit in the second octet for a new subnet mask of /26, or 255.255.255.192.

3. The subnet multiplier is 64, which can be found as 256 – 192 = 64 or because the 64 bit is the last bit borrowed.

4. Table 23-5 lists the first three subnets, host ranges, and broadcast addresses.

Image

Table 23-5 Subnet Addressing Scheme for Example 3

VLSM

You probably noticed that the starting address space in Subnetting Example 3 is not an entire classful address. In fact, it is subnet 5 from Subnetting Example 2. So, in Subnetting Example 3, we “subnetted a subnet.” That is what VLSM is in a nutshell—subnetting a subnet.

With VLSM, you can customize your subnets to fit your network. Subnetting works the same way. You just have to do it more than once to complete your addressing scheme. To avoid overlapping address spaces, start with your largest host requirement, create a subnet for it, and then continue with the next-largest host requirement.

Let’s use a small example. Given the address space 172.30.4.0/22 and the network requirements shown in Figure 23-1, apply an addressing scheme that conserves the most amount of addresses for future growth.

Image

Figure 23-1 VLSM Example Topology

We need five subnets: four LAN subnets and one WAN subnet. Starting with the largest host requirement on LAN 3, begin subnetting the address space.

To satisfy the 250-host requirement, we leave 8 host bits (28 – 2 = 254 hosts per subnet). Because we have 10 host bits total, we borrow 2 bits to create the first round of subnets (22 = 4 subnets). The starting subnet mask is /22, or 255.255.252.0. We turn on the next 2 bits in the subnet mask to get /24, or 255.255.255.0. The multiplier is 1. The four subnets are as follows:

Image Subnet 0: 172.30.4.0/24

Image Subnet 1: 172.30.5.0/24

Image Subnet 2: 172.30.6.0/24

Image Subnet 3: 172.30.7.0/24

Assigning Subnet 0 to LAN 3, we are left with three /24 subnets. Continuing on to the next-largest host requirement on LAN 4, we take Subnet 1, 172.30.5.0/24, and subnet it further.

To satisfy the 100-host requirement, we leave 7 bits (27 – 2 = 128 hosts per subnet). Because we have 8 host bits total, we can borrow only 1 bit to create the subnets (21 = 2 subnets). The starting subnet mask is /24, or 255.255.255.0. We turn on the next bit in the subnet mask to get /25, or 255.255.255.128. The multiplier is 128. The two subnets are as follows:

Image Subnet 0: 172.30.5.0/25

Image Subnet 1: 172.30.5.128/25

Assigning Subnet 0 to LAN 4, we are left with one /25 subnet and two /24 subnets. Continuing on to the next-largest host requirement on LAN 1, we take Subnet 1, 172.30.5.128/25, and subnet it further.

To satisfy the 60-host requirement, we leave 6 bits (26 – 2 = 62 hosts per subnet). Because we have 7 host bits total, we borrow 1 bit to create the subnets (21 = 2 subnets). The starting subnet mask is /25, or 255.255.255.128. We turn on the next bit in the subnet mask to get /26, or 255.255.255.192. The multiplier is 64. The two subnets are as follows:

Image Subnet 0: 172.30.5.128/26

Image Subnet 1: 172.30.5.192/26

Assigning Subnet 0 to LAN 1, we are left with one /26 subnet and two /24 subnets. Finishing our LAN subnetting with LAN 2, we take Subnet 1, 172.30.5.192/26, and subnet it further.

To satisfy the 10-host requirement, we leave 4 bits (24 – 2 = 14 hosts per subnet). Because we have 6 host bits total, we borrow 2 bits to create the subnets (22 = 4 subnets). The starting subnet mask is /26, or 255.255.255.192. We turn on the next 2 bits in the subnet mask to get /28, or 255.255.255.240. The multiplier is 16. The four subnets are as follows:

Image Subnet 0: 172.30.5.192/28

Image Subnet 1: 172.30.5.208/28

Image Subnet 2: 172.30.5.224/28

Image Subnet 3: 172.30.5.240/28

Assigning Subnet 0 to LAN 2, we are left with three /28 subnets and two /24 subnets. To finalize our addressing scheme, we need to create a subnet for the WAN link, which needs only 2 host addresses. We take Subnet 1, 172.30.5.208/28, and subnet it further.

To satisfy the 2-host requirement, we leave 2 bits (22 – 2 = 2 hosts per subnet). Because we have 4 host bits total, we borrow 2 bits to create the subnets (22 = 4 subnets). The starting subnet mask is /28, or 255.255.255.240. We turn on the next 2 bits in the subnet mask to get /30, or 255.255.255.252. The multiplier is 4. The four subnets are as follows:

Image Subnet 0: 172.30.5.208/30

Image Subnet 1: 172.30.5.212/30

Image Subnet 2: 172.30.5.216/30

Image Subnet 3: 172.30.5.220/30

We assign Subnet 0 to the WAN link. We are left with three /30 subnets, two /28 subnets, and two /24 subnets.

Summarizing Subnet Addresses

When a network’s addressing scheme is designed hierarchically, summarizing addresses to upstream routers makes routing much more efficient. Instead of sending a collection of various subnets, a border router can send one summary route to the next router.

If you are using static routing or configuring a summary route for EIGRP, you might need to calculate the right network prefix and subnet mask.

Referring to Figure 23-2, what summary route would R1 send to the upstream router, BBR (Backbone Router) for the four subnets?

Image

Figure 23-2 Summarizing Subnets: Example 1

Use the following steps to calculate a summary route:

Step 1. Write out the networks that you want to summarize in binary, as shown following Step 4.

Step 2. To find the subnet mask for summarization, start with the leftmost bit.

Step 3. Work your way to the right, finding all the bits that match consecutively.

Step 4. When you find a column of bits that do not match, stop. You are at the summary boundary.

11000000.10101000.00000001.00000000
11000000.10101000.00000001.00100000
11000000.10101000.00000001.01000000
11000000.10101000.00000001.01100000

Step 5. Count the number of leftmost matching bits, which in this example is 25. This number becomes your subnet mask for the summarized route, /25 or 255.255.255.128.

Step 6. To find the network address for summarization, copy the matching 25 bits and add all 0 bits to the end to make 32 bits. In this example, the network address is 192.168.1.0.

In production networks, the subnets to be summarized most likely will not have the same subnet mask. For example, the subnets in Figure 23-3 are using three different subnet masks. What summary route would R1 send to BBR for the four subnets?

Image

Figure 23-3 Summarizing Subnets: Example 2

Use the same steps to calculate the summary:

10101100.00010000.00000000.00000000
10101100.00010000.10000000.00000000
10101100.00010001.00000000.00000000
10101100.00010010.00000000.00000000

Summary Route: 172.16.0.0/14

Study Resources

For today’s exam topics, refer to the following resources for more study.

Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.12.205