Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

12-10-2022

Contents
• IP Address Space • IPV4
• Classful addressing • IPV6
• Routing in classtype • IPV6 – Flow label
• Address conversion • IPV6 – Next Address
• CIDR • IPV6 - CIDR
• Subnet • Anycast
• Subnet mask • IPV6 Address
• Supernet • IPV6 to IPV4
• NAT • IPV6 to IPV4
• Special IP Address

IP Address Space

An IP Address consists of 32 bits

An IP prefix / a subnet mask.

TCP IP Protocol Suite - Behrouz A. Forouzan

1
12-10-2022

IP Address Space

Each 32 bit IP address


consists of two-level
1. To whom does the IP
address belong?? hierarchical structure
2. How do we know the Network - the leftmost
network part in an IP n bits (prefix)
Address? Host - the rightmost 32 − n bits

Classful addressing

In classful addressing, the


address space is
Divided into five classes:
A, B, C, D, and E

2
12-10-2022

Address

IPv4 Addressing

IP Address as a 32-Bit Binary Number

3
12-10-2022

Binary to DDN conversion

Classful addressing

Class A – Prefix – 8 bits


Starts with 0
Class B – Prefix – 16 bits
Starts with 10

TCP IP Protocol Suite - Behrouz A. Forouzan

4
12-10-2022

Classful addressing

Class C – Prefix – 24 bits


Starts with 110
Class D -Starts with 1110
28 bit Multicast address
Class E – Starts with 1111
- Reserved
TCP IP Protocol Suite - Behrouz A. Forouzan

Routing in class type IP


address

When packet arrives


destination address is
looked at
• 28 bits shift to get 4 bit
class value (A,B,C,D..)
• 4 bits will have 16 values

5
12-10-2022

Routing in class type IP


address
8 Values (0000 – 0111) class A
4 values (1000 – 1011) class B
2 values (1100 – 1101) class C
1 values (1110, 1111 ) each
for class D,E
By knowing class - You know
the network bits/ Prefix

Routing in class type IP


address

By Knowing network bits you


can find the network address
from IP address.
Class A – 8 bits – FF000000
Class B – 16 bits – FFFF 0000
Class C – 24 bits – FFFFFF00

6
12-10-2022

Routing in class type IP


address
Specific routing table for
each class – A, B, C
• The interface is looked at in
the table
• The packet is sent to the
destination address using
specified interface.

Address conversion

Binary to Hex
a. 1000 0001 00001011
0000 1011 11101111
b. 1100 0001 1000 0011
0001 1011 11111111

7
12-10-2022

Address conversion

Decimal to Binary
a. 111.56.45.78
b. 221.34.7.82
Hex to decimal/Binary
a. C8 56 BB AA
b. 79 C9 52 DD

Error in IP Address

a. 111.56.045.78
b. 221.34.7.8.20
c. 75.45.301.14
d. 11000010.23.15.123

8
12-10-2022

Classless Inter Domain


Routing - CIDR

In classless addressing
RFC 4632 • Variable-length address
It works with subnets blocks are assigned that
Pronounced ‘‘cider,’’ as belong to no class
in the drink. • What was the number of
addresses in class A, B?

CIDR
Entire address space (232
addresses)
• Divided into blocks of
One subnet consists of different sizes
a block of IP address • Networks with blocks of IP
address
with power of 2n.
• Address blocks in power of
n = 0, 1, 2 .. 31 2n. Such as 2,4,8 ..1024…

9
12-10-2022

CIDR
In classless addressing The
prefix defines the network –>
n bits
• n=0 … 32
A.B.C.D/n
• A small n means a larger
Classful address is possible with
block of IP address
specific rule in classless
• a large n means a small block
addressing n = 8,16,24,4,4
of IP address
The suffix defines the number of
host 32-n bit

CIDR
In classless addressing, we
• Number of addresses need to know
• Start address • One of the addresses in the
AND subnet mask with given block
IPA
• The prefix length
• End address
OR complement of subnet mask • How do we define CIDR
with given IPA (network block of IP Address?
address)
198.200.20.56/27 ??

10
12-10-2022

CIDR

Subnets
Company with 60 departments
Multiple locations,
Each having 30 – 50 hosts.

Class C network will not suffice. University with 30 departments.


Class B has 64K hosts and very Each department needs 30-90 IPA
large for their needs.
Putting all hosts in one network How many IP address they need?
is not possible. Which class of IP network you will
So we create subnets. How? assign?

11
12-10-2022

Subnets
For class B – 16 bit host
address
Few bits are taken away to
create subnet number
• If we take 4 bits from host How do we know what is the
part, we can create 16
subnet from IP address?
subnet.
• If we take 10 bits from host What is subnet mask?
part, we can create 1024 AND subnet mask with IPA to
subnets find the network address.

Subnets

• If we take 4 bits from host


part, we can create 16
subnet.
• If we take 10 bits from host
part, we can create 1024
subnets

TCP IP Protocol Suite - Behrouz A. Forouzan

12
12-10-2022

Subnet

TCP IP Protocol Suite - Behrouz A. Forouzan

Subnet mask
Network Prefix can not be
derived from IP address.
Hence, network prefix should
All computer connected to be specified exclusively
one subnet must use one Network prefix number of 1’s
network address. is called subnet mask
Logical AND of subnet 141.14.0.0/16
mask with IP address gives 141.14.0.0/18
network address.

13
12-10-2022

Subnet
The IP address 230.8.24.56
can belong to many blocks

TCP IP Protocol Suite - Behrouz A. Forouzan

Supernet

14
12-10-2022

Network address Translation - NAT

• The ISP may not be able to grant the demand


• Because the addresses before and after the range may have
already been allocated to other networks
• The distribution of addresses through ISPs has created a
new problem.

NAT

TCP IP Protocol Suite - Behrouz A. Forouzan

15
12-10-2022

NAT
A technology that can help in
these cases is NAT
• Address Translation
• Translation Table

TCP IP Protocol Suite - Behrouz A. Forouzan

Network address
Translation - NAT

Private IP address
172.18.x.y
Routable IP address
200.24.5.8

16
12-10-2022

Special IP address

Private address
How many addresses in 10.0.0.0/8 - 10.255.255.255
each private address? 172.16.0.0/12 - 172.16.15.255
192.168.0.0/16 – 192.168.255.255
What is the last address? 169.254.0.0/16- 169.254. 255.255

Special IP address
0.0.0.0/32
Used when I do not know my IP
address
Bootstrap server
DHCP server
Source 0.0.0.0
127.0.0.0
Destination 255.255.255.255 Loop back address
Software testing – IPv4,
Client-server
TCP IP Protocol Suite - Behrouz A. Forouzan

17
12-10-2022

Special IP address
0.0.0.0/32
Used when I do not know
my IP address
Bootstrap server
DHCP client
127.0.0.0
Loop back address
Software testing –
IPv4, Client-server
TCP IP Protocol Suite - Behrouz A. Forouzan

Special IP address

Network address – First


address
All suffix set to zero
20.12.14.0/24
Last address
Direct broadcast address
All suffix set to one
20.12.14.255/24
TCP IP Protocol Suite - Behrouz A. Forouzan

18
12-10-2022

Special IP address

Limited broadcast
address
255.255.255.255

TCP IP Protocol Suite - Behrouz A. Forouzan

IPV4

TCP IP Protocol Suite - Behrouz A. Forouzan

19
12-10-2022

IPV4

TCP IP Protocol Suite - Behrouz A. Forouzan

IPV6

TCP IP Protocol Suite - Behrouz A. Forouzan

20
12-10-2022

IPV6

• If we assign 260 addresses to


the users each year
 Almost one billion each
second
 It will take 268 years to
deplete addresses.

TCP IP Protocol Suite - Behrouz A. Forouzan

IPV6

TCP IP Protocol Suite - Behrouz A. Forouzan

21
12-10-2022

IPV6

Show abbreviations for the following addresses:


a. 0000:0000:FFFF:0000:0000:0000:0000:0000
b. 1234:2346:0000:0000:0000:0000:0000:1111
c. 0000:0001:0000:0000:0000:0000:1200:1000
Solution
a. 0:0:FFFF:: d. 0000:0000:0000:0000:0000:FFFF:24.123.12.6
b. 1234:2346::1111
c. 0:1::1200:1000
d. ::FFFF:24.123.12.6

IPV6

TCP IP Protocol Suite - Behrouz A. Forouzan

22
12-10-2022

IPV6

TCP IP Protocol Suite - Behrouz A. Forouzan

IPV6 Next Header

TCP IP Protocol Suite - Behrouz A. Forouzan

23
12-10-2022

IPV6 Next Header

TCP IP Protocol Suite - Behrouz A. Forouzan

IPV6 Next Header


• Source routing
 Strict source route and the
 Loose source route options
• Destination option pass
• Fragmentation,
information to the
• Authentication,
destination.
• Encrypted security payload
 Intermediate routers are
• Hop by Hop
not permitted to access
 Management, debugging, or
this information
control functions
• Payload length more than 65535

24
12-10-2022

IPV6 CIDR

A destination address can be


Unicast
Multicast
Anycast
TCP IP Protocol Suite - Behrouz A. Forouzan

IPv6 Interface Identifiers and Physical


Address Mapping

25

You might also like