Cs3591 CN Unit 5 Notes
Cs3591 CN Unit 5 Notes
Data Link Layer – Framing – Flow control – Error control – Data-Link Layer Protocols –
HDLC –PPP - Media Access Control – Ethernet Basics – CSMA/CD – Virtual LAN –
Wireless LAN (802.11)- Physical Layer: Data and Signals - Performance – Transmission
media- Switching – Circuit
• Logical Link Control: It deals with protocols, flow-control, and error control
• Media Access Control: It deals with actual control of media
• Framing
• Addressing
• Error Control
• Flow Control
5.2 Framing
Framing is a point-to-point connection between two computers or devices consisting of a wire
in which data is transmitted as a stream of bits. However, these bits must be framed into
discernible blocks of information.
Framing is a function of the data link layer. It provides a way for a sender to transmit a set of
bits that are meaningful to the receiver. Frames have headers that contain information such as
error-checking codes.
At the data link layer, it extracts the message from the sender and provides it to the receiver by
providing the sender’s and receiver’s addresses.
The process of dividing the data into frames and reassembling it is transparent to the user and
is handled by the data link layer.
Framing is an important aspect of data link layer protocol design because it allows the
transmission of data to be organized and controlled.
• Frame Header − It contains the source and the destination addresses of the frame.
• Payload field − It contains the message to be delivered.
• Trailer − It contains the error detection and error correction bits.
• Flag − It marks the beginning and end of the frame.
Types of framing
1. Fixed-size: The frame is of fixed size and there is no need to provide boundaries to the
frame, the length of the frame itself acts as a delimiter.
Drawback: It suffers from internal fragmentation if the data size is less than the
frame size
Solution: Padding
2. Variable size: The size of the frame is variable during this form of framing. In variable-size
framing, we are in need of a way to outline the tip of the frame and also the starting of the
succeeding frame. This can be utilized in local area networks (LAN).
2.1 Length field–To confirm the length of the field, a length field is used. It is utilized in
Ethernet (1EEE 802.3).
2.2 End Delimeter–To confirm the size of the frame, a pattern is worn as a delimiter. This
methodology is worn in the token ring. In short, it is referred to as ED. Two different methods
are used to avoid this condition if the pattern happens within the message.
Most protocols use a special 8-bit pattern flag 01111110 as a result of the delimiter to
stipulate the beginning and so the end of the frame. Bit stuffing is completed at the
sender end and bit removal at the receiver end.
If we have a tendency to get a zero(0) after 5 1s. we have a tendency to tend to still
stuff a zero(0). The receiver will remove the zero. Bit stuffing is in addition said as bit
stuffing.
Byte stuffing is one of the methods of adding an additional byte once there is a flag or
escape character within the text. Take an illustration of byte stuffing as appeared in the
given diagram.
The sender sends the frame by adding three additional ESC bits and therefore the
destination machine receives the frame and it removes the extra bits to convert the
frame into an identical message.
Flow control is a set of procedures that restrict the amount of data a sender should send
before it waits for some acknowledgment from the receiver.
Stop-and-wait Protocol
Stop-and-wait protocol works under the assumption that the communication channel is
noiseless and transmissions are error-free.
Working :
The sliding window protocol is the flow control protocol for noisy channels that allows the
sender to send multiple frames even before acknowledgments are received. It is called a Sliding
window because the sender slides its window upon receiving the acknowledgments for the sent
frames.
Working:
• The sender and receiver have a “window” of frames. A window is a space that
consists of multiple bytes. The size of the window on the receiver side is always 1.
• Each frame is sequentially numbered from 0 to n - 1, where n is the window size at
the sender side.
• The sender sends as many frames as would fit in a window.
• After receiving the desired number of frames, the receiver sends an acknowledgment.
The acknowledgment (ACK) includes the number of the next expected frame.
Error control in data link layer is the process of detecting and correcting data frames that have
been corrupted or lost during transmission.
In case of lost or corrupted frames, the receiver does not receive the correct data-frame and
sender is ignorant about the loss. Data link layer follows a technique to detect transit errors and
The error control mechanism in data link layer involves the following phases −
• A timeout counter is maintained by the sender, which is started when a frame is sent.
• If the sender receives acknowledgment of the sent frame within time, the sender is
confirmed about successful delivery of the frame. It then transmits the next frame in
queue.
• If the sender does not receive the acknowledgment within time, the sender assumes
that either the frame or its acknowledgment is lost in transit. It then retransmits the
frame.
• If the sender receives a negative acknowledgment, the sender retransmits the frame.
Go-Back-N ARQ
• Both the sender and the receiver have buffers called sending window and receiving
window respectively.
• The sender sends multiple frames based upon the sending-window size, without
receiving the acknowledgment of the previous ones.
• The receiver also receives multiple frames within the receiving window size.
• The receiver keeps track of incoming frame’s sequence numbers, buffers the frames in
memory.
• It sends ACK for all successfully received frames and sends NACK for only frames
which are missing or damaged.
• The sender in this case, sends only packet for which NACK is received.
SDLC:
SDLC stands for synchronous data link control protocol, is a communication protocol of a
computer.
It is usually used to carry system network architecture traffic. Synchronous data link protocol
connects all the remote devices to the mainframe computer at the Central location.
SDLC support one to many connections even in case of error detection or error recovery.
SDLC ensures that all the received data units are correct and flow is right from one network
point to the next network point.
HDLC:
HDLC stands for High-level data link control protocol, is a bit-orientated code transparent
synchronous protocol developed by ISO (International organization for standardization)
in1979.
It is based on the SDLC protocol that supports both point-to-point and multipoint
communication.
HDLC frames are transferred over synchronous or asynchronous serial communication links.
HDLC uses various modes such as normal response mode, asynchronous response mode,
asynchronous balanced mode.
Normal response mode is used to share the secondary to primary link without contention.
asynchronous response mode is used for full-duplex links. asynchronous balanced mode,
support combined terminal which can act as both primary and secondary.
SLIP:
SLIP stands for Serial line interface protocol which is used to add framing byte at the end of
the IP Packet. SLIP is a data link layer protocol That transforms the IP packets among ISP
(Internet Service Providers) and home user over dial-up links.
SLIP is designed to work with ports and router connections. SLIP does not provide error
detection, being reliant on upper-layer protocols for this. Therefore, SLIP on its own is not
satisfactory over an error-prone dial-up connection.
PPP:
PPP stands for Point to point protocol. PPP is a data link layer protocol that provides the
same services as the Serial line interface protocol.
It is a robust protocol that transfers the other types of pockets also with the IP packets. It
provides two protocols LCP and NCP, that we will discuss in the next section. Point to point
protocol uses framing methods that describe the frames.
Point to point protocol is also called character orientated protocol which is used to detect errors.
PPC provides Connection authentication, data compression, encryption, and transmission. It is
LCP:
LCP stands for Link control protocol, is a part of point-to-point control protocol. LCP packets
determine the standards of data transmission.
LCP protocol is used to determine the identity of the linked devices, if the device is correct it
accepts it otherwise it rejects the device.
It also determines whether the size of the packet is accepted or not. If requirements exceed
the parameters, then the link control protocol terminates that link.
LAP:
LAP stands for Link access procedure is a data link layer protocol that is used for framing
and transfer the data across point-to-point links.
There are three types of Link access procedure – LAPB ( Link Access procedure balanced),
LAPF ( Link Access Procedure Frame-Mode Bearer Services), and LAPD (Link Access
Procedure D-Channel.
LAP was originally derived from HDLC (High-Level Data Link Control), but was later
updated and renamed LAPB (LAP Balanced).
NCP:
NCP stands for Network control protocol, is a part of the point-to-point protocol. The network
control protocol is used to negotiate the parameter and facilities for the network layer.
For every higher-layer protocol supported by PPP, one NCP is there. IPCP ( Internet Protocol
control protocol), DNCP (DECnet Phase IV Control Protocol), OSINLCP (OSI Network Layer
Control Protocol), IPXCP (Internetwork Packet Exchange Control Protocol), NBFCP
(NetBIOS Frames Control Protocol), IPV6CP (IPv6 Control Protocol) are some of the NCPs.
5.6 HDLC
High-level Data Link Control (HDLC) is a group of communication protocols of the data link
layer for transmitting data between network points or nodes. Since it is a data link protocol,
data is organized into frames. A frame is transmitted via the network to the destination that
verifies its successful arrival. It is a bit - oriented protocol that is applicable for both point - to
- point and multipoint communications.
Transfer Modes
HDLC supports two types of transfer modes, normal response mode and asynchronous
balanced mode.
Asynchronous Balanced Mode (ABM) − Here, the configuration is balanced, i.e. each
station can both send commands and respond to commands. It is used for only point - to -
point communications.
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 a HDLC frame are −
• Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The
bit pattern of 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 bytes.
• 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. The fields 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 set to 11111111 in case of broadcast.
• 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.
MAC address or media access control address is a unique identifier allotted to a network
interface controller (NIC) of a device. It is used as a network address for data transmission
within a network segment like Ethernet, Wi-Fi, and Bluetooth. MAC address is assigned to a
network adapter at the time of manufacturing. It is hardwired or hard-coded in the network
interface card (NIC). A MAC address comprises of six groups of two hexadecimal digits,
separated by hyphens, colons, or no separators. An example of a MAC address is
00:0A:89:5B:F0:11.
5.8.3 ALOHA:
ALOHA is a system for coordinating and arbitrating access to a shared communication
Networks channel. A shared communication system like ALOHA requires a method of
handling collisions that occur when two or more systems attempt to transmit on the channel at
the same time. Aloha means "Hello". Aloha is a multiple access protocol at the datalink layer
and proposes how multiple terminals access the medium without interference or collision.
Pure ALOHA
• In pure ALOHA, the stations transmit frames whenever they have data to send.
• When two or more stations transmit simultaneously, there is collision and the frames are
destroyed.
• In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement
from the receiver.
• If acknowledgement is not received within specified time, the station assumes that the frame
(or acknowledgement) has been destroyed.
If the frame is destroyed because of collision the station waits for a random amount of time
and sends it again. This waiting time must be random otherwise same frames will collide
again and again.
• Therefore pure ALOHA dictates that when time-out period passes, each station must wait
for a random amount of time before resending its frame. This randomness will help avoid
more collisions.
• Whenever two frames try to occupy the channel at the same time, there will be a collision
and both will be damaged. If first bit of a new frame overlaps with just the last bit of a frame
almost finished, both frames will be totally destroyed and both will have to be retransmitted.
Slotted ALOHA
• Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of
collision in pure ALOHA are very high.
• In slotted ALOHA, the time of the shared channel is divided into discrete intervals called
slots. The stations can send a frame only at the beginning of the slot and only one frame is
sent in each slot.
• In slotted ALOHA, if any station is not able to place the frame onto the channel at the
beginning of the slot i.e. it misses the time slot then the station has to wait until the beginning
of the next time slot.
• In slotted ALOHA, there is still a possibility of collision if two stations try to send at the
beginning of the same time slot as shown in fig.
Standard Ethernet has many physical layer implementations. The four main physical layer
implementations are shown in the following diagram
• Although there are several types of optical fiber 10-Mbps Ethernet, the most
common is called 10Base-F.
• 10Base-F uses a star topology to connect stations to a hub.
• The stations are connected to the hub using two fiber-optic cables.
5.10 CSMA/CD
Carrier Sense in CSMA/CD means that all the nodes sense the medium to check whether it
is idle or busy.
• If the carrier sensed is idle, then the node transmits the entire frame.
• If the carrier sensed is busy, the transmission is postponed.
Collision Detect means that a node listens as it transmits and can therefore detect when a
frame it is transmitting has collided with a frame transmitted by another node.
• The non-persistent approach reduces the chance of collision because it is unlikely that two
or more stations will wait the same amount of time and retry to send simultaneously.
• However, this method reduces the efficiency of the network because the medium remains
idle when there may be stations with frames to send.
Persistent Strategy
1-Persistent :
• This method has the highest chance of collision because two or more stations may find the
line idle and send their frames immediately.
P-Persistent :
• In this method, after the station finds the line idle it follows these steps:
• With probability p, the station sends its frame.
• With probability q = 1 − p, the station waits for the beginning of the next time slot and
checks the line again.
• 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
EXPONENTIAL BACK-OFF
• Once an adaptor has detected a collision and stopped its transmission, it waits a certain
amount of time and tries again.
• Each time it tries to transmit but fails, the adaptor doubles the amount of time
• Protocol VLAN − Here, the traffic is handled based on the protocol used. A switch or
bridge segregates, forwards or discards frames the come to it based upon the traffics
protocol.
• Port-based VLAN − This is also called static VLAN. Here, the network
administrator assigns the ports on the switch / bridge to form a virtual network.
• Dynamic VLAN − Here, the network administrator simply defines network
membership according to device characteristics.
Analog data refers to data that is of continuous format whereas digital data is one which has
discrete states. So the analog data takes continuous values and digital data takes discrete
values. Analog data can be directly converted into an analog signal or sampled and converted
to digital signal. In quite a similar fashion digital data can also be converted to digital signal
or into analog signal after modulation. These are converted so that efficient transmission can
take place.
Similar to data, the signals which represent these can also be digital or analog. Analog signals
are known to have many levels of intensity over a given period of time. As the wave moves
from one value to another, along the path it traverses via infinite number of values. Digital
signals rather have only definite set of values. These are represented using a pair of
perpendicular axes. The vertical axis represents the strength of the signal and the horizontal
axis gives the time period.
• High Speed
• Secure
• Used for comparatively shorter distances
• ⇢ Least expensive
• ⇢ Easy to install
• ⇢ High-speed capacity
Disadvantages:
Applications:
Advantages:
⇢ Eliminates crosstalk
⇢ Comparatively faster
Disadvantages:
⇢ More expensive
⇢ Bulky
• High Bandwidth
• Better noise Immunity
• Easy to install and expand
• Inexpensive
Disadvantages:
Advantages:
Disadvantages:
(iv) Stripline
(v) Microstripline
In this, the conducting material is separated from the ground plane by a layer of dielectric.
2. Unguided Media:
It is also referred to as Wireless or Unbounded transmission media. No physical medium is
required for the transmission of electromagnetic signals.
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the
height of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile
phone communication and television distribution.
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate
through obstacles. This prevents interference between systems. Frequency Range:300GHz –
400THz. It is used in TV remotes, wireless mouse, keyboard, printer, etc.
5.13.3 Switching
In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
Switching technique is used to connect the systems for making one-to-one communication.
Circuit Switching
• Circuit establishment
• Data transfer
• Circuit Disconnect
The incoming and outgoing signals when received and re-transmitted in a different time
slot, is called Time Division Switching.
Message Switching
Packet Switching
• The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
• The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
• Every packet contains some information in its headers such as source address,
destination address and sequence number.
• Packets will travel across the network, taking the shortest path as possible.