Upload
ch-saqib-shabbir
View
231
Download
0
Embed Size (px)
Citation preview
8/8/2019 Lecture 13 (Ch20)
1/23
Network layer
Internet Protocol
8/8/2019 Lecture 13 (Ch20)
2/23
Need for network layer
The network layer at the sourceis responsible for creating a packet from the
data coming from anotherprotocol such as transport layerprotocol.
The header of the packet contains, among otherinformation, the
logical addresses of the source and destination.
The network layeris responsible for checking its routing table to findthe routing information.
If the packet is too large, the packet is fragmented.
8/8/2019 Lecture 13 (Ch20)
3/23
The network layer at the switch or router
The network layer at the switch or routeris
responsible for the routing the packet.
When a packet arrives, the router or a switch concernsits routing
table and finds the interface from which the packet must be sent.
8/8/2019 Lecture 13 (Ch20)
4/23
The network layer at the destination
is responsible for addressverification
Destination address on the packet is the same as the address of the
host.
If the packet is fragmented, the network layer waitsuntil all
fragments have arrived, and then reassemble them and delivers the
reassembled packet to the transport layer.
8/8/2019 Lecture 13 (Ch20)
5/23
IPV4
Is an unreliable and connectionless datagram protocol,best effort deliveryservice.
The term best effort means that IPV4 provides no error and flow controlexcept for error detection on the header.
If reliability isimportant, IPV4 must be paired with reliable protocol such as
TCP/IP. IPV4 uses datagram approach forpacket switching network; each datagram
is handled independently and each datagram can fallow a different to thedestination.
8/8/2019 Lecture 13 (Ch20)
6/23
IPV4 datagram format
Packetsin the IPV4 layer are called datagram.
8/8/2019 Lecture 13 (Ch20)
7/23
VERis a 4-bit field defines the version of the IP protocol.
HLEN this 4-bit field total length of the datagram headerin 4byte words.T
he length of the headerisvariable( between 20 and 60 bytes). When there are no options, header length is 20 bytes.
When the option field is at its maximum size, the value of this field is 60
bytes.
Services
It is an 8 bit field, the first 3 bits are called precedence bits.
The next 4 bits are called type ofservice and the last bit is not used.
Precedenceis a 3 bit ranges from 0 to 7 ,it defines the priority of
datagram that need to be discarded when there are congestion , those
datagrams with the lowest precedence are discarded first.
8/8/2019 Lecture 13 (Ch20)
8/23
TOSbits
8/8/2019 Lecture 13 (Ch20)
9/23
Differential Services
Total Length it is a 16 bit field that define the total length ( Header +D
ata) of IPv4 datagram .Length of data = total length header length
Time to Live A datagram is a limited lifetime in its travel through theinternet. The field is decremented by each visited router. The datagram is
discarded when the value become 0.
Identification this field isused in fragmentation.
Flags this field isused in fragmentation.
8/8/2019 Lecture 13 (Ch20)
10/23
FragmentationOffset this field isused in fragmentation.
Protocol
the 8 bit field defines a higher level protocols that uses the services ofIPv4 layer.
In IPv4 datagram encapsulate data from the higher level layersprotocolssuch asTCP,UDP,ICMP and IGMP.
The field specify the final destination protocol to which the IPv4 datagram isdelivered.
Checksum
Source Address a 32 bit field ofsource address.
Destination Address 32 bit field of destination address.
8/8/2019 Lecture 13 (Ch20)
11/23
Maximum Transfer Unit (MTU) When a datagram is encapsulated inframe, the total size of datagram must be less than this maximum size,which is define by the restrictionsimposed by the hardware and softwarein the network.
The maximum length of the IPv4 datagram is equal to the 65535bytes.
For ourphysical networks we divide a datagram to make it possible topass through these networks. thisis called fragmentation.
Fields related to the Fragmentation.
1. Identification 16 bit field identifies a datagram originated from thesource host. the identification no helps the destination in
reassembling the datagram.. Flags 3 bit field,
First bit is reserved.
The second bit is called a do not fragment bit.
Ifitsvalue is 1 the machine do not fragment the datagram,
ifitsvalue is 0 the datagram can be fragmented.
The third bit is called more fragment bit.
ifthe value is 1 means the datagram is not the last and there aremore segments.
if the value is 0, means thisis the last or only fragment.
8/8/2019 Lecture 13 (Ch20)
12/23
Fragmentation offset The 13-bit field shows the relative position of this
fragment with respect to the whole datagram.
Options can be used for testing and debugging.
8/8/2019 Lecture 13 (Ch20)
13/23
Drawbacks in IPV4
Despite of all short term solutions,such assubnetting, classless
addressing isstill a long term problem in the Internet.
The Internet must accommodate real time audio and video
transmission. This type of transmission requires minimum delay
strategies and reservations not provided in the IPV4.
The Internet must accommodate encryption and authentication of
data forsome applications. No encryption or authentication isprovided by IPV4.
To overcome these discrepancies IPV6 wasintroduced
8/8/2019 Lecture 13 (Ch20)
14/23
IPng (Internetworking Protocol, next generation)
Advantages
Large addressspace An IPV6 addressis 128 bits,so addressspace isincreased by 296 .
Better header format IPV6 uses a new header format in whichoptions are separated from the base header and inserted, whenneeded,between the base header and the upper layer data.
New Options IPV6 has new options to allow additionalfunctionalities.
Allowance for extension In, IPV6 is designed to allow the extension ofthe protocol if required by new technologies.
Support for resource allocation In IPV6, the type ofservice field hasbeen removed by flow label to enable the source to request special
handling ofpacket. This mechanism isused to support real-time audioand video traffic.
Support for more Security The encryption and authentication optionsin IPV6 provide confidentiality and integrity of the packet.
8/8/2019 Lecture 13 (Ch20)
15/23
IPV6Packet format
Each packet is composed ofbase header and payload.
The base header occupies 40 bytes, whereas the extension headers and
data from the upper layer contain up to 65,535 bytes ofinformation.
Version This 4-bit field defines the version of the IP, for IPV6 the value is 6.
Priority The 4-bit priority field defines the priority of the packet with respect
to traffic congestion.
8/8/2019 Lecture 13 (Ch20)
16/23
Format of an IPV6 datagram
8/8/2019 Lecture 13 (Ch20)
17/23
Flow Label is a 3-byte(24 bit) field that is designed to provide
special handling for a particular data flow.
Payload Length The 2-byte payload length field defines the length of
the IP datagram excluding the base header.Next header The next headeris an 8-bit field defining the header
that fallows the base headerin the datagram.
The next headeris either one of the optional extension headersused
by IP or the header of an encapsulation packet such asUDP or
TCP.Hop Limit This 8-bit hop limit filed serves the same purpose as the
TTL field in IPV4.
Source address The source addressis 16-byte (128 bit) .Internet
address that identifies the original source of the datagram.
Destination address The destination addressis 16-byte (128 bit).Internet address that identifies the original source of the datagram.
8/8/2019 Lecture 13 (Ch20)
18/23
Priority defines the priority of each packet,if one of the datagram is to
be discarded due to congestion, the datagram with the lowest
priority is discarded.
Congested-Controlled Traffic
8/8/2019 Lecture 13 (Ch20)
19/23
Noncongestion-controlled Traffic
Refer to the type of delay tat expect minimum traffic.
Discarding of traffic is not desirable
The source does not adapt itself to congestion.
Flow Label
Asequence ofpackets,sent from a particularsource to a particular
destination, that needsspecial handling by routersis called flow of
packets.
The combination of the source address and the value of the flow
labeluniquely defines a flow ofpackets.
Each router receives a packet,it consultsits flow label table to find
the corresponding entry for the flow label value defined in the
packet. It then provides the packet with the services mentioned inthe entry.
8/8/2019 Lecture 13 (Ch20)
20/23
Transition from IPV4 to IPV6
8/8/2019 Lecture 13 (Ch20)
21/23
Dual Stack
Dual stack a station must run IPV4 and IPV6 simultaneously.
To determine which IP version is to use to send packet ,the sourcehost queries the DNS.
IfDNS returns an IPV4 address, the source host sends an IPV4packet.
If the DNS returns an IPV6 address, the source host sends an IPV6packet.
8/8/2019 Lecture 13 (Ch20)
22/23
Tunneling is a strategy used when two computersusing IPV6 want to
communicate with each other and the packet must pass through a
region that uses IPV4.
To pass this region, the packet must have an IPv4 address. So IPV6 packet is encapsulated in an IPv4 packet when it enters the
region, and it leavesits capsule when it exists the region.
8/8/2019 Lecture 13 (Ch20)
23/23
Header translation
is needed when sender wants to use IPV6 but
receiver has IPV4 version.
In this case, the header format is totally be changed through headertranslation.
The header of the IPV6 is converted to an IPv4 header.