Anda di halaman 1dari 15

BCS-041 solved

ed ass
assignment july 2017- january
jan
2018 session
Q.1. (a) Differentiate between
n Go Bac
Back-N ARQ with Selective Repeat ARQ. Also,, explain the
disadvantages of stop-and-wait- ARQ in comparision to Go Back-N ARQ protocol.

A.1.(a)

Go-Back-N Protocol and “Selective


ctive Re
Repeat Protocol” are the sliding window protocols.
ocols. The
Th sliding
window protocol is primarily an error control protocol, i.e. it is a method of error detection
detectio and error
correction. The basic difference
ce betwe
between go-back-n protocol and selective repeatt protocol
protoco is that the
“go-back-n protocol” retransmits
its all th
the frames that lie after the frame which is damaged
amaged or lost. The
“selective repeat protocol” retransmit
transmits only that frame which is damaged or lost.
Comparison Chart :-

BASIS FOR
GO-BACK-N SELECTIVE REPEAT
COMPARISON

Basic Retransmits
mits all tthe frames that sent Retransmits only
ly those frames that
after thee frame which suspects to be are suspected to
o lost or damaged.
damaged d or lost
lost.

Bandwidth If error rate is h


high, it wastes a lot of Comparatively less bandwidth
ban is
Utilization bandwidth. wasted in retransmittin
nsmitting.
BASIS FOR
GO-BACK-N SELECTIVE REPEAT
COMPARISON

Complexity Less complicated. More complex as it require to apply


extra logic and sorting and storage,
at sender and receiver.

Window size N-1 <= (N+1)/2

Sorting Sorting is neither required at sender Receiver must be able to sort as it


side nor at receiver side. has to maintain the sequence of the
frames.

Storing Receiver do not store the frames Receiver stores the frames received
received after the damaged frame after the damaged frame in the
until the damaged frame is buffer until the damaged frame is
retransmitted. replaced.

Searching No searching of frame is required The sender must be able to search


neither on sender side nor on and select only the requested frame.
receiver

ACK Numbers NAK number refer to the next NAK number refer to the frame lost.
expected frame number.

Use It more often used. It is less in practice because of its


complexity.
Definition of Go-Back-N
Go-Back-N protocol is a sliding window protocol. It is a mechanism to detect and control the error in
datalink layer. During transmission of frames between sender and receiver, if a frame is damaged, lost,
or an acknowledgement is lost then the action performed by sender and receiver is explained in the
following content.
(b) Describe the architecture of an A
ATM network. Also, differentiate between two types
type of
connections: PVC and SVC used ed in AT
ATM.

Ans (b)

How ATM Works


Asynchronous transfer mode (ATM) is one of many network transmission protocols ols included
includ in Windows
Server 2003. The most commonlyonly use
used transmission protocol included in Windowss Server
Serve 20003 is
TCP/IP, which is a connectionless
less prot
protocol. As such, TCP/IP cannot offer some of the advantages
adva that a
connection-oriented, virtual circuit,
ircuit, pa
packet-switching technology, such as ATM, can.
an. Unlike
Unlik most
connectionless networking protocols,
otocols, ATM is a deterministic networking system — it provides
prov
predictable, guaranteed quality
ity of ser
service.
The ideal environment in whichch to use ATM is one that combines computer, voice, e, and video
vi networking
into a single network, and the combin
combination of existing networks into a single infrastructur
astructure.

ATM Architecture
ATM is a combination of hardware
ware anand software that can provide either an end-to-end
end network
ne or form
a high-speed backbone. The structure
tructure of ATM and its software components comprise
prise the ATM
architecture, as the following illustrati
illustration shows. The primary layers of ATM are the
he physical
physic layer, the
ATM layer, and the ATM Adaptation
tation la
layer.
ATM Architectural Diagram
Each layer and sublayer is described
cribed b
briefly in the following table, “ATM Layers.”
ATM Layers

Layer Function

ATM The ATM Adaptation


aptation layer facilitates the use of packets larger
ger than a cell.
Adaptation Packets are segmen
segmented by the ATM interface, transmitted individually,
individua and then
reassembledd on the receiving end. The ATM Adaptation Layer yer includes
inclu the
Segmentation
on and RReassembly and Convergence sublayers.

ATM The ATM layer


yer regu
regulates cells and cell transport and establishes
ishes and releases
Virtual Circuits.
its. The ATM layer has no sublayers

Physical The Physicall layer re


represents the physical medium and regulates
ulates Physical
Ph layer
functions such
ch as vo
voltages and bit timing. The Physical layer consist
nsists of the
Transmissionn Conve
Convergence and the Physical Medium Dependent ndent sublayers
su

PVC vs SVC
PVC and SVC are different typeses of vir
virtual circuits. “PVC” stands for “Permanent Virtual Circuit”
C and
“SVC” stands for “Switched Virtual
irtual Cir
Circuit.” Both PVC and SVC play the main role in networks
netwo like Frame
Relay and X.25. They are also used in A ATM machines. To understand their differences,
nces, let us first
understand what Frame Relayy and X.2 X.25 networks are.
Frame Relay Networks
Frame Relay network is a protocol for a data link network. These networks are specially
ecially designed
d for
transferring data on WANs or wide arearea networks. Frame Relay works on ISDN lines es or fiber
fib optics; they
offer low latency and corrects errors tthus reducing the overhead. The protocol provides
rovides cost-effective
c
telecommunication which has been adopted by companies to transfer long-distance nce data.
data In recent
times, the popularity of relay network
networks is diminishing due to the gradual migration towards
towar IP or
Internet Protocol based solutions.

PVC (Permanent Virtual Circuit)


PVC is a virtual circuit which iss availab
available permanently. It is a type of virtual circuit where the
t end points
do not signal the circuit. The virtual cicircuit values are manual. The route through the network,
netw link-by-
link is also manual. If the equipment
ipment h happens to fail, the PVC also fails, and the physical
hysical network
n has to
re-route. The permanent virtual al circui
circuit is an efficient circuit for hosts which have to
communicate frequently like ATMs.
SVC (Switched Virtual Circuit)
SVC has to re-establish the connection every time the data has to be sent. It is a circuit established by
UNI. It is basically a demand connection; the connection is initiated by the user. When the switch fails,
the SVC fails, and the connection needs to be re-established.
Q.2.(a) Differentiate between switch and bridge? What are the advantages of separating an Ethernet
LAN using a bridge? Explain.

A.2.(a) Bridge
A bridge is a product that connects a local area network (LAN) to another local area network that uses
the same protocol (for example, Ethernet or token ring). You can envision a bridge as being a device that
decides whether a message from you to someone else is going to the local area network in your building
or to someone on the local area network in the building across the street. A bridge examines each
message on a LAN, "passing" those known to be within the same LAN, and forwarding those known to
be on the other interconnected LAN (or LANs).In bridging networks, computer or node addresses have
no specific relationship to location. For this reason, messages are sent out to every address on the
network and accepted only by the intended destination node. Bridges learn which addresses are on
which network and develop a learning table so that subsequent messages can be forwarded to the right
network.

Switch
A switch is a network device that selects a path or circuit for sending a unit of data to its next
destination. A switch may also include the function of the router, a device or program that can
determine the route and specifically what adjacent network point the data should be sent to. In general,
a switch is a simpler and faster mechanism than a router, which requires knowledge about the network
and how to determine the route.

(b) Write the role of DNS resolver in the DNS system. Also, explain how does a DNS Resolver
bootstrap the domain name lookup process?

Ans2(b)
DNS resolvers play a key role in converting Web links to IP addresses, acting as a link between your
computer and the Internet's DNS infrastructure. A DNS resolver is a local server that stores a central
database of DNS nameservers and manages DNS requests for all the clients on your network. With DNS
resolvers, your computer does not need to store addresses for multiple online nameservers, a process
which is difficult to manage effectively.
How DNS Works
DNS systems allow network clients to convert Universal Resource Locators, or URLs, into IP addresses.
This is a key part of network operation, as computers and other devices generally need to know each
other's IP address in order to communicate over a network. When you provide your computer with a
Web link, the computer issues a DNS request asking for the IP address that corresponds to that address.
The DNS then responds with the corresponding address, allowing the computer to communicate with
the server that hosts that site.

Role of Resolvers
A DNS resolver is a server that acts as a “first port of call” in the DNS process. When a network client
contacts a resolver, that resolver contacts multiple authoritative nameservers -- the servers that actually
hold the IP address information -- in order to get the necessary IP address. DNS requests may involve
nameservers all over the world.
DNS Resolver bootstrap the domain name lookup process
The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services,
or other resources connected to the Internet or a private network. It associates various information
with domain names assigned to each of the participating entities. Most prominently, it translates more
readily memorized domain names to the numerical IP addresses needed for locating and identifying
computer services and devices with the underlying network protocols. By providing a worldwide,
distributed directory service, the Domain Name System is an essential component of the functionality
on the Internet, that has been in use since 1985.
The Domain Name System delegates the responsibility of assigning domain names and mapping those
names to Internet resources by designating authoritative name servers for each domain. Network
administrators may delegate authority over sub-domains of their allocated name space to other name
servers. This mechanism provides distributed and fault tolerant service and was designed to avoid a
single large central database.
The Domain Name System also specifies the technical functionality of the database service that is at its
core. It defines the DNS protocol, a detailed specification of the data structures and data communication
exchanges used in the DNS, as part of the Internet Protocol Suite. Historically, other directory services
preceding DNS were not scalable to large or global directories as they were originally based on text files,
prominently the HOSTS.TXT resolver.
The Internet maintains two principal namespaces, the domain name hierarchy and the Internet
Protocol (IP) address spaces. The Domain Name System maintains the domain name hierarchy and
provides translation services between it and the address spaces. Internet name servers and a
communication protocol implement the Domain Name System.A DNS name server is a server that stores
the DNS records for a domain; a DNS name server responds with answers to queries against its
database.

The most common types of records stored in the DNS database are for Start of Authority (SOA), IP
addresses (A and AAAA), SMTP mail exchangers (MX), name servers (NS), pointers for reverse DNS
lookups (PTR), and domain name aliases (CNAME). Although not intended to be a general purpose
database, DNS can store records for other types of data for either automatic lookups, such
as DNSSEC records, or for human queries such as responsible person (RP) records. As a general purpose
database, the DNS has also been used in combating unsolicited email (spam) by storing a real-time
blackhole list. The DNS database is traditionally stored in a structured zone file.
3. (a) Explain masking used in addressing with the help of a suitable example. Also, difference
between boundary level masking and non-boundary level masking.

Ans 3(a)

Sub network address is the address, which is depends upon the IP address and what class is used in IP
address. Class of IP address may be the A, B, C. In organization we need to use sub-netting. In sub-
netting IP address is split into the many sub-network address. Sub-netting allows us to split network
address into several parts of internal use. If we done sub-netting then outside world only see the single
network address or act as single network.
Here the term mask address is used; mask address is the address which extracts the address of the
physical network address from the given IP address.
Masking is two types. First one is the boundary level masking and second one is the Non boundary level
masking. If the mask address is contain only 0 or 255 then this mask is the boundary level masking. And
if the mask numbers are not just 0 or 255 then it is non boundary level masking.
Masking address may be given in two ways. In first way mask address is written looks like the IP
address. Ex- 255.255.0.0
And in second way the mask is given in numbers, the number is appended to IP address after slash.
Ex- 45.23.21.8/26
If the mask is given in slash number form then we need to calculate the mask address from this. For this
write down the number of 1’s as given after slash. And complete the total 32 bits (if the IPv4 ) using fill
0’ in right side. And then divide in 8 bit groups. Write down the equivalent decimal value of each group.
Just like the for- 45.23.21.8/26
11111111. 11111111 .11111111 .11000000
Mask address is 255.255.255.192
Now let’s see how to find sub-network address. At first check which type of mask address is given either
boundary level or non boundary level?
Sub-network address if boundary level mask is given:-
If the mask address is boundary level then it is very easy to find out the sub-network address from IP
address and mask.
For this write down mask address below the IP address.
If mask bytes is 255 then IP address bytes is repeated in sub-network address.
And if bytes in the IP address that correspond to 0 in mask then put 0 in sub-network address.
Let’s take an example-
IP- 46.24.22.8
Mask- 255.255.0.0

Sub-network address is 46.24.0.0


(b) Classify the routing protocols based on different parameters. Why is adaptive routing superior to
non adaptive routing? Explain.

Ans(b)
Adaptive routing, also called dynamic routing, is a process for determining the optimal path a
data packet should follow through a network to arrive at a specific destination. Adaptive routing can be
compared to a commuter taking a different route to work after learning that traffic on his usual route is
backed up.
Adaptive routing uses algorithms and routing protocols that read and respond to changes in network
topology. In addition to Open Shortest Path First (OSPF), other routing protocols that facilitate adaptive
routing include Intermediate System to Intermediate System (IS-IS) protocol for large networks such as
the internet and routing information protocol (RIP) for short-distance transport.
Advantages and challenges of adaptive routing
The purpose of adaptive routing is to help prevent packet delivery failure, improve network
performance and relieve network congestion. Adaptive routing can cause nodes to become overloaded,
however, due to the complex processing decisions they make. Because routers share information about
the network topology, adaptive routing can be less secure than non-adaptive routing processes and
require more bandwidth.

(c) Discuss the various types of encoding and modulation techniques used in Data communication.
Ans (c)
Encoding is the process of converting the data or a given sequence of characters, symbols, alphabets
etc., into a specified format, for the secured transmission of data. Decoding is the reverse process of
encoding which is to extract the information from the converted format.
Data Encoding
Encoding Techniques

NRZ - L (NRZ – LEVEL)


Bi-phase Manchester
Differential Manchester

Q4. (a) Differentiate between analog and digital transmission. Give examples of each.
A4(a) Analog vs. Digital Transmission
Encoding is the process of using various patterns of voltage or current levels to represent 1s and 0s of
the digital signals on the transmission link.
The common types of line encoding are Unipolar, Polar, Bipolar, and Manchester.
The data encoding technique is divided into the following types, depending upon the type of data
conversion.
Analog data to Analog signals − The modulaRon techniques such as Amplitude Modulation, Frequency
Modulation and Phase Modulation of analog signals, fall under this category.
Analog data to Digital signals − This process can be termed as digiRzaRon, which is done by Pulse Code
Modulation (PCM). Hence, it is nothing but digital modulation. As we have already discussed, sampling
and quantization are the important factors in this. Delta Modulation gives a better output than PCM.
Digital data to Analog signals − The modulaRon techniques such as Amplitude Shift Keying (ASK),
Frequency Shift Keying (FSK), Phase Shift Keying (PSK), etc., fall under this category. These will be
discussed in subsequent chapters.
Digital data to Digital signals − These are in this secRon. There are several ways to map digital data to
digital signals. Some of them are −
Non Return to Zero (NRZ)
NRZ Codes has 1 for High voltage level and 0 for Low voltage level. The main behavior of NRZ codes is
that the voltage level remains constant during bit interval. The end or start of a bit will not be indicated
and it will maintain the same voltage state, if the value of the previous bit and the value of the present
bit are same.
The following figure explains the concept of NRZ coding.
If the above example is considered, as there is a long sequence of constant voltage level and the clock
synchronization may be lost due to the absence of bit interval, it becomes difficult for the receiver to
differentiate between 0 and 1.
There are two variations in NRZ namely −
There is a change in the polarity of the signal, only when the incoming signal changes from 1 to 0 or
from 0 to 1. It is the same as NRZ, however, the first bit of the input signal should have a change of
polarity.
NRZ - I (NRZ – INVERTED)
If a 1 occurs at the incoming signal, then there occurs a transition at the beginning of the bit interval. For
a 0 at the incoming signal, there is no transition at the beginning of the bit interval.
NRZ codes has a disadvantage that the synchronization of the transmitter clock with the receiver clock
gets completely disturbed, when there is a string of 1s and 0s. Hence, a separate clock line needs to be
provided.
Bi-phase Encoding
The signal level is checked twice for every bit time, both initially and in the middle. Hence, the clock rate
is double the data transfer rate and thus the modulation rate is also doubled. The clock is taken from the
signal itself. The bandwidth required for this coding is greater.
There are two types of Bi-phase Encoding.
Bi-phase Manchester
In this type of coding, the transition is done at the middle of the bit-interval. The transition for the
resultant pulse is from High to Low in the middle of the interval, for the input bit 1. While the transition
is from Low to High for the input bit 0.
Differential Manchester
In this type of coding, there always occurs a transition in the middle of the bit interval. If there occurs a
transition at the beginning of the bit interval, then the input bit is 0. If no transition occurs at the
beginning of the bit interval, then the input bit is 1.
The following figure illustrates the waveforms of NRZ-L, NRZ-I, Bi-phase Manchester and Differential
Manchester coding for different digital inputs.
Analog transmission is a method of conveying voice, data, image, signal, or video information. It uses a
continuous signal varying in amplitude, phase, or another property that is in proportion to a specific
characteristic of a variable. Analog transmission could mean that the transmission is a transfer of an
analog source signal which uses an analog modulation method (or a variance of one or more properties
of high frequency periodic waveform, also known as a carrier signal). FM and AM are examples of such a
modulation. The transmission could also use no modulation at all. It is most notably
an information signal that is constantly varying.
Data transmission (also known as digital transmission or digital communications) is a literal transfer
of data over a point to point (or point to multipoint) transmission medium –such as copper wires, optical
fibres, wireless communications media, or storage media. The data that is to be transferred is often
represented as an electro-magnetic signal (such as a microwave). Digital transmission transfers
messages discretely. These messages are represented by a sequence of pulses via a line code. However,
these messages can also be represented by a limited set of wave forms that always vary. Either way,
they are represented using a digital modulation method.
Analog transmission is capable of being conveyed in a no fewer than four ways: through a twisted pair
or coax cable, through a fibre optic cable, through the air, or through water. There are, however, only
two basic types of analog transmission. The first is known as amplitude modulation (or AM). This is a
technique used in electronic communication and works by alternating the strength of a transmitted
signal in relation to the information that is being sent. The second is known as frequency modulation (or
FM). This type of communication conveys information over a carrier wave, just as AM transmission.
However, FM communication alternates the frequency of the transmitted signal.
Data that is transmitted via digital transmission may be digital messages that have origins for a data
source (a computer or a keyboard, for example). However, this transmitted data may also be from an
analog signal (a phone call or a video signal, for example). It may then be digitized into a bit stream using
pulse code modulation (or PCM) –or even more advanced source coding schemes. The coding of the
data is carried out using codec equipment.

(b) List the requirements to connect two different networks (Ethernet and Token ring) in the lower
layers?

Ans(b)
Types of Network Protocols
Ethernet
Local Talk
Token Ring
FDDI
ATM

Rules of Network Protocol include guidelines that regulate the following characteristics of a network:
access method, allowed physical topologies, types of cabling, and speed of data transfer.
The most common network protocols are:
The followings are some commonly used network symbols to draw different kinds of network protocols.
Ethernet
The Ethernet protocol is by farr the mo most widely used one. Ethernet uses an accesss method
metho called
CSMA/CD (Carrier Sense Multiple iple Acce
Access/Collision Detection). This is a system where ere each computer
listens to the cable before sending
ding anyanything through the network. If the network is clear, the computer
will transmit. If some other nodes
odes hav have already transmitted on the cable, the computer puter will
w wait and try
again when the line is clear. Sometime
ometimes, two computers attempt to transmit at the he same instant. A
collision occurs when this happens.
pens. Ea Each computer then backs off and waits a random om amount
am of time
before attempting to retransmit. it. With this access method, it is normal to have collisions.
llisions. However, the
delay caused by collisions and retrans
retransmitting is very small and does not normally effect the th speed of
transmission on the network.
The Ethernet protocol allows for linea
linear bus, star, or tree topologies. Data can be transmitted
transmit over
wireless access points, twistedd pair, co coaxial, or fiber optic cable at a speed of 10 Mbps
bps up to 1000 Mbps.
Fast Ethernet
To allow for an increased speeded of tra transmission, the Ethernet protocol has developedoped a new
n standard
that supports 100 Mbps. This is commcommonly called Fast Ethernet. Fast Ethernet requires uires the
th application of
different, more expensive network
twork co concentrators/hubs and network interface cards. rds. In addition,
ad
category 5 twisted pair or fiberr optic ccable is necessary. Fast Ethernet is becomingg commoncomm in schools
that have been recently wired.
Local Talk
Local Talk is a network protocolol that w was developed by Apple Computer, Inc. for Macintosh
Macinto computers.
The method used by Local Talk lk is calle
called CSMA/CA (Carrier Sense Multiple Access with Collision
Col
Avoidance). It is similar to CSMA/CD
A/CD eexcept that a computer signals its intent to transmit
ransmit before it
actually does so. Local Talk adapters
apters aand special twisted pair cable can be used to o connect
connec a series of
computers through the serial port. Th The Macintosh operating system allows the establishm
stablishment of a peer-
to-peer network without the need for additional software. With the addition of the he server
serve version of
AppleShare software, a client/server
/server n network can be established.
The Local Talk protocol allowss for line
linear bus, star, or tree topologies using twisted d pair cable.
ca A primary
disadvantage of Local Talk is low
ow spee
speed. Its speed of transmission is only 230 Kbps.
Token Ring
The Token Ring protocol was develope
developed by IBM in the mid-1980s. The access method thod used
use involves
token-passing. In Token Ring, the com computers are connected so that the signal travels vels around
arou the
network from one computer to anoth another in a logical ring. A single electronic token moves around the ring
from one computer to the next. xt. If a co computer does not have information to transmit,smit, it simply
s passes
the token on to the next workstation.
station. If a computer wishes to transmit and receives ves an empty
em token, it
attaches data to the token. Thee token then proceeds around the ring until it comes es to the computer for
which the data is meant. At this is point
point, the data is captured by the receiving computer. uter. The
Th Token Ring
protocol requires a star-wired ring using twisted pair or fiber optic cable. It can operate at transmission
speeds of 4 Mbps or 16 Mbps. Due to the increasing popularity of Ethernet, the use of Token Ring in
school environments has decreased.

(c) Explain the limitations of distance vector routing algorithm.

Ans(c)

(d) Explain the significance and use of different fields of TCP header and IP header with the help of
neat diagrams.

Ans(d) IP Layer in TCP/IP Suite


IP protocol is one of the main protoco
protocols in the TCP/IP stack.
It is in the form of IP datagramss that all the TCP, UDP, ICMP and IGMP data travels ls over the
th network.
IP is connection less and unreliable
liable pr
protocol. It is connection less in the sense thatt no state
stat related to IP
datagrams is maintained either er on sou
source or destination side and it is unreliable in
n the sense
se that it not
guaranteed that an IP data gram am will gget delivered to the destination or not.
If an IP datagram encounters some er error at the destination or at some intermediateate host (while
traveling from source to destination)
ination) tthen the IP datagram is generally discarded and an ICMPI error
message is sent back to the source.
ource.

As can be seen from the imagee above, the IP protocol sits at the layer-2 of TCP/IP protocol
protoco suite ie the
Internet layer. Another point worth nonoting here is how the data is packed in TCP/IP
IP suite. If we analyze
the figure above, we see :
The application layer sends thee data (t
(to be transferred to remote destination ) to the transport
tran layer.
The transport layer puts its header
ader in the beginning and sends this complete packetket (TCP-header
(TCP + app-
data) to the IP layer.
On the same lines, The IP layerr puts it
its header in front of the data received from TCP (Note
(No that data
received from TCP = TCP-header er + app
app-data).
So now the structure of IP datagram
tagram b becomes IP-header + TCP-header + app-data.
This IP datagram is passed to the ethe
ethernet layer which on the same lines adds its own header
hea to IP
datagram and then the whole packet is transmitted over network.
On the destination host, the reverse
everse pprocess happens. This means that each layerr reads its
it own header
in the packet and then strips the head
header so that finally application receives the app-data.
data.
IP Header
Protocol Version(4 bits) : This is the fir first field in the protocol header. This field occupies
cupies 4 bits. This
signifies the current IP protocol versio
version being used. Most common version of IP protocol rotocol being used is
version 4 while version 6 is outt in mar market and fast gaining popularity.
Header Length(4 bits) : This field
eld provi
provides the length of the IP header. The length of the header h is
represented in 32 bit words. This his leng
length also includes IP options (if any). Since thisis field is of 4 bits so the
maximum header length allowed ed is 60 bytes. Usually when no options are presentt then the th value of this
field is 5. Here 5 means five 322 bit worwords ie 5 *4 = 20 bytes.
Type of service(8 bits) : The first
rst three bits of this field are known as precedence bits and are ignored as
of today. The next 4 bits represent
esent typtype of service and the last bit is left unused. The 4 bits
bit that
represent TOS are : minimize delay, m maximize throughput, maximize reliability and d minimize
minim monetary
cost.
Total length(16 bits): This represents
resents tthe total IP datagram length in bytes. Since the headerhead length
(described above) gives the length ngth of h header and this field gives total length so the length of data and its
starting point can easily be calculated
lculated using these two fields. Since this is a 16 bit field and it represents
length of IP datagram so the maximum aximum size of IP datagram can be 65535 bytes. When hen IP fragmentation
f
takes place over the network then val value of this field also changes. There are casess when IP datagrams
are very small in length but some me data links like ethernet pad these small frames to be of a minimum
length ie 46 bytes. So to know the exa exact length of IP header in case of ethernet padding
adding this
t field comes
in handy.
Identification(16 bits): This fieldld is use
used for uniquely identifying the IP datagrams.. This valueval is
incremented every-time an IP datagradatagram is sent from source to the destination. This his field comes in handy
while reassembly of fragmented ted IP dadata grams.
Flags(3 bits): This field comprises
ises of ththree bits. While the first bit is kept reserved as of now,
no the next
two bits have their own importance.
rtance. TThe second bit represents the ‘Don’t Fragment’ ent’ bit. When this bit is
set then IP datagram is never fragmen
fragmented, rather its thrown away if a requirement nt for fragment
fra arises.
The third bit represents the ‘More ore Fra
Fragment’ bit. If this bit is set then it represents
ts a fragmented
fragm IP
datagram that has more fragments ents aft
after it. In case of last fragment of an IP datagram
ram this bit is not set
signifying that this is the last fragment of a particular IP datagram.
Fragment offset(13 bits): In case se of fra
fragmented IP data grams, this field contains the offset(
offse in terms of 8
bytes units) from the start of IP datagr
datagram. So again, this field is used in reassembly ly of fragmented
frag IP
datagrams.
Time to live(8 bits) : This value represents number of hops that the IP datagram will go through before
being discarded. The value of this field in the beginning is set to be around 32 or 64 (lets say) but at
every hop over the network this field is decremented by one. When this field becomes zero, the data
gram is discarded. So, we see that this field literally means the effective lifetime for a datagram on
network.
Protocol(8 bits) : This field represents the transport layer protocol that handed over data to IP layer. This
field comes in handy when the data is demultiplex-ed at the destination as in that case IP would need to
know which protocol to hand over the data to.
Header Checksum(16 bits) : This fields represents a value that is calculated using an algorithm covering
all the fields in header (assuming this very field to be zero). This value is calculated and stored in header
when IP data gram is sent from source to destination and at the destination side this checksum is again
calculated and verified against the checksum present in header. If the value is same then the datagram
was not corrupted else its assumed that data gram was received corrupted. So this field is used to check
the integrity of an IP datagram.
Source and destination IP(32 bits each) : These fields store the source and destination address
respectively. Since size of these fields is 32 bits each so an IP address os maximum length of 32 bits can
be used. So we see that this limits the number of IP addresses that can be used. To counter this
problem, IP V6 has been introduced which increases this capacity.
Options(Variable length) : This field represents a list of options that are active for a particular IP
datagram. This is an optional field that could be or could not be present. If any option is present in the
header then the first byte is represented as follows :
0 1 2 3 4 5 6 7
copy flagoption classoption num
In the description above, the ‘copy flag’ means that copy this option to all the fragments in case this IP
datagram gets fragmented. The ‘option class’ represents the following values : 0 -> control, 1-> reserved,
2 -> debugging and measurement, and 3 -> reserved. Some of the options are given below :
classnumber lengthdescription
0 0 – end of option list
0 1 – no operation
0 2 11 security
0 3 var. loose source routing
0 9 var. strict source routing
0 7 var. record route
0 8 4 stream id
2 4 var. INTERNET time stamp
Data: This field contains the data from the protocol layer that has handed over the data to IP layer.
Generally this data field contains the header and data of the transport layer protocols. Please note that
each TCP/IP layer protocol attaches its own header at the beginning of the data it receives from other
layers in case of source host and in case of destination host each protocol strips its own header and
sends the rest of the data to the next layer.

Anda mungkin juga menyukai