You are on page 1of 21

University of Kelaniya, Sri Lanka

Dr. Nalin Warnajith


BSc(Kel’ya), PGDipIT(Kel’ya), PhD(Japan),MACS
Senior Lecturer

Software Engineering Teaching Unit


SENG 24213
Computer Networks
IP ADDRESS

SETU, Faculty of Science , University of Kelaniya, Sri Lanka


IP Address
• An IP address is a numeric identity of an interface. Just like a
postal address provides a unique identity to a house, an IP
address provides a unique identity to an interface.
• IP address to find the destination interface and delivers the IP
packets. In order to receive IP packets, an interface needs a
unique IP address.
• An IP address is the combination of two addresses, network
address and host address.
• Network address is the group address of all hosts which belong
to a particular network and host address is the unique address
of a specific host in that network.
• IP address is 32 bits in length(IPv4). These bits are divided in
four parts. Each part is known as octets and contains and 8 bits.
• Subnet mask is used to separate the network address from the
host address in IP address.

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
IP Address classes [IPv4]
• 4,294,967,296 [232]IP addresses. Managing all these addresses
without any scheme are next to impossible.

Class Starting Address Ending Address Subnet mask

A 0.0.0.0 127.255.255.255 255.0.0.0

B 128.0.0.0 191.255.255.255 255.255.0.0

C 192.0.0.0 223.255.255.255 255.255.255.0

D 224.0.0.0 239.255.255.255 255.255.255.255

E 240.0.0.0 255.255.255.255 255.255.255.255

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
Classful Addressing

SETU, Faculty of Science , University of Kelaniya, Sri Lanka


SETU, Faculty of Science , University of Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
SETU, Faculty of Science , University of Kelaniya, Sri Lanka
Special IP Addresses
• Several IP addresses are available for special
purposes or are to be put to special use
a) Addresses significant to every IP subnet
- Network Address
- Broadcast Address
b) Addresses significant to individual hosts
- Loopback Address
c) Special Addresses of Global Significance
– Private Addresses
– Reserved Addresses

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
Special IP Addresses
• Addresses significant to individual hosts
Loopback Address
The 127.0.0.0 class 'A' subnet is used for special local
addresses, most commonly the loopback address
127.0.0.1. This address is used to test the local network
interface device's functionality
All network interface devices should respond to this
address from the command line of the local host
If you PING 127.0.0.1 from the local host, you can be
assured that the network hardware is functioning and
that the network software is also functioning
The addresses in the 127.0.0.0 - 127.255.255.255
range cannot be reached from outside the host, and so
cannot be used to build a LAN
SETU, Faculty of Science , University of
Kelaniya, Sri Lanka
Special IP Addresses
• Special Addresses of Global Significance
-Private Addresses
Private IP addresses on private networks that are not
directly connected to the Internet

• The private addresses are:

Class Starting IP Ending IP


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

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
IP Address classes [IPv6]
• The IPv6 is the most recent version of Internet Protocol. As the
Internet is growing rapidly, there is a global shortage for IPv4.
• IPv6 is intended to replace the IPv4. IPv6 uses a 128-bit address
and it allows 2128 i.e. approximately 3.4×1038 addresses.
• The actual number is slightly smaller as some ranges are reserved
for special use or not used
• The IPv6 addresses are represented by 8 groups of four
hexadecimal digits with the groups being supported by colons. An
example is given below:
Eg: 2001:0db8:0000:0042:0000:8a2e:0370:7334

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
Classless Addressing
• This classless addressing system is also known
as CIDR(Classless Inter-Domain Routing)
• The CIDR is a more flexible way of allocating
and specifying IP addresses than the classful
method
• CIDR defines arbitrarily-sized subnets solely by
base on IP address and number of significant
bits in the IP address

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka
What happened in classful addressing is that if any
company needs 1000 host machines?
- 1000>254; hence Class-C cannot be used
- Then class-B need to be used
- Class-B has 65,534 addresses (216-2)
- 65,534 – 1000 = 64,534 addresses are wasted

SETU, Faculty of Science , University of Kelaniya, Sri Lanka


• As you know, all the classes of IP address
such that A, B, and C comes in Classful
• It means
a.b.c.d/8 in case of Class A
a.b.c.d/16 in case of Class B
a.b.c.d/24 in case of Class C
are classful

SETU, Faculty of Science , University of Kelaniya, Sri Lanka


Classless Addressing
• CIDR effectively solved the problem by providing
a new and more flexible way to specify network
addresses in routers
• A CIDR network address looks like this:
191.160.0.0/22
• “/ ” notation is also called CIDR notation
• The "191.160.0.0" is the network address itself

SETU, Faculty of Science , University of


Kelaniya, Sri Lanka

You might also like