2. Subnetting
• Subnetting is a method of dividing a single physical network into logical sub-
networks (subnets).
• Subnetting allows a business to expand its network without requiring a new
network number from its Internet service provider.
• Advantages
• Subnetting helps to reduce the network traffic and also conceals network complexity.
• Reallocating IP Addresses:- A limited number of host allocations are available for each class; so to allocate
more ip adreesses ,we can do subnetting.
• Improves Network Speed:- It reduces traffic so increases speed.
• Improving Network Security:- Subnetting helps network administrators to reduce network-wide threats
• Reliving Network Congestion:- Without a subnet, data packets from every other computer on the network
would be visible to all computers and servers.
• Efficiency:- Subnetting is used to simplify network traffic by eliminating the need for additional routers.
3. Subnetting
• Two level of hierarchy(No Subnetting)
• Each address in the block can be considered
as a two-level hierarchical structure:
the leftmost n bits (prefix) define the network;
the rightmost 32 - n bits define the host.
• Three-Levels of Hierarchy: Subnetting
• An organization that is granted a large block
of addresses may want to create clusters of
networks (called subnets) and divide the
addresses between the different subnets. The
rest of the world still sees the organization as
one entity; however, internally there are
several subnets
4. Example of subnetwork
• suppose an organization is given the block 17.12.40.0/26, which
contains 64 addresses.
• The organization has three offices and needs to divide the
addresses into three subblocks of 32, 16, and 16 addresses. We can find
the new masks
by using the following arguments:
1. Suppose the mask for the first subnet is n1, then 2 32- n1 must be 32,
which means
that n1 = 27.
2. Suppose the mask for the second subnet is n2, then 2 32- n2 must be
16, which
means that n2 = 28.
3. Suppose the mask for the third subnet is n3, then 232- n3 must be 16,
which means
that n3 = 28.
6. Finding Subnet address
• find the subnet addresses from one of the addresses in
the subnet.
a) In subnet 1, the address 17.12.14.29/27 can give us the subnet address if we use the
mask /27 because
Host: 00010001 00001100 00001110 00011101
Mask: /27
Subnet:00010001 00001100 00001110 00000000 .... (17.12.14.0)
b) In subnet 2, the address 17.12.14.45/28 can give us the subnet address if we use the
mask /28
Host: 00010001 00001100 00001110 00101101
Mask: /28
Subnet: 00010001 00001100 00001110 00100000 .... (17.12.14.32)
c) In subnet 3, the address 17.12.14.50/28 can give us the subnet address if we use the
mask /28 because
Host: 00010001 00001100 00001110 00110010
Mask: /28
Subnet: 00010001 00001100 00001110 00110000 .... (17.12.14.48)
8. 19.8
An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers as
follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses.
c. The third group has 128 customers; each needs 64
addresses.
Design the subblocks and find out how many addresses are
still available after these allocations.
Example 1
10. 19.10
Solution
Figure 2 shows the situation.
Example 1 (continued)
Group 1
For this group, each customer needs 256 addresses. This
means that 8 (log2 256) bits are needed to define each
host. The prefix length is then 32 − 8 = 24. The addresses
are
11. 19.11
Example 1(continued)
Group 2
For this group, each customer needs 128 addresses. This
means that 7 (log2 128) bits are needed to define each
host. The prefix length is then 32 − 7 = 25. The addresses
are
12. 19.12
Example 1 (continued)
Group 3
For this group, each customer needs 64 addresses. This
means that 6 (log264) bits are needed to each host. The
prefix length is then 32 − 6 = 26. The addresses are
Number of granted addresses to the ISP: 65,536
Number of allocated addresses by the ISP: 40,960
Number of available addresses: 24,576