Vous êtes sur la page 1sur 39

Basics of Internet

Chapter :1

Basics of internet
I.I

WHAT IS INTERNET?

L2

PROTOCOLS AND STANDARDS

1.3 INTERNET ADDRESSING


1.4 UNSCASTSNG, MULTICASTING AND BROADCASTING
1.5 CONNECTING DEVICES
1.6 OS8 MODEL
L7

TCP/IP SUITE AND POSITION OF OTHER PROTOCOLS

1.1

WHAT IS INTERNET?

Internet is being used in many aspects of our daily life. It has affected and influenced whole
world in terms of business, communication/entertainment, education searches etc. Internet is a
well structured and organized system. The roots of today's internet are in the ARPANET
(Advanced Research Projects Agencies Network) which was started by America's Department of
Defense in 1960's. In 1969, the four nodes i.e. (1) University of California, Los Angeles (2)
University of California Santa Barbra, (3) Sanford Research Institute and (4) University of Utah
were connected together to from a network and the software was provided for communication
called as NCP (Network Communication Protocol). It was the starting of internet.
A network is a group of connected computers and / or other devices such as printers for
communication and an Internet is a group of networks communicating with each other. The
protocols used for communication over the internet are TCP and IP. These are combined together
to form TCP/IP protocol suite, where TCP stands for TCP stands for Transmission Control
Protocol and IP - Internet Protocol.
The following is the list of some important events.
1960: Four node ARPANET was established.
1970: NCP was implemented on ARPA.
1973: TCP/IP development begins.
1977: Internet was tested using TCP/IP protocol suite.
1978: UNIX distributed to academic / research sites
1981: CSNET (A network supported by national science foundation) established.
1983: TCP/IP becomes official protocol for ARPANET.
1983: MILNET was born
1986: NSFNET established
' 1990: ARPANET replaced by NSFNET
1995: NSFNET goes back to being a research network
1995: Companies known as ISP (Internet service providers) started.

1.2 PROTOCOLS AND STANDARDS:


Protocol is a set of rules used for communication between devices / computers over the
network. A protocol defines what is to be communicated, how and when to communicate. The
protocol is identified by syntax semantics, and timing.

Basics of Internet

Syntax:
It defines the structure or format or data. Semantic refers to meaning of each section of bits
defined in the syntax, how the pattern is interpreted and what action is to be taken. Timing refers
to things (1) When data is to be sent (2) How fast the data is sent.
Standards:
Provide guidelines for manufacturers, vendors, government agencies and other service
providers. They are essential for creating and maintaining an open and competitive market for
manufacturers. They quadrate the international interoperability of data. They fall into two
categories.
(1) De facto: Standards that have not been approved by an organized body but have been
adopted as standards through widespread use.
(2) De jure (by law): Standards that have been legislated by an officially recognized body.
Following are some organizations/committees who took part in developing the standards.
(1) ISO: International Standards Organization
(2) ITU-T: International Telecommunication Union-Telecommunication Standards Sector.
(3) ANSI: American National Standards Institute.
(4) IEEE: Institute of Electrical and Electronics Engineer.
(5) EIA: Electronic Indtistri.es Association

1.3

INTERNET ADDRESSING:

"The host or routers connected over the internet are uniquely and universally identified by a
32 bit binary address called as IP address."
IP Address:
These are 32 bit addresses and one address defines only one, connection to the internet. The
IP addresses are unique and universal. If a device is connected to internet via two networks it
has two IP addresses.
If a protocol uses N bits its address space is 2 N i.e. it can have 2N addresses / connections
available with it.
IP protocol has two versions IPV4 and IPV6 currently being used is IPV4 which uses 32 bits.
Therefore its address space is
232 = 4,294,96/^96

> IP address uses two notations.


(1) Binary Notation: It has four sections, each containing 8 bits.
e.g. 01110100 10010101 00011011 11101010
(2) Dotted Decimal Notation:

Class full Addressing:


IP addresses are divided into different classes therefore it is called as class full addressing. In
this address space of IP is divided into five classes A, B, C, D and E. Following is the
distribution of address spaces among the classes.

If the address is written in binary notation, the first few bits of address can tell the
J
class of address.
.

In dotted decimal notation also we can identity the class of particular address.

NetIQs and Hassids in IP Address:


Class A, B, and C contains both netted and hosted where netted indicates the network id and
hosted is the id of the machine/device class D and E are not divided into netted hosted class D
addresses are used for multicasting there is only one block or address. Class E is reserved for
special purposes.

1.4

UNICASTING MULTICASTING AND BROADCASTING:

Communication on the internet is achieved through uncast, multicast, broadcast addresses.


Uncast:
Uncast means one to one communication i.e. a packet is sent from one source to one
destination Uncast addresses belong to classes A, B, and C.
Multicast:
Multicast means one to many communication i.e. a packet is sent from one source to many
destinations multicast address is a D class address.
Broadcast:
Broadcast means one to all. Internet allows broadcasting only at local level not at global
level, i.e. a system cannot send message to all hosts or routers in the world. Because of this
restriction network traffic is avoided.

1.5

CONNECTING DEVICES:

(1) Repeater: It is a device which operates on physical layer of OSI model. Its function is to
receive the signal and retransmit it.

Internet Technologies (B.Sc. IT)

Since the signal has to travel long distances it may become weak after traveled some
distance, due to this the receiver may receive weak signal. Repeaters are the devices which
retransmits the signal with original strength. Repeater extends the physical length, of
network. Repeater doesn't have any filtering capacity. It can connect two segments of a
LAN.

Fig. 1.1
(2) Bridges: Bridge operates at physical and data link layer. It connects two segments LANS.
As a physical layer device it regenerates the signal and as a data link layer device it
checks the physical address.
A Bridge itself has no physical address. It acts only as a filter. A bridge has a table which
is used in filtering decisions.

Fig. 1.2
(3) HUBS: It is also called as multiport Repeater. It is normally used to create connected
between stations in physical star topology.

(4) Router: It is a three layer device which operates on physical, data link and network layers. As
a physical layer device it regenerates the signal. As a data link layer device it checks the
physical addresses. As a network layer device it checks the network layer addresses. A
router connects independent LAN's or WANs to create an internet work.

Fig. 1.4
Switches:
We can have two layer or three layer switch
Two Layer Switch:
It is a bridge with having many interfaces and a design that allows faster performance.
Three Layer Switch:
It is a router with an improved design to allow better performance. A three layer switch can
receive, process and dispatch a packet much faster than a traditional router even though the
functionality is same.

1.6

THE OSI MODEL:

It is a layered framework for the design of network systems for communication between all
types of computer systems. It consist of seven layers. The model was introduced in 1970's. It
consist of set of protocols used in communication over the internet. Following are the different
layers.
Physical Layer:
At the physical layer the data is represented as bit stream. It contains the physical mediums
and devices used in communication and deals with electrical and mechanical specifications of
the interface. Physical layer deals with following,
(1) Physical characteristics of transmission media. \
(2) Representation of bits as a stream of bits.
(3) The transmission rate i.e. The number of bits sent per second.

-------------,

(4) Synchronization of bits.


(5) The physical topology used for connection.
(6) The mode of transmission, the modes can be simplex, duplex (half duplex and full duplex).

Fig. 1.5: OSI Layers


Data Link Layer:
It makes the physical layer to appear error free to upper layers. It does the flow control and
error control Following are some responsibilities of data link layers.
(1) Dividing the stream of bits into data units called as frames.
(2) Adding headers to frames to define the sender and / or receivers.
(3) Controlling the flow of data.

(4) (4) Error control - Data link layer gives the reliability to physical layer by adding

mechanisms to control the errors like damaged frames, duplicated frames.


(5) Network Layer:

The N/W layer is responsible for source to destination delivery of packets traveling
through multiple links.
(6)

The network layer adds the header to the packets coming from upper layer, includes the
logical .address of sender and receiver. Network layer ensures that each packet gets from its
origin to its final destination.
(7)

(8) As Routers operate on N/W layer they route the packet to the final destination. One of
the important function of network layers is the Routing.

Transport Layer:

(9)

(10) Is responsible for end to end delivery of the entire message? The network layer does not
recognize any relationship between the packets those reached at destination. It treats each packet
independently whether or not they belong to same message. Transport layer ensures that whole
message arrives intact and in proper order, overseeing error control and flow control. The
transport layer also does the segmentation i.e. the message is divided into segments having
sequence number.
(11) Like data link layer transport layer is responsible for error control and flow control. One
more function of transport layer is connection control. It can give both connection oriented as
well as connectionless service. ,
(12)

Session Layer:

(13) It is a dialog controller layer, it establishes, maintains and synchronizes the interaction
between source and destinations. For the dialog control session layer allows the communication
between two processes in half duplex and full duplex mode.
(14)

Presentation Layer.

(15)

exchanged
and destination.

It deals with the syntax and semantics of the information


between
source
. .'..

(16) The responsibilities of presentation layer includes translation (encoding), Encryption and
decryption, and compression of data.
(17)

Application Layer:

(18) The application layer is responsible for the interaction of user (human or software) with
internet. It provides uses interfaces and services like gmail, file transfers and sharing of
information,'and directory services.

(19) 1.7

TCP/IP SUITE AND POSITION OF PROTOCOLS:

(20)

(21) Fig.

1.6 Short forms used:

(22)

(23)

(24)

Chapter 2

Internet Protocol

(IP)
2.1 IP INTRODUCTION
2.2 IP DATAGRAM
2.3 FRAGMENTATION IN IP
2.4 CHECKSUM CALCULATION
2.5 OPTIONS USED IN IP
2.6 IP PACKAGE
2.7 INTERNET PROTOCOL VERSION 6 (IPV 6)
2.8 PROBLEMS

2.9

2.1

IP INTRODUCTION:

2.10 IP is called as connection less unreliable protocol. It is one of the protocol of TCP/IP
suite. It is combined with TCP to achieve more reliability while transmitting data. The data at IP
is represented in the form of datagram. As IP is a connectionless protocol datagram can follow
different routes to reach the destination. Therefore the problems of out of order arrival or
corrupted datagram may pour during transmission. To avoid these problems IP relies heavily on
higher level protocols like TCP:

2.112.2

IP DATAGRAM:

2.12

(1) VER: It is 4 bit field identifies version of IP protocol, i.e. IPV4 or IPV6. The current used
version is IPV4.
(2) HLEN: This field gives total length of header in a 4 byte words. When there are no options,
header length is 20 bytes and when the option field is at its maximum size the value of this
field is 60 bytes. Hence minimum length of Header is 20bytes.
(1) DS (Differentiated Services):
IETF (Internal Engineering Task Force) changed the interpretation and name of
services field. Previously it was called as service Type and now it is called as Differentiated
Services.
2.13

2.14 (a) Service Type:

2.15

2.16 D - Minimize delay


2.17 T - Maximize throughout
2.18 R-Maximize reliability
2.19 C - Minimize cost
2.20 The first three bits are called as precedence bits next four bits are TOS bits & It
bit is never used.
2.21 The precedence defines the priority of the datagram in issues such as conges tic If
a router is congested and needs to discard some datagrams, those datagrams we lowest
precedence are discarded first. Some datagrams in the Internet are mc important than
others. For example, a datagram used for network management much more urgent and
important than a datagram containing optional information for a group.
2.22 TOS bits is a 4-bit subfield with each bit having a special meaning. Although a 1

can be either 0 or 1. One and only one of the bit can have the value of 1 in ea diagram
with only 1 bit set at a time, we can have five different types of services.

2.23

2.24

2.1

2.25

(b) Differentiated Services:

2.26
In this interpretation, the first 6 bits make up the code point subfield, and the
last 2 bits are not used. The code point subfield can be used in two different ways.
2.27
(i) When the 3 right most
bits
are
Os,
the
3
leftmost
bits
are
interpreted
the
same
as the precedence bits in the service type interpretation. In other words, it is
compatible with the old interpretation.

2.28
(ii) When the 3 rightmost bits are not all Os, the 6 bits define 64 services based
on the priority assignment by the Internet or local authorities. The first category contains 32
service types; the second and the third each contain 16. The first category (numbers, 2, 4, ...,
62) is. assigned by the Internet authorities (IETF). The second category (3, 7, 11, 15, ..., 63)
can be used by local authorities (organizations). The third category (1, 5, 9, ..., 61) is
temporary and can be used for experimental purposes. Note that the members are not
contiguous. If they were, the first category would range from 0 to 31, the second from 32 to
47, and the third from 48 to 63. This would be incompatible with the TOS interpretation
because XXX000 (which includes 0, 8,16, 24, 32, 40, 48 and 56) would fall into all three
categories. Instead, in this assignment method all these services belong to category 1. Note
that the assignments have not yet been finalized.

2.29

2.30 (4) Total Length: It is a 16 bit field that defines total length of IP datagram in bytes.

Length of data = Total length - Header Length.


2.31

The total length of IP address datagram is limited to (2 16 1) - 65535 bytes.

(5) Identification, flags, Fragmentation offset are the fields used for fragmentation will be
discussed later.
,
(6) Time to live: A datagram has a limited lifetime In its travel through internet. The TTL field
limits lifetime for the datagram when a router processes a request. It decrements the TTL
field by 1 and if the value is 0 (zero) it will drop the packet.
(7) Protocol: This 8 bit field defines the higher level protocol that uses the services of IP layer.
This field specifies the final destination protocol to which IP datagram should be delivered.
IP datagram can encapsulate data from several higher level protocols such as ICMP, IGMP,"
UDP and TCP.

(8)

(8) Header Checksum: The checksum concept is used for error control, will be discussed later.
(9) Option: Only 6 options are currently being used, they are included in the variable part at the
IP datagram. They are not required for every datagram. They are used for Network testing
and debugging.
(9) Format for Option:

(10)

(11)

2.3

FRAGMENTATION IN IP:

(12) A datagram can travel through different networks. Each router decapsulates the IP
datagram from the frame it receives processes it and then encapsulate it in another frame. The
format and size of received frame and sent frame depend on physical network through which the
frame has just travelled or the frame is going to travel respectively. Sometimes it is required to
divide the datagram to make it possible to pass through different networks. This process is called
as fragmentation. Sometimes a fragmented datagram may also be fragmented if it reaches to the
network of even smaller MTU.
(13)

MTU (Maximum Transfer Unit):

(14) When datagram is encapsulated in a frame the total size of datagram must be less than
the maximum size which is defined by restriction imposed by underlying software and hardware
used by Network.

(15)

(16)

2.3 Values of MTU for different


2.2
protocols.

(17) Fields Related with Fragmentation:

(1) Identification: This is 16 bit field identifies a datagram originating from source. The
combination of identification and source IP address must uniquely define a datagram when
it leaves the source. To guarantee the uniqueness IP protocol uses a counter. Counter is
initialized to positive number. When IP protocol sends a datagram it copies Current Value of
counter to all the fragments of datagram and increments the counter by one hence all the
fragments have same identification number.
(2) Flags: This is a 3 bit field, the first bit is reserved, 2nd bit is do not fragment and third bit is
for more fragments.

(18)

(19)

D - Do not

fragment M - More
fragments

(20)

(21)__
(22) (3) Fragmentation Offset: This is a 13-bit field showing the relative position of the

fragment with respect to whole datagram. It is the offset of the data in the original datagram
measured in units of 8 bytes.
(23) Consider a datagram with a data size of 4t)00 bytes which is fragmented into 4 fragments.
(24)_____________________

(25) Internet Protocol (IP)

17

(26) The bytes in original datagram will be numbered from 0 to 3999. The offset of these

fragments are calculated as:


(27) The first fragment contains bytes form 0 to 999
(28) therefore

offset =0/8 = 0.

(29) The second fragment contains bytes numbered from 1000 to 1999.
(30) hence the

offset =1000/8 = 125 '

(31) Similarly third fragments offset is 2000/8 = 250.


(32) Fourth fragments offset is 3000/8 = 375.

(33)

(34)

2.4

CHECKSUM CALCULATION:

(35) It is the error detection method used by IP. Checksum is additional information added to

a packet which is used protection of the packet from corruption. Checksum is calculated at the
sender side and the value obtained is sent with that packet. The receiver does same calculation
on the whole packet. If the result is satisfactory the packet is accepted otherwise it is rejected.
(36)

Checksum Calculation at Sender:

(37) Steps:

(1) The packet is divided into k number of sections each having n number of bits.
(2) All the sections are added using one's complement arithmetic,
(3) The final result is complemented to make the checksum.

(38)

,T -

(39)

18

Internet Technologies

(B.Sc. IT)

(40)

Checksum Calculation at Receiver:

(1) Receiver also divides the packet into k number of sections each having n bits.
(2) It then adds all sections.
(3) Complement of result is taken.
(4) If the final result is zero then packet is accepted otherwise not. For
example: Consider following IP packet

(41)

(42) Checksum Calculation at Sender:


(43)

4,8,0
(44) 64

->

00000000

(45)

- 00000000

(46) 0,0 ->


(47)

5,17 -
(48)

(49)

01000000
00000001

00000000

00000000

00000101

00010001

00000000

00000000

00001010

00000001

(50) 5,1 -

00000101

00000001 ;.

12,4 ->

00001100

00000100

(52) 7,9 ->

00000111

00001001

01101111

01100001

(53)

Sum

l's Complement 10010000


Checksum

(55) Now the packet will look like

(56)

00000000

10,1 -

(51)

(54)

-> 01001000

10011110

(57) Checksum Calculation at Receiver:


(58)

4,8,0 ->

(59)

64 ->

(60)

1 -

(61)

0,0. ->

00000000
00000000

Checksum ->
(64)

10,1 ->

(65)

5,1 -4

(66)

12,4 ->

(67)

7,9 ->

(68)

Sum

l's Complement Checksum

(69)
(70)

00000000

01000000
00000001
00000000

. 5,17 - ; ooooo1o1 ooo1ooo1

(62)
(63)

01001000 00000000

10010000

10011110

00001010 00000001
00000101

00000001

00001100 00000100
00000111

00001001

11111111 11111111
00000000 00000000

Complement is zero. Hence packet will be


accepted.

(71)

2.5

OPTIONS USED IN IP:

(72) IP header is divided into two parts fixed (20 bytes) and variable (40 bytes). The
(73)
variable part contains the options and their maximum size is 40

bytes. Options are


optional fields.
(74) Format for Options

(75)

(76)

Explanat

(77)

ion: Code:
(78) Field is divided into three parts

(1) Copy: To indicate whether options are to be copied into all fragments or only in the first
fragment.
(2) Class: Indicate the general purpose of the option.
(3) Number: Defines the type of option currently only six types are used.
Length:
(80) Defines the total length of options including code field and length field. This field is not
presented in all option types.

(79)

(81)

Data:

(82) The data field contains data that specific options require. This field is not present in all

option types. Option Types:


(83)
No operation: It is a 1 byte option used for filler between options:

(84)

(85) No-op is used to align next option End of Option: It is also 1

byte option used for padding at the end of option. This can be vided only once in the option to
indicate the end.

(86) Internet Protocol (IP)


(87)

2.4

2.6

2.5

(88)

(89)

Record Route:

(90) It is used to record the routers that handle the datagram over internet. It can list
upto nine IP addresses of router. Since maximum size of IP header is 60 bytes including 20
bytes for base header. Remaining 40 bytes left for option part which can be used to store

maximum nine addresses.


(91)

Strict Source Routing, Loose Source Routing:

(92) Strict source route and loose source route options are defined in options of IP datagram. If a
datagram is specified with strict source route option, it must visit all the routers defined in option.
The datagram can not visit any router whose address is not specified in the list, if it does so
datagram is discarded and an error message is issued. Also if a datagram reaches destination without
visiting some of the routers specified in the list, it will be discarded and an error message is issued.
Strict source routing is not used by non-privileged users who are not aware of the physical topology
of the internet.

(93)

2.8 Loose Source Route:


2.9 In this option routers specified in the list must

be visited as well as a datagram is free to visit


other routers. It is similar to strict source route
but relaxation is given to visit other routers.

(94)

2.6
(95)

IP PACKAGE:

2.7

(96) IP supports several options and processing of options, but the important

components
(97) of IP package are:

(1) Header Adding Module.


(2) Processing Module
(3) Fragmentation Module
(4) Reassembly Module
(5) Routing Module
(6) Routing table
(7) MTU table and
(8) Reassembly table.
(98)

(1) Header Adding Module:

(99) It is responsible for adding header to the IP datagram while encapsulating the data, when
it receives data from an upper layer protocol along with the destination IP address.

(100)

(101)

(2) Processing Module:

(102)
It is called as heart of an
IP
package.
It
receives
datagram
from
an
interface
or
from
an header-adding module. It processes and routes the datagram regardless of its
sources.

When datagram comes to processing module, it checks whether it is (a)


lookback packet or (b) a packet which has reached its destination. In both the cases it sends the
packet to reassembly module.
(103)

(104)
If the Node to which datagram is being processed is router, it will decrement the
TTL field by one, if the value is less than or equal to zero, the packet will be discarded and I
CMP message is sent to sender (source). If the value of TTL (after decrementing) is greater or
equal to 1, processing module sends the packet to routing module.
(105)

Processing Module:

(106)
(107) (b)

(a) Take a datagram from one of the input queues.


If (destination address is 127. X. Y. Z (loopback packet) or (any one of the local

address)
(108)

(i) Send the datagram to reassembly module,

(109)

(ii) Return.

(110) (c)

If (machine is router)

(111)

(i) Discard the datagram.

(112)

(ii) Send an ICMP error message.

(113)

(iii) Return.

(114) (d)

If (Titlist< = 0)

(115)

(i) Discard the datagram.

(116)

(ii) Send an ICMP error message.

(117)

(iii) Return.

(e) Send the datagram to routing table.


(f) Return.
(118)

(3) Fragmentation Module:

(119) It receives an IP datagram from routing modules. The datagram contains address of
either next station or final destination and interface number through which the datagram is sent
out. The fragmentation module then checks the MTU table to find MTU for specific interface.
Depending on the MTU Fragmentation module fragments, the datagram if required, adds the
header to it and sends them to ARP package for address resolution.
(120)

Fragmentation Module:

(121)Receive: IP packet from routing module.

(1) Extract the size of datagram.

(2) Compare size with MTU.


(122)

If (Size > MTU of corresponding network)

(123)

2.1

If (D bit is set C = 1)

(a) Discard the datagram.


(b) Send ICMP error message.
(c) Return.
(124)

2.2

Else

(125)

(a) Calculate maximum size.

(b) Divide datagram into fragments.


(c) Add Header to fragments.
(d) Add options if required.
(e) Send the datagram.
(f) Return.
(3)

(126)
(127)

Else.

2.1 Send the datagram.

(128)

(4)

Stop.

(129)

(4) Reassembly Module:

(130) It receives datagram fragments from processing module, which have arrived at their
final destination. The module considers un-fragmented datagram as a single fragment.
(131) Since IP is a connectionless, unreliable protocol, it does not guarantee that fragments
will arrive in order at the destination. Hence it uses reassembly table to handle intermixed
fragments. For proper ordering of fragments. During the reassembly of fragments of a datagram
if established time-out has expired or any fragment is missing then the fragments are discarded.
(132)

Reassembly Module:

(133)

Receive: An IP datagram/fragments from the processing module.

(134)

(1)

If (offset value is zero and M bit is 0)

(a) Send the datagram to appropriate queue.


(b) Return.
(135)

(2) Search the reassembly table for the corresponding entry.


(3) If (not found)
(a) Create a new entry

(136)
(137)
(138)

(4)

Insert the fragments at the appropriate place in the linked list.

(a)

If (all fragments have

arrived)
(i) Reassemble the fragments
(139)

(ii) Deliver the datagram to the corresponding upper layer

protocol, (iii) Return.


(140)

(b)

(141)

Else.
(i) Check the time-out.

(142)

26

Internet Technologies

(B.Sc. IT)

(143)

(ii) If (time out is expired)

Discard the fragments.

Send ICMP error message.

(5) Stop
(5)

(144)

Routing Module:

(145) It receives IP packet from processing module. If a packet is to be forwarded it is passed


to this module. It finds the IP address of the next station along with interface number and sends
the packet to fragmentation module.
(146)

(6)

Routing Table:

(147)It is used by the routing module to determine next hop address of the packet.
(148)

(7)

MTU Table:

(149)It is used by fragmentation module to find maximum transfer unit of a particular


interface.
(150)

(8)

Queues:

(151)The package uses two types of queues: input queues and output queues.
(152)

store
datagrams
protocols.
(153)

coming

from

data

link

layer

or

the

Input
upper
'

queue
layer

Output queue store datagrams going to data link layer or the upper layer

protocols.
(154)

Processing module is responsible for removing datagrams from input queues

and,
(155)

(156)

2.7

Fragmentation and reassembly module adds the datagrams into output queues.

INTERNET PROTOCOL VERSION 6 (IPV6):

It was proposed to overcome some deficiencies present in IPV4. Though IPV4 is


a well designed data communication protocol it has some deficiencies like:
(157)

(1) Address depletion is still a problem with IPV4.


(2) IPV4 does not support some strategies and reservation of resources for real time audio
and video transmission.
(3) No encryption and authentication is available with IPV4. ,
IPV6 is now a standard and soon it will
replace
IPV4
but
its
adoption
is
very
slow.
It
is because of three short term remedies - classless addressing, use of Dynamic Host
Configuration Protocol (DHCP) for dynamic address allocation, and Network Address
(158)

Translation (NAT).

.'

(159)

of
internet
and
new
services
may require 1PV6 rather than IPV4.

such

as

mobile

But fast spreading use


IP,
IP
telephony,
,

IPV6 has following advantages over


..... ,

(160)

IPV4:

(161)(T) It has large address space i.e. 128 bits long. (IPV4 = 32 bits therefore 2 32 - 1

addresses possible). Therefore there is huge increment in addresses available 2 32


(162)
It has
new format for header in which options are separated front base header and inserted
when required, between base header and upper layer data which simplifies routing
process,
,]
Additional functionalities are added with use; of new options.. ,
+ 2%.

(2) It supports extension of the protocol to support new technologies. ;


(3) The type of service field is removed and a mechanism called as flow label has been
added to enable source to request special handling 'of the packet.
(4) The encryption and authentication options are provided to support confidentiality and
integrity of the packet.
(163)

IPV6 Addresses:

(164)

IPV6 addresses consists of 16 bytes since it is 128 bits long.

(165)To make it readable it uses hexadecimal colon notation, in which 128 bits are divided

into eight sections of 2 bytes in length. Hence, the address consists of 32 hexadecimal digits,
every four hexadecimal digits are separated by a colon. For e>..

(166)

(167)

If the address contains more zero digits, we can abbreviate it to make it more

readable.
(168)

For e.g.,

(169)

0075 can be written as 75

(170)

000E can be written as E

(171)

(172) IPV6 defines three types of addresses - uncast, any cast and multicast.
(173)A packet sent to uncast address is delivered to specific computer.
(174) Any cast address defines a group of computers with addresses having some prefix (i.e.
all computers connected to same physical network). Packet sent to any cast address will be
delivered to exactly one of the member of this group, (generally the closest or most easily
accessible).
(175)

A packet sent to multicast address must be delivered to each member of the

group.
(176)The designers of IPV6 divided the address space into two parts: (1) Type prefix

-variable length defines the purpose of address. (2) Rest of addresses.


(177)

(178)

The Prefixes for IPV6 addresses:

(179)

IPV6 Datagram:

(180)

(181)

'1) Version: This is a 4 bit field defining the version number of IP. Its value is 6 for

IPV6.
2) Priority: The 4-bit field defines the priority of packet with respect to traffic
congestion.

(182)

3) Flow Label: It is a 3 byte field provided for special handling for a particular
flow of data.

(183)

(184)

4) Payload Length: It defines the length of IP datagram excluding base header.

5) Next Header: This 8-bit field


defines
the
header
that
follows
the
base
header
in
datagram. The next header is either one of the optional header used by IP or header
of encapsulated packet such as UDP or TCP.
,

(185)

(186)

6) Hop Limit: This 8-bit field defines number of hops the datagram can travel

before
reaching the destination (same as TTL in IPV4).

(187)
(188)

"I Source Address: Source address is a 16 byte internet address that identifies the

original source of datagram.

Destination Address: It is a 16 byte field identifying the

destination internet address. Some Reference Tables related with Datagram: (1) Next
Header Codes:

2.10

(189)

(190)

(2) Priorities for Congestion-Controlled Traffic:

(191)

(192)

Flow Labels:

(193)
When a sequence of packets sent from a particular, source to particular destination
that needs special handling by routers is called as flow of packets. The combination of source
address and value of flow label uniquely defines a flow of packets. There are
(194)
. ihree rules defined to allow,
effective vise of flow labels.
-.;

(1): Flow label is assigned to a packet by the source host. Label is random number
between 224 - 1. Any source must not reuse flow label for new flow when existing

(195)

label is still alive.


(2)
if a host does not support flow label, it sets this field
to zero. If a router does not
support flow label it simply discards it.
(196)

(197)

(3)

All packets belonging to same flow have the same source, destination,

priority anc
(198)

options.
(199)

(200)

2.12 Comparison between IPV6 and IPV4 Packet


2.11

Header:

(201)

(202)

2.8

PROBLEMS:

Example 1:
An IP packet

(203)

has arrived with the first 8 bits' as shown 01.000010, the receiver discard
racket. Why?
Solution:

(204)

HLFN field is 0010,


(206)
.'. the header length is 2 x 4 = 8 bytes. But the in immure header length is 20
bytes. Therefore packet is discarded.
(205)

Example 2:'
(208) An IP packet has arrived with first few hexadecimal digits as shown below,
(209)45000028000100000102 is the packet discarded. How many hubs can this packet travel
r-c-ore being dropped? The data being to what upper layer protocol?

(207)

(210) elution:
(211) The even packet is distributed as

(212)

The first digit indicates the version IPV4 similarly. The time to live field is 01 in

(213)

hexadecimal i.e. 0000 0001 in binary, i.e. Value of TTL is 1. Therefore it can travel
through only one router. Therefore packet is discarded when it travels through 1st hub
and the protocol field is 02 i.e. the upper layer protocol used is IGMP.
Example 3:
(215)
An IP packet the value of header length is 1000 in binary. How many bytes of

(214)

options being carried by this packet? Solution:


(216)

The size of header is 8 x 4 = 32 bytes.

(217)

Minimum size of header is 20 bytes

(218)

.-. Options available with the given packet are of 32 - 20 = 12 bytes.

(219) Example 4:
(220)
In an IP packet, value of header length is (10)i6 and the value of total length field

is (0238)i6. How many bytes of data is being carried by this packet?


(221)

Solution:
Header length = (10)w =

(222)

(10 10)2 HLEN


=8x4+2x4
= 32 + 8 = 40

(223)

bytes
(0238)16
0000

0010

0011

1000

512 + 32 + 16 + 8 = 568

(224)

Packet length = Total length -

(225)

H Length * 568 - 40 = 528


bytes
(226) Example 5:

An IP datagram has arrived with the following information in the header (in

(227)

hexadecimal)
(228)

4500005400030000200600007C4E0302B40EOf0

2
(229)

Then answer the following questions:

(a) What is the size of data?


(b) Which version of the protocol is used?
(c) Are there any options?
(d) Is checksum used?

'

(e) How many more routers can the packet travel to?
(f) Is the packet fragmented?
(g) What is the identification, number? (h)
What is the type of service?
Solution:

(e)
(f)

First draw the Datagram with appropriate values given:

(g)

(h) (a) Version field is 4. Therefore version of the protocol is IPV4.


(i)

(b) Haleness.
(j) 5 x 4 = 20 bytes.
(k) Length of header is 20 bytes.
(l) Since header length is of minimum length/size.

(m) (c) Total length field is 0054 in Hex = 0000 0000 0101 0100 in binary.

.-. Total Length = 64 + 16 + 4 = 84 bytes.


(n) .-. Length of data is 84 - 20 = 64 bytes.

Data length = total length - HLEN.


(d) The checksum field is 0000.
Here no checksum is used.
(e) Identification field is 0003.
(o)

Hence identification number is 3.


(p) (f) The TTL field is 20 in Hex = 00100000 in binary. Hence the datagram can travel

through 32 routers.
2.13 (g) Fragmentation is decided by flags and flags are
000.

(q)

2.14

(r) When D = 0 means datagram can be fragmented If required. '

(s) M = 0 means this is a last or only fragment.

Therefore we can say that this is a last


fragment but we can also conclude that since fragmentation is allowed the packet may he
previously fragmented; ,
;
(t) (h) The protocol field in- .06.; ., .

Therefore the upper layer protocol in TCP

(u)

Example 6:
(w) In a datagram, the M bit is 0, the value of HLEN is 5, value of total length is 200 and
offset value is 200. What is the first byte number and last byte number of datagram?
(v)

Is this the first, last or middle

(x)

fragment? "
Solution:

(y)

(z) Since M bit is 0, it means there are no more fragments used. Hence this is the last

fragment.
(aa) Since HLEN - 5, Header length = 5 x 4 = 20 bytes, Total length = 200.

'

(ab) Hence length of data = 200 - 20 = 180 bytes.


(ac) Also offset is given = 200.
(ad)

200 x 8 = 1600 which is the first byte number.

(ae) Since there are 180 bytes of data more 179 bytes are required for 180 bytes of

data. .'.1600 + 179 = 1779.


(af) 1779 is the last byte

number. Example 7:
(ag) A packet is arrived with M value 1 and offset 0. Is this the first, last or middle fragment?
Solution:
(ai) Since M bit is 1, it means that it is not last fragment and may be fragmented and since
offset is 0, its starting byte number is 0, hence it is the first byte, ,
(ah)

(aj)

Example 8: The value of Header length is 7 and total length is 64 bytes how much size of options and
data is carried by the datagram?. Solution: HLEN is 7.
(ak) .;. 7 x 4 = 28 bytes is the header length.
(al)

Minimum length of Header = 20 bytes and remaining are the options. Hence, 28

- 20 = 8 bytes are for options. Also total length = 64 bytes. Size of data = total length HLEN = 64-28 = 36 bytes.
(am)

QUESTIONS

(an) (1)Draw an IP datagram header format, (May 11)


(ao) (2)Explain Different Types of options used in IP.
(ap) (3)Explain checksum calculation in IP.
(aq) (4)Why fragmentation is used in IP? Explain the fields related with it.
(5) Explain IP Package.
(6) Explain differentiated services of the IP datagram? (Oct. 08, 5 marks)
(7) Define checksum in IP. Explain checksum calculation at the receiver with the help of diagram?
(Oct. 08, 7 marks)
(ar) (8)Explain Fragmentation, Why it is required to fragment an IP datagram? Explain related to
fragmentation?
(as)
(i) Identification.
(at)
(ii) Flags.
(au)
(iii) Fragmentation offset. Explain with example. (Oct. 08, 8 marks)
(av)
(9)
Explain header description, total length, protocol and time to live fields of the IP
datagram 'format? (May 08,8 marks)
' ( 10) Explain option format of Internet Protocol. Explain
strict source route and timestamp , option in detail? (May 08,8 marks)
(11) Draw the IP packet format and explain each of its fields? (May 07,8 marks)
(12) Draw the IP packet format and explain each of its field. Which field of the IP header change from
router to router? (May 05, 8 marks)
(aw) (13)
What is fragmentation? Which are the fields of IP datagram related to fragmentation?
How? (May 09, 5 marks)
(ax) (14)
Draw and explain the different fields in IP header. (May 09, 8 marks)

Vous aimerez peut-être aussi