Week 5: Tanzeel Ur Rehman (Lecturer, Elite Colleges)
Week 5: Tanzeel Ur Rehman (Lecturer, Elite Colleges)
Week 5
The addresses space for IPv4 is quickly running out due to the
rapid growth of the Internet. Ipv6 was introduced as a solution
for expanding the possible number of users on the internet.
Time To Live (TTL): A value used to prevent loops. Routers decrement this field
by 1 each time the packet is forwarded; once it decrements to 0, the packet is
discarded.
Protocol: A field that identifies the contents of the data portion of an IP packet.
Classless and classful addressing are mainly just two ways to think
about IP address formats.
o Classful IP Addressing
Classful logic simply means that the main class A, B, and C are
considered.
A 10.0.0.0 - 10.255.255.255
B 172.16.0.0 - 172.31.255.255
C 192.168.0.0 - 192.168.255.255
Out of the total valid addresses in each class, two dedicated IP address is reserved for Network
address and Broadcast address. So, the total number of available IP addresses is 2 n-2
Subnet Mask
A subnet mask is a 32-bit value that allows the recipient of IP packets to
distinguish the network ID portion of the IP address from the host ID portion
of the IP address.
Example
Classless Interdomain Routing (CIDR)
CIDR
CIDR, which stands for Classless Inter-Domain Routing, is an IP
addressing scheme that improves the allocation of IP addresses.
It replaces the old system based on classes A, B, and C.
This scheme also helped in extending the life of IPv4 as well as slowing
the growth of routing tables.
CIDR is based on variable-length subnet masking
(VLSM). This allows it to define prefixes of arbitrary
lengths making it much more efficient than the old
system. CIDR IP addresses are composed of two sets of
numbers. The network address is written as a prefix e.g.,
“192.168.1.0” .The second part is the suffix which
indicates how many bits are in the entire address e.g.,
“/25”.
CIDR uses both subnetting and supernetting.
I want to I want to
connect 120 connect 62
PCs PCs
I want to I want to
connect 25 connect 5
PCs PCs
Steps:
Now, divide first 128 IP addresses further into two parts. One
ranging from 1.0.0.0 to 1.0.0.63 and other from 1.0.0.64 to
1.0.0.127. Now the subnet mask will change from /25 to /26.
128 128
(1.0.0.0 to 1.0.0.127) (1.0.0.128 to 1.0.0.255)
64 64
(1.0.0.0 to 1.0.0.63) (1.0.0.64 to 1.0.0.127) Assigned to Router A
32 32
(1.0.0.0 to 1.0.0.31) (1.0.0.32 to 1.0.0.63) Assigned to Router B
16 16
(1.0.0.0 to 1.0.0.15) (1.0.0.16 to 1.0.0.31) Assigned to Router C
Assigned to Router D
Subnet Number, Broadcast Number and Valid Range of IP
Addresses
o Address: 172.31.103.41
o Mask: 255.255.252.0 or /22
As the first 6 bits are part of Network and their value sums to 100
so, Subnet Number (Network ID) is 172.31.100.0/22
The broadcast address (Broadcast ID) is when all the Hosts are
equal to 1. So, in this case it is 172.31.103.255/22
o Network: 172.31.0.0
o Mask: 255.255.224.0
As it is class B address and three extra bits are included in the network part so,
all the combinations of these 3 bits of Network part are subnets of this network.
Private IP addresses
A 10.0.0.0 - 10.255.255.255
B 172.16.0.0 - 172.31.255.255
C 192.168.0.0 - 192.168.255.255