IP Addressing Part1 2016
-
Upload
mahbubur-rahman -
Category
Documents
-
view
218 -
download
0
Transcript of IP Addressing Part1 2016
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 1/64
1
Network Layer:Internet Protocol
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 2/64
2
INTERNETWORKINGINTERNETWORKING
In this section, we discuss internetworking, connecting In this section, we discuss internetworking, connecting
networks together to make an internetwork or annetworks together to make an internetwork or an
internet.internet.
Need for Network Layer
Internet as a Datagram Network
Internet as a Connectionless Network
Topics discussed in this section:To
pics discussed in this section:
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 3/64
3
Figure Links between two hosts
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 4/64
4
Figure Network layer in an internetwork
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 5/64
5
Figure Network layer at the source, router, and destination
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 6/64
6
Figure Network layer at the source, router, and destination (continued)
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 7/647
Switching at the network layer in theInternet uses the datagra a!!roach to
!acket switching"
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 8/64#
$ounication at the network layer inthe Internet is connectionless"
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 9/64%
IPv4IPv4
The Internet Protocol ersion ! ( The Internet Protocol ersion ! ( IP! IP! ) is the deliery ) is the deliery
mechanism used by the T"P#IP protocols.mechanism used by the T"P#IP protocols.
Datagram
Fragmentation
Checksum
Options
Topics discussed in this section:To pics discussed in this section:
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 10/641&
The Internet has chosen the datagram approach to switching
in the network layer. It uses the universal addresses definedin the network layer to route packets from the source to the
destination.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 11/6411
Datagram
Packets in the IPv4 layer are called datagrams. Figure
shows the IPv4 datagram format.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 12/6412
Figure Position o$ IP! in T"P#IP protocol suite
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 13/6413
Figure IP! datagram $ormat
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 14/64
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 15/64
15
Figure 20. %erice type or di$$erentiated serices
a. Precedence is a ,-bit subfield ranging from ' $''' in binary% to $ in
binary%. The precedence de.ines the !riority o. the datagra in issues
such as congestion. If a router is congested and needs to discard some
datagrams" those datagrams with lowest !recedence are discarded
.irst"
b. T/* bits is a 4-bit subfield with each bit having a s!ecial eaning"
0lthough a bit can be either ' or " one and only one o. the /its can
ha-e the -alue o. 1 in each datagram. The bit patterns and their
interpretations are given in Table.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 16/64
16
Figure %erice type or di$$erentiated serices
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 17/64
17
0he !recedence su/.ield was !art o.-ersion 4 /ut ne-er used"
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 18/64
1#
!a"le Types o$ serice
!!lication !rogras can reuest a s!eci.ic ty!e o. ser-ice. The
defaults for some applications are shown in Table ne+t
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 19/64
1%
!a"le &e$ault types o$ serice
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 20/64
2&
2" i..erentiated Ser-ices: In this interpretation" the .irst 6 /its ake u!
the code!oint su/.ield" and the last 2 /its are not used. The codepoint
subfield can be used in two different ways.
a%1hen the 3 rightost /its are &s" the 3 le.tost /its are inter!reted
the sae as the !recedence /its in the service type interpretation. In
other words" it is compatible with the old interpretation.
b%1hen the 3 rightost /its are not all &s" the 6 /its de.ine 64 ser-icesbased on the priority assignment by the Internet or local authorities
according to Table . 0he .irst category contains 32 ser-ice types2 the
second and the third each contain 16"
The first category $nu/ers & 24 """ 62+ is assigned by the Internetauthorities $I(TF%. The second category (3 7 11 15 63% can be used
by local authorities $organi3ations%. The third category $1 5 % 61% is
temporary and can be used for e+perimental purposes.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 21/64
21
!a"le 'alues $or codepoints
i..erentiated Ser-ices: In this interpretation" the first # bits make up the
codepoint subfield" and the last & bits are not used. The codepoint subfield
can be used in two different ways.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 22/64
22
0he total length .ield de.ines the totallength o. the datagra including the
header"
0otal length. This is a In-bit field that defines the total length $header
plus data% of the IPv4 datagram in bytes.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 23/64
23
Figure ncapsulation o$ a small datagram in an thernet $rame
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 24/64
24
Figure Protocol $ield and encapsulated data
Protocol" This )-bit field defines the higherle-el !rotocol that uses the
services of the IPv4 layer. 0n IPv4 datagram can encapsulate data fromseveral higher-level protocols such as TP" DP" I5P" and I65P.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 25/64
25
!a"le Protocol alues
#$ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 26/64
26
n IP! packet has arried with the $irst * bits as shown:
++++++
The receier discards the packet. -hy
%olution
There is an error in this packet. The 4 leftmost bits (0100)
show the version, which is correct. The next 4 bits (0010)
show an invalid header length (2 × 4 = 8). The minimum
number of bytes in the header must be 20 . The packet has
been corrupted in transmission.
#$ample
l
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 27/64
27
In an IP! packet, the alue o$ /LN is +++ in binary.
/ow many bytes o$ options are being carried by this
packet
%olution
The HLEN value is 8, which means the total number of
bytes in the header is 8 × 4, or 32 bytes. The first 20 bytes
are the base header, the next 12 bytes are the options.
0ample
l
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 28/64
2#
In an IP! packet, the alue o$ /LN is 1, and the alue
o$ the total length $ield is +0++2*. /ow many bytes o$
data are being carried by this packet
%olution
The HLEN value is 5, which means the total number of
bytes in the header is 5 × 4, or 20 bytes (no options). The
total length is 40 bytes, which means the packet is
carrying 20 bytes of data (40 − 20).
0ample
# l
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 29/64
2%
$hecksu. The checksum concept and its calculation.
Source address. This ,&-bit field defines the IPv4 address of the source.
This field must remain unchanged during the time the IPv4 datagram
travels from the source host to the destination host.
estination address" This ,&-bit field defines the IPv4 address of thedestination. This field must remain unchanged during the time the IPv4
datagram travels from the source host to the destination host.
#$ample
# l
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 30/64
3&
n IP! packet has arried with the $irst $ew he0adecimal
digits as shown.
+0!1++++2*+++++++++2 . . .
/ow many hops can this packet trael be$ore being
dropped The data belong to what upper3layer protocol
%olution
To find the time-to-live field, we skip 8 bytes. The time-to-
live field is the ninth byte, which is 01. This means the packet can travel only one hop. The protocol field is the
next byte (02), which means that the upper-layer protocol
is IGMP.
#$ample
ragentation
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 31/64
31
ragentation
0 datagram can travel through different networks. (ach router
decapsulates the IPv4 datagram from the frame it receives"processes it" and then encapsulates it in another frame.
8a9iu 0rans.er nit (80+
(ach data link layer protocol has its own frame format in most
protocols. /ne of the fields defined in the format is the ma+imumsi3e of the data field.
To make the IPv4 protocol independent of the physical network"
the designers decided to make the ma+imum length of the IPv4
datagram e7ual to #8"8,8 bytes.
Fi ld R l t d t F t ti
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 32/64
32
Fields Related to Fragmentation
0 datagram can travel through different networks. (ach router
decapsulates the IPv4 datagram from the frame it receives"processes it" and then encapsulates it in another frame.
8a9iu 0rans.er nit (80+
(ach data link layer protocol has its own frame format in most
protocols. /ne of the fields defined in the format is the ma+imumsi3e of the data field.
To make the IPv4 protocol independent of the physical network"
the designers decided to make the ma+imum length of the IPv4
datagram e7ual to #8"8,8 bytes.
Fields Related to Fragmentation
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 33/64
33
Fields Related to Fragmentation
Identi.ication" This #-bit field identifies a datagram originating from
the source host. The combination of the identification and source IPv4
address must uni7uely de.ine a datagra as it lea-es the sourcehost.
lags" This is a ,-bit field. The first bit is reserved. The second bit is
called the do notfragment bit. If its value is " the machine must not
fragment the datagram. If it cannot pass the datagram through anyavailable physical network" it discards the datagram and sends an
I5P error message to the source host $see hapter &%. If its value
is '" the datagram can be fragmented if necessary. The third bit is
called the more fragment bit. If its value is " it means the datagram is
not the last fragment2 there are more fragments after this one. If itsvalue is '" it means this is the last or only fragment.
ragentation o..set" This ,-bit field shows the relative position of
this fragment with respect to the whole datagram. It is the offset of the
data in the original datagram measured in units of ) bytes.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 34/64
34
Figure 4a0imum trans$er unit (4T5)
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 35/64
2&"35
!a"le 4T5s $or some networks
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 36/64
36
Figure 6lags used in $ragmentation
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 37/64
37
Figure 6ragmentation e0ample
/riginal datagram are numbered ' to ,999.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 38/64
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 39/64
3%
packet has arried with an 4 bit alue o$ +. Is this the
$irst $ragment, the last $ragment, or a middle $ragment
&o we know i$ the packet was $ragmented
%olution
If the M bit is 0, it means that there are no more
fragments; the fragment is the last one. However, we
cannot say if the original packet was fragmented or not. A
non-fragmented packet is considered the last fragment.
0ample
#$ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 40/64
4&
packet has arried with an 4 bit alue o$ . Is this the
$irst $ragment, the last $ragment, or a middle $ragment
&o we know i$ the packet was $ragmented
%olution
If the M bit is 1, it means that there is at least one more
fragment. This fragment can be the first one or a middle
one, but not the last one. We don’t know if it is the first
one or a middle one; we need more information (the
value of the fragmentation offset).
#$ample
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 41/64
2&"41
packet has arried with an 4 bit alue o$ and a
$ragmentation o$$set alue o$ +. Is this the $irst $ragment,
the last $ragment, or a middle $ragment
%olution
Because the M bit is 1, it is either the first fragment or a
middle one. Because the offset value is 0, it is the first
fragment.
0ample
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 42/64
42
packet has arried in which the o$$set alue is ++.
-hat is the number o$ the $irst byte &o we know the
number o$ the last byte
%olution
To $ind the number o$ the $irst byte, we multiply the o$$set
alue by *. This means that the $irst byte number is *++.
-e cannot determine the number o$ the last byte unless
we know the length.
0ample
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 43/64
43
packet has arried in which the o$$set alue is ++, the
alue o$ /LN is 1, and the alue o$ the total length $ield
is ++. -hat are the numbers o$ the $irst byte and the last
byte
%olutionThe first byte number is 100 × 8 = 800. The total length is
100 bytes, and the header length is 20 bytes (5 × 4), which
means that there are 80 bytes in this datagram. If the first
byte number is 800, the last byte number must be 879.
0ample
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 44/64
44
6igure shows an e0ample o$ a checksum calculation $or
an IP! header without options. The header is diided
into 73bit sections. ll the sections are added and the
sum is complemented. The result is inserted in the
checksum $ield.
0ample
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 45/64
45
$hecksu" Then the entire header is divided into #-bit sections and
added together. The result $sum% is complemented and inserted into thechecksum field. The checksum in the IPv4 packet covers only the header"
not the data.
!tions" The header of the IPv4 datagram is made of two parts: a fi+edpalt and a variable part. The fi+ed part is &' bytes long and was discussed
in the previous section. The variable part comprises the options that can be
a ma+imum of 4' bytes.
/ptions" as the name implies" are not re7uired for a datagram. They can be
used for network testing and debugging.
;o /peration" 0 noo!eration o!tion is a I-byte option used as a filler
between options.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 46/64
46
(nd of /ption. 0n end-of-option option is a I/yte o!tion used .or
!adding at the end of the option field. It" however" can only be used as the
last option.
<ecord <oute. 0 record route option is used to record the Internet routers
that handle the datagram. It can list u! to nine router addresses. It can
be used for debugging and management purposes.
*trict *ource <oute. 0 strict source route option is used by the source to
predetermine a route for the datagram as it travels through the Internet.
=oose *ource <oute. 0 loose source route option is similar to the strict
source route" but it is less rigid.
Timestamp. 0 timestamp option is used to record the tie o. datagra
!rocessing /y a router" The time is e+pressed in milliseconds from
midnight" niversal time or 6reenwich mean time. >nowing the time a
datagram is processed can help users and managers track the behavior of
the routers in the Internet.
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 47/64
47
Figure 0ample o$ checksum calculation in IP!
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 48/64
4#
Figure Ta0onomy o$ options in IP!
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 49/64
2&"4%
IPv6IPv6
The network layer protocol in the T"P#IP protocolThe network layer protocol in the T"P#IP protocol
suite is currently IP!. lthough IP! is well designed,suite is currently IP!. lthough IP! is well designed,
data communication has eoled since the inception o$data communication has eoled since the inception o$
IP! in the 89+s. IP! has some de$iciencies that IP! in the 89+s. IP! has some de$iciencies thatmake it unsuitable $or the $ast3growing Internet.make it unsuitable $or the $ast3growing Internet.
%d&antages
'acket Format
#$tension (eaders
Topics discussed in this section:To pics discussed in this section:
6
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 50/64
5&
IPv6IPv6
Despite all short-term solutions" such as subnetting" classless
addressing" and ;0T" address depletion is still a long-term problem in
the Internet.
The Internet must accommodate real-time audio and video
transmission. This type of transmission re7uires minimum delay
strategies and reservation of resources not provided in the IPv4
design.
The Internet must accommodate encryption and authentication of data
for some applications. ;o encryption or authentication is provided by
IPv4.
%d&antages
'acket Format
#$tension (eaders
Topics discussed in this section:To pics discussed in this section:
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 51/64
51
Figure IP7 datagram header and payload
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 52/64
52
Figure 6ormat o$ an IP7 datagram
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 53/64
53
!a"le Ne0t header codes $or IP7
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 54/64
54
!a"le Priorities $or congestion3controlled tra$$ic
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 55/64
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 56/64
56
!a"le "omparison between IP! and IP7 packet headers
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 57/64
57
Figure 0tension header types
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 58/64
5#
!a"le "omparison between IP! options and IP7 e0tension headers
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 59/64
5%
TRANSITION FROM IPv4 TO IPv6TRANSITION FROM IPv4 TO IPv6
ecause o$ the huge number o$ systems on the ecause o$ the huge number o$ systems on the
Internet, the transition $rom IP! to IP7 cannot Internet, the transition $rom IP! to IP7 cannot
happen suddenly. It takes a considerable amount o$happen suddenly. It takes a considerable amount o$
time be$ore eery system in the Internet can moe $romtime be$ore eery system in the Internet can moe $rom
IP! to IP7. The transition must be smooth to preent IP! to IP7. The transition must be smooth to preent
any problems between IP! and IP7 systems.any problems between IP! and IP7 systems.
Dual )tack
!unneling
(eader !ranslation
Topics discussed in this section:To pics discussed in this section:
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 60/64
6&
Figure Three transition strategies
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 61/64
61
Figure &ual stack
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 62/64
62
Figure Tunneling strategy
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 63/64
63
Figure /eader translation strategy
8/17/2019 IP Addressing Part1 2016
http://slidepdf.com/reader/full/ip-addressing-part1-2016 64/64
!a"le /eader translation