Chapter 5- Data Link Control
Chapter 5- Data Link Control
DLC (data link control) is the service provided by the Data Link layer defined in the open System
Interconnection (OSI) model for network communication. The Data Link layer is responsible for providing
reliable data transfer across one physical link (or telecommunications path) within the network.
HDLC Frame
HDLC is a bit-oriented protocol where each frame contains up to six fields. The structure varies according
to the type of frame. The fields of an HDLC frame are –
Flag- It is an 8-bit sequence that marks the beginning and the end of the frame. The bit patternof
the flag is 01111110.
Address - It contains the address of the receiver. If the frame is sent by the primary station, it
contains the address (es) of the secondary station(s). If it is sent by the secondary station, it
contains the address of the primary station. The address field may be from 1 byte to several.
Control - It is 1 or 2 bytes containing flow and error control information.
Payload- This carries the data from the network layer. Its length may vary from one network to
another.
FCS – It is a 2-byte or 4 bytes frame check sequence for error detection. The standard code used
is CRC (cyclic redundancy code)
PPP Frame
PPP is a byte-oriented protocol where each field of the frame is composed of one or more bytes. Thefields
of a PPP frame are –
Flag- 1 byte that marks the beginning and the end of the frame. The bit pattern of the flag is 01111110.
Address- 1 byte which is s set to 11111111 in case of broadcast. C to .
Control – 1 byte set to a constant value of 11000000.
Protocol – 1 or 2 bytes that define the type of data contained in the payload field.
Payload- This carries the data from the network layer. The maximum length of the payload field is 1500
bytes. However, this may be negotiated between the endpoints of communication.
FCS – It is a 2-byte or 4 bytes frame check sequence for error detection. The standard code used is CRC
(cyclic redundancy code)
Byte Stuffing in PPP Frame - Byte stuffing is used in the PPP payload field whenever the flag sequence
appears in the message so that the receiver does not consider it as the end of the frame The escape byte,
01111101, is stuffed before every byte that contains the same byte as the flag byte or the escape
byte. The receiver on receiving the message removes the escape byte before passing it onto the network
layer.
Several data streams originating from several nodes are transferred through the multi-point transmission
channel.
ALOHA
ALOHA, the earliest random access method was developed at the University of Hawai in early 1970. It
was designed for radio (wireless) LAN, but it can be used on any shared medium. There are potential
collisions in this arrangement. The medium is shared between the stations. When a station sends data,
another station may attempt to do so at the same time. The data from the two stations collide and become
garbled. There are two variations of the ALOHA protocol:
1. Pure ALOHA
The original ALOHA protocol is called pure ALOHA. This is a simple, but elegant protocol. The idea is
that each station sends a frame whenever it has a frame to send. However, since there is only one channel
toshare, there is the possibility of collision between frames from different stations.
The pure ALOHA protocol relies on acknowledgments from the receiver. When a station sends a frame, it
expects the receiver to send an acknowledgment. If the acknowledgment does not arrive after a time- out
period, the station assumes that the frame (or the acknowledgment) has been destroyed and
resends the frame, A collision involves two or more stations. If all these stations try resend their frames
after the time-out, the frames will collide again. Pure ALOHA dictates that when the time-out period
passes, each station waits a random amount of time before resending its frame. The randomness will help
avoid more collisions. We call this time the back-off time T(B)
Vulnerable time: Vulnerable time is the Length of time, in which there is a possibility of collision. We
assume that the stations send fixed-length frames with each frame taking T(fr) s to send.
Because a station is allowed to send only at the beginning of the synchronized time slot, if a station
misses this moment, it must wait until the beginning of the next time slot. This means that the station
which started at the beginning of this slot has already finished sending its frame. But, still there is the
possibility of collision if two stations try to send at the beginning of the same time slot. However, the
vvuerable time is now reduced to one-half, equal to Tfr.
P-Persistent: The p-persistent method is used if the channel has time slots with a slot duration equal to
or greater than the maximum propagation time. The p-persistent approach combines the advantages of the
other two strategies.
It reduces the chance of collision and improves efficiency. In this method, after the station finds the line
idle it follows these steps:
1. With probability p, the station sends its frame.
2. With probability q = 1 – p, the station waits for the beginning of the next time slot and checks
the line again.
a. If the line is idle, it goes to step 1.
b. If the line is busy, it acts as though a collision has occurred and uses the back off procedure.
• The first difference is the addition of the persistence process. We need to sense the channel before we
start sending the frame by using one of the persistence processes we discussed previously (non-
persistent, I-persistent, or p-persistent).
• The second difference is the frame transmission. In ALOHA, we first transmit the entire frame and then
wait for an acknowledgment. In CSMA/CD, transmission and collision detection is a continuous process.
We constantly monitor in order to detect one of two conditions: either transmission is finished or a
collision is detected. Either event stops transmission.
• The third difference is the sending of a short jamming signal that enforces the collision in case other
stations have not yet sensed the collision.
Energy Level:
We can say that the level of energy in a channel can have three values: zero, normal, and abnormal. At
the zero level, the channel is idle. At the normal level, a station has successfully captured the channel
and is sending its frame. At the abnormal level, there is a collision and the level of the energy is twice
the normal level. A station that has a frame to send or is sending a frame needs to monitor the energy
level to determine if the channel is idle, busy, or in collision mode.
Throughput
The throughput of CSMA/CD is greater than that of pure or slotted ALOHA. The maximum throughput
occurs at a different value of G and is based on the persistence method and the value of p in the p-
persistent approach. For 1-persistent method the maximum throughput is around 50 percent when G
=1. For non-persistent method, the maximum throughput can go up to 90 percent when G is between 3 and
8.
Disadvantages of CSMA/CA
The algorithm calls for long waiting times.
It has high power consumption.
Reservation
In the reservation method, a station needs to make a reservation before sending data. Time is divided into
intervals. In each interval, a reservation frame precedes the data frames sent in that interval.
If there are N stations in the system, there are exactly N reservation mini-slots in the reservation frame.
Each mini-slot belongs to a station. When a station needs to send a data frame, it makes a reservation in its
own mini-slot. The stations that have made reservations can send their data frames after the reservation
frame. The following figure shows a situation with five stations and a five mini-slot reservation frame. In
the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1
has made a reservation.
Polling
Polling works with topologies in which one device is designated as a primary station and the other
devices are secondary stations. All data exchanges must be made through the primary device even when
the ultimate destination is a secondary device. The primary device controls the link; the secondary
devices follow its instructions. It is up to the primary device to determine which device is allowed to use
the channel at a given time. The primary device, therefore, is always the initiator of a session.
If the primary wants to receive data, it asks the secondary’s if they have anything to send, this is called
poll function. If the primary wants to send data, it tells the secondary to get ready to receive; this is
called select function.
Select:
The select function is used whenever the primary device has something to send. If it has something to
send, the primary device sends it. It has to know whether the target device is prepared to receive or not. So
the primary must alert the secondary to the upcoming transmission and wait for an acknowledgment of the
secondary's ready status. Before sending data, the primary creates and transmits a select (SEL) frame, one
field of which includes the address of the intended secondary.
Polling:
Polling works with topologies in which one device is designated as a primary station and the
other devices are secondary stations. All data exchanges must be made through the primary
device even when the ultimate destination is a secondary device.
3. Token Passing:
In the token-passing method, the stations in a network are organized in a logical ring. In other words, for
each station, there is a predecessor and a successor.
The predecessor is the station which is logically before the station in the ring;
The successor is the station which is after the station in the ring.
The current station is the one that is accessing the channel now.
The right to this access has been passed from the predecessor to the current station. The right will be
passed to the successor when the current station has no more data to send.
Token management is needed for this access method. Stations must be limited in the time they can have
possession of the token. The token must be monitored to ensure it has not been lost or destroyed. For
example, if a station that is holding the token fails, the token will disappear from the network. Another
function of token management is to assign priorities to the stations and to the types of data being
transmitted. And finally, token management is needed to make low- priority stations release the token to
high priority stations.
Logical Ring:
In a token-passing network, stations do not have to be physically connected in a ring; the ring can be a
logical one. The following figure show four different physical topologies that can create a logical ring.
Physical Ring:
Bus Ring:
In the bus ring topology, also called a token bus, the stations are
connected to a single cable called a bus. They, however, make a
logical ring, because each station knows the address of its
successor (and also predecessor for token management
purposes). When a station has finished sending its data, it
releases the token and inserts the address of its successor in
the token. Only the station with the address matching the
destination address of the token gets the token to access the
shared media. The Token Bus LAN, standardized by IEEE,
uses this topology.
Star Ring:
Only that station can transmit the data which is Only one station can transmit the data frames at a
approved by all other stations in that network. time.
The transmission is based on the availability of the Collision-free transmission through the
transmission channel communication channel
Channel bandwidth is used to alert the station Channel bandwidth carries explicit information that
during collision allows stations to schedule the transmission
Collision are more Collision are less
Channelization
Channelization is a multiple-access method in which the available bandwidth of a link is shared in time,
frequency, or through code, between different stations. The three channelization protocols are FDMA,
TDMA, and CDMA.
The Frequency-Division Multiple Access (FDMA):
In frequency-division multiple access (FDMA), the available bandwidth is divided into frequency
bands. Each station is allocated a band to send its data. In other words, each band is reserved for a
specific station, and it belongs to the station all the time. Each station also uses a bandpass filter to
confine thetransmitter frequencies. To prevent station interferences, the allocated bands are separated
from one another by small guard bands.
Time-Division Multiple Access (TDMA):
In time-division multiple access (TDMA), the stations share the bandwidth of the channel in time. Each
station is allocated a time slot during which it can send data. Each station transmits its data in is
assigned time slot.
CDMA simply means communication with different codes. CDMA differs from FDMA because only one
channel occupies the entire bandwidth of the link. It differs from TDMA because all stations can send
data simultaneously; there is no timesharing.
There are two properties for codes
Ci*Cj=0 for all I != J, i.e.. If we multiply each code by another code, we get 0.
Ci*Ci=n where, n is the number of stations. i.e.. If we multiply each by code by itself.
Any station that wants to receive data from one of the other three multiplies the data on the channel by the
code of the sender. For example, suppose stations 1 and 2 are talking to each other. Station 2 wants to
hear what station 1 is saying. It multiplies the data on the channel by c1 the code of station1. Because
(c1.c1) is 4, but (c2 . c1), (c3. c1), and (c4 .c1) are all 0s, station 2 divides the result by 4 to get the data
from station1.
Data=[(d1.c1+d2.c2+d3.c3+d4.c4).c1]/4
=[d1.c1.c1+d2.c2.c1+d3.c3.c1+d4.c4.c1]
=[4xd1+0+0+0]/4
= d1
Comparison between FDMA, TDMA and CDMA