The document discusses subnetting and supernetting in classful addressing, explaining how class A, B, and C IPv4 addresses can be divided into smaller networks for better management and efficiency. Subnetting involves borrowing bits from the host portion to create multiple subnets, while supernetting combines several class C addresses to accommodate larger networks. Examples illustrate the process of determining subnet addresses, subnet masks, and the number of hosts per subnet.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
14 views
Subnetting and Supernetting Classful Addressing
The document discusses subnetting and supernetting in classful addressing, explaining how class A, B, and C IPv4 addresses can be divided into smaller networks for better management and efficiency. Subnetting involves borrowing bits from the host portion to create multiple subnets, while supernetting combines several class C addresses to accommodate larger networks. Examples illustrate the process of determining subnet addresses, subnet masks, and the number of hosts per subnet.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 34
Computer Networks |
Chapter 3: Network Layer
Lecture Focus:
Subnetting in classful Addressing
Supernetting in classful Addressing}
Compiled by: Tigabu YayaSub-netting
= Class A,B, &C IPv4 addresses are made up of 2-levels of hierarchy before they
are subnetted: the network portion and host portion .
= To reach a host in the Internet, we first reach the network using the network address
and then we reach the host using the hostid based up on the class of the address.
193.168.100.1
193.168.100.6 To the
Router |——> rest of the
Internet
193.168.100.5Sub-netting (continued...)
= If an organization is interested to categorize its machines into different groups, the best
solution is sub-netting. Sub-netting is the process of dividing a given network into
smaller groups of networks. 193.168,100,34
193.168.100.33
193.168.100.1
193.168.100.63,
193.168.100.31 To the rest of
Router | —>
= the Internet
193.168.100.2
193.168.100.30oo
ro
A network with two levels of hierarchy (unsubnetted)
11.14.01 141.14.0.2 141.14.192.2 141.14.255.254 141.14.2
a a a
| J
Network: 141.14.0.0 14.14.2014
254
ee
R1
To the rest of
the InternetA network with three levels of hierarchy (Subnetted)
uansor 1e1as02 Wi isoa2st Lenses audoe ——Lanaatzran4
ee! 1 a a a
=
TANTS | Subnet
MLits40
eS:
qaLt4azet 1414282 14191254
i 4 1
Subnet
AL4128.0
Site: 1411.14.00Sub-netting (Continued...)
= Creating subnetworks in class A, B and C IPv4 addresses will add an
intermediary level in the hierarchy of addressing. Subnetted networks have
3-levels of hierarchy:
1. Netid portion
nv
Subnetid portion
3. Hostid portion
= The routing of an IP packet now involves three steps: delivery to the network,
delivery to the subnetwork , and delivery to the host.
= Why sub-netting?
Y Non-sub-netted networks waste a lot of IPv4 addresses
“In smaller networks traffic management is easier
“To improve network performance and securitySub-netting (Continued...)
During the process of sub-netting , we borrow some bits from the host portion
in order to divide the large network into smaller network.
Borrowing bits from the host portion reduces the number of hosts
In the process of sub-netting we don’t have control over the network bits. We
must borrow the sub-netting bits from the host portion.
Communication between these sub-networks is achieved through a router
Question 1: What is the minimum and maximum number of bits that we can
borrow from the host portion of a class B IPv4 address during sub-netting?
Question 2: Determine the number of sub-nets that can be created by borrowing 3
bits from the host portion of a given class C IPv4 address?
Question 3: What is the maximum numbers of valid hosts addresses in each of
the sub-nets in Question 2?Analogy
esa Dividing the barrel of apples into small barrels or baskets
does not give us any more apples...
100 Apples= Sub-netting is almost the same as taking a barrel of 100
apples and dividing it into 10 barrels of 10 apples each.Analogy
98 Apples
(100 — 2)
100 — 2 apples = 98 Usable Apples
Before subnetting:
Nv
In any network (or subnet) we can not use all
the IP addresses for host addresses.
We lose two addresses for every network or
subnet.
Network Address - One address is reserved to
that of the network.
Broadcast Address — One address is reserved to
address all hosts in that network or subnet.ro
10 barrels x 8 apples = 80 apples
8 |@iRS| 5 gaite| S| gaits
(less 2) (less 2) (less 2)
80 Apples — » 8 eke ee
10 * (10 - 2) (less 2)
a)
(less 2)
= Insub-netting we will see that we continue to lose two apples
per subnet, one for the subnet address and one for the broadcast
address.Sub-net mask
= The default masks are used when the network is not sub-netted.
= But if the network contains sub-nets the situation is different. We must have a
sub-net mask.
= Sub-net masks have all 1s in the network and sub-network portion, and all Os in
the host portion.
Sub-net mask
Given IP Bitwise AND |
‘Address Operation Sub-net address
= A sub-net mask is a 32-bit number that gives the sub-net address when it is
bitwise ANDed with a given IP address.Finding the Subnet Address
Given an IP address, we can find the
subnet address the same way we found the
network address. We apply the mask to the
address. We can do this in two ways:
straight or short-cut.Ce kee eS So
Finding the Subnet Address...
Straight Method
In the straight method, we use binary
notation for both the address and the
mask and then apply the AND operation
to find the subnet address.Finding the Subnet Address...
Example 1:
What is the subnetwork address if the
destination address is 200.45.34.56 and the
subnet mask is 255.255.240.0?
11001000 00101101 00100010 00111000
11111111 11111111 11110000 00000000
11001000 00101101 00100000 00000000
The subnetwork address is 200.45.32.0.Finding the Subnet Address ...
Short-Cut Method
If the byte in the mask is 255, copy the byte in the
address.
If the byte in the mask is 0, replace the byte in the
address with 0.
If the byte in the mask is neither 255 nor 0, we
write the mask and the address in binary and apply
the AND operation.Finding the Subnet Address...
Example 2:
What is the subnetwork address if the destination
19.30.80.5 and the mask is
address is
255.255.192.0?
C as ° 30 — 5
Mask
19 ~«
Subnet Address
84 0
192 1
64 0
cloo
oo
4
0
0
0
1
0
o
oloo
olorNote:Finding the Subnet Address...
Example 3:
A company is granted the site address
201.70.64.0 (class C). The company needs
six subnets. Design the subnets.
The number of Is
in the default
mask is 24 (class C).Solution 3...
The company needs six subnets.
The number 6 is not a power of 2.
The next number that is a power of 2 is 8 (23).
We need 3 more Is in the subnet mask.
The total number of 1s in the subnet mask is 27 (24 + 3).
The total number of Os is 5 (32 - 27). The mask isSolution 3...
11111111 11111111 11111111 11100000
or
255.255.255.224
The number of subnets is 8.
The number of addresses in each subnet is 25 (5 is the
number of 0s) or 32.
See Next slideSolution 3...
Start here
4
Add 31
| 201.70.64.0,§ ———"“" =" ___» 991.70,64.31
1st subnet
Add 1
_————_
| 201.70.64.32 ~Add 3 > 201.70.64.63
2nd subnet Add 1
°
°
°
| 201.70.64,224 201.70.64.255
8th subnet t
Finish hereFinding the Subnet Address...
Example 4:
A company is granted the site address
181.56.0.0 (class B). The company needs
1000 subnets. Design the subnets.
The number of Is in the default mask is 16
(class B).Solution 4...
The company needs 1000 subnets.
1000 is not a power of 2.
The next number that is a power of 2 is 1024 (2!°).
We need 10 more Is in the subnet mask.
The total number of Is in the subnet mask is 26 (16 + 10).
The total number of 0s is 6 (32 — 26).Solution 4...
The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192.
The number of subnets is 1024.
The number of addresses in each subnet is 2°
(6 is the number of 0s) or 64.
See next slideoo
ro
Solution 4...
Start here
102th subnet subtract 1
10221h subnet subwact 1
1OZAth subnet
Finish bereFinding the Subnet Address
Example 5
= A company is assigned a class B address of 172.16.0.0 by an ISP and the
company wants to create 256 subnets. Design these subnets, identify the subnet
mask and maximum number of hosts that can be accommodated in each subnet .
Solution: to represent 256 subnets we should borrow 8 bits from the hostid
portion since 2*8 = 256. The remaining 8 bits in the hostid portion can be used
to represent 254 (248 — 2 ) different hosts in each subnet.
The 1* subnet is : 172.16.0.0 --- 172.16.0.255
The 2"4 subnet is : 172.16.1.0 172.16.1.255
The last subnet is : 172.16.255.0 - -- 172.16.255.255
The subnet mask is 255.255,255.0
Do you remember we have said 255.255.255.0 is the default mask for class C
address? But in this case it is the sub-net mask for a class B address.Sub-netting example (continued...)
Network address 172.16.0.0 with /16 network mask
as
Using Subnets: subnet mask 255.
Default Mask:
255.255.0.0 or /16
255.255.255.0 or /24
Host
0
255.255.0 or /24
Host
ononoeee 00000000
00000000Sub-netting example 5(continued...)
Using Subnets: subnet mask 255.255.255.0 or /24
Network | Network | Subnet Host
172 16 0 Host Subnets
172 16 1 Host 256 Subnets
172 16 2 Host 28 -2 hosts in
472 16 3 Host each subnet
172 16 Etc. Host
172 16 254 Host
172 16 255 HostSub-netting example 5(continued...)
172.16.0.0/24 172.16.10.0/ 24
Network A
«| 172.16.25.0/24
Network D
172.16.5.0/24 | «
Network ¢Exercise 1
= Given
Host IP Address: 138.101.114.250
oSubnet Mask: 255.255.255.192
From the given information :
a)Identify the subnet where this host lives
b) Identify the other subnets in the network
Identify the total number of hosts in each subnet1
R
Exercise 2
For the given IPv4 addresses identify the subnet mask , design the subnets and
identify the maximum number of hosts that can be accommodated in each
subnet .
a)
b)
c)
d)
192.168.1.0 interested in 4 subnets
172.168.132.70(/20)
192.168.1.0(/25)
10.10.100.10 (/18)
You are given a class B address and you are required to create 1000 sub-
networks. Determine the sub-net mask and the number of hosts that you will
obtain in each sub-net work in this addressing scheme.
You are given a class B address and you are interested to have 1000 hosts in
each sub-network. Determine the sub-net mask and the number of sub-nets that
you should create in this addressing scheme.Super-netting
= Class A and B addresses are almost depleted, class C addresses are still available.
But class C addresses are not able to satisfy the needs many large organizations.
= One solution is super-netting, In super-netting , an organization can combine
several class C addresses to create a large range of addresses.
= During super-netting we “borrows” bits from the network portion to create
contiguous nodes.
= Insuper-netting , we need the first address of the super-net and the super-net
mask to define the range of addresses.
= A super-net has /ess number of Is than the default masks of each cla:Super-netting Example
Company A has about 1000 nodes to address. A class B address would be too big
(or may not be available). The solution for this is super-netting It has got 4
contiguous class C addresses from its ISP.
203.10.112.0 ; 203.10.113.0;203.10.114.0 and 203.10.115.0
By allowing the first 2 bits of the third octet to be “borrowed”, a virtual class B
address can be created.
A super-net address of 203.10.112.0 — 203.10.115.255 is formed with a subnet
mask of 255.255.252.0.
The Host portion will be expanded from 8 — 10 bits
Route summarisation can occur to 203.10.112.0/22