Uploaded by Jordan Ewert

4.1.7 Subnet

advertisement
Firefox
1 of 4
https://labsimapp.testout.com/v6_0_570/index.html/productviewer/1190...
4.1.7 Subnet Facts
Subnetting is the process of dividing a large network into smaller networks called subnets.
When you subnet a network, each network segment has a di�erent network address (subnet
address). In practice, the terms network and subnet are used interchangeably to describe a
physical network segment with a unique network address.
This lesson covers the following topics:
• Subnetting
• Classless Inter-Domain Routing (CIDR)
• Variable-length subnet mask (VLSM)
• Network address ANDing process
• Supernetting
Subnetting
Breaking a network into smaller networks (subnetting) provides some bene�ts including:
• Increased security
• Easier network management
• Improved network performance
• Separation of departments
To subnet a network, bits are borrowed from the host ID and added to the network ID in IP
addressing.
For example, the following network needs to be subnetted into 7 smaller networks:
Network ID
192.168.5.0
11000000.10101000.00000101.00000000
Subnet Mask
255.255.255.0
11111111.11111111.11111111.00000000
The �rst step is to determine how many bits are borrowed from the host portion by using the
following formula:

2x
x = number of bits borrowed
When bits are moved from the host ID to the network ID, the number of subnets is
determined by the possible combinations of 1's and 0's of the borrowed bits. To create 7
9/9/2023, 6:26 PM
Firefox
2 of 4
https://labsimapp.testout.com/v6_0_570/index.html/productviewer/1190...
subnets in the above network, 3 bits must be borrowed in order to create enough subnets to
solve the problem. In this case it is 2 3 to give you 8 total subnets, enough to meet your needs.
• 11111111.11111111.11111111. 000 00000 (network ID 192.168.5.0)
• 11111111.11111111.11111111. 001 00000 (network ID 192.168.5.32)
• 11111111.11111111.11111111. 010 00000 (network ID 192.168.5.64)
• 11111111.11111111.11111111. 011 00000 (network ID 192.168.5.96)
• 11111111.11111111.11111111. 100 00000 (network ID 192.168.5.128)
• 11111111.11111111.11111111. 101 00000 (network ID 192.168.5.160)
• 11111111.11111111.11111111. 110 00000 (network ID 192.168.5.192)
• 11111111.11111111.11111111. 111 00000 (network ID 192.168.5.224)
In this example, the fourth octet is known as the interesting octet. The interesting octet is the
�rst octet whose subnet mask is not 255. It is the octet that bits are borrowed from and
where the host ID starts.
When subnetting, the number of hosts per subnet is reduced. To calculate the number of
hosts per subnet, use the following formula:

2y-2
y = number of bits in the host ID
Two addresses are subtracted because the �rst IP in each subnet is the reserved network
address and the last IP is reserved for the broadcast address. In the above network, with the
�ve 00000's, each subnet would have 2 5-2 number of hosts which equals 30.
The standard subnetting process like this is known as �xed-length subnet mask (FLSM). Using
this method, each subnet has the same number of hosts. FLSM is typically used in private
networks as it requires less con�guration and administration.
Classless Inter-Domain Routing
When subnets are created, the standard IP classes are no longer used. This is called Classless
Inter-Domain Routing. To simplify writing the network address, you can use CIDR notation
which is the network ID with a slash followed by the number of bits in the network ID.
The above network's CIDR notation is 192.168.5.0/27. This means 27 bits are used to identify
the network and 5 bits identify the hosts, for a total of 32 bits.
Variable-Length Subnet Mask (VLSM)
9/9/2023, 6:26 PM
Firefox
3 of 4
https://labsimapp.testout.com/v6_0_570/index.html/productviewer/1190...
Using the VLSM method, you can create subnets of di�erent sizes to reduce IP address waste.
The �rst step is to create a table showing the di�erent subnets and possible host addresses.
For example:
CIDR Notation
Hosts Per Subnet
/24
254
/25
126
/26
62
/27
30
/28
14
/29
6
/30
2
The second step is to list the needed subnets ranked from most addresses needed down to
least number needed. Each subnet is then assigned the network address that will provide the
needed addresses with minimal waste.
Keep in mind that for VLSM to work, the network must be using advanced routing protocols
such as OSPF, BGP, and others. VLSM is typically used by ISP's and larger public networks as it
requires complex con�guration.
Network Address and ANDing Process
When given a network IP address, you might have to determine the network, or subnet, it
belongs to. This is done by using a process called ANDing. ANDing is done by multiplying each
bit of the binary versions of the IP address and its subnet mask with each other and
calculating the results. Each bit can have the following results:
• 0 and 0 = 0
• 1 and 0 = 0
• 0 and 1 = 0
• 1 and 1 = 1
The result of the ANDing process is the network ID that the IP address belongs to. The
following table shows ANDing process for the IP address 172.16.77.54/21:
9/9/2023, 6:26 PM
Firefox
4 of 4
https://labsimapp.testout.com/v6_0_570/index.html/productviewer/1190...
Component
Value
IP address
10101100.00010000.01001101.00110110
Subnet
11111111.11111111.11111000.00000000
ANDing
10101100.00010000.01001000.00000000
After converting the ANDing results string into decimal, the network ID that the IP address
belongs to is 172.16.72.0.
Supernetting
When routers talk to each other, they share their routing tables. As networks become more
complex, these routing tables can get quite large and complicated. Supernetting is the
process of combining several subnets. This reduces the number of entries in a routing table.
Supernetting has many advantages including:
• Reducing the size of routing tables.
• Simplifying the network overview.
• Decreasing CPU and RAM resources on the routers.
• Improving network performance.
The main thing to keep in mind when supernetting is that the networks must be in sequence.
If they are not in sequence, the networks cannot be combined.
Copyright © 2023 TestOut Corp. Copyright © The Computing Technology Industry
Association, Inc. All rights reserved.
9/9/2023, 6:26 PM
Download