Network Layer Logical Addressing
Network Layer Logical Addressing
Network
Layer_Logical
Logical-Addressing
Addressing
IPv4 Notations
Binary
Dotted-decimal notation
Classful Addressing
IPv4 addressing
addressing, at its inception
inception, used the
concept of classes
In classful addressing
addressing, the address space
is divided into five classes:
A,
A B,
B C,
C D,
D and
dE
Netid
Hostid
Class E: were reserved for future use -----only few were used
Classless Addressing
No classes
classes, but addresses are still granted
in blocks
Restriction:
The addresses in a block must be contiguous
The
Th number
b off addresses
dd
iin a bl
block
k mustt b
be
a power of 2 (1,2,4,8 ,)
The
Th first
fi t address
dd
mustt be
b evenly
l di
divisible
i ibl b
by
the number of addresses
Example: 01
Example: 01
Contd
Contd
(16 = 24 )
MASKING
In IPv4 addressing,
addressing a block of
addresses can be defined as:
x.y.z.t
x y z t /n
in which x.y.z.t defines one of the addresses
and the /n defines the mask
MASKING Contd..
Contd
The first address in the block can be found by
y setting
g the
rightmost
32 n bits to 0s
The last address in the block can be found by setting the
rightmost
32 n bits to 1s
The number of addresses in the block can be found by
y
using the formula
232-n
Example 02
Example-02
A block of addresses is granted to a small
organization. We know that one of the
addresses is 205.16.37.39/28.
205 16 37 39/28 What are
the first address, last address and number
of addresses in the block?
Example-02
Example
02
Contd
Contd.
If we set 3228
32 28 rightmost bits to 0, we get
11001101
00010000
00100101 00100000
or
o
205.16.37.32.
Example-02
Example
02
Contd
Contd.
If we set 3228
32 28 rightmost bits to 1, we get
11001101
or
o
205.16.37.47
00010000
00100101 00101111
Example-02
Example
02
Contd
Contd.
23228 = 16
Network Address
Three level Hierarchy: Subnetting
Network Address
Three level Hierarchy: Subnetting
Then n1=27
n2 = 28
n3 = 28
Thi
This means th
thatt we h
have th
the masks
k
27,28,28 with the organization mask
b i 26
being
Example -03
03
An ISP is g
granted a block of addresses starting
g with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of
customers as follows:
a) The first group has 64 customers; each needs 256
addresses.
b) The second group has 128 customers; each needs 128
addresses.
c) The third group has 128 customers; each needs 64
addresses.
A NAT implementation
Addresses in a NAT
IPv6
An IPv6 address is 128 bits long
IPv6 address in binary and hexadecimal
colon notation:
Dual Stack
Tunneling
Two computers
p
using
g IPv6 want to communicate
And the packet must pass through a region that
uses IPv4.
Header Translation
R i table
Routing
bl for
f router R1