0% found this document useful (0 votes)
3 views15 pages

L16 - Network Layer Protocols

The document provides an overview of the Network Layer and the Internet Protocol version 4 (IPv4), detailing its role in packet creation, routing, and delivery across networks. It explains the structure of IPv4 datagrams, including fragmentation and the importance of the Maximum Transmission Unit (MTU). Additionally, it discusses the characteristics of IPv4 as an unreliable and connectionless protocol, emphasizing its best effort delivery approach.

Uploaded by

Chirag Sethi
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)
3 views15 pages

L16 - Network Layer Protocols

The document provides an overview of the Network Layer and the Internet Protocol version 4 (IPv4), detailing its role in packet creation, routing, and delivery across networks. It explains the structure of IPv4 datagrams, including fragmentation and the importance of the Maximum Transmission Unit (MTU). Additionally, it discusses the characteristics of IPv4 as an unreliable and connectionless protocol, emphasizing its best effort delivery approach.

Uploaded by

Chirag Sethi
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/ 15

Network Layer

Internet Protocol

1
Network Layer
• Source Router
• Creating a packet from the upper
layer. • Routing the packet by consulting the
routing table for each incoming packet
• The header contains source and and find the information that the packet
destination IP addresses. must be sent to.
• Checking the routing table to find
the routing info (eg. Outgoing Destination
interface, or machine address of the
next hop) • Address verification.
• For fragmented frames, wait for all
• If the packet is larger than MTU
fragmentations then reassemble them
(Maximum Transmission Unit ), before delivering the packet to the upper
fragment it. layer.

2
INTERNETWORKING
• Internetworking, connecting networks together to make an internetwork or an internet.
• Let us assume that host A needs to send a data
packet to host D.

• When data arrive at interface f1 of S1, how does


S1 know that interface f3 is the outgoing
interface?
• There is no provision in the data link (or
physical) layer to help S1 make the right
decision.
• Here Network layer comes into picture to solve
this problem of delivery through several links.

Links between two hosts


Network layer in an internetwork
• To solve the problem of delivery
through several links, the network
layer was designed.

• The network layer is responsible for


host-to-host delivery and for routing
the packets through the routers or
switches.
Network layer at the source, router, and destination

20.5
Internet Protocol version 4
The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the
TCP/IP protocols.
• IPv4 is an unreliable and
connectionless datagram protocol –
a best effort delivery
• Best effort means that IPv4
provides no error control (except
for error detection on the header) or
flow control
• IPv4 does its best to get a
transmission through to its
Position of IPv4 in TCP/IP protocol suite
destination, but with no guarantees

6
IPv4 Datagram Format

• Version (VER): Version of the IP protocol.


• Header length (HLEN): the total length of the
datagram header in 4-byte words.
• Services: service type or differentiated services
• Total length: total length (header plus data) of
the datagram in bytes.
 Total length of data = total length – header
length
• Time to live: it is used to control the maximum
number hops visited by the datagram.
• Protocol: defines the higher-level protocol that
uses the services of the IPV4 layer.
• Checksum: 1’s compliment checksum
• Identification and Flags: used in fragmentation
• Fragmentation offset: used in fragmentation
Encapsulation of a small datagram in an Ethernet frame
 The total length field defines the total length of the datagram including the header.

One of the reason why “total length” field is required.

Protocol values

Protocol field and encapsulated data


Fragmentation
• Fragmentation occurs when an IP datagram
traverses a network which has a maximum
transmission unit (MTU) that is smaller than the
size of the datagram.
• MTU
– Each DL has its own frame format and limitation.
– One of such limitation is the maximum size of the frame,
which is imposed by software, hardware, performance, and
standards. MTUs for some networks
Fields Related to Fragmentation

Identification: identifies a datagram originating from the source host.


A combination of the identification and source address must uniquely
define a datagram as it leaves the source node.

Fragmentation offset: is the offset of the data in the original datagram


measured in units of 8 bytes.
Flags (3 bits) used in fragmentation

• first bit: reserved (not used)


• second bit: = 1 requires the packet not to be fragmented
drops the packet if it is > MTU
= 0 then datagram can be fragmented if necessary

• third bit: =1 more fragmented packets later


=0 the last fragmented packet
Fragmentation example

A datagram with a data size of 4000 bytes fragmented into three fragments.

12
Question

An IPv4 packet has arrived with the first 8 bits


as given below. The packet was discarded by
receiver, why?
01000010
Question
A packet has arrived in which the offset value is 100, the value of HLEN is 5, and the
value of the tota1length field is 100. What are the numbers of the first byte and the last
byte?

Solution
The first byte number is 100 x 8 = 800.
The total length is 100 bytes, and the header length is 20 bytes
(5 x 4)
No. of bytes in the datagram= 80
If the first byte number is 800, the last byte number must be
879.
Question

​Which of the following fields of


an IP header is/are always modified
by any router before it forwards
the IP packet?
A.Source IP Address
B.Protocol
C.Time to Live (TTL) Answer:- C, D
D.Header Checksum

You might also like