0% found this document useful (0 votes)
10 views

unit3 IP addressing

The document provides an overview of IP addressing, detailing the classification of IP addresses into Classes A, B, C, D, and E, along with their respective ranges and characteristics. It explains the concepts of network and host parts of an IP address, subnetting, and the distinction between private and public IP addresses. Additionally, it discusses the issues of address depletion and introduces classless addressing as a solution, including the use of CIDR notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

unit3 IP addressing

The document provides an overview of IP addressing, detailing the classification of IP addresses into Classes A, B, C, D, and E, along with their respective ranges and characteristics. It explains the concepts of network and host parts of an IP address, subnetting, and the distinction between private and public IP addresses. Additionally, it discusses the issues of address depletion and introduces classless addressing as a solution, including the use of CIDR notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

UNIT-III (Contd.

IP ADDRESSING

-Prepared By
Ms. Sumedha Seniaray
Assistant Professor
Department of Applied Mathematics, DTU
IP Address
• An IP address is a unique global address for a network interface.

• IP address can be categorized as:


• Special Addresses: these are assigned to specific host/network like:
• Network Address: address assigned to some network
• Broadcast Address: used to send information to all other computers within the network

• Normal Addresses: these are assigned to any host/computer in the network.


E.g.

Binary Notation

E.g.
IP ADDRESSING

E.g. IP address 172.16.254.1 belongs to Class B as the 1st byte or the 1st octet i.e. 172 lies in Class B range i.e. 128-191.
• IP address is divided into two parts:
• Network part i.e. net id (identifies a network in the internet)
• Host part i.e. host id (identifies a host in that network)

Depending on the class to which this


IP Address belongs
Classes of IP Address
Class A:
• In a Class A Network binary address start with 0 and rest of the 7 bits may vary, therefore the decimal
number in the first byte can be anywhere from 0 to 127.
• Class A IP address range: [0.0.0.0] to [127.255.255.255]
• The first 8 bits (the first octet) identify the network and the remaining 24 bits indicate the host within the
network.
• An example of a Class A IP address is 102.168.212.226, where "102" identifies the network and
"168.212.226" identifies the host on that network.
• No. of Class A networks possible = 27
• No. of Class A hosts possible within any Class A network = 224 – 2 (Except Network address and Broadcast
address)

Fixed
7 Bits Vary NetID varies from 0 0000000 → 0
(0-127)
0 0 1111111 → 127
NetID HostID

8 Bits 24 Bits
• NOTE:
• To identify the network address, all host bits must be 0
• To identify the broadcast address, all host bits are set to 1

E.g. 7.20.180.5 is a class A IP address


To find the network address of this IP address, 1st identify the netID and the hostID.
Here, the netID is “7” and the hostID is “20.180.5”
Therefore, to find its network address, set all the host bits to 0, that is,
00000111 00000000 00000000 00000000
i.e. 7.0.0.0 is the network address of the given IP address.

To find its broadcast address, set all host bits to 1, that is,
00000111 11111111 11111111 11111111 i.e. 7. 255.255.255 is the broadcast address.
Class B:
• In a Class B Network binary address start with 10 and rest of the 14 bits may vary, therefore the decimal
number in the first byte can be anywhere from 128 to 191.
• Class B IP address range: [128.0.0.0] to [191.255.255.255]
• The first 16 bits (two bytes) identify the network and the remaining 16 bits indicate the host within the
network.
• An example of a Class B IP address is 182.18.255.20, where "182.18" identifies the network and "255.20"
identifies the host on that network.
• No. of Class B networks possible = 214
• No. of Class B hosts possible within any Class B network = 216 – 2

NetID varies from 10 000000 → 128


(128-191)
Fixed 10 111111 → 191
14 Bits Vary
10
NetID HostID

16 Bits 16 Bits
E.g. 128.227.0.50 is a class B IP address
Here, the netID is “128.227” and the hostID is “0.50”
Therefore, it’s network address, is 10000000 11100011 00000000 00000000
i.e. 128.227.0.0 is the network address of the given IP address.

To find its broadcast address, set all host bits to 1, that is,
10000000 11100011 11111111 11111111 i.e. 128. 227.255.255 is the broadcast
address.
Class C:
• In a Class C Network binary address start with 110 and rest of the 21 bits may vary, therefore the decimal
number in the first byte can be anywhere from 192 to 223.
• Class C IP address range: [192.0.0.0] to [223.255.255.255]
• The first 24 bits (three bytes) identify the network and the remaining 8 bits indicate the host within the
network.
• An example of a Class C IP address is 211.64.15.1, where "211.64.15" identifies the network and “1"
identifies the host on that network.
• No. of Class C networks possible = 221
• No. of Class C hosts possible within any Class C network = 28 – 2

NetID varies from 110 00000 → 192


(192-223)
Fixed 110 11111 → 223
21 Bits Vary
110
NetID HostID

24 Bits 8 Bits
E.g. 211.64.15.1 is a class C IP address
Here, the netID is “211.64.15” and the hostID is “1”
Therefore, it’s network address, is 11010011 01000000 00001111 00000000
i.e. 211.64.15.0 is the network address of the given IP address.

To find its broadcast address, set all host bits to 1, that is,
11010011 01000000 00001111 11111111 i.e. 211.64.15.255 is the broadcast
address.
Class D:
• Class D IP addresses are reserved for Multicasting.
• There is no netID and hostID in a Class D IP address but it’s first four bits are fixed starting from 1110 and rest
of the 28 bits may vary, therefore the decimal number in the first byte can be anywhere from 224 to 239.
• Class D IP address range: [224.0.0.0] to [239.255.255.255]
Fixed 1st octet of Class D varies from
1110 1110 0000 → 224
Class D IP address 1110 1111 → 239

• Class E: 32 Bits
• Class E IP addresses are reserved for future purposes such as research, testing and experimentation. They
have never been documented or utilized in a standard way.
• In a Class E Network, binary IP addresses start with 1111, therefore the decimal number can range from 240
to 255.
• Class E IP address range: [240.0.0.0] to [255.255.255.255]
1st octet of Class E varies from
Fixed 1111 1111 0000 → 240
Class E IP address 1111 1111 → 255

32 Bits
Class Ranges of IPv4 Address
Default Mask:
• Although the length of the netid and hostid (in bits) is predetermined
in classful addressing, we can also use a default mask
• Default Mask is used to determine the network address of a given IP
address.
• Default mask can be created by setting all NetID bits to 1 and HostID
bits to 0.
The masks for classes A, B, and C are shown below:
• Default mask is masked (AND operation) with the given IP address to
produce it’s Network address.
Class B

E.g. IP address → 165.252.98.253


Default Mask → _255.255. 0 . 0__
Network address of the
_165.252. 0 . 0__ given Class B IP address

165 → 10100101 252 → 11111100 253 → 11111101


255 → 11111111_ 255 → 11111111 0 → 00000000
10100101→ 165 11111100→252 00000000→ 0
• IP Addresses can also be categorized as:
• Private IP address
• Public IP address
PRIVATE IP PUBLIC IP
• Used within LAN or within the organization • Used on public networks (INTERNET)
• Not recognized on internet • Recognized on internet
• Provided by Administrator • Provided by Service Provider
• Unique within network or organization • Globally unique
• Free of cost • Fee paid to service provider (or IANA)
• Scope is Local • Scope is Global
• Unregistered IP address • Registered IP address

Private IP Addresses:
All other IP addresses are
Public addresses

Eg. 11.1.5.60
Subnetting
• Dividing a network into smaller networks for efficient utilization of IP
addresses is known as Subnetting.
• It supports a 3-level hierarchy Uses Network Mask

NetID

Uses Subnet
Mask SubnetID ........ SubnetID

HostID ... HostID HostID ... HostID

• Subnetwork→ always in power of 2 i.e. no. of subnetworks possible will


always be power of 2
• To create a subnetwork, we borrow some of the HostID bits as SubnetID

Total no. of subnets created = 2n


Total no. of subnets utilized = 2n – 2
SUBNET MASK:
• The Subnet mask is used to get the Subnetwork address for the given IP address.
• Subnet mask can be generated by setting the NetID and SubnetID bits to 1 and remaining
HostID bits are set to 0.
• Subnet Mask can be used to identify the Subnetwork Address of the given IP
address by masking the subnet mask with the IP address.

IP Address
Subnet Mask_
Subnet Address

Eg. Identify the Subnet address for the given IP address 165.170.198.200
when there are 8 subnets for a given network.

165.170.198.200
255.225.224. 0_
165.170.192. 0_ Subnet
Address
Address Depletion
• The imperfection in classful addressing scheme combined with the fast
growth of the Internet led to the near depletion of the available addresses.

• Yet the number of devices on the Internet is much less than the 232 address
space. We have run out of class A and B addresses, and class C address
space is too small for most midsize organizations.

• One solution that has alleviated the problem is the idea of Classless
Addressing.
Classless Addressing
• Classless addressing is used to overcome address depletion and give
organizations more access to the Internet.
• In this addressing scheme, there no classes, but the addresses are
represented as Blocks (group of IP addresses).
• In classless addressing, when an entity, small or large, needs to be connected
to the Internet, it is granted a block (range) of addresses.
• The size of the block (the number of addresses) varies based on the size of the
entity.
• For example, a household may be given only two addresses; a large
organization may be given thousands of addresses.
• An ISP, as the Internet service provider, may be given thousands or hundreds
of thousands based on the number of customers it may serve.
• Classless address is represented using CIDR notation (Classless Inter Domain
Routing notation). Also known as Slash notation.
• Format of CIDR notation: x. y. z. w/ n
IP Address Mask

e.g. 190.36.73.119/20
Mask 11111111 11111111 11110000 00000000 255.255.240.0
n helps find the default mask for the given IP address, where n denotes that
1st n bits of the mask IP address is set to 1 and rest of the bits are set to 0.

No. of addresses in a Block = 232 - n

You might also like