Internet Protocol Extra Material
Internet Protocol Extra Material
Powerpoint Templates
Network Layer
Network layer is concerned with getting packets from the
source all the way to the destination (end-end to
transmission)
➢May require many hops at intermediate routers
(multiple hops),
86
90 133.120.75.8
94 129.102.12.7
MARIA AVE
129.102.0.0 133.120.0.0
131.107.0.0
129.102.16.2
131.107.3.27
Netid and Hostid
Range of
Number Number of Hosts
Network IDs
of Networks per Network
(First Octet)
1 2 3
24
Reserved, Private addresses
Private address block:
Class A: 10.0.0.0 to 10.255.255.255 [16777216] (Private use
networks)
Class B: 172.16.0.0 to 172.31.255.255 [1048576]
Class C: 192.168.0.0 to 192.168.255.255 [65536]
Reserved:
Class A: 0.0.0.0 to 0.255.255.255 & 127.0.0.0 to 127.255.255.255 (LB)
Administered by RIRs: Examples
128.0.0.0 to 128.0.255.255 & 191.255.0.0 to 191.255.255.255
192.0.0.0 to 192.0.0.255 ---------196.-.-.-, 198.-.-.-
What is Subnet Mask?
IPv4 address has two components, the network part and the
host part.
27
Subnet and Sub-netting
28
Class C – 1 bit sub-netting
Consider class C network 192.168.10.0 (subnet mask is 255.255.255.0)
❖ If we include one bit from the host part to the network part, the
subnet mask changes into 255.255.255.128 (for 1 bit sub-netting)
❖ The single bit can have two values in last octet, either 0 or 1
❖ 11000000.10101000.00001010.0 | 0000000
11111111.11111111.11111111.1 | 0000000
❖ So the network 192.168.10.0 is divided into two networks with a
single bit sub-netting,
❖ each network has 128 total addresses of which 126 are usable
❖ two are used in each subnet to represent the network address and
broadcast address.
29
Class C – 1 bit sub-netting
SN No. Description Binaries Decimal
32
Class B – 1 bit sub-netting
Consider class B network 172.16.0.0 (subnet mask is 255.255.0.0)
❖ If we include one bit from the host part to the network part, the
subnet mask changes into 255.255.128.0 (with 1 bit sub-netting)
❖ The single bit can have two values in last octet, either 0 or 1
❖ 10101100.00010000.0 | 0000000.00000000
11111111.11111111.1 | 0000000.00000000
❖ So the network 172.16.0.0 is divided into two networks with single
bit sub-netting,
❖ each network has 32768 total addresses of which 32766 are
usable, two are used in each subnet to represent the network
address and broadcast address.
33
Class B – 1 bit sub-netting
SN No. Description Binaries Decimal
1 Network
10101100.00010000.00000000.00000000 172.16.0.0
Address
Broadcast
10101100.00010000.01111111.11111111 172.16.127.255
Address
2 Network
10101100.00010000.10000000.00000000 172.16.128.0
Address
Broadcast
10101100.00010000.11111111.11111111 172.16.255.255
Address
34
Class B – 2 bit sub-netting
SN No. Description Binaries Decimal
1 NA 10101100.00010000.00000000.00000000 172.16.0.0
1st 10101100.00010000.00000000.00000001 172.16.0.1
Last 10101100.00010000.00111111.11111110 172.16.63.254
BA 10101100.00010000.00111111.11111111 172.16.63.255
2 NA 10101100.00010000.01000000.00000000 172.16.64.0
1st 10101100.00010000.01000000.00000001 172.16.64.1
Last 10101100.00010000.01111111.11111110 172.16.127.254
BA 10101100.00010000.01111111.11111111 172.16.127.255
3 NA 10101100.00010000.10000000.00000000 172.16.128.0
1st 10101100.00010000.10000000.00000001 172.16.128.1
Last 10101100.00010000.10111111.11111110 172.16.191.254
BA 10101100.00010000.10111111.11111111 172.16.191.255
4 NA 10101100.00010000.11000000.00000000 172.16.192.0
1st 10101100.00010000.11000000.00000001 172.16.192.1
Last 10101100.00010000.11111111.11111110 172.16.192.254
35
Example: Route 193.205.102.36
Classless Addressing
➢ Classless addressing
➢ uses a variable number of bits for the network and host
portions of the address (variable-length blocks)
37
Classless Addressing
➢ Classless addressing
➢ How to find the prefix length if an address is given?
➢ As prefix length is not inherent in the address
➢ Need to separately give the length of the prefix
➢ So, Prefix length is added to the address, separated by a
slash
Format of classless address
The notation is informally referred to as slash notation
and formally as classless inter-domain routing or CIDR
38
Table Prefix lengths
40
Example 2: What is the first address in the block if one
of the addresses is 140.120.84.24/20? Number of
addresses, first and last useable IPs in block? Broadcast
address?
Answer: The first address is 140.120.80.0/20
41
Example 4: find the first and last address in the block
if one of the addresses is 140.120.84.24/20.
45
Variable Length Subnet Mask (VLSM)
➢ VLSM is a way of further sub-netting a subnet.
➢ VLSM allows us to use more than one subnet mask within the
same network address space.
46
Variable Length Subnet Mask (VLSM)
➢ Suppose we want to divide 192.168.10.0 (a Class C network)
into four networks each with unequal number of address as per
the following requirements:
Subnet A : 126 IPv4 Addresses.
Subnet B : 62 IPv4 Addresses.
Subnet C : 30 IPv4 Addresses.
Subnet D : 30 IPv4 Addresses.
47
Two-level hierarchy in an IPv4 address
FIRST DIVISION
▪ Divide into two networks equally with 128 addresses (126 usable)
using subnet mask 255.255.255.128
1. 192.168.10.0/25 [255.255.255.128]
➢ 11000000.10101000.00001010.00000000 [in binary]
11111111.11111111.11111111.10000000 [subnet mask]
2. 192.168.10.128/25 [255.255.255.128]
➢ 11000000.10101000.00001010.10000000
11111111.11111111.11111111.10000000 [subnet mask]
49
Variable Length Subnet Mask (VLSM)
SECOND DIVISION
▪ Divide second subnet 192.168.10.128/25 (obtained from first
division) again into two networks,
▪ Each with 64 addresses (62 usable) using subnet mask
255.255.255.192
1. 192.168.10.128/26 [255.255.255.192]
➢ 11000000.10101000.00001010.10000000 [in binary]
11111111.11111111.11111111.11000000 [subnet mask]
2. 192.168.10.192/26 [255.255.255.192]
➢ 11000000.10101000.00001010.11000000
11111111.11111111.11111111.11000000 [subnet mask]
50
Variable Length Subnet Mask (VLSM)
THIRD DIVISION
▪ Divide second subnet 192.168.10.192/26 (obtained from second
division) again into two networks,
▪ each with 32 addresses (30 usable) using subnet mask
255.255.255.224
1. 192.168.10.192/27 [255.255.255.224]
➢ 11000000.10101000.00001010.11000000 [in binary]
11111111.11111111.11111111.11100000 [subnet mask]
2. 192.168.10.224/27 [255.255.255.224]
➢ 11000000.10101000.00001010.11100000
11111111.11111111.11111111.11100000 [subnet mask]
X.X.X.0010xxxx
X.X.X.000xxxxx
X.X.X.0011xxxx
Example 3:
An organization is granted a block of addresses starting
with 14.24.74.0/24.
64
Address depletion and IPv6
➢ Despite all short-term solutions, address depletion is
still a long-term problem for the Internet.
65
IPv6 ADDRESSES
Abbreviated IPv6 addresses
EXAMPLE
Expand the address 0:15::1:12:1213 to its original.
Solution
We first need to align
➢ the left side of the double colon to the left of the
original pattern and
➢ the right side of the double colon to the right of the
original pattern
in order to find how many 0s we need to replace the double
colon.