[go: up one dir, main page]

0% found this document useful (0 votes)
34 views29 pages

Telecommunication Networks 15B11EC611: Dr. Bhagirath Sahu Assistant Professor, JIIT, Noida

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 29

Telecommunication Networks

15B11EC611

Dr. Bhagirath Sahu


Assistant Professor, JIIT, Noida
Network Layer: Internet Protocol
 Kindly refer page numbers: 579 to 605 of the Book_1_Data-
Communications-and-Networking - By Forouzan for detailed discussion.
Network Layer: Internet Protocol
 In the Internet model, the main network protocol is the Internet Protocol (IP)

INTERNETWORKING
 The physical and data link layers of a network operate locally. These two layers are jointly
responsible for data delivery on the network from one node to the next

Figure: Links between two hosts

There is a big problem here. When data arrive at interface f1 of R1 (Router1 or switch1), how does R1
know that interface f3 is the outgoing interface? There is no provision in the data link (or physical)
layer to help R1 make the right decision. The frame does not carry any routing information either.
Need for Network Layer
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.

Figure: Network layer in an internetwork


FUNCTIONALITY OF THE NETWORK LAYER AT A SOURCE, AT A ROUTER, AND AT THE
DESTINATION

Network layer at the source  Network layer at the destination 


responsible for creating a packet from responsible for address verification; it
the data coming from another makes sure that the destination address
protocol. The header of the packet on the packet is the same as the address
contains the logical addresses of the of the host.
source and destination.
FUNCTIONALITY OF THE NETWORK LAYER AT A SOURCE, AT A ROUTER, AND AT THE
DESTINATION

Network layer at the switch or router 


responsible for routing the packet.
 Internet as a Datagram Network
The Internet has chosen the datagram approach to switching in the network layer.

 Internet as a Connectionless Network


In connectionless service, the network layer protocol treats each packet
independently, with each packet having no relationship to any other packet. The
packets in a message may or may not travel the same path to their destination.
This type of service is used in the datagram approach to packet switching. The
Internet has chosen this type of service at the network layer.
The reason for this decision is that the Internet is made of so many heterogeneous
networks that it is almost impossible to create a connection from the source to the
destination without knowing the nature of the networks in advance.
IPv4
 Internet Protocol version 4 (IPv4) is an unreliable and connectionless datagram protocol.
 IPv4 is the delivery mechanism used by the TCP/IP protocols.

Figure: Position of IPv4 in TCP/IP protocol suite

 IPv4 is also a connectionless protocol for a packet-switching network that uses the datagram
approach. This means that each datagram is handled independently, and each datagram can
follow a different route to the destination.
IPv4 Datagram Format
 Packets in the IPv4 layer are called datagrams.
IPv4 Datagram Format
 A datagram is a variable-length packet consisting of two parts: header and data. The
header is 20 to 60 bytes in length and contains information essential to routing and
delivery.

 Version (VER). version of the IPv4 protocol, currently the version is 4

 Header length (HLEN). total length of the datagram header in 4-byte words. This field
is needed because the length of the header is variable (between 20 and 60 bytes).
When there are no options, the header length is 20 bytes, and the value of this field
is 5 (5 x 4 = 20). When the option field is at its maximum size, the value of this field is
15 (15 x 4 = 60).

 Service (8-bit). It determines treatment (e.g. priority) to be given to IP packet by a


router.
6 2
Differentiated service code point (DSCP) Reserved

 The first six bits are called Differentiated Service Code Point (DSCP).
- The last two bits are reserved. These are used for explicit congestion notification (ECN).
IPv4 Datagram Format

Total length. This is a 16-bit field that defines the total length (header plus data) of the
IPv4 datagram in bytes.

Length of data =total length - header length

Since the field length is 16 bits, the total length of the IPv4 datagram is limited to
65,535 (216 - 1) bytes, of which 20 to 60 bytes are the header and the rest is data from
the upper layer.

• Identification
• Flags These fields are used in fragmentation
• Fragmentation offset

Fragmentation 
• Divide the datagram to make it possible to pass through the networks
• Protocols: Hyperchannel (65,535), Ethernet (1500), PPP (296)
Fragmentation
• When a datagram is fragmented, each fragment has its own header with most of the
fields repeated, but with some changed.
• Datagram can be fragmented several times before it reaches the final destination.
• When a datagram is fragmented, required parts of the header must be copied by all
fragments.

Fields Related to Fragmentation

Identification:
• This 16-bit field identifies a datagram originating from the source host.
• All fragments have the same identification number, the same as the original
datagram.
• The identification number helps the destination in reassembling the datagram.
• It knows that all fragments having the same identification value must be
assembled into one datagram.
Fragmentation
Flags: This is a 3-bit field. DF MF
1st bit  Reserved
2nd bit  DF = 1 (Do not fragment bit)
3rd bit  MF = 1 (More fragment), 0 (Last fragment)
Fragmentation offset
This 13-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 8 bytes.
Figure 20.11 shows a datagram with a data size of 4000 bytes fragmented into three
fragments.
Fragmentation
Figure 20.12 shows an expanded view of the fragments in Figure 20.11.

Note1: value of the identification field


is the same in all fragments.

Note2: value of the flags field with the


more bit set for all fragments
except the last
IPv4 Datagram Format

Time to live (TTL) (8 bits)  (0-255 seconds, typical 64).


 Defines leftover life of a packet. When TTL becomes zero, the packet is discarded.
 Each router decrements its value by amount of time spent in the router.
 Time < 1 second is taken as 1 second.
Need of TTL:
 Because routing tables in the Internet can become corrupted. A datagram may
travel between two or more routers for a long time without ever getting
delivered to the destination host. This field limits the lifetime of a datagram.
 To intentionally limit the journey of the packet.
Protocol (8 bits):
 This 8-bit field defines the higher-level protocol that uses the services of the IPv4
layer.
 An IPv4 datagram can encapsulate data from several higher-level protocols such as
TCP, UDP, etc. (TCP = 6, UDP = 17)
Header checksum (16 bits):
 Checksum is used for detection of error in Header, because header of the IPv4
packet changes with each visited router, but the data do not.
 Packet is discarded if error is detected.
IPv4 Datagram Format

• Source address (32 bits) : IP address of the source of this packet.


• Destination address (32 bits) : IP address of the destination of this packet.
• Options (Variable) : Used for network testing and debugging. It contains options
chosen by source. It consists of option code, length, & option variables.
Record Route
It enables determination of path taken by a packet.
Each intermediate router that handles the packet writes its IP address in
the Record Route field.
Source Route
It specifies the route to be taken by a packet. The route is specified by the
sender. If the path cannot be followed, the packet is discarded.
Time stamp
Used to record the time of datagram processing by a router.
The time is expressed in milliseconds from midnight.
Limitations of IPv4
Limitations of IPv4
1. Address space
• IPv4’s 32-bit address space is already exhausted.
• IPv6 provides enlarged address space using 128-bit addresses.

2. Network security
• Network should provide secure transfer of data. IPv4 supports security feature
as an implementation option. Security option may not implemented by an ISP.
• Security is integral part of IPv6 implementation. Its usage is optional.

3. Flow identification
• IP packet flows need to be identified for implementing quality of service (QOS).
• E.g. IP flow containing voice packets can be given priority and reserved
bandwidth.
• A flow is identified in IPv4 by 5 fields. Packets with same values in these fields
belong to one flow.
Source address (IP Header)
Destination address (IP Header)
Protocol (IP Header)
Source port number (TCP/UDP header)
Destination port number (TCP/UDP header)
• Flow identification affects performance of an IPv4 router.
• In IPv6, additional flow identifier field is provided.
Limitations of IPv4
4. Header design
• IPv4 header design impacts router performance. Header has variable length.
Each router must
o calculate header size,
o check it for errors,
before it can retrieve information for packet forwarding.
Error check is unnecessary for today’s optical fibre based technology.
• IPv6 has fixed header size and does not have error check bits.
Advantages:
The IPv6 also known as Ipng (IP next-generation) has some advantages over IPv4:
1. Larger address space
2. Better header format
3. New options  IPv6 has new options to allow for additional functionalities.
4. Allowance for extension  IPv6 is designed to allow the extension of the protocol if
required by new technologies or applications.
5. Support for resource allocation  A mechanism (called flow label) has been added to
enable the source to request special handling of the packet. This mechanism can be
used to support traffic such as real-time audio and video.
6. Support for more security  The encryption and authentication options in IPv6
provide confidentiality and integrity of the packet.
IPv6 – Packet Format
40 octets Up to 65,535 octets
Base header Payload

Extension headers (optional) Data from upper layer

4 8 20
Version Traffic class Flow label
Payload length Next header Hop limit
Base header Source address (SA)
(16 octets)
Destination address (DA)
(16 octets)
Pay load (Extension headers + Data from upper layer)

Version (4): Its value is 6.


Traffic class (8): It corresponds to type of service field of IPv4.
Flow label (20): (SA + DA + Flow label) identify a flow.
Payload length (16): It gives the size of payload in bytes.
Next header (8): It indicates the next header after base header. Next header can be an
extension header or (TCP/UDP) header.
IPv6 – Packet Format
Hop limit (8): It is equivalent to TTL. It is number of hops and is decremented by 1 in each hop.

Source address 128-bit addresses


Destination address

 Extension headers replace options field of IPv4.


 There can be maximum 7 extension headers.

 Some typical next header field values


6 TCP
17 UDP
43 Routing
44 Fragment
50, 51 Security (ESP, AH)
Types of Extension Headers
1. Hop-by-hop options
• It contains options to be processed by all intermediate nodes. E.g. Number of
padding bytes in the header, length of Jumbogram (Packet longer than 65535
bytes).
2. Routing header
• It enables source routing. It contains the list of routers and destination to be
visited (Max 24).
3. Fragment header
• It contains fragment identifier, offset, ‘more fragments’ fields.
• In IPv6 fragmentation is carried out by the hosts only. Routers never fragment
packets. Reassembly is also done by the host as in IPv4.
4. Authentication header (AH)
• It provides content integrity, source authentication, and protection against
replay.
5. ESP (Encapsulating security payload) header
• It provides confidentiality using encryption and protection against replay.
6. Destination options header
• It contains optional information for the destination.
IPv6 Address Notation
• 128-bit address is split into eight 16-bit parts, separated by colons.
• Each part is written as four hexadecimal numbers.
• FEDC:00C3:0000:0000:0000:34FE:7354:3510
• Leading zeros can be suppressed
• FEDC:00C3:0000:0000:0000:34FE:7354:3510
• FEDC:C3:0:0:0:34FE:7354:3510
• Consecutive zeros of 16-bit parts can be put between two colons.
• FEDC:C3::34FE:7354:3510
• Double colon is used only once in an address.
• Network prefix is indicated by / followed by bit count
• FEDC:C3:0:0:0:34FE::/96
Examples
FE80:0000:0000:0100:0000:0000:0000:0123
 FE80::100:0:0:0:123
2000:1234:5678:9ABC:0000:0000:0000:0000/64
 2000:1234:5678:9ABC::/64
2000:0000:0000:0000:0000:0000:0000:0000/3
 2000::/3
Comparison between IPv4 and IPv6 packet headers
 The header length field is eliminated in IPv6 because the length of the header
is fixed in this version.
 The service type field is eliminated in IPv6. The priority and flow label fields
together take over the function of the service type field.
 The total length field is eliminated in IPv6 and replaced by the payload length
field.
 The identification, flag, and offset fields are eliminated from the base header
in IPv6. They are included in the fragmentation extension header.
 The TTL field is called hop limit in IPv6.
 The protocol field is replaced by the next header field.
 The header checksum is eliminated because the checksum is provided by
upper-layer protocols; it is therefore not needed at this level.
 The option fields in IPv4 are implemented as extension headers in IPv6.
TRANSITION FROM IPv4 TO IPv6
 Transition from IPv4 to IPv6 is likely to be gradual spread over several years.
 Perhaps IPv4 will never completely disappear.

 Approaches to transition from IPv4 to IPv6


a) Dual stack
 Network/hosts support both IPv4, IPv6
b) Tunneling
 IPv6 traffic is tunneled through IPv4 network.
c) Header translation
 Translate protocols from IPv6 to IPv4 and vice versa.
 These approaches are to be used in parallel. Any one approach cannot resolve all the
transition issues.
Dual Stack
 A station must run IPv4 and IPv6 simultaneously until all the Internet uses IPv6.
 See Figure 20.19 for the layout of a dual-stack configuration.

 To determine which version to use when sending a packet to a destination, the source
host queries the DNS.
 If the DNS returns an IPv4 address, the source host sends an IPv4 packet.
 If the DNS returns an IPv6 address, the source host sends an IPv6 packet.
Domain Name System (DNS) is a hierarchical and decentralized naming system for computers,
services, or other resources connected to the Internet or a private network.
Tunneling
1. Tunneling is a strategy used when two computers using IPv6 want to communicate
with each other and the packet must pass through a region that uses IPv4.
2. To pass through this region, the packet must have an IPv4 address.
3. So the IPv6 packet is encapsulated in an IPv4 packet when it enters the region, and it
leaves its capsule when it exits the region.
4. It seems as if the IPv6 packet goes through a tunnel at one end and emerges at the
other end.
Header Translation
 Header translation is necessary when the majority of the Internet has moved to IPv6 but
some systems still use IPv4.
 Tunneling does not work in this situation because the packet must be in the IPv4 format to
be understood by the receiver.
 In this case, the header format must be totally changed through header translation.
 Header translation uses the mapped address to translate an IPv6 address to an IPv4
address.
THANK YOU

You might also like