Unit 3.2-IP Addressing
Unit 3.2-IP Addressing
IP Addresses
What is an IP Address?
• An IP address:
- is a 32 bit long identifier
- encodes a network number (network prefix)
and a host number
Dotted Decimal Notation
• Example:
10000000 10001111 10001001 10010000
1st Byte 2nd Byte 3rd Byte 4th Byte
= 128 = 143 = 137 = 144
128.143.137.144
Network prefix and Host number
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Example
Example: www.google.com
•IP address is 128.143.137.144
– Is that enough info to route datagram??? -> No, need netmask or
prefix at every IP device (host and router)
•Using Prefix notation IP address is: 128.143.137.144/16
– Network prefix is 16 bits long
128.143 137.144
Problems with Classful IP Addresses
• Problem: Organizations
have multiple networks
University Network
which are independently
managed Engineeri
ng Medical
– Solution 1: Allocate an School
address for each network School
• Difficult to manage
• From the outside of the Library
organization, each
network must be
addressable ie have an
identifiable address.
– Solution 2: Add another
level of hierarchy to the
IP addressing structure Subnetting
Basic Idea of Subnetting
subnet
network prefix number
host number
* There are different ways of subnetting. Commonly used netmasks for university
networks with /16 prefix (Class B) are 255.255.255.0 and 255.255.0.0
Example of a Subnetting Plan
Subnet 128.49.0.0/24
Internet
Subnet 1
Subnet 128.49.1.0/24
Subnet 3
Router
R
Subnet 128.49.2.128/24
Subnet 4
Subnet 2
Subnet 128.49.3.0/24
Advantages of Subnetting
128.143.0.0/16
Same Network with Subnets
Same network with different subnetmasks
128.143.137.0
Subnet
Subnetting Example
• Solution:
– 10.2.22.0/24 (256 addresses > 200)
– 10.2.23.0/26 (64 addresses >61)
– 10.2.23.64/26 (64 addresses > 55)
– 10.2.23.128/26 (64 addresses > 41)