You are on page 1of 15

February 2010

Master of Computer Application (MCA) – Semester 3

MC0075 – Computer Networks
Assignment Set – 2

1. Explain the following design issues regarding the Data

Link Layer:
A) Framing B) Error Control C) Flow
Ans –

A) Framing

The DLL translates the physical layer’s raw bit stream into discrete
units (messages) called frames. That is because the physical layer just
accepts a raw bit stream and to deliver it to the destination. This bit stream
is not guaranteed to be error free. The number of bits received may be less
than, equal to, or more than the number of bits transmitted. They may also
have different values. It is up to DLL to detect and if necessary correct
errors. If not correct at least detect errors and take proper action like ask
for retransmission etc. The usual approach of DLL is to break the bit stream
up into discrete frames and then for the purpose of error detection or
correction, it uses some coding technique that finds some checksum for
each frame. When a frame arrives at the destination, the checksum is
recomputed. If the newly computed checksum is different from the one
contained in the frame, the DLL knows that an error has occurred and takes
steps to deal with it.

Now the question is how can the receiver detect frame boundaries?
That is, how can the receiver recognize the start and end of a frame? Thus
breaking the bit streams up into frames is more difficult than it appears to
be. One way is to insert time gaps between frames, much like spaces used
between words in ordinary text. But hardly networks make any guarantees
about timings, since it is too risky to count on timings to mark start and end
of each frame, other framing techniques have been devised and discussed
below. Here in this unit we discuss four methods, that are used or even
combinations of these methods are used in different protocols.

B) Error control
Error control is concerned with insuring that all frames are eventually
delivered and possibly in order to a destination as they are sent from the
source. How? Three items are required.


Typically, reliable delivery is achieved using the “acknowledgments

with retransmission’’. Here the receiver returns a special acknowledgment
(ACK) frame to the sender indicating the correct receipt of a frame. In some
systems, the receiver also returns a negative acknowledgment (NACK) for
incorrectly-received frames. This is nothing more than a hint to the sender
so that it can retransmit a frame right away without waiting for a timer to


One problem that simple ACK/NACK schemes fail to address is

recovering from a frame that is lost, and as a result, fails to solicit an ACK or
NACK. What happens if an ACK or NACK becomes lost? Retransmission
timers are used to resend frames that don’t produce an ACK. When sending
a frame, schedule a timer to expire at some time after the ACK should have
been returned. If the timer goes off, retransmit the frame.

Sequence Numbers:

Retransmissions introduce the possibility of duplicate frames. To

suppress duplicates, add sequence numbers to each frame, so that a
receiver can distinguish between new frames and old copies.

In data communication, line noise is a fact of life (e.g., signal

attenuation, natural phenomenon such as lightning, and the telephone
repairman). Moreover, noise usually occurs as bursts rather than
independent, single bit errors. For example, a burst of lightning will affect a
set of bits for a short time after the lightning strike. Detecting and
correcting errors requires redundancy — sending additional information
along with the data.

C) Flow control

Flow control deals with throttling the speed of the sender to match
that of the receiver. Usually, this is a dynamic process, as the receiving
speed depends on such changing factors as the load, and availability of
buffer space.

There are two approaches

1. feedback-based flow control

2. rate based flow control

In feedback-based flow control, the receiver sends back information

to the sender giving it permission to send more data or at least telling the
sender how the receiver is doing.

In rate based flow control, the protocol has a built in mechanism that
limits the rate at which senders may transmit the data without using
feedback from the receiver.

DLL deals implements the flow control using the feedback-based

techniques. And Rate based flow control methods are not used in the data
link layer.

2. Describe the following Medium Access Control Sub

Layer’s Multiple access protocols:
A) Pure ALOHA or Unslotted ALOHA
B) Slotted ALOHA or Impure ALOHA
Ans –

Pure or Unslotted Aloha

The ALOHA network was created at the University of Hawaii in 1970

under the leadership of Norman Abramson. The Aloha protocol is an OSI
layer 2 protocol for LAN networks with broadcast topology.

The first version of the protocol was basic:

· If you have data to send, send the data

· If the message collides with another transmission, try resending later

Figure: Pure ALOHA

Slotted or Impure ALOHA

An improvement to the original Aloha protocol was Slotted Aloha. It is

in 1972, Roberts published a method to double the throughput of an pure
ALOHA by uses discrete timeslots. His proposal was to divide the time into
discrete slots corresponding to one frame time. This approach requires the
users to agree to the frame boundaries. To achieve synchronization one
special station emits a pip at the start of each interval similar to a clock.
Thus the capacity of slotted ALOHA increased to the maximum throughput
of 36.8%.

The throughput for pure and slotted ALOHA system is as shown in

figure below. A station can send only at the beginning of a timeslot, and
thus collisions are reduced. In this case, the average number of aggregate
arrivals is G arrivals per 2X seconds. This leverages the lambda parameter
to be G. The maximum throughput is reached for G = 1.

3. Explain the following principles of routing:

A) Types of routing algorithms
B) Classes of routing algorithms
C) Properties of routing algorithms
D) Optimality principle

Ans –

A) Types of routing algorithms

There are two types of routing algorithm depending up on the

communication subnet.

· Session routing: if subnet uses virtual circuits

· Forwarding: if subnet uses datagram

If the subnet uses the virtual circuits internally, routing decision is

made only when a new virtual circuit is set up. Once a virtual circuit is set
up there after the data packets just follows the previously established
route. This is called session routing because a route remains in force for an
entire user session.

If the subnet uses the datagram’s internally, routing decision are

made anew for every data packet since the best route must have changed
since last time. One can think of two processes inside a router. One process
handles each packet as it arrives, looking up the out going line to use for it
in the routing tables. This process is called forwarding. The other process of
the router is responsible for filling in and updating the routing tables. To
update the routing tables we need to use the routing algorithms.

B) Classes of routing algorithms

Routing algorithms can be grouped into two major classes.

· Static or Non-adaptive Routing algorithms

· Dynamic or Adaptive Routing algorithms

Small networks may involve manually configured routing tables, while

larger networks involve complex topologies and may change constantly,
making the manual construction of routing tables very problematic.

Static or Non-adaptive Routing algorithms do not base their routing

decisions on measurements or estimates of the current traffic and topology.
The choice of the route to use to get from source to destination or from one
node to other is computed in advance. It is done off-line, and downloaded to
the routers when the network is booted. Most of the public switched
telephone network (PSTN) uses pre-computed routing tables, with fallback
routes if the most direct route becomes blocked.

Dynamic or adaptive Routing algorithms in contrast change their

routing decisions to reflect changes in topology and usually the traffic as
well. Dynamic routing attempts to solve this problem by constructing
routing tables automatically, based on information carried by routing
protocols, and allowing the network to act nearly autonomously in avoiding
network failures and blockages.

Dynamic routing dominates the Internet. However, the configuration

of the routing protocols often requires a skilled touch; one should not
suppose that networking technology has developed to the point of the
complete automation of routing.

Packet-switched networks, such as the Internet, split data up into

packets, each labeled with the complete destination address and each
routed individually. Circuit switched networks, such as the voice telephone
network, also perform routing, in order to find paths for circuits (such as
telephone calls) over which they can send large amounts of data without
continually repeating the complete destination address.

C) Properties of routing algorithms

Regardless of whether routes are chosen independently for each

packet or only when a new connection is established certain properties are
desirable in a Routing algorithm. They are

· Correctness

· Simplicity

· Robustness – since usually the entire network can’t be “re-booted”

· Stability – routing algorithm reaches equilibrium in a reasonable time

· Fairness, and

· Optimality

Correctness and simplicity hardly require any explanation. Once a

major network is set up, it may be expected to run continuously for years
without any failures. The need for robustness is very essential. In any
system there is bound to be some hardware or software failures or the lines
will fail repeatedly or the topology changes. The routing algorithm should
be able to cope up with the changes in the topology and traffic without
requiring all jobs in all hosts to be aborted and the network to be rebooted
every time some router crashes.

Stability is also important goal for routing algorithms. There exists

routing algorithm that never converges to equilibrium, no matter how long
they run. A stable algorithm reaches equilibrium and stays there.

Link capacities

fully utilized by

A-A¢, B-B¢ and C-C¢

traffic respectively

conflict between fairness and optimality

Fairness and Optimality may sound obvious but they are

contradictory goals. For example: consider a system as shown in figure 8.1.
There is enough traffic between A and A’ between B and B’ and also
between C and C’ to saturate the horizontal links. To maximize the traffic
flow between X and X’ traffic shut off all together. Eventually the
compromise between the global efficiency to individual connections is

When we optimizing? With respect to what are we trying to optimize?

Minimizing average Packet delay is and total Packet throughput is essential.
Operating any queuing system near capacity implies a long queuing delay.
Many networks attempt to optimize the number of hops a packet must
make, because reducing the number of hops tends to improve the delay
and also reduce the amount of bandwidth consumed, which tends to
improve the throughput as well.

D) Optimality principle
4. Discuss the following with respect to Internet Control
Message Protocols (ICMP):
A) Testing Destination Reachability and Status
B) Congested and Datagram Flow control
Ans –

A) Testing Destination Reachability and Status

One of the most frequently used tools for debugging invokes the Echo
request and echo reply messages. A host or a router sends an echo request
message to a specified destination. Any machine that receives an echo
request message formulates an echo reply and returns this reply message
to the original sender.

Both echo request message and the associated echo reply message travel
in IP datagram. Hence it verifies the transport system as:

1. IP software source must router the datagram

2. Intermediate routers between the source and destination must be

operating and must route the datagram correctly.

3. The destination machine must be running, that is it must at least respond

to the interrupts. Hence both IP and ICMP must be running

4. Finally all routers along the return path must have correct routes.

On many systems the command used for echo request is named ping.
Complex or sophisticated versions of ping send a series of ICMP echo
request, capture responses and provide the statistics about datagram loss.
They allow users to specify the length of the data being sent and the
interval between the requests. Less sophisticated simply send one ICMP
echo request and wait for the reply.

The echo request message and the associated echo reply message
can be used to test whether a destination is reachabe and whether it can
respond. If a router is unreachable to describe the problem for
unreachability a mesaage destination unreachable is used. Its format is
illustrated and discussed below.

B) Congested and Datagram Flow control

As IP is a connectionless, a router cannot reserve communication

resources or memory in advance of receiving datagram. Hence routers can
be overrun with traffic. This situation is called network congestion or simply

Congestion arises because of two reasons:

1. A high speed computer generating traffic faster than a network can


2. The datagram may need to cross a slower speed WAN .

When datagram arrive at host or router to process at faster rate, it

enqueues them in memory temporarily. So for small bursts temporary
memory solves the problem. But if the traffic continues the memory will be
exhausted and results in discarding the datagram. A machine uses ICMP
source quench messages to report to the original source. It is request for
the source to reduce its current rate of the datagram transmission.

In general a router sends one source quench message for every

datagram that they discard. There is no ICMP message to reverse the effect
of a source quench. As soon as any host gets this source quench message,
it lowers the rate at which the datagram it sends to that destination until it
stops getting source quench messages. It then gradually increases the rate
as long as further source quench messages are not received.

5. Explain the following with respect to OSPF Message

A) Hello B) Database description
C) Link state request D) Link state update
E) Link state acknowledgement
Ans –
A) Hello protocol

The HELLO protocol is an IGP that uses a routing metric other than hop
count. It is a protocol that uses a metric of delay.

It provides two functions

1. it synchronizes the clocks among a set of machines.

2. it allows each machine to compute shortest delay path to destination.

Thus HELLO messages carry timestamp information as well as routing

the basic idea of this protocol is each machine participating in the HELLO
exchange maintains a table of its best estimate of clocks in the neighboring
machine. Before transmitting a packet a machine adds its timestamp by
copying the current clock value into the packet. When a packet arrives, the
receiver computes an estimate of the current delay on the link or
subtracting the time stamp on the incoming packet from the local estimate
for the current clock in the neighbor. Periodically machines poll their
neighbors to reestablish estimate of clock.

HELLO messages also allow machines to compute new routes. This

protocol uses modified distance vector algorithm with delay as metric. This
protocol is a obsolete now.

B) Database description message format

Routers exchange the OSPF database description messages to initialize

their network topology database. In exchange one machine serves as a
master and the other a slave.

C) Link state request message format

Link state request message format

After exchanging database description messages with a neighbor, the

router may discover that parts of the database are out of date. The router
sends this message to request the neighbor to supply updated information
about the specific set of links.

And the specific set of links is identified by using the LINK type, LINK
ID, and the address of the router.

D) Link state update

Each router floods link state update messages to each of its

destination. A router sends this message to broadcast information about its
directly connected links to all other routers. This message gives its state
and provides the cost used in the topological database.

The format Link status update message is as shown in figure 6.7.

Link Update message format

Each link status advertisement has a header format as shown in

figure 6.8. The Fields used in the header of link status advertisements are
same as seen in the database description message. Following the header
there is one of the four possible formats to describe:

· The links from a router to a given area

· The links from a router to a specific network

· The links from a router to the physical network a single or subnetted IP


· The links from a router to networks at other sites.

Thus a router, that receives the link status update message, knows
exactly which of the described destination lie inside the site and which are

Header of link status advertisement.

Routers also send these messages when a line goes up or down or when its
cost changes.

E) Link state acknowledgement

The Link state acknowledgement message acknowledges the link state


6. Explain the following with respect to E-Mail:

A) Architecture B) Header format
C)User agents D) E-mail Services
Ans –

A) Architecture

E-mail system normally consists of two sub systems

1. the user agents

2. the message transfer agents

The user agents allow people to read and send e-mails. The message
transfer agents move the messages from source to destination. The user
agents are local programs that provide a command based, menu-based, or
graphical method for interacting with e-mail system. The message transfer
agents are daemons, which are processes that run in background. Their job
is to move datagram e-mail through system.

A key idea in e-mail system is the distinction between the envelope

and its contents. The envelope encapsulates the message. It contains all
the information needed for transporting the message like destinations
address, priority, and security level, all of which are distinct from the
message itself.

The message transport agents use the envelope for routing. The
message inside the envelope consists of two major sections:

· The Header:

The header contains control information for the user agents. It is structured
into fields such as summary, sender, receiver, and other information about
the e-mail.

· Body:

The body is entirely for human recipient. The message itself as

unstructured text; sometimes containing a signature block at the end

B) Header format

consists of following fields

· From: The e-mail address, and optionally name, of the sender of the
· To: one or more e-mail addresses, and optionally name, of the receiver’s
of the message.
· Subject: A brief summary of the contents of the message.
· Date: The local time and date when the message was originally sent.

C) User agents

It is normally a program and sometimes called a mail reader. It

accepts a variety of commands for composing, receiving, replying
messages as well as manipulating the mail boxes. Some user agents have a
fancy menu or icon driven interfaced that require a mouse where as others
are one character commands from keyboard. Functionally these are same.
Some systems are menu or icon driven but also have keyboard shortcuts.

To send an e-mail, user provides the message, the destination

address and possibly some other parameters. Most e-mail system supports
mailing lists.

Example: Reading e-mail

When a user is started up, it looks at the user’s mailbox for incoming
e-mail before displaying anything on the screen. Then it announces the
number of messages in the mailbox or displays a one-line summary of each
e-mail and wait for a command.

The display may look something like that is shown in figure 8.4. Each
line of the display contains several fields extracted from the envelope or
header of the corresponding message. In a simple e-mail system, the choice
of fields is built into the program. In more sophisticated system, user can
specify which fields are to be displayed by providing a user profile.

Referring to the display it contains following fields

1. Message number: it is serial number of the message. It can be displayed

from the most currently received messages or vice versa.

2. Flags: contains K means the message is not new, A means the message
is already read and F means the message has been forwarded to someone

3. size of the message: indicates the length of the message

4. source of the message: originator’s address

5. subject: gives a brief summary of what the message is about

D) E-mail Services

Basic services:

E-mail systems support five basic functions. These basic functions are:

1. Composition:

It refers to the process of creating messages and answers. Any text

editor can be used for the body of the message, the system itself can
provide assistance with addressing and the numerous header fields
attached to each message.

2. Transfer:

It refers to moving messages from the originator to the recipient. This

requires establishing a connection to the destination or some intermediate
machine, outputting the message, and finally releasing the connection. E-
mail does it automatically without bothering the user.

3. Reporting:
It refers to acknowledging or telling the originator what happened to
the message. Was the message delivered? Was it rejected? Numerous
applications exist in which confirmation of delivery is important and may
even have a legal significance. E-mail system is not very reliable.

4. Displaying

The incoming message has to be displayed so that people can read

their e-mail. Sometimes conversation is required or a special viewer must
be invoked. For example: if message is a postscript file or digitized voice.
Simple conversations and formatting are sometimes attempted.

5. Disposition

It is the final step and concerns what the recipient does with the
message after receiving it. Possibilities include throwing it away before
reading, throwing it away after reading, saving it, and so on. It should be
possible to retrieve and reread saved messages, forward them or process
them in other ways.

Advanced services:

In addition to these basic services, some e-mail systems provide a

variety of advanced features.

· When people move or when they are away for some period of time, they
want their e-mail to be forwarded, so the system should do it automatically.

· Most systems allow user to create mailboxes to store incoming e-mails.

Commands are needed to create and destroy mailboxes, inspect the
contents of mailboxes, insert and delete messages from the mailboxes.

· Corporate managers often need to send messages to each of their

subordinates, customers, or suppliers. This gives rise to the idea of mailing
list, which is a list of e-mail addresses. When a message is sent to the
mailing list, identical copies are delivered to everyone on the list.

· Carbon copies, blind Carbon copies, high priority e-mail, secret e-mail,
alternative recipient’s if primary one is not currently available, and the
ability for secretaries to read and answer their bosses e-mail.

· E-mail is now widely used within an industry for intra company

communication. It allows far-flung employees to cooperate on projects.