0% found this document useful (0 votes)
12 views31 pages

IN Mod 2

Uploaded by

princy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views31 pages

IN Mod 2

Uploaded by

princy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

ITT302

INTERNETWORKING WITH
TCP/IP

Text Books
1.Douglas E Comer, “Internetworking with TCP/IP Principles, Protocol, and Architecture” ,
Volume 1, 6th Edition, Pearson Education, 2013
2.Andrew S. Tanenbaum, “Computer Networks”, Prentice Hall, 5th Edition
3.James F Kurose, Keith W Ross, Computer Networking: A top Down Approach featuring
the Internet, Pearson Education, 3rd Edition
Syllabus (module 2)
2.1 Internet Protocol: Connectionless Datagram Delivery (IPv4, IPv6) – Introduction,
Connectionless Delivery System Characteristics, Purpose And Importance Of The
Internet Protocol, The IP Datagram, Datagram Type Of Service And Differentiated
Services, Datagram Encapsulation, Datagram Size, Network MTU and Fragmentation,
Datagram Reassembly, Header Fields Used For Datagram Reassembly, Time To Live
(IPv4) And Hop Limit (IPv6), Optional IP Items, Options Processing During
Fragmentation
2.2 Internet Protocol: Error And Control Messages (ICMP) – Introduction, The Internet
Control Message Protocol, Error Reporting Vs. Error Correction, ICMP Message
Delivery, 5 Conceptual Layering, ICMP Message Format
Connectionless Delivery System
Characteristics
 connectionless because each packet is treated independently
from all others.

 unreliable ,means that delivery is not guaranteed.

 best-effort delivery because the Internet software makes an


earnest attempt to deliver packets.
Purpose And Importance Of The Internet Protocol
The protocol that defines the unreliable, connectionless delivery mechanism is called the
Internet Protocol (IP).

The Internet Protocol provides three important specifications.


 First, IP defines the basic unit of data transfer used throughout a TCP/IP internet. Thus, it
specifies the exact packet format used by all data as the data passes across an internet.
 Second, IP software performs the forwarding function, choosing a path over which a packet
will be sent
 Third, IP includes a set of rules that embody the basis of unreliable delivery. The rules
characterize how hosts and routers should process packets, how and when error messages
should be generated, and the conditions under which packets can be discarded.
The IP Datagram

 The Internet calls its basic transfer unit an Internet datagram, usually abbreviated IP datagram.

 Datagram header contains metadata such as the source and destination addresses and a type
field that identifies the contents of the datagram.
IPv4 Datagram Format

 Because the TOTAL LENGTH field is 16 bits long, the maximum possible 124 Internet Protocol:
Connectionless Datagram Delivery (IPv4, IPv6) Chap. 7 size of an IP datagram is 216 or 65,535
octets
 PROTOCOL ,the value specifies which high-level protocol was used to create the message carried
in the PAYLOAD area of the datagram.
 HEADER CHECKSUM ensures integrity of header values. The IP checksum is formed by treating the
header as a sequence of 16-bit integers (in network byte order), adding them together using
one’s complement arithmetic, and then taking the one’s complement of the result. For purposes
of computing the checksum, field HEADER CHECKSUM is assumed to contain zero
IPv6 Datagram Format
IPv6 datagram begins with a fixed-size base header followed by zero or
more extension headers, followed by a payload
IPv6 Extension Example
Datagram Type Of Service And Differentiated
Services
The 8-bit SERVICE TYPE field in an IPv4 header and the TRAFFIC CLASS field in an IPv6
header specify how the datagram should be handled.

 In IPv4, the field was originally divided into subfields that specified the datagram’s
precedence and desired path characteristics (low delay or high throughput).

 Although it is possible to define 64 separate services, the designers suggest that a given
router will only need a few services, and multiple codepoints will map to each service

 For example, a router might be configured with a voice service, a video service,
network management service, and a normal data service
Datagram Encapsulation

The type field in the frame header identifies the data being carried.

For example,

Ethernet uses the type value 0x0800 to specify that the payload contains an encapsulated IPv4 datagram
and 0x86DD to specify that the payload contains an IPv6 datagram
Datagram Size, Network MTU and
Fragmentation
we need a fact about network hardware: each packets-witching technology places a fixed upper
bound on the amount of data that can be transferred in one frame. For example, Ethernet limits
transfers to 1500 octets of data†. We refer to the size limit as the network’s maximum transfer unit,
maximum transmission unit or MTU

If the datagram does not fit into a frame, divide the datagram into smaller pieces called fragments.
Choose the size such that each fragment can be sent in a network frame. The process of dividing a
datagram is known as fragmentation.
Although they each provide datagram fragmentation, IPv4 and IPv6 take
completely different approaches.

IPv4 allows any router along a path to fragment a datagram.

IPv6 requires the original source to learn the path MTU and perform
fragmentation; routers are forbidden from performing fragmentation.
IPv4 Datagram Fragmentation
 A source only insures that a datagram can fit into a frame on
the first network it must traverse.

 The FLAGS field in the datagram header contains a bit that


specifies whether the datagram is a complete datagram or a
fragment.

 Another bit in the FLAGS field specifies whether more


fragments occur (i.e., whether a particular fragment occupies
the tail end of the original datagram).

 OFFSET field in the datagram header specifies where in the


original datagram the data in the fragment belongs.

 OFFSET field stores a position in multiples of eight octets. That


is, an octet offset is computed by multiplying the OFFSET field
by eight. As a consequence, the size of each fragment must be
chosen to be a multiple of eight
IPv6 Fragmentation And Path MTU Discovery (PMTUD)
 The original source host is required to find the minimum MTU along the path to
the destination and fragment each datagram according to the path it will take.

 IP routers along the path are not permitted to fragment IPv6 datagrams; if a
datagram does not fit into the MTU of a network, the router sends an error
message to the original source and drops the datagram

 When IPv6 was being defined, phone companies were pushing Asynchronous
Transfer Mode (ATM) technologies, and the IPv6 designers assumed ATM would
become widely used.

 Because networking technologies used in the Internet do not inform a host about
the path MTU, a host must engage in a trial-and-error mechanism to determine
the path MTU. Known as Path MTU Discovery (PMTUD), the mechanism consists
of sending an IPv6 datagram that fits in the MTU of the directly-connected
network. If a network along the path has a smaller MTU, a router will send an
ICMP error message to the original source that specifies the smaller MTU..
Datagram Reassembly
 Fragments must be reassembled to produce a complete copy of the original datagram

approach has two disadvantages


 First, if only one network along the path has a small MTU, sending small fragments
over the other networks is inefficient, because transporting small packets means
more overhead than transporting large packets. Thus, even if networks
encountered after the point of fragmentation have very large MTUs, IP will send
small fragments across them.

 Second, if any fragments are lost, the datagram cannot be reassembled. The
mechanism used to handle fragment loss consists of a reassembly timer

Reassembly Timer
The ultimate destination starts a timer when a fragment arrives
for a given datagram. If the timer expires before all fragments
arrive, the receiving machine discards the surviving fragments
Header Fields Used For Datagram
Reassembly
 Three fields in an IPv4 datagram header or an IPv6 Fragment Extension Header control
reassembly of datagrams: IDENTIFICATION, FLAGS (M in IPv6), and FRAGMENT OFFSET

 Field IDENTIFICATION contains a unique integer that identifies the datagram. That is, each
datagram sent by a given source has a unique ID. A destination uses the IDENTIFICATION
field in fragments along with the datagram source address to group all the fragments of a
given datagram.

 3-bit FLAGS field, The first control bit aids in such testing by specifying whether the
datagram may be fragmented. It is called the do not fragment bit because setting the bit to
1 specifies that the datagram should not be fragmented.

 The low order bit in the FLAGS field in IPv4 or the M bit in IPv6 specifies whether the
payload in the fragment belongs somewhere in the middle of the original datagram or at
the tail end. It is known as a more fragments bit because the value 1 means the payload in
the fragment is not the tail of the datagram.
 FRAGMENT OFFSET field and the size of the fragment, the destination can compute the
length of the original datagram. Thus, once the tail of the original datagram arrives, the
destination can tell when all other fragments have arrived.
Time To Live (IPv4) And Hop Limit (IPv6)
 Originally, the IPv4 TIME TO LIVE (TTL) header field specified how long, in seconds, a datagram
was allowed to remain in an internet — a sender set a maximum time that each datagram
should survive, and routers that processed the datagram decremented the TTL as time
passed. When a TTL reached zero, the datagram was discarded.

 To prevent a datagram from traveling around a circle forever, a rule was added as a fail-safe
mechanism. The rule requires each router along the path from source to destination to
decrement the TTL by 1. In essence, each network that a datagram traverses counts as one
network hop.

 IPv6 uses the name HOP LIMIT in place of TIME-TO-LIVE.


Optional IP Items
 Both IPv4 and IPv6 define optional items that can be included in a datagram

 In IPv4, the IP OPTIONS field that follows the destination address is used to send
optional items.

 In IPv6, each of the extension headers is optional, and a given datagram may
include multiple extensions.

IPv4
 The length of the options field depends on which options have been included. Some
options are one octet long and other options are variable length. Each option starts with
a single octet option code that identifies the option.

 options area of the header is treated as an array of octets, and options are placed in the
array one after another.
IPV4 Options
 Record Route Option. The record route option allows the source to create an
empty list of IPv4 addresses and request that each router along the path add its
IPv4 address to the list.

 Source Route Options. Two options, Strict Source Route and Loose Source Route,
provide a way for a sender to control forwarding along a path through an
internet.

 Internet Timestamp Option. The timestamp option works like the record route
option: the option field starts with an initially empty list, and each router along
the path from source to destination fills in one entry.
IPv6 Optional Extensions
 IPv6 uses the mechanism of extension headers in place of IPv4 options.
IPv6 requires datagram headers to
be aligned to a multiple of eight
octets. Variable-size options mean
that the Hop-By-Hop header may
not align correctly. In such cases,
IPv6 defines two padding options
that a sender can use to align the
headers
Options Processing During Fragmentation
 Both IPv4 and IPv6 use the same conceptual approach to handle options during fragmentation.
When creating fragments, the IP code examines each of the options in the original datagram. If an
option must be processed by intermediate routers, the option is copied into each fragment.
However, if the option is only used at the ultimate destination, the option is copied into the
header of the first fragment but not the rest.
 Although they use the same concept, IPv4 and IPv6 differ in most details. The next sections
describe how each handles options.

IPv4 Processing Options During Fragmentation


 each option begins with a code octet. Each code octet contains a copy bit that specifies whether
the option should be replicated in all fragments or in only one fragment.

 Source route options provide an example of options that must be copied into each fragment. When
a sender specifies a source route, the sender intends for the datagram to follow the specified path
through an internet.
IPv6 Processing Options During Fragmentation
IPv6 divides a datagram into two conceptual pieces: an initial piece that is
classified as unfragmentable and the remainder, which is classified as
fragmentable.

In particular, the Hop-By-Hop Header and Route Header are not


fragmentable; other extension headers are fragmentable.
Therefore, the fragmentable part of the datagram begins after the
non-fragmentable extension headers
Internet Protocol: Error And Control Messages
(ICMP)

The Internet Control Message Protocol


 To allow routers in an internet to report errors or provide
information about unexpected circumstances, the designers
added a special-purpose mechanism to the TCP/IP protocols.
Known as the Internet Control Message Protocol (ICMP)

 The ultimate destination of an ICMP message is not an


application program running on the source computer or the
user who launched the application. Instead, ICMP messages
are sent to Internet Protocol software on the source
computer.
Error Reporting Vs. Error Correction
 Technically, ICMP is an error reporting mechanism. It provides a way for
routers that encounter an error to report the error to the original source,
but ICMP does not interact with the host nor does ICMP attempt to
correct the error.

 The ultimate destination of an ICMP message is not an application


program running on the source computer or the user who launched the
application. Instead, ICMP messages are sent to Internet Protocol
software on the source computer.

 We note that the idea of error reporting rather than error correction
helps improve security. If a router tried to maintain state when an error
occurred, an attacker could simply flood the router with incorrect packets
and either not respond or respond very slowly when the router
attempted to correct the problem. Such an attack could exhaust router
resources. Thus, the idea of only reporting errors can prevent certain
security attacks.
ICMP Message Delivery

 Each ICMP message travels across an internet in the payload  IPv6 uses the NEXT HEADER field
portion of an IP datagram, which itself travels across an to specify the type of the item
underlying network in the payload portion of a frame. being carried

 IPv4 uses the PROTOCOL field in the datagram header as a


type field. When an ICMP message is carried in the payload
area of an IPv4 datagram, the PROTOCOL field is set to 1

 IPv4 uses the PROTOCOL field in the datagram header as a


type field. When an ICMP message is carried in the payload
area of an IPv4 datagram, the PROTOCOL field is set to 1
ICMP Message Format

 ICMP message begins with an 8-bit integer ICMP message TYPE field. The TYPE field identifies
the specific ICMP message that follows. A receiver uses the value in the TYPE field to know how
to parse the remainder of the message.

 An 8-bit CODE field in an ICMP message provides further information about the message type.
For example, an ICMP TIME EXCEEDED message can have a code value to indicate that the hop
count (TTL) of the datagram reached zero or that reassembly timed out before all fragments
arrived.

 The third field in each ICMP message consists of a 16-bit CHECKSUM that is computed over the
entire ICMP message. ICMP uses the same 16-bit one’s complement checksum as IP.
Thank you

You might also like