Computer Networks 1
Computer Networks 1
Computer Networks 1
DIGITAL NOTES
ON
COMPUTER NETWORKS
(R18A0518)
B.TECH III YEAR – II SEM (R18)
(2020-21)
UNIT - I:
Introduction: Network, Uses of Networks, Types of Networks, Reference Models: TCP/IP Model,
The OSI Model, Comparison of the OSI and TCP/IP reference model. Architecture of Internet.
Physical Layer: Guided transmission media, Wireless transmission media, Switching.
UNIT - II:
Data Link Layer - Design issues, Error Detection & Correction, Elementary Data Link Layer
Protocols, Sliding window protocols
Multiple Access Protocols - ALOHA, CSMA,CSMA/CD, CSMA/CA, Collision free protocols,
Ethernet- Physical Layer, Ethernet Mac Sub layer, Data link layer switching: Use of bridges,
learning bridges, spanning tree bridges, repeaters, hubs, bridges, switches, routers and gateways.
UNIT - III:
Network Layer: Network Layer Design issues, store and forward packet switching connection less
and connection oriented networks-routing algorithms-optimality principle, shortest path, flooding,
Distance Vector Routing, Count to Infinity Problem, Link State Routing, Path Vector Routing,
Hierarchical Routing; Congestion control algorithms, IP addresses, CIDR, Sub netting, Super
netting, IPv4, Packet Fragmentation, IPv6 Protocol, Transition from IPv4 to IPv6, ARP, RARP.
UNIT - IV:
Transport Layer: Services provided to the upper layers elements of transport protocol- addressing
connection establishment, Connection release, Error Control & Flow Control, Crash Recovery.
The Internet Transport Protocols: UDP, Introduction to TCP, The TCP Service Model, The TCP Segment
Header, The Connection Establishment, The TCP Connection Release, The TCP Sliding Window, The TCP
Congestion Control Algorithm
UNIT - V:
Application Layer- Introduction, providing services, Applications layer paradigms: Client server model,
HTTP, E-mail, WWW, TELNET, DNS; RSA algorithm.
TEXT BOOKS:
1. Data Communications and Networking - Behrouz A. Forouzan, Fifth Edition TMH, 2013.
2. Computer Networks - Andrew S Tanenbaum, 4th Edition, Pearson Education.
UNIT -I
Introduction to Computer Networks
Data Communication: When we communicate, we are sharing information.
This sharing can be local or remote. Between individuals, local communication
usually occurs face to face, while remote communication takes place over distance.
Components:
A data communications system has five components.
2. Sender. The sender is the device that sends the data message. It can be a computer,
workstation, telephone handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver. Some examples of transmission media include twisted-pair wire,
coaxial cable, fiber-optic cable, and radio waves
NETWORKS
A network is a set of devices (often referred to as nodes) connected by communication links. A node
can be a computer, printer, or any other device capable of sending and/or receiving data generated by
other nodes on the network.
Distributed Processing
Most networks use distributed processing, in which a task is divided among multiple computers.
Instead of one single large machine being responsible for all aspects of a process, separate
computers (usually a personal computer or workstation) handle a subset.
Network Criteria
A network must be able to meet a certain number of criteria. The most important of these are
performance, reliability, and security.
Performance:
Performance can be measured in many ways, including transit time and response time.
Reliability:
Security:
Physical Structures:
Type of Connection
A multipoint (also called multi drop) connection is one in which more than two specific
devices share a single link.
Physical Topology
The term physical topology refers to the way in which a network is laid out physically. One or
more devices connect to a link; two or more links form a topology. The topology of a network is
the geometric representation of the relationship of all the links and linking devices (usually
called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring
Mesh: In a mesh topology, every device has a dedicated point-to-point link to every other
device. The term dedicated means that the link carries traffic only between the two devices it
connects.
To accommodate that many links, every device on the network must have n – 1 input/output
(VO) ports to be connected to the other n - 1 stations.
Advantages:
1. The use of dedicated links guarantees that each connection can carry its own data load,
thus eliminating the traffic problems that can occur when links must be shared by
multiple devices.
Disadvantages:
1. Disadvantage of a mesh are related to the amount of cabling because every device must
be connected to every other device, installation and reconnection are difficult.
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub.
Other advantages include robustness. If one link fails, only that link is affected. All other links
remain active. This factor also lends itself to easy fault identification and fault isolation. As long
as the hub is working, it can be used to monitor link problems and bypass defective links.
One big disadvantage of a star topology is the dependency of the whole topology on one single
point, the hub. If the hub goes down, the whole system is dead.
Bus Topology:
The preceding examples all describe point-to-point connections. A bus topology, on the
other hand, is multipoint. One long cable acts as a backbone to link all the devices in a network
Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection
A second type of broadcast system is the ring. In a ring, each bit propagates around on its own,
not waiting for the rest of the packet to which it belongs. Typically, each bit circumnavigates the
entire ring in the time it takes to transmit a few bits, often before the complete packet has even
been transmitted. As with all other broadcast systems, some rule is needed for arbitrating
simultaneous accesses to the ring. Various methods, such as having the machines take turns, are
in use. IEEE 802.5 (the IBM token ring), is a ring-based LAN operating at 4 and 16 Mbps. FDDI
is another example of a ring network.
Metropolitan Area Network (MAN):
A metropolitan area network, or MAN, covers a city. The best-known example of a MAN is the
cable television network available in many cities.
In 1967, at an Association for Computing Machinery (ACM) meeting, ARPA presented its ideas
for ARPANET, a small network of connected computers. The idea was that each host computer
(not necessarily from the same manufacturer) would be attached to a specialized computer,
called an interface message processor (IMP). The IMPs, would be connected to one another.
Each IMP had to be able to communicate with other IMPs as well as with its own attached host.
By 1969, ARPANET was a reality. Four nodes, at the University of California at Los Angeles
(UCLA), the University of California at Santa Barbara (UCSB), Stanford Research Institute
(SRI), and the University of Utah, were connected via the IMPs to form a network. Software
called the Network Control Protocol (NCP) provided communication between the hosts.
In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group,
collaborated on what they called the Internet ting Projec1. Cerf and Kahn's landmark 1973 paper
outlined the protocols to achieve end-to-end delivery of packets. This paper on Transmission
Control Protocol (TCP) included concepts such as encapsulation, the datagram, and the functions
of a gateway. Shortly thereafter, authorities made a decision to split TCP into two protocols:
Transmission Control Protocol (TCP) and Internetworking Protocol (lP). IP would handle
datagram routing while TCP would be responsible for higher-level functions such as
Segmentation, reassembly, and error detection. The internetworking protocol became known
as TCPIIP.
The Internet Today
The Internet has come a long way since the 1960s. The Internet today is not a simple hierarchical
structure. It is made up of many wide- and local-area networks joined by connecting devices and
switching stations. It is difficult to give an accurate representation of the Internet because it is
continually changing-new networks are being added, existing networks are adding addresses,
and networks of defunct companies are being removed. Today most end users who want Internet
connection use the services of Internet Service Providers (lSP).
At the top of the hierarchy are the international service providers that connect nations
together.
National Internet Service Providers:
The national Internet service providers are backbone networks created and maintained by
specialized companies. these backbone networks are connected by complex switching stations
(normally run by a third party) called network access points (NAPs).
Regional Internet Service Providers:
Regional internet service providers or regional ISPs are smaller ISPs that are connected
to one or more national ISPs. They are at the third level of the hierarchy with a smaller data rate.
Local Internet Service Providers:
Local Internet service providers provide direct service to the end users. The local ISPs
can be connected to regional ISPs or directly to national ISPs.
Comparison of the OSI and TCP/IP Reference Models:
The OSI and TCP/IP reference models have much in common. Both are based on the
concept of a stack of independent protocols. Also, the functionality of the layers is roughly
similar. For example, in both models the layers up through and including the transport layer are
there to provide an end-to-end, network-independent transport service to processes wishing to
communicate. Three concepts are central to the OSI model:
1. Services.
2. Interfaces.
3. Protocols.
Probably the biggest contribution of the OSI model is to make the distinction between these three
concepts explicit. Each layer performs some services for the layer above it. The service
definition tells what the layer does, not how entities above it access it or how the layer works. It
defines the layer's semantics.
The TCP/IP model did not originally clearly distinguish between service, interface, and protocol,
although people have tried to retrofit it after the fact to make it more OSI-like. For example, the
only real services offered by the internet layer are SEND IP PACKET and RECEIVE IP
PACKET.
Architecture of Internet
Computer Network Architecture is defined as the physical and logical design of the software,
hardware, protocols, and media of the transmission of data. Simply we can say that how
computers are organized and how tasks are allocated to the computer.
The two types of network architectures are used:
Peer-To-Peer network
Client/Server network
Peer-To-Peer network
Peer-To-Peer network is a network in which all the computers are linked together with
equal privilege and responsibilities for processing the data.
Peer-To-Peer network is useful for small environments, usually up to 10 computers.
Therefore, it cannot back up the data as the data is different in different locations.
It has a security issue as the device is managed itself.
Client/Server Network
Client/Server network is a network model designed for the end users called clients, to
access the resources such as songs, video, etc. from a central computer known as Server.
The central controller is known as a server while all other computers in the network are
called clients.
I. TRANSMISSION MEDIA
A transmission medium can be broadly defined as anything that can carry information from a
source to a destination. For example, the transmission medium for two people having a dinner
conversation is the air. The air can also be used to convey the message in a smoke signal or
semaphore. For a written message, the transmission medium might be a mail carrier, a truck, or
an airplane. In data communications the definition of the information and the transmission
medium is more specific. The transmission medium is usually free space, metallic cable or
optical cable. The information is usually a signal that is the result of conversion of data from
another form.
Guided Media
Guided media, which are those that provide a conduit from one device to another, include
twisted-pair cable, coaxial cable, and fiber-optic cable.
1. Twisted-Pair Cable
A twisted pair consists of two conductors (normally copper), each with its own plastic insulation,
twisted together, as shown below figure.
One of the wires is used to carry signals to the receiver, and the other is used only as a ground
reference. The receiver uses the difference between the two. In addition to the signal sent by the
sender on one of the wires, interference (noise) and crosstalk may affect both wires and create
unwanted signals. If the two wires are parallel, the effect of these unwanted signals is not the
same in both wires because they are at different locations relative to the noise or crosstalk
sources (e,g., one is closer and the other is farther).
Applications
Twisted-pair cables are used in telephone lines to provide voice and data channels. The local
loop-the line that connects subscribers to the central telephone office-commonly consists of
Unshielded twisted pair cables. The DSL line that are used by the telephone companies to
provide high-data-rate connections also use the high-bandwidth capability of unshielded twisted-
pair cables. Local-area networks, such as lOBase-T and lOOBase-T, also use twisted-pair cables.
2. Coaxial Cable
Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair
cable, in part because the two media are constructed quite differently. Instead of having two
wires, coax has a central core conductor of solid or stranded wire (usually copper) enclosed in an
insulating sheath, which is, in turn, encased in an outer conductor of metal foil, braid, or a
combination of the two. The outer metallic wrapping serves both as a shield against noise and as
the second conductor, which completes the circuit. This outer conductor is also enclosed in an
insulating sheath, and the whole cable is protected by a plastic cover (below figure).
Applications
Coaxial cable was widely used in analog telephone networks where a single coaxial network
could carry 10,000 voice signals. Later it was used in digital telephone networks where a single
coaxial cable could carry digital data up to 600 Mbps. However, coaxial cable in telephone
networks has largely been replaced today with fiber-optic cable. Cable TV networks also
usecoaxial cables. In the traditional cable TV network, the entire network used coaxial cable.
Fiber Optic Cable: A fiber-optic cable is made of glass or plastic and transmits signals in the
form of light. To understand optical fiber, we first need to explore several aspects of the nature
of light. Light travels in a straight line as long as it is moving through a single uniform If a ray of
light traveling through one substance suddenly enters another substance (of a different density),
the ray changes direction. Figure 7.10 shows how a ray of light changes direction when going
from a more dense to a less dense substance.
As the figure shows, if the angle of incidence I (the angle the ray makes with the line
perpendicular to the interface between the two substances) is less than the critical angle, the ray
refracts and moves closer to the surface. If the angle of incidence is equal to the critical angle,
the light bends along the interface. If the angle is greater than the critical angle, the ray reflects
(makes a turn) and travels again in the denser substance. Note that the critical angle is a property
of the substance, and its value differs from one substance to another.
Cable Composition
Figure 7.14 shows the composition of a typical fiber-optic cable. The outer jacket is made of
either PVC or Teflon. Inside the jacket are Kevlar strands to strengthen the cable. Kevlar is a
strong material used in the fabrication of bulletproof vests. Below the Kevlar is another plastic
coating to cushion the fiber. The fiber is at the center of the cable, and it consists of cladding and
core.
Applications
Fiber-optic cable is often found in backbone networks because its wide bandwidth is cost-
effective. Today, with wavelength-division multiplexing (WDM), we can transfer data at a rate
of 1600 Gbps. The SONET network provides such a backbone. Some cable TV companies use a
combination of optical fiber and coaxial cable, thus creating a hybrid network. Optical fiber
provides the backbone structure while coaxial cable provides the connection to the user premises.
Advantages
Fiber-optic cable has several advantages over metallic cable (twisted pair or coaxial).
1. Higher bandwidth. Fiber-optic cable can support dramatically higher bandwidths (and
hence data rates) than either twisted-pair or coaxial cable. Currently, data rates and
bandwidth utilization over fiber-optic cable are limited not by the medium but by the
signal generation and reception technology available.
2. Disadvantages
through free space and thus are available to anyone who has a device capable of receiving them.
Unguided signals can travel from the source to destination in several ways: ground propagation,
sky propagation, and line-of-sight propagation, as shown in Figure 7.18. In ground
propagation,radio waves travel through the lowest portion of the atmosphere, hugging the earth.
These low-frequency signals emanate in all directions from the transmitting antenna and follow
the curvature of the planet. Distance depends on the amount of power in the signal: The greater
the power, the greater the distance. In sky propagation, higher-frequency radio waves radiate
upward into the ionosphere where they are reflected back to earth.
This type of transmission allows for greater distances with lower output power. In line of sight
propagation, very high frequency signals are transmitted in straight lines directly from antenna to
antenna. Antennas must be directional, facing each other, and either tall enough or close enough
together not to be affected by the curvature of the earth. Line-of-sight propagation is tricky
because radio transmissions cannot be completely focused.
1. Radio Waves
Waves ranging in frequencies between 3 kHz and 1 GHz are called radio waves. Radio waves,
for the most part, are omni directional. When an antenna transmits radio waves, they are
propagated in all directions. This means that the sending and receiving antennas do not have to
be aligned. A sending antenna sends waves that can be received by any receiving antenna.
Radio waves use omni directional antennas that send out signals in all directions. Based on the
wavelength, strength, and the purpose of transmission, we can have several types of antennas.
Below figure 7.20 shows an omni directional antenna.
Applications
The omni directional characteristics of radio waves make them useful for multicasting, in which
there is one sender but many receivers. AM and FM radio, television, maritime radio, cordless
phones, and paging are examples of multicasting.
2. Microwaves
Electromagnetic waves having frequencies between I and 300 GHz are called microwaves.
Microwaves are unidirectional. When an antenna transmits microwave waves, they can be
narrowly focused. This means that the sending and receiving antennas need to be aligned. The
unidirectional property has an obvious advantage. A pair of antennas can be aligned without
interfering with another pair of aligned antennas. The following describes some characteristics of
microwave propagation:
1. Microwave propagation is line-of-sight. Since the towers with the mounted antennas need
to be in direct sight of each other, towers that are far apart need to be very tall. The
curvature of the earth as well as other blocking obstacles do not allow two short towers
to communicate by using microwaves. Repeaters are often needed for long distance
communication.
2. Very high-frequency microwaves cannot penetrate walls. This characteristic can be
a disadvantage if receivers are inside buildings.
Unidirectional Antenna
Microwaves need unidirectional antennas that send out signals in one direction. Two types of
antennas are used for microwave communications: the parabolic dish and the horn (see below
figure). A parabolic dish antenna is based on the geometry of a parabola: Every line parallel to
the line of symmetry (line of sight) reflects off the curve at angles such that all the lines intersect
in a common point called the focus.
3. Infrared
Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1 mm to 770 nm), can be
used for short-range communication. Infrared waves, having high frequencies, cannot penetrate walls. This
advantageous characteristic prevents interference between one system and another; a short-range
communication system in one room cannot be affected by another system in the next room. When we use
our infrared remote control, we do not interfere with the use of the remote by our neighbors. However, this
same characteristic makes infrared signals useless for long-range communication. In addition, we cannot
use infrared waves outside a building because the sun's rays contain infrared waves that can interfere with
the communication.
Applications
The infrared band, almost 400 THz, has an excellent potential for data transmission. Such a wide
bandwidth can be used to transmit digital data with a very high data rate. The Infrared Data Association
(IrDA), an association for sponsoring the use of infrared waves, has established standards for using these
signals for communication between devices such as keyboards, mice, PCs, and printers. For example,
some manufacturers provide a special port called the IrDA port that allows a wireless keyboard to
communicate with a PC.
SWITCHING
Introduction
A Network Switch is a constituent of computer network that connects two network slices and/or two
network devices (switches or routers) together. Switch can be termed as a network bridge with multiple
ports which helps to process and route packets at data link layer of the OSI reference model. There are
some switches which have capabilities to process data at the upper layers (network layer and above).
Those switches are often termed as multilayer switches.
For data transfer, different types of switching methods are available. They are
I. Circuit Switching
Circuit switched network consists of a set of switches connected by physical links.
In circuit switched network, two nodes communicate with each other over a dedicated
communication path.
Computer Networks Downloaded by Deepak . ([email protected]) Page 33
lOMoARcPSD|25763680
There is a need of pre-specified route from which data will travel and no other data is
permitted.
Before starting communication, the nodes must make a reservation for the resources to be used
during the communication.
In this type of switching, once a connection is established, a dedicated path exists between
both ends until the connection is terminated.
As the connection is dedicated it cannot be used to transmit any other data even if the
channel is free.
It is inefficient in terms of utilization of system resources. As resources are allocated for the
entire duration of connection, these are not available to other connections.
Dedicated channels require more bandwidth.
Prior to actual data transfer, the time required to establish a physical link between the two
stations is too long.
II. Packet Switching
In packet switching, messages are divided into packets of fixed or variable size.
The size of packet is decided by the network and the governing protocol.
Resource allocation for a packet is not done in packet switching.
Resources are allocated on demand.
The resource allocation is done on first-come, first-served basis.
Each switching node has a small amount of buffer space to hold packets temporarily.
If the outgoing line is busy, the packet stays in queue until the line becomes available.
Packet switching method uses two routing methods: 1.
->A source and destination have to go through three phases in a virtual circuit packet switching:
I. Setup phase
ii. Data transfer phase
iii. Connection release phase
A logical connection is established when a sender sends a setup request to the receiver and the
receiver sends back an acknowledgement to the sender if the receiver agree.
All packets belonging to the same source and destination travel the same path.
The information is delivered to the receiver in the same order as transmitted by the sender.
Store and forward – The intermediate nodes have the responsibility of transferring the entire
message to the next node. Hence, each node must have storage capacity. A message will only be
delivered if the next hop and the link connecting it are both available, otherwise it’ll be stored
indefinitely. A store-and-forward switch forwards a message only if sufficient resources are
available and the next hop is accepting data. This is called the store-and-forward property.
UNIT-II
Chapter-I
Data Link Layer
I. Introduction
The data link layer transforms the physical layer, a raw transmission facility, to a link responsible for
node-to-node (hop-to-hop) communication. Specific responsibilities of the data link layer include
framing, addressing, flow control, error control, and media access control.
The network layer wants to be able to send packets to its neighbors without worrying about the
details of getting it there in one piece.
2. Framing
Group the physical layer bit stream into units called frames. Frames are nothing more than "packets"
or "messages". By convention, we use the term "frames" when discussing DLL.
3. Error Control
Sender checksums the frame and transmits checksum together with data. Receiver re-computes the
checksum and compares it with the received value.
4. Flow Control
There are many reasons such as noise, cross-talk etc., which may help data to get
corrupted during transmission. The upper layers work on some generalized view of network
architecture and are not aware of actual hardware data processing. Hence, the upper layers
expect error-free transmission between the systems. Most of the applications would not
function expectedly if they receive erroneous data. Applications such as voice and video may
not be that affected and with some errors they may still function well.
Types of Errors
There may be three types of errors:
Single bit error
Error Detection
Errors in the received frames are detected by means of
(i)Parity Check and
(ii)Cyclic Redundancy Check (CRC).
In both cases, few extra bits are sent along with actual data to confirm that bits received at other end are
same as they were sent. If the counter-check at receiver’ end fails, the bits are considered corrupted.
The receiver simply counts the number of 1s in a frame. If the count of 1s is even and even parity is
used, the frame is considered to be not-corrupted and is accepted. If the count of 1s is odd and odd
parity is used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when more
than one bits are erroneous, then it is very hard for the receiver to detect the error.
(ii) Cyclic Redundancy Check (CRC)
CRC is a different approach to detect if the received frame contains valid data. This technique
involves binary division of the data bits being sent. The divisor is generated using polynomials. The
sender performs a division operation on the bits being sent and calculates the remainder. Before
sending the actual bits, the sender adds the remainder at the end of the actual bits. Actual data bits
plus the remainder is called a codeword. The sender transmits data bits as code words.
At the other end, the receiver performs division operation on code words using the same CRC
divisor. If the remainder contains all zeros the data bits are accepted, otherwise it is considered as
there some data corruption occurred in transit.
Error Correction
In the digital world, error correction can be done in two ways:
Backward Error Correction When the receiver detects an error in the data received, it
requests back the sender to retransmit the data unit.
Forward Error Correction When the receiver detects some error in the data received, it
executes error-correcting code, which helps it to auto-recover and to correct some kinds of
errors.
The first one, Backward Error Correction, is simple and can only be efficiently used where
retransmitting is not expensive. For example, fiber optics. But in case of wireless transmission
retransmitting may cost too much. In the latter case, Forward Error Correction is used.
IV Elementary Data Link Protocols
Protocols in the data link layer are designed so that this layer can perform its basic functions:
framing, error control and flow control. Framing is the process of dividing bit - streams from
physical layer into data frames whose size ranges from a few hundred to a few thousand bytes.
Simplex Protocol
The Simplex protocol is hypothetical protocol designed for unidirectional data transmission over an
ideal channel, i.e. a channel through which transmission can never go wrong. It has distinct
procedures for sender and receiver. The sender simply sends all its data available onto the channelas
soon as they are available its buffer. The receiver is assumed to process all incoming data instantly.
It is hypothetical since it does not handle flow control or error control.
Stop – and – Wait protocol is for noiseless channel too. It provides unidirectional data transmission
without any error control facilities. However, it provides for flow control so that a fast sender does not
drown a slow receiver. The receiver has a finite buffer size with finite processing speed. The sender can
send a frame only when it has received indication from the receiver that it is available for further data
processing.
Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a variation of the above protocol
with added error control mechanisms, appropriate for noisy channels. The sender keeps a copy of the sent
frame. It then waits for a finite time to receive a positive acknowledgement from receiver. If the timer
expires or a negative acknowledgement is received, the frame is retransmitted. If a positive
acknowledgement is received then the next frame is sent.
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgement
for the first frame. It uses the concept of sliding window, and so is also called sliding window
protocol. The frames are sequentially numbered and a finite number of frames are sent. If the
acknowledgement of a frame is not received within the time period, all frames starting from that
frame are retransmitted.
This protocol also provides for sending multiple frames before receiving the acknowledgement for
the first frame. However, here only the erroneous or lost frames are retransmitted, while the good
frames are received and buffered.
Sliding window protocols are data link layer protocols for reliable and sequential delivery of data
frames. The sliding window is also used in Transmission Control Protocol.
In this protocol, multiple frames can be sent by a sender at a time before receiving an
acknowledgment from the receiver. The term sliding window refers to the imaginary boxes to hold
frames. Sliding window method is also known as windowing.
Working Principle
In these protocols, the sender has a buffer called the sending window and the receiver has buffer
called the receiving window.
The size of the sending window determines the sequence number of the outbound frames. If the
sequence number of the frames is an n-bit field, then the range of sequence numbers that can be
assigned is 0 to 2𝑛−1. Consequently, the size of the sending window is 2𝑛−1. Thus in order to
accommodate a sending window size of 2𝑛−1, a n-bit sequence number is chosen.
The size of the receiving window is the maximum number of frames that the receiver can accept at a
time. It determines the maximum number of frames that the sender can send before receiving
acknowledgment.
Example
Suppose that we have sender window and receiver window each of size 4. So the sequence
numbering of both the windows will be 0,1,2,3,0,1,2 and so on. The following diagram shows the
positions of the windows after sending the frames and receiving acknowledgments.
Types of Sliding Window Protocols
The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two categories −
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgment for
the first frame. It uses the concept of sliding window, and so is also called sliding window protocol.
The frames are sequentially numbered and a finite number of frames are sent. If the acknowledgment
of a frame is not received within the time period, all frames starting from that frame are
retransmitted.
This protocol also provides for sending multiple frames before receiving the acknowledgment for
the first frame. However, here only the erroneous or lost frames are retransmitted, while the good
frames are received and buffered.
Chapter-II
1. Random Access Protocol: In this, all stations have same superiority that is no station has
more priority than another station. Any station can send data depending on medium’s state(
idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
The Random access protocols are further subdivided as:
(a) ALOHA – It was designed for wireless LAN but is also applicable for shared medium. In this,
multiple stations can transmit data at the same time and can hence lead to collision and data being
garbled.