Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

IP Addressing

ALTTC/ BBFaculty 1
What is an IP address?
 Each host on a TCP/IP network is
uniquely identified at the IP layer
with an address.
 An Internet Protocol (IP) address
specifies the location of a host or
client on the Internet.
 The IP address is also known as
Protocol address
 The IPv4 address is 32 bits long
ALTTC/ BB Faculty 2
IPv4 Address Scheme
 What the Internet machines see an IP
address?
11001010000011100100000000000001
 For human understanding the 32 bits of IP
address are separated into 4 bytes of 8
binary digits
 Each binary byte is converted into decimal
and is separated by a dot hence also
known as Dotted Decimal Notation
 How we see an IP address?
202.14.64.1
ALTTC/ BB Faculty 3
IPv4 Address Scheme
32 Bits
Network Host

8 Bits 8 Bits 8 Bits 8 Bits

172 . 16 . 122 . 204


 In decimal the address range is
0.0.0.0 to 255.255.255.255
 The IP address is of the form
<networkID,hostID>
ALTTC/ BB Faculty 4
IPv4 Address Scheme
 Two types of addressing schemes for IPv4
– Classful
– Classless
 Classful
– Original style of addressing based on first few
bits of the address.
– Generally used in customer sites.
 Classless
– A new type of addressing that disregards the
class bit of an address and applies a variable
prefix (mask) to determine the network number.

ALTTC/ BB Faculty 5
IPv4 Address classes
Class-A: N H H H

Class-B: N N H H

Class-C: N N N H

Class-D: For Multicast

Class-E: For Research

•N=Network number assigned by IR.


•H=Host number assigned by network administrator.

ALTTC/ BB Faculty 6
Network Address Mask
 Class-A Address
– 00001010.00001010.01000000.00001001
– Natural or Default Mask is /8
– 11111111.00000000.00000000.00000000
– 255.0.0.0
 Class-B Address
– 10001010.00001110.01010000.00000001
– Natural or Default Mask is /16
– 11111111.11111111.00000000.00000000
– 255.255.0.0

ALTTC/ BB Faculty 7
Network Address Mask
 Class-C Address
– 11001010.00001100.01000000.10000001
– Natural or Default Mask is /24
– 11111111.11111111.11111111.00000000
– 255.255.255.0

ALTTC/ BB Faculty 8
Identifying a class of address

Address Identifier Network Address Host Address

A 0 7 bits Network Address 24 bits Host Address

B 10 14 bits Network Address 16 bits Host Address

C 110 21 bits Network Address 8 bits Host Address

D 1110 Multicast address (224.0.0.0-239.255.255.255)

E 1111 Reserved for future use

ALTTC/ BB Faculty 9
IP Address Bit Patterns

8 Bits 8 Bits 8 Bits 8 Bits

Class-A: 00000000 01111111 0-127

Class-B: 10000000 10111111 128-191

Class-C: 11000000 11011111 192-223

Class-D: 11100000 11101111 224-239

Class-E: 11110000 11111111 240-255

ALTTC/ BB Faculty 10
Address space utilisation
128 127
10000000 01111111 100%

B-25%

10111111 0
191
1 0 A-50%
192
11000000 0 1
C-12.5% 11011111 1
223 0
D-6.25% 1
224
11100000 239 0 00000000
E-6.25% 11101111 240
255 0
11110000 11111111

ALTTC/ BB Faculty 11
Networks Vs Hosts
 In Classless environment we can have
232=4294967296 Hosts
 Class Networks Hosts/Network
 A 126 16777214
 B 16384 65354
 C 2097152 254
– Having 16777214 hosts for Class-A and
254 hosts for Class-C were not working
well

ALTTC/ BB Faculty 12
Subnetting
 Chopping up of a network into a number of smaller
networks is called subnetting.
 Allows to assign some of the bits, normally used
by the host portion of the address, to the network
portion of the address.
 The format of subnetted IP address would be
<network number, subnet number, host number>
 Efficiently uses the full network address.
 Subnet is a real network under a network.
 Any of the classes can be subnetted.

ALTTC/ BB Faculty 13
Subnetting (1 Bit)
N.N.N.H
N.N.N.0hhhhhhh
N.N.N.1hhhhhhh
Subnet-2 Subnet-1
N.N.N.128/25 N.N.N.0/25
0000000 - 0
0000001 - 1
1 0
0000010 - 2
Hosts: Hosts: . .
27-2=126 27-2=126 . .
(1-126) (1-126) 1111110 - 126
1111111 - 127

ALTTC/ BB Faculty 14
Subnetting (2 Bits)
N.N.N.H N.N.N.00hhhhhh
SN3 SN2
N.N.N.01hhhhhh
N.N.N.128/26 N.N.N.64/26 N.N.N.10hhhhhh
N.N.N.11hhhhhh
Hosts:62 Hosts:62
0 1 000000 - 0
1 0 000001 - 1
SN4 1 0 SN1 000010 - 2
N.N.N.192/26 N.N.N.0/26
. .
Hosts:62 Hosts:62 . .
(1-62) (1-62) 111110 - 62
111111 - 63

ALTTC/ BB Faculty 15
Subnetting (8 Bits)
172 16 H H
IP Address
Network Host

Default / Natural Mask 255 255 0 0


Network Host

8 bit Subnet Mask 255 255 255 0


Network Subnet Host

•Default / Natural Mask : 172.16.H.H /16


•8 bit Subnetting : 172.16.N.H /24

ALTTC/ BB Faculty 16
Identifying Network Address

201.222.5.121/29 11001001 11011110 00000101 01111001

Subnet Mask 11111111 11111111 11111111 11111000

ANDing 11001001 11011110 00000101 01111000


Network

201 222 5 120

•Five bits of subnetting


•Subnet address: 201.222.5.120 (0+64+32+16+8)
•Host Number : 1

ALTTC/ BB Faculty 17
Variable Length Subnet Mask
 Subnetting creates subnets with equal number of
hosts, in a network.
 The number of bits subnetted i.e. the length of
subnet mask will be same for all the subnets.
 To co-op with the variable number of hosts in
subnets, in a network, number subnetted bits i.e.
the length of subnet mask for the subnets will
also vary.
 The method of achieving subnetting, with
variable length of subnet mask, is known as
Variable Length Subnet Mask.

ALTTC/ BB Faculty 18
Variable Length Subnet Mask
E- 100H = 27 = 128 202.195.32.0
A- 50H = 26 = 64
C- 14H = 24 = 16 A (50 Hosts)
B- 13H = 24 = 16
D- 6H = 23 = 8 Link-3
E (100 Hosts)
SL1 = 22 = 4 S0
SL2 = 22 = 4 E0 S0 Link-2 S1

SL3 = 22 = 4 E1 S1
E0

Link-1
S0

B (13 Hosts)
E0 E1

C (14 Hosts) D (6 Hosts)

ALTTC/ BB Faculty 19
Variable Length Subnet Mask
E- 100H = 27 = 128
A- 50H = 26 = 64
C- 14H = 24 = 16
B- 13H = 24 = 16
= 23 = 8
D- 6H
SL1 = 22 = 4 A
= 22 = 4
SL2
= 22 = 4
SL3 0

0
10 E
E - 202.195.32.0 0000000 0 1
C
A - 202.195.32.10 000000 1 1
C - 202.195.32.1100 0000 0
0 1
B - 202.195.32.1101 0000 B 1
0
01
D - 202.195.32.11100 000 0
SL1- 202.195.32.111010 00 D
SL2- 202.195.32.111011 00
SL3- 202.195.32.111100 00

ALTTC/ BB Faculty 20
Variable Length Subnet Mask
N/W N/W Address
E - 202.195.32.0 0000000 202.195.32.0
A - 202.195.32.10 000000 202.195.32.128
C - 202.195.32.1100 0000 202.195.32.192
B - 202.195.32.1101 0000 202.195.32.208
D - 202.195.32.11100 000 202.195.32.224
SL1 - 202.195.32.111010 00 202.195.32.232
SL2 - 202.195.32.111011 00 202.195.32.236
SL3 - 202.195.32.111100 00 202.195.32.240
•Network Address:
•Set all host bits to zero
•Calculate the binary value of last byte
ALTTC/ BB Faculty 21
Variable Length Subnet Mask
N/W B/C Address
E - 202.195.32.0 1111111 202.195.32.127
A - 202.195.32.10 111111 202.195.32.191
C - 202.195.32.1100 1111 202.195.32.207
B - 202.195.32.1101 1111 202.195.32.223
D - 202.195.32.11100 111 202.195.32.231
SL1 - 202.195.32.111010 11 202.195.32.235
SL2 - 202.195.32.111011 11 202.195.32.239
SL3 - 202.195.32.111100 11 202.195.32.243
Broadcast Address:
•Set all host bits to one
•Calculate the binary value of last byte
ALTTC/ BB Faculty 22
Variable Length Subnet Mask
N/W N/W Address B/C Address
E - 202.195.32.0 202.195.32.127
A - 202.195.32.128 202.195.32.191
C - 202.195.32.192 202.195.32.207
B - 202.195.32.208 202.195.32.223
D - 202.195.32.224 202.195.32.231
SL1 - 202.195.32.232 202.195.32.235
SL2 - 202.195.32.236 202.195.32.239
SL3 - 202.195.32.240 202.195.32.243
N/W IP Address Range
E- 202.195.32.1 – 202.195.32.126
A- 202.195.32.129 – 202.195.32.190
C- 202.195.32.193 – 202.195.32.206
B- 202.195.32.209 – 202.195.32.222
D- 202.195.32.225 – 202.195.32.230
SL1- 202.195.32.233 – 202.195.32.234
SL2- 202.195.32.237 – 202.195.32.238
SL3- 202.195.32.241 – 202.195.32.242
ALTTC/ BB Faculty 23
Internet Registry (IR)
 An Internet Registry is an organisation that is
responsible for distributing IP address space to
its members or customers and for registering
those distributions. IRs can be classified as:
 RIRs (Regional Internet Registery)
 NIRs (National Internet Registery)
 LIRs (Local Internet Registery)

ALTTC/ BB Faculty 24
Internet Registries
IANA

InterNIC RIPE APNIC


America Europe Asia Regional

National

Local

Consumer

ALTTC/ BB Faculty 25
Private Address Space
 IANA has reserved the following three blocks of
the IP address space for private internets (RFC
1918):
– 10.0.0.0 - 10.255.255.255 (10.0.0.0/8 prefix)
 24-bit block
 Complete class-A network number
– 172.16.0.0 - 172.31.255.255 (172.16.0.0/12 prefix)
 172.0001/0000.0.0-172.0001/1111.255.255
 20-bit block
 Set of 16 contiguous class-B network numbers
– 192.168.0.0 - 192.168.255.255 (192.168.0.0/16 prefix)
 16-bit block
 Set of 256 contiguous class-C network numbers

ALTTC/ BB Faculty 26
ALTTC/ BB Faculty 27

You might also like