DCN UNIT3 Complete
DCN UNIT3 Complete
Peer –to-Peer Protocols:- Peer-to peer Protocols and service models ARQ
Protocols stop and wait , Go –back-N Selective Repeat , Transmission
efficiency of ARQ Protocols, Other adaptation functions , - Sliding window
flow control Timing Recovery in Synchronous Services Reliable Stream
Service, Data Link Control, HDLC, PPP ; Statistical Multiplexing.
The network layer (third layer) is designed to service request from transport layer and
issues service requests to the data link layer.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 1
What are the Functions of the network layer. Explain. 5m
Path Determination. The network layer must determine the route or path taken by packets as
they flow from a sender to a receiver. The algorithms that calculate these paths are referred to
as routing algorithms.
Routing: Network layer establishes a path for the data to transfer. It makes use of shortest
path routing algorithms.
Call Setup. Some network architectures require router call setup along the path before the
data flows.
A peer-to-peer protocol involves the interaction of two or more processes or entities through
the exchange of messages and are called as protocol data units (PDU).
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 2
once data reaches the receiver, an acknowledgement for the received data is sent to
the sender.
Connection termination – after successful data communication, two end systems
should be terminated. And resources are released.
Ex : TCP
ex: Internet protocol (IP) and User datagram protocol (UDP) are connectionless
protocol.
The service provided by a given layer can have the following features
Sequence
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 3
Reliability
Timing
Multiplexing
Single Hop
Peer-to-peer protocol that operates across a single hop in a network uses the physical
and data link layer of the OSI reference model to show how data link layer provides
service for the transfer of packets across a single link in the network.
The data link layer takes packets from the network layer, encapsulates them in frames
and it transfers across the link and delivers them to the network layer at the other end.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 4
End-to-End
ARQ PROTOCOLS
If the sender does not receive an acknowledgment before the timeout, it usually re-
transmits the frame/packet until the sender receives an acknowledgment or exceeds a
predefined number of re-transmissions.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 5
• Lost frame: A frame fails to arrive at the other side. For example, a noise burst (undesired
signals in a communication circuit, can affect your network in a bad way )may damage a
frame to the extent that the receiver is not aware that a frame has been transmitted.
• Damaged frame: A recognizable frame does arrive, but some of the bits are in error (have
been altered during transmission).
• Error detection: there will be errors, resulting in the change of one or more bits in a
transmitted frame.
• Retransmission after timeout: The source retransmits a frame that has not been
acknowledged after a predetermined amount of time.
Flow control 4m
Flow control means receiver is not able to receive packets at the same rate the sender is
sending.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 6
ARQ PROTOCOL
simplest protocol –
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 7
2. Stop-and-Wait ARQ
Also called Stop-and-Wait Automatic Repeat reQuest (ARQ)
It is the simplest form.
Source may not send new frame until receiver acknowledges the frame already sent.
Very inefficient, especially when a single message is broken into separate frames, or
when the data link is long enough for significant delays to be introduced.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 8
The frame that arrives at the destination could be damaged.
The receiver detects this by using the error-detection technique and simply
discards the frame.
To account this possibility, the source station is equipped with a timer.
After a frame is transmitted, the source station waits for an acknowledgment.
If no acknowledgment is received by the time that the timer expires, then the
same frame is sent again.
Note that this method requires that the transmitter maintain a copy of a transmitted
frame until an acknowledgment is received for that frame.
Consider the following situation. Station A sends a frame. The frame is received
correctly by station B, which responds with an acknowledgment (ACK).
The ACK is damaged in transit and is not recognizable by A, which will therefore
time out and resend the same frame.
This duplicate frame arrives and is accepted by B.
B has therefore accepted two copies of the same frame as if they were separate.
To avoid this problem, frames are alternately labeled with 0 or 1, and positive
acknowledgments are of the form ACK0 and ACK1.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 9
Channel is thick and long means it takes large bandwidth and long round trip delay.
then all the frames are re- In selective Repeat protocol, only
4. complex. complex.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 10
In Go-Back-N Protocol, neither In selective Repeat protocol,
packet, then also, the entire hence only the selective packet is
is protocol is also
9. N/(1+2*a) N/(1+2*a)
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 11
1. more complexity of sender and receiver
Problem:
In go back N , 3 is the window size, if every 5th frame is lost and if we have to send 10
packets, then how many transmissions are required?
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 12
OTHER PEER TO PEER PROTOCOLS
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 13
Sliding-window flow control is best utilized when the buffer size is limited
and pre-established.
The sender can send and the receiver can accept n frames (n is the buffer size
in frames). without having to wait for an acknowledgement.
Both the sender and receiver maintain what is called a window. The size of
the window is less than or equal to the buffer size.
Sliding window flow control has a far better performance than stop-and-
wait flow control.
This is because in a wireless environment data rates are very low and noise
level is very high, so waiting for an acknowledgement for every packet that is
transferred is not very feasible.
Therefore, transferring data as a bulk would yield a better performance in
terms of higher throughput(amount of data moved successfully).
PIGGYBACKING
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 14
Whenever TCP is about to ACK the data it has received from the client, it does not
immediately, rather it delays the ACK and see whether any data has to be sent to the
client, so the ACK can be sent along with the data.
This is called Piggyback. Or
The process of sending data along with the acknowledgment is called
piggybacking.
For example, your Internet server provider may provide you with a PPP connection so
that the provider's server can respond to your requests, pass them on to the Internet,
and forward your requested Internet responses back to you.
1. PPP defines the format of the frame that has to be exchanged between 2 devices.
2. PPP was designed to support multiple network protocols simultaneously.
It can transfer packets that are produced by different network layer protocols
3. PPP defines how 2 devices can authenticate each other.
4. PPP defines how network layer data are encapsulated in the data link frame.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 15
2. Establish: Connection goes into this phase when one of the nodes start communication. In
this phase, two parties negotiate the options. If negotiation is successful, the system goes into
authentication phase or directly to networking phase. LCP(link control protocol) packets are
used for this purpose.
3. Authenticate: This phase is optional. The two nodes may decide during the establishment
phase, not to skip this phase. However if they decide to proceed with authentication, they
send several authentication packets. If the result is successful, the connection goes to the
networking phase; otherwise, it goes to the termination phase.
4. Network: negotiation for the network layer protocols takes place.
ex: when a PC is connecting to an IP network, NCP(network control protocol) dynamically
assigns IP address.
5. Open: In this phase, data transfer takes place. The connection remains in this phase until
one of the endpoints wants to end the connection.
6. Terminate: In this phase connection is terminated.
HDLC provides two common transfer modes that can be used in different
configurations:
normal response mode (NRM) and asynchronous balanced mode (ABM).
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 16
Normal Response Mode:
In normal response mode (NRM), the station configuration is unbalanced. We have one
primary station and multiple secondary stations. A primary station can send commands, a
secondary station can only respond. The NRM is used for both point-to-point and multiple-
point links, as shown in the following figure.
In asynchronous balanced mode (ABM), the configuration is balanced. The link is point-to-
point, and each station can function as a primary and a secondary (acting as peers). This is the
common mode today.
1. Flag field: The flag field of an HDLC frame is an 8-bit bit pattern that identifies both the
beginning and the end of a frame .
2. Address field: The second field of an HDLC frame contains the address of the secondary
station. If a primary station created the frame, it contains to address. If a secondary creates
the frame, it contains a from address.
3. Control field: The control field is a 1- or 2-byte segment of the frame used for flow and
error control.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 17
4. Information field: The information field contains the user's data. Its length can vary from
one network to another.
5. FCS field: The frame check sequence (FCS) is the HDLC error detection field.
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 18
DCN notes – UNIT3 VBCA A – PRESIDENCY COLLEGE FACULTY: Ms. Anitha Page 19