Unit4 2 2019-20
Unit4 2 2019-20
Unit4 2 2019-20
Internetworking
IPv4
IPv6
Link Layer Interconnection
• Frame in data link layer does not carry any routing information
• Problem: How does S1 know that data should be sent out from interface f3?
Network Layer in an Internetwork
• Network layer is responsible for host-to-host delivery and for
routing the packets
Network Layer (1)
• Network layer at
source is responsible
for creating a packet
from data coming from
another protocol.
• Checks routing table to
find the routing
information.
• The packet is
fragmented.
Network Layer (2)
• Makes sure that the
destination address on
the packet is same as
the address of the host.
• If the packet is a
fragment, the network
layer waits until all the
fragments have
arrived.
Network Layer (3)
• The router or the
switch consults its
routing table and
finds the interface
from which the
packet must be sent.
• After some changes
to the header, the
packet is passed to
the data link layer.
Internet Protocol (IP)
• Switching at the network layer in the Internet uses the datagram
approach
• Communication at the network layer in the Internet is connectionless
• Position of IPv4 in TCP/IP protocol suite
IPv4
• IPv4 is an unreliable and connectionless datagram
protocol – a best-effort delivery service.
• IPv4 must be paired with a reliable protocol such
as TCP.
• IPv4 is also a connectionless protocol for a
packet-switching network that uses the datagram
approach.
• IPv4 relies on a higher-level protocol for
reliability.
IPv4 Datagram
• A datagram is a variable length packet consisting of two parts: Header and
Data.
• Header – 20 to 60 bytes, contains information essential to routing and
delivery.
IPv4 Header (1)
• Version (VER): Defines the version. If a machine is using some
other version the datagram is discarded rather than interpreted
incorrectly.
• Header length (HLEN): Defines the total length of the datagram
header in 4-byte words. Eg: if the field value is 5, the header length
is (5X4=)20 bytes.
• Services: previously called service type, now called differentiated
services.
• Service type:
– Precedence : defines priority of the datagram in issues such as
congestion (lowest precedence values discarded first)
– TOS (type of service):only one of the bits can have the value 1
IPv4 Header (2)
• TOS – 5 different types of services
Default TOS for Applications
IPv4 Header (3)
Differentiated services: first 6 bits make up the codepoint
subfield, last 2 bits not used.
A. When 3 right most bits are 0s, the 3 left most bits are
interpreted as precedence bits.
B. When 3 right most bits are not 0s, the 6 bits define the 64
services based on the priority assignment by the internet or
local authorities.
– The firs category contains 32 service types, second and third
contain 16 each.
• Note the numbers are not contiguous
Category Codepoint Assigning Authority
1 XXXXX0 Internet
2 XXXX11 Local
3 XXXX01 Temporary or
experimental
IPv4 Header (4)
• Total length: 16
bit field defines the total length
of IPv4 datagram in bytes including the
header.
– [Length of data = total length – header length]
• Identification, Flags and Fragmentation offset: these
field are used in fragmentation.
IPv4 Header (5)
• Time to live: A datagram has a limited lifetime in its travel
through an internet.
– Originally designed to hold a timestamp.
– Datagram is discarded when the value becomes zero.
– Today, this field is used mostly to control the number of hops
visited by the datagram.
• Protocol: 8-bit field defines the higher level protocol(TCP,
UDP, ICMP, IGMP) that uses the services of the IPv4 layer.
IPv4 Header (6)
• Checksum: for error detection purpose.
• Source address: 32 bit field defines the IPv4
address of the source. This field must remain
unchanged during the datagram’s travel from
the source host to destination host.
• Destination address: 32 bit field defines the IPv4
address of the destination. This field must
remain unchanged during the travel of
datagram from source to destination.
IPV4 Header(7)
Fragmentation
• Maximum size of the datagram is restricted by the hardware and
the software used in the network.
• Maximum length of the IPv4 datagram: 65,535 bytes
• Datagram can be fragmented by the source host or any router in
the path.
• However reassembly is done only at the destination host.
• When a datagram is fragmented most of the header is copied by all
fragments, optional field may or may not be copied.
• The flow label is assigned to a packet by the source host. The label
is a random number between 1 and 224-1. A source must not reuse
the flow label for a new flow while the existing flow is still active.
• If a host does not support the flow label, it sets this field to zero. If
a router does not support the flow label it simply ignores it.
• All packets belonging to the same flow have the same source, same
destination, same priority and same options.
Comparison between IPv4 and IPv6
Extension Header
• To give greater functionality to the IP
datagram, the base header can be followed by
up to six extension headers.
Extension Header
• Transition should be smooth to prevent any problems between IPv4 and IPv6
systems