You are on page 1of 28

ASSIGNMENT NO.

SEMESTER:V DATE OF DECLARATION: 15/10/2017

SUBJECT: CN DATE OF SUBMISSION: 15/10/2017

NAME OF THE STUDENT: Mitali Butala ROLL NO.: 12

Learning 1. Demonstrate the knowledge of basic networking concepts.


Objectiv
e 2. Solve technical and aptitude questions related to computer networking.

Learning 1. Discuss basic networking concepts in detail.


Outcom
2. Solve technical and aptitude questions related to computer networking
e

Course CO504.1: To describe the terminology and concepts of the OSI reference model and
Outcom TCP/IP reference model alongwith hardware and software components and their
e interrelations.
CO504.2: Describe, analyze and compare datalink, network and transport layer
protocol, algorithms and techniques.
CO504.6: Communicate technical, ethical, social information related to computer
networking .

Program PO1: Apply the knowledge of mathematics, science, engineering, fundamentals, and an
Outcom engineering specialization to the solution of complex engineering problem.
e
P10: Communicate effectively on complex engineering activities with the engineering
community and with society as large, such as, being able to comprehend and write
effective reports and design documentations, make effective presentation, and give and
receive clear instructions.

Bloom's Remember
Taxono
my Level Apply

Assignm Q.1 Compare OSI and TCP/IP reference model.


ent
Questio
ns
Diagrammatic comparison of OSI and TCP/IP layers
Q.2 Explain CSMA protocols. Explain how collisions are
handled in CSMA/CD.
Carrier Sensed Multiple Access (CSMA) : CSMA is a network access
method used on shared network topologies such as Ethernet to
control access to the network. Devices attached to the network cable
listen (carrier sense) before transmitting. If the channel is in use,
devices wait before transmitting. MA (Multiple Access) indicates that
many devices can connect to and share the same network. All devices
have equal access to use the network when it is clear. In other words,
a station that wants to communicate "listen" first on the media
communication and awaits a "silence" of a preset time (called the
Distributed Inter Frame Space or DIFS). After this compulsory period,
the station starts a countdown for a random period considered. The
maximum duration of this countdown is called the collision window
(Window Collision, CW). If no equipment speaks before the end of the
countdown, the station simply deliver its package. However, if it is
overtaken by another station, it stops immediately its countdown and
waits for the next silence. She then continued his account countdown
where it left off. This is summarized in Figure. The waiting time random
has the advantage of allowing a statistically equitable distribution of
speaking time between the various network equipment, while making
little unlikely (but not impossible) that both devices speak exactly the
same time. The countdown system prevents a station waiting too long
before issuing its package. It's a bit what place in a meeting room
when no master session (and all the World's polite) expected a silence,
then a few moments before speaking, to allow time for someone else
to speak. The time is and randomly assigned, that is to say, more or
less equally.

Again, this is what we do naturally in a meeting room if many people


speak exactly the same time, they are realizing account immediately
(as they listen at the same time they speak), and they interrupt without
completing their sentence. After a while, one of them speaks again. If
a new collision occurs, the two are interrupted again and tend to wait
a little longer before speaking again.
CSMA protocol was developed to overcome the problem found in
ALOHA i.e. to minimize the chances of collision, so as to improve the
performance. CSMA protocol is based on the principle of 'carrier
sense'. The station senses the carrier or channel before transmitting a
frame. It means the station checks the state of channel, whether it is
idle or busy.
Even though devices attempt to sense whether the network is in use,
there is a good chance that two stations will attempt to access it at the
same time. On large networks, the transmission time between one end
of the cable and another is enough that one station may access the
cable even though another has already just accessed it.
The chances of collision still exist because of propagation delay. The
frame transmitted by one station takes some time to reach other
stations. In the meantime, other stations may sense the channel to be
idle and transmit their frames. This results in the collision.
There Are Three Different Type of CSMA Protocols
(I) I-persistent CSMA
(ii) Non- Persistent CSMA
(iii) p-persistent CSMA

(i) I-persistent CSMA


• In this method, station that wants to transmit data continuously
senses the channel to check whether the channel is idle or busy.
• If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle-channel, it immediately transmits
the frame with probability 1. Hence it is called I-persistent CSMA.
• This method has the highest chance of collision because two or more
stations may find channel to be idle at the same time and transmit their
frames.
• When the collision occurs, the stations wait a random amount of time
and start allover again.
Drawback of I-persistent
• The propagation delay time greatly affects this protocol. Let us
suppose, just after the station I begins its transmission, station 2 also
became ready to send its data and senses the channel. If the station I
signal has not yet reached station 2, station 2 will sense the channel to
be idle and will begin its transmission. This will result in collision.

(ii) Non-persistent CSMA


• In this scheme, if a station wants to transmit a frame and it finds that
the channel is busy (some other station is transmitting) then it will wait
for fixed interval oftime.
• After this time, it again checks the status of the channel and if the
channel is.free it will transmit.
• A station that has a frame to send senses the channel.
• If the channel is idle, it sends immediately.
• If the channel is busy, it waits a random amount of time and then
senses the channel again.
• In non-persistent CSMA the station does not continuously sense the
channel for the purpose of capturing it when it detects the end of
previous transmission.
Advantage of non-persistent
• It reduces the chance of collision because the stations wait a random
amount of time. It is unlikely that two or more stations will wait for
same amount of time and will retransmit at the same time.
Disadvantage of non-persistent
• It reduces the efficiency of network because the channel remains
idle when there may be stations with frames to send. This is due to the
fact that the stations wait a random amount of time after the collision.

(iii) p-persistent CSMA


• This method is used when channel has time slots such that the time
slot duration is equal to or greater than the maximum propagation
delay time.
• Whenever a station becomes ready to send, it senses the channel.
• If channel is busy, station waits until next slot.
• If channel is idle, it transmits with a probability p.
• With the probability q=l-p, the station then waits for the beginning of
the next time slot.
• If the next slot is also idle, it either transmits or waits again with
probabilities p and q.
• This process is repeated till either frame has been transmitted or
another station has begun transmitting.
• In case of the transmission by another station, the station acts as
though a collision has occurred and it waits a random amount of time
and starts again.

Advantage of p-persistent
• It reduces the chance of collision and improves the efficiency of the
network.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)


To reduce the impact of collisions on the network performance,
Ethernet uses an algorithm called CSMA with Collision Detection
(CSMA / CD): CSMA/CD is a protocol in which the station senses the
carrier or channel before transmitting frame just as in persistent and
non-persistent CSMA. If the channel is busy, the station waits. it listens
at the same time on communication media to ensure that there is no
collision with a packet sent by another station. In a collision, the issuer
immediately cancel the sending of the package. This allows to limit the
duration of collisions: we do not waste time to send a packet complete
if it detects a collision. After a collision, the transmitter waits again
silence and again, he continued his hold for a random number; but this
time the random number is nearly double the previous one: it is this
called back-off (that is to say, the "decline") exponential. In fact, the
window collision is simply doubled (unless it has already reached a
maximum). From a packet is transmitted successfully, the window will
return to its original size.
Again, this is what we do naturally in a meeting room if many people
speak exactly the same time, they are realizing account immediately
(as they listen at the same time they speak), and they interrupt without
completing their sentence. After a while, one of them speaks again. If
a new collision occurs, the two are interrupted again and tend to wait
a little longer before speaking again.

The entire scheme of CSMA/CD is depicted in the fig.


Frame format of CSMA/CD
The frame format specified by IEEE 802.3 standard contains following
fields.

1. Preamble: It is seven bytes (56 bits) that provides bit


synchronization. It consists of alternating Os and 1s. The purpose is to
provide alert and timing pulse.

2. Start Frame Delimiter (SFD): It is one byte field with unique pattern:
10 10 1011. It marks the beginning of frame.
3. Destination Address (DA): It is six byte field that contains physical
address of packet's destination.
4. Source Address (SA): It is also a six byte field and contains the
physical address of source or last device to forward the packet (most
recent router to receiver).
5. Length: This two byte field specifies the length or number of bytes in
data field.
6. Data: It can be of 46 to 1500 bytes, depending upon the type of
frame and the length of the information field.
7. Frame Check Sequence (FCS): This for byte field contains CRC for
error detection.

CSMA/CD Procedure:
Fig. Shows a flow chart for the CSMA/CD protocol.
Explanation:
The station that has a ready frame sets the back off parameter to zero.
• Then it senses the line using one of the persistent strategies.
• If then sends the frame. If there is no collision for a period
corresponding to one complete frame, then the transmission is
successful.
• Otherwise the station sends the jam signal to inform the other
stations about the collision.
• The station then increments the back off time and waits for a random
back off time and sends the frame again.
• If the back off has reached its limit then the station aborts the
transmission.
• CSMA/CD is used for the traditional Ethernet.
• CSMA/CD is an important protocol. IEEE 802.3 (Ethernet) is an
example of CSMNCD. It is an international standard.
• The MAC sublayer protocol does not guarantee reliable delivery.
Even in absence of collision the receiver may not have copied the
frame correctly.

Q.3 Discuss ICMP protocol in detail.


The Internet Control Message Protocol (ICMP) [RFC792] protocol is
classic example of a client server application. The ICMP server
executes on all IP end system computers and all IP intermediate
systems (i.e routers). The protocol is used to report problems with
delivery of IP datagrams within an IP network. It can be sued to show
when a particular End System (ES) is not responding, when an IP
network is not reachable, when a node is overloaded, when an error
occurs in the IP header information, etc. The protocol is also
frequently used by Internet managers to verify correct operations
of End Systems (ES)and to check that routers are correctly routing
packets to the specified destination address.

ICMP messages generated by router R1, in response to message sent


by H0 to H1 and forwarded by R0. This message could, for instance be
generated if the MTU of the link between R0 and R1 was smaller than
size of the IP packet, and the packet had the Don't Fragment (DF) bit
set in the IP packet header. The ICMP message is returned to H0,
since this is the source address specified in the IP packet that
suffered the problem. A modern version of Path MTU Discovery
provides a mechanism to verify the Path MTU [RFC4821].

An ICMP message consisting of 4 bytes of PCI and an optional


message payload.

The format of an ICMP message is shown above. The 8-bit type code
identifies the types of message. This is followed by at least the first 28
bytes of the packet that resulted in generation of the error message
(i.e. the network-layer header and first 8 bytes of transport header).
This payload is, for instance used by a sender that receives the ICMP
message to perform Path MTU Discovery so that it may determine IP
destination address of the packet that resulted in the error. Longer
payloads are also encouraged (which can help better identify the
reason why the ICMP message was generated and which program
generated the original packet).

The figure below shows the encapsulation of ICMP over


an Ethernet LAN using an IP network layer header, and a MAC link
layer header and trailer containing the 32-bit checksum:

Encapsulation for a complete ICMP packet (not showing


the Ethernet preamble)

It is the responsibility of the network layer (IP) protocol to ensure that


the ICMP message is sent to the correct destination. This is achieved
by setting the destination address of the IP packet carrying the ICMP
message. The source address is set to the address of the computer
that generated the IP packet (carried in the IP source address field)
and the IP protocol type is set to "ICMP" to indicate that the packet is
to be handled by the remote end system's ICMP client interface.

RFC792 specifies the Internet Control Message Protocol (ICMP) that is


used with the Internet Protocol version 4 (IPv4). It defines, among
other things, a number of error messages that can be used by an end-
system and intermediate systems to report errors back to the sending
system. The host requirements [RFC1122] classifies ICMP these error
messages into those that indicate "soft errors" (advising of problems),
and those that indicate "hard errors" (which need to be responded to).

A version of ICMP has also been defined for IPv6, called


ICMPv6 [RFC4443]. This subsumes all the equivalent functions of ICMP
for IPv4 and adds other network-layer functions. ICMP error messages
are up to 1280 bytes in size, and therefore always carry a substantial
number of bytes from the packet that generated the error being
reported.

The Ping Application

The "ping" program contains a client interface to ICMP. It may be used


by a user to verify an end-to-end Internet Path is operational. The ping
program also collects performance statistics (i.e. the measured round
trip time and the number of times the remote server fails to reply. Each
time an ICMP echo reply message is received, the ping program
displays a single line of text. The text printed by ping shows the
received sequence number, and the measured round trip time (in
milliseconds). Each ICMP Echo message contains a sequence number
(starting at 0) that is incremented after each transmission, and a
timestamp value indicating the transmission time.

Use of the ping program to test whether a particular computer


("sysa") is operational.

The operation of ICMP is illustrated in the frame transition diagram


shown above. In this case there is only one Intermediate System (IS)
(i.e. IP router). In this case two types of message are involved
the ECHO request (sent by the client) and the ECHO reply (the
response by the server). Each message may contain some optional
data. When data are sent by a server, the server returns the data in
the reply which is generated. ICMP packets are encapsulated in IP for
transmission across an internet.

The Traceroute Application

The "traceroute" program contains a client interface to ICMP. Like the


"ping" program, it may be used by a user to verify an end-to-end
Internet Path is operational, but also provides information on each of
the Intermediate Systems (i.e. IP routers) to be found along the IP Path
from the sender to the receiver. Traceroute uses ICMP echo
messages. These are addressed to the target IP address. The sender
manipulates the TTL (hop count) value at the IP layer to force each hop
in turn to return an error message.

 The program starts by sending an ICMP Echo request message


with an IP destination address of the system to be tested and
with a Time To Live (TTL) value set to 1. The first router that
receives this packet decrements the TTL and discards the
message, since this now has a value of zero. Before it deletes
the message, the system constructs an ICMP error
message (with an ICMP message type of "TTL exceeded") and
returns this back to the sender. Receipt of this message allows
the sender to identify which system is one link away along the
path to the specified destination.
 The sender repeats this two more times, each time reporting the
system that received the packet. If all packets travel along the
same path, each ICMP error message will be received from the
same system. Where two or more alternate paths are being
used, the results may vary.
 If the system that responded was not the intended destination,
the sender repeats the process by sending a set of three
identical messages, but using a TTL value that is one larger than
the previous attempt. The first system forwards the packet
(decrementing the TTL value in the IP header), but a subsequent
system that reduces the TTL value to zero, generates an ICMP
error message with its own source address. In this way, the
sender learns the identity of another system along the IP path to
the destination.
 This process repeats until the sender receives a response from
the intended destination (or the maximum TTL value is reached).

Note: Some Routers are configured to discard ICMP messages, while


others process them but do not return ICMP Error Messages. Such
routers hide the "topology" of the network, but also can impact
correct operation of protocols. Some routers will process the ICMP
Messages, providing that they do not impose a significant load on the
routers, such routers do not always respond to ICMP messages. When
"traceroute" encounters a router that does not respond, it prints a "*"
character.

An example:
>traceroute bbc.co.uk traceroute to bbc.co.uk
(212.58.224.131), 64 hops max, 40 byte packets
1 10.10.10.1 (10.10.10.1) 51.940 ms 18.491 ms 1.260 ms
2 lo0-plusnet.ptn-ag2.plus.net (195.166.128.53) 49.263 ms
55.061 ms 53.525 ms
3 ge1-0-0-204.ptn-gw2.plus.net (84.92.3.106) 139.647 ms 52.525
ms 127.196 ms
4 gi1-1-22.ptn-gw5.plus.net (212.159.4.6) 76.505 ms 57.524 ms
52.404 ms
5 rt0.thdo.bbc.co.uk (212.58.239.25) 89.200 ms 49.666 ms
144.629 ms
6 212.58.238.133 (212.58.238.133) 48.786 ms 68.650 ms 51.599
ms

Q.4 What is traffic shaping? Explain leaky bucket


algorithm and compare it with token bucket
algorithm.
Realistically, spacing between incoming packets has an irregular
pattern, which in many cases causes congestion. The goal of traffic
shaping in a communication network is to control access to available
bandwidth to regulate incoming data to avoid congestion, and to
control the delay incurred by packets Turbulent packets at rate λ and
with irregular arrival patterns are regulated in a traffic shaper over
equal-sized 1/g intervals. Figure 6.2.2. Traffic shaping to regulate any
incoming turbulent traffic.

If a policy dictates that the packet rate cannot exceed a specified rate
even though the network node's access rates might be higher, a
mechanism is needed to smooth out the rate of traffic flow. If different
traffic rates are applied to a network node, the traffic flow needs to be
regulated. (Monitoring the traffic flow is called traffic policing.) Traffic
shaping also prevents packet loss by preventing the sudden increased
usage of system bandwidth. The stochastic model of a traffic shaper
consists of a system that converts any form of traffic to a deterministic
one. Two of the most popular traffic-shaping algorithms are leaky
bucket and token bucket.

When too many packets are present in (a part of) the subnet,
performance degrades. This situation is called congestion.

Factors Causing Congestion

 Packet arrival rate exceeds the outgoing link capacity.


 Insufficient memory to store arriving packets
 Bursty traffic
 Slow processor

General Principles of Congestion Control

The two approaches of congestion Control are :

 Open loop: try to prevent congestion occurring by good design


 Closed-loop: monitor the system to detect congestion, pass this
information to where action can be taken, and adjust system
operation to correct the problem (detect,feedback and correct).

Leaky Bucket
Figure : Leaky Bucket Algorithm

 Imagine a bucket with a small hole in the bottom.


 No matter the rate at which water enters the bucket, the outflow
is at a constant rate, when there is any water in the bucket and
zero when the bucket is empty.
 Also, once the bucket is full, any additional water entering it
spills over the sides and is lost.
 The same idea can be applied to packets, as shown in Fig. (b).
 Conceptually, each host is connected to the network by an
interface containing a leaky bucket, that is, a finite internal
queue.
 If a packet arrives at the queue when it is full, the packet is
discarded. In other words, if one or more processes within the
host try to send a packet when the maximum number is already
queued, the new packet is unceremoniously discarded.

The Token Bucket Algorithm


Token Bucket Algorithm

 For many applications, it is better to allow the output to speed


up somewhat when large bursts arrive, so a more flexible
algorithm is needed, preferably one that never loses data.
 One such algorithm is the token bucket algorithm.
 Tokens arrive at the constant rate in the token bucket.
 If the bucket is full, tokens are discarded.
 A packet from the buffer can be taken out only if a token in the
token bucket can be drawn.
 The token bucket algorithm provides a different kind of traffic
shaping than that of the leaky bucket algorithm. The leaky
bucket algorithm does not allow idle hosts to save up
permission to send large bursts later.
 The token bucket algorithm does allow saving, up to the
maximum size of the bucket, n. This property means that bursts
of up to n packets can be sent at once, allowing some burstiness
in the output stream and giving the faster response to sudden
bursts of input.

Q.5 Explain in brief PPP frame format.


Point-to-Point Protocol (PPP):

• PPP was devised by IETF (Internet Engineering Task Force) to create


a data link protocol for point to point lines that can solve all the
problems present in SLIP.
• PPP is most commonly used data link protocol. It is used to connect
the Home PC to the server of ISP via a modem.
• This protocol offers several facilities that were not present in SLIP.
Some of these facilities are:
1. PPP defines the format of the frame to be exchanged between the
devices.
2. It defines link control protocol (LCP) for:-
(a) Establishing the link between two devices.

(b) Maintaining this established link.


(c) Configuring this link.
(d) Terminating this link after the transfer.
3. It defines how network layer data are encapsulated in data link
frame.
4. PPP provides error detection.
5. Unlike SLIP that supports only IP, PPP supports multiple protocols.
6. PPP allows the IP address to be assigned at the connection time i.e.
dynamically. Thus a temporary IP address can be assigned to each
host.
7. PPP provides multiple network layer services supporting a variety
of network layer protocol. For this PPP uses a protocol called NCP
(Network Control Protocol).
8. It also defines how two devices can authenticate each other.

PPP Frame Format


The frame format of PPP resembles HDLC frame. Its various fields are:

1. Flag field: Flag field marks the beginning and end of the PPP frame.
Flag byte is 01111110. (1 byte).
2. Address field: This field is of 1 byte and is always 11111111. This
address is the broadcast address i.e. all the stations accept this
frame.
3. Control field: This field is also of 1 byte. This field uses the format of
the U-frame (unnumbered) in HDLC. The value is always 00000011 to
show that the frame does not contain any sequence numbers and
there is no flow control or error control.
4. Protocol field: This field specifies the kind of packet in the data
field i.e. what is being carried in data field.
5. Data field: Its length is variable. If the length is not negotiated using
LCP during line set up, a default length of 1500 bytes is used. It carries
user data or other information.
6. FCS field: The frame checks sequence. It is either of 2 bytes or 4
bytes. It contains the checksum.

Point-to-point protocol Stack


PPP uses several other protocols to establish link, authenticate users
and to carry the network layer data.
The various protocols used are:
1. Link Control Protocol
2. Authentication Protocol
3. Network Control Protocol
1. Link Control Protocol
• It is responsible for establishing, maintaining, configuring and
terminating the link.
• It provides negotiation mechanism to set options between two
endpoints.
• All LCP packets are carried in the data field of the PPP frame.
• The presence of a value C02116 in the protocol field of PPP frame
indicates that LCP packet is present in the data field.
• The various fields present in LCP packet are:
1. Code: 1 byte-specifies the type of LCP packet.
2. ID: 1 byte-holds a value used to match a request with the reply.
3. Length: 2 byte-specifies the length of entire LCP packet.
4. Information: Contains extra information required for some LCP
packet.
• There are eleven different type of LCP packets. These are
categorized in three groups:
1. Configuration packet: These are used to negotiate options between
the two ends. For example: configure-request, configure-ack,
configure-nak, configure-reject are some configuration packets.
2. Link termination packets: These are used to disconnect the link
between two end points. For example: terminate-request, terminate-
ack, are some link termination packets.
3. Link monitoring and debugging packets: These are used to monitor
and debug the links. For example: code-reject, protocol-reject, echo-
request, echo-reply and discard-request are some link monitoring and
debugging packets.
2. Authentication Protocol
Authentication protocols help to validate the identity of a user who
needs to access the resources.
There are two authentication protocols:
1. Password Authentication Protocols (PAP)
2. Challenge Handshake Authentication Protocol (CHAP)

1. PAP (Password Authentication Protocol)


This protocol provides two step authentication procedures:
Step 1: User name and password is provided by the user who wants to
access a system.
Step 2: The system checks the validity of user name and password and
either accepts or denies the connection.
• PAP packets are also carried in the data field of PPP frames.
• The presence of PAP packet is identified by the value C02316 in the
protocol field of PPP frame.
• There are three PAP packets.
1. Authenticate-request: used to send user name & password.
2. Authenticate-ack: used by system to allow the access.
3. Authenticate-nak: used by system to deny the access.

2. CHAP (Challenge Handshake Authentication Protocol)


• It provides more security than PAP.
• In this method, password is kept secret, it is never sent on-line.
• It is a three-way handshaking authentication protocol:
1. System sends. a challenge packet to the user. This packet contains
a value, usually a few bytes.
2. Using a predefined function, a user combines this challenge value
with the user password and sends the resultant packet back to the
system.
3. System then applies the same function to the password of the user
and challenge value and creates a result. If result is same as the result
sent in the response packet, access is granted, otherwise, it is denied.
• There are 4 types of CHAP packets:
1. Challenge-used by system to send challenge value.
2. Response-used by the user to return the result of the calculation.
3. Success-used by system to allow access to the system.
4. Failure-used by the system to deny access to the system.
3. Network Control Protocol (NCP)
• After establishing the link and authenticating the user, PPP connects
to the network layer. This connection is established by NCP.
• Therefore NCP is a set of control protocols that allow the
encapsulation of the data coming from network layer.
• After the network layer configuration is done by one of the NCP
protocols, the users can exchange data from the network layer.
• PPP can carry a network layer data packet from protocols defined by
the Internet, DECNET, Apple Talk, Novell, OSI, Xerox and so on.
• None of the NCP packets carry networks layer data. They just
configure the link at the network layer for the incoming data.

Technical and Aptitude Questions:


Q.1 Which layers are user support layers?

Ø Session layer
Ø Presentation layer

Ø Application layer

Q.2 Describe piggybacking.


In all practical situations, the transmission of data needs to be bi-
directional. This is called as full-duplex transmission.
• We can achieve this full duplex transmission i.e. by having two
separate channels-one for forward data transfer and the other for
separate transfer i.e. for acknowledgements.
• A better solution would be to use each channel (forward & reverse)
to transmit frames both ways, with both channels having the same
capacity. If A and B are two users. Then the data frames from A to
Bare intermixed with the acknowledgements from A to B.
• One more improvement that can be made is piggybacking. The
concept is explained as follows:
In two way communication, Whenever a data frame is received, the
received waits and does not send the control frame
(acknowledgement) back to the sender immediately.
The receiver waits until its network layer passes in the next data
packet. The delayed acknowledgement is then attached to this
outgoing data frame.
This technique of temporarily delaying the acknowledgement so that it
can be hooked with next outgoing data frame is known as
piggybacking.
• The major advantage of piggybacking is better use of available
channel bandwidth.
• The disadvantages of piggybacking are:
1. Additional complexity.
2. If the data link layer waits too long before transmitting the
acknowledgement, then retransmission of frame would take place.

Q.3 State responsibilities of the data link layer.

FUNCTIONS OF DATA LINK LAYER:

1. Framing: Frames are the streams of bits received from the


network layer into manageable data units. This division of stream
of bits is done by Data Link Layer.
2. Physical Addressing: The Data Link layer adds a header to the
frame in order to define physical address of the sender or receiver
of the frame, if the frames are to be distributed to different systems
on the network.
3. Flow Control: A flow control mechanism to avoid a fast
transmitter from running a slow receiver by buffering the extra bit
is provided by flow control. This prevents traffic jam at the receiver
side.
4. Error Control: Error control is achieved by adding a trailer at the
end of the frame. Duplication of frames are also prevented by using
this mechanism. Data Link Layers adds mechanism to prevent
duplication of frames.
5. Access Control: Protocols of this layer determine which of the
devices has control over the link at any given time, when two or
more devices are connected to the same link.

Q.4 Compare error detection and error correction.


Error Detection

Parity bits are a simple approach for the detection of errors. A parity
bit is an extra bit sent with the data that is simply the 1-bit sum of the
data. The receiver adds up the data bits compares the sum bit with the
parity bit. If they don’t match, the data (or the parity bit itself) was
corrupted somewhere along the way.

An even number of 1 bits results a 0 parity bit, an odd number a 1


parity bit.

01001010 parity bit: 1


00101011 parity bit: 0
Simple parity bits are rarely used for anything larger than a byte. For
blocks of data, various kinds of checksums are used. These can be
simply a literal sum of the data bytes (typically truncated to 16 or 32
bits.) This fails, however, to detect errors such as transposed bytes or
double bit errors. A better solution is a cyclic redundancy check (CRC)
algorithm that uses a polynomial function to mix the bits so that
positional information affects the result. Such a value is also known as
a hash or message digest. The longer the hash, the less likely the data
could be corrupted and still result in the same hash value.

This concept is central to digital signatures as used in public key


crypto systems. A secure (one-way) hash function is used to generate
a message digest of a document, which is then encrypted with the
person’s private key and attached to the document. The receiver uses
the person’s public key to decrypt the hash and compare it to one
generates from the same document. If they match, we know 1) the
document is unchanged since it was signed and 2) since the person’s
public key successfully decrypted it, we know it came from them.

Error Correction

When transmitting data (say over the internet), it is usually sufficient to


detect an error and correct it by simply retrying the request. But that
approach isn’t possible in many situations.

If enough redundant information is supplied with the actual data, it’s


possible to reconstruct the damaged portions, depending on the
degree of damage. For example, 4 bits of redundant info
(see Hamming code) are sufficient to correct single bit errors in a 16-
bit chunk and to detect (but not correct) double bit errors. This a
commonly used scheme for highly-reliable computer memory.

Music CDs contain a significant amount of redundant data (like one


third of their content) to deal with damage incurred through normal
wear and tear such as scratches and smudges. You’ve probably seen
significantly scratched disks that still play — you can thank redundant
data and error correction algorithms for that.

Q.5 Explain the concept of TELNET.


TELNET: TELNET (TELecommunication NETwork) is a
network protocol used on the Internet or local area network (LAN)
connections. It was developed in 1969 beginning with RFC 15 and
standardized as IETF STD 8, one of the first Internet standards.
It is a network protocol used on the Internet or local area networks to
provide a bidirectional interactive communications facility. Typically,
telnet provides access to a command-line interface on a remote host
via a virtual terminal connection which consists of an 8-bit byte
oriented data connection over the Transmission Control Protocol
(TCP). User data is interspersed in-band with TELNET
control information. The user's computer, which initiates the
connection, is referred to as the local computer.

The computer being connected to, which accepts the connection, is


referred to as the remote computer. The remote computer can be
physically located in the next room, the next town or in another
country.
The network terminal protocol (TELNET) allows a user to log in on any
other computer on the network. We can start a remote session by
specifying a computer to connect to. From that time until we finish the
session, anything we type is sent to the other computer.
The Telnet program runs on the computer and connects your PC to a
server on the network. We can then enter commands through the
Telnet program and they will be executed as if we were entering them
directly on the server console. This enables we to control the server
and communicate with other servers on the network. To start a Telnet
session, we must log in to a server by entering a valid username and
password. Telnet is a common way to remotely control Web servers.
The term telnet also refers to software which implements the client
part of the protocol. TELNET clients have been available on most Unix
systems for many years and are available virtually for all platforms.
Most network equipment and OSs with a TCP/IP stack support some
kind of TELNET service server for their remote configuration including
ones based on Windows NT. TELNET is a client server protocol, based
on a reliable connection oriented transport. Typically this protocol
used to establish a connection to TCP port 23, where a getty-
equivalent program (telnet) is listening, although TELNET predates.
Telnet was developed in 1969 to aid in remote connectivity
between computers over a network. Telnet can connect to a remote
machine that on a network and is port listening. Most common ports to
which one can connect to through telnet are:

Port 21 ~ File Transfer Protocol


Port 22 - SSH Remote Login Protocol
Port 23 - Telnet Server
Port 25 - Simple Mail Transfer Protocol (SMTP)
Port 53 - Domain Name Server (DNS)
Port 69 - Trivial File Transfer Protocol (TFTP)
Port 70 - Gopher
Port 80 - Hyper Text Transfer Protocol (HTTP)
Port 110 - Post Office Protocol 3 (POP3)
Telnet Protocol Characteristics

There are the various characteristics of Telnet which are described


below:

Telnet is a terminal emulation protocol. When you start installing and


configuring native TCP/IP devices, you are going to need some way to
connect to the device to issue its commands.
Telnet is versatile. You can establish Telnet sessions over the phone. If
there is no phone connection and your device is accessible to the
Internet, you can establish a Telnet session over the Internet. In any of
these conditions you can establish a Telnet session with a remote
host.
Terminal Emulation
A personal computer can connect via Modem to a large computer and
run a terminal emulation program. The most common terminal
emulation is the VT100. The computer works like a dumb terminal,
except it is connected via a phone line instead of a direct connection.
Often, you will not be able to use graphics on the Internet, such as the
WWW (World Wide Web), this kind of access, although you will be able
to browse the text-only portion of the Web.
This kind of Internet account is sometimes called "Shell" account. This
shell account is available with VSNL for students in India. Many
terminal emulation programs can emulate DEC terminals, including
the VT52 and VT200 series terminals. For example, tty pathname of
your terminal's device file.
The syntax for this command is
tty [option]
The options are:
1. -1 Prints the synchronous line number.
2. -s Causes tty not to print any output but sets the exit status to 0 if the
standard input file is a terminal, and to 1 if it is not.
TELNET is generally used with the following applications :
(1) Enterprise networks to access host applications, e.g. on IBM
Mainframes.
(2) Administration of network elements, e.g., in commissioning,
integration and maintenance of core network elements in mobile
communication networks.
(3) MUD games played over the Internet, as well as talkers, MUSHes,
MUCKs, MOOes, and the resurgent BBS community.
(4) Embedded systems.

Rubrics Performance Does not Developing Meets Exceeds


for Indicators meet expectations expectations
Assess expectations
ment
Quality No relevantSome ofThe contentThe contents
Content content the contentis not asaddress the
is relateddetailed questions
to theand/or clearly and
assignment concise asfully.
topic. needed.

Data analysisNo properAnalyzes Analyzes Analyzes


and analysis and and and
interpretation interprets interprets interprets
data
data data
correctly
correctly correctly most of the
occasionall most of thetime; most of
y; sometime; most ofthe
conclusion the conclusions
s areconclusions are correct
incorrect are correctand useful
and useful

Efforts Books andReferred Referred Referred


Internet only only book for books and
references Internet forwrite up. Internet for
are write up. write up.
improper

On Time Submiited submitted submitted submitted


Submission after 15 within 15 within 8 on time.
days days. days.

Referen 1. B.A. Forouzan, “Data Communications and Networking”, TMH, Fourth Edition.
2. Write the name of websites referred.
ces:
 http://ecomputernotes.com/computernetworkingnotes/services-and-
applications/what-is-telnet
 https://www.quora.com/What-is-the-difference-between-error-correction-
and-detection
 http://www.studytonight.com/computer-networks/osi-model-datalink-layer
 http://engineeringinterviewquestions.com/layers-user-support-layers/

You might also like