0% found this document useful (0 votes)
32 views106 pages

CN Unit-1

Uploaded by

dineshsai94601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views106 pages

CN Unit-1

Uploaded by

dineshsai94601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 106

UNIT-1

Computer Networks
(20ACS17)
What is Computer Network?
•A computer network is a group of interconnected
computers that communicate with each other to share
resources and information.
•Uses of computer networks are to facilitate
communication, enable resource sharing, provide
remote access, and collaborate.
•Computer networks are essential for businesses,
educational institutions, and individuals who rely on
technology to connect with others and access
resources.

2
Uses of Computer Network
 Communication: Computer networks enable
individuals and organizations to communicate
with each other using various methods such as
email, messaging, and video conferencing, etc.
 Resource sharing: Networks allow users to share
resources such as printers, scanners, and files.
 Remote access: Networks enable users to
access information and resources with flexibility
and convenience.
 Collaboration: Networks facilitate collaboration
by enabling users to work together on projects,
share ideas, and provide feedback in real time.
3
Cont…
 E-commerce: Computer networks are used
extensively in e-commerce, enabling businesses to
sell products and services online and process
payments securely.

 Education: Networks are used in educational


institutions to facilitate distance learning, provide
access to educational resources, and enable
collaboration among students and teachers.

 Entertainment: Networks are used for


entertainment purposes such as online gaming,
streaming movies and music, and social media.

4
Advantages of Computer Networks
 Improved communication and collaboration.
 Cost savings through resource sharing.
 Better data management and security.
 Increased flexibility with remote access.
 Enhanced productivity and efficiency

Disadvantages of Computer Networks


 Security risks and potential for data breaches.
 Technical issues and maintenance challenges.
 Increased vulnerability to viruses and malware.
 Potential for decreased privacy and confidentiality.

5
Types of Computer Networks
There are mainly five types of Computer Networks

• Personal Area Network (PAN)


• Local Area Network (LAN)
• Campus Area Network (CAN)
• Metropolitan Area Network (MAN)
• Wide Area Network (WAN)

6
1. Personal Area Network (PAN)
•PAN is communication between the computer
devices is centered only on an individual’s workspace.
•PAN offers network range of 1 to 100 meters from
person to device providing communication.
•Its transmission speed is very high with very easy
maintenance and very low cost.
Technology: Bluetooth, IrDA, and Zigbee.
Examples: USB, computer, phone, tablet, printer,
PDA, etc.

7
2. Local Area Network (LAN)
•LAN is the most frequently used network.
•LAN connects computers through a common
communication path, contained within a limited area, that
is, locally.
•LAN encompasses two or more computers connected
over a server.
•The two important technologies involved in this network
are Ethernet and Wi-fi.
Ranges: up to 2km & transmission speed is very high with
easy maintenance and low cost.
Examples: Networking in a home, school, library,
laboratory, college, office, etc. 8
3. Campus Area Network (CAN)
•CAN is bigger than a LAN but smaller than a MAN.
•This is usually used in places like a school or colleges.
•This network covers a limited geographical area.
•CAN technology with a range from 1km to 5km.
•Its transmission speed is very high with a moderate
maintenance cost and moderate cost.
Examples: networks covers within the campus of schools,
colleges, buildings, etc.

9
4. Metropolitan Area Network (MAN)
• MAN is larger than a LAN but smaller than a WAN.

• MAN connects computers over a geographical distance


through a shared communication path over a city, town,
or metropolitan area.
• This network mainly uses FDDI, CDDI, and ATM as the
technology with a range from 5km to 50km.
• Its transmission speed is average.
• It is difficult to maintain and it comes with a high cost.

Examples: networking in towns, cities, a single large city, a


large area within multiple buildings, etc.

10
5. Wide Area Network (WAN)
•WAN connects computers over a large geographical
distance through a shared communication path.
•It is not restrained to a single location but extends over
many locations.
•WAN can also be defined as a group of local area
networks that communicate with each other with a range
above 50km.
•Its transmission speed is very low.

•it comes with very high maintenance and very high cost.

11
What is Network Hardware?
•Network hardware is a set of physical or network
devices that are essential for interaction and
communication between hardware.

•These are dedicated hardware components that


connect to each other and enable a network to
function effectively and efficiently.

12
Fundamental Devices of Computer Network
Modems: A modem enables a computer to connect to
the internet via a telephone line.
– At one end converts the computer’s digital
signals into analog signals and sends them
through a telephone line.
– At the other end, it converts the analog
signals to digital signals that are
understandable for another computer.
Routers:
• A router connects two or more networks.
• The router is to connect a home or office network (
LAN) to the internet (WAN).
13
Hubs:
• A hub is device that links multiple device in network
and generally used to connect computers in a LAN.
Two types of Hubs
• Passive Hubs : used for connecting signals from diff
network cable segments.
• Active Hubs: its monitor, amplify, and regenerate
weak signals between nodes.

Bridges:
• A bridge connects two separate LAN networks.
• It scans for the receiving device before sending a
message.

14
Switches: A switch is more powerful than hub or
bridge but performs a similar role.
• It stores the MAC addresses of network devices
and transfers data packets only to those devices
that have requested.
• It reduces the amount of latency.
Network cables: Cables connect different devices
on a network.
• Today, most networks have cables over a
wireless connection as they are more secure.

Amplifier: increase amplitude of electronic signals.


Latency: It shows the time that data takes to transfer across
the network. 15
Network interface cards:
• A network interface card (NIC) is a hardware unit
installed on a computer, which allows it to connect to
a network.
• It is typically in the form of a circuit board or chip.
• NICs are built into the motherboards.

16
Firewall: is Hardware or Software device between
computer and the rest of the network open to
attackers or hackers.

LAN can be protected from hackers by firewall
between the LAN and internet connection.
• A firewall allows authorized connections but
blocks unauthorized connections.

17
Network Topology
Network Topology is defines the structure, and
how these components are connected to each
other.
The various network topologies are:
1. Point to Point Topology
2. Mesh Topology
3. Star Topology
4. Bus Topology
5. Ring Topology
6. Tree Topology
7. Hybrid Topology
18
1. Point to Point Topology
• This topology works on the functionality of the
sender and receiver.
• It is the simplest communication between two
nodes, in which one is the sender and the other one
is the receiver.
• Its provides high bandwidth.

19
2. Mesh Topology
• In Mesh Topology, every device is connected to
another device via a particular channel.

• The protocols used are AHCP (Ad Hoc


Configuration Protocols), DHCP (Dynamic Host
Configuration Protocol), etc.

20
Advantages of Mesh Topology
• Communication is very fast between the nodes.
• Mesh Topology is robust.
• The fault is diagnosed easily.
• Data is reliable because, data is transferred among the
devices through dedicated channels or links.
• Provides security and privacy.
Drawbacks of Mesh Topology
• Installation and configuration are difficult.
• The cost of cables is high as bulk wiring is required,
hence suitable for less number of devices.
• The cost of maintenance is high

21
3. Star Topology

• In Star Topology, all the devices are connected to a


single hub through a cable.

22
3. Star Topology
• This hub is the central node and all other nodes are
connected to the central node.
• The Hub can be passive in nature i.e., not an intelligent
hub such as broadcasting devices, at the same time the
hub can be intelligent known as an active hub.

• Coaxial cables or RJ-45 cables are used to connect the


computers.

• In Star Topology, many popular Ethernet LAN protocols


are used as CD(Collision Detection), CSMA (Carrier
Sense Multiple Access), etc.

23
Advantages of Star Topology
• If N devices are connected to each other in a star
topology, then the number of cables required to connect
them is N. So, it is easy to set up.
• Each device requires only 1 port i.e. to connect to the
hub, therefore the total number of ports required is N.
• It is Robust. If one link fails only that link will affect and
not other than that.
• Easy to fault identification and fault isolation.
• Star topology is cost-effective as it uses inexpensive
coaxial cable.

24
Disadvantages of Star Topology
• If the concentrator (hub) on which the whole topology
relies fails, the whole system will crash down.
• The cost of installation is high.
• Performance is based on the single concentrator i.e.
hub.

25
4. Bus Topology
• Bus Topology is a network type in which every computer
and network device is connected to a single cable.
• It is bi-directional.
• It is a multi-point connection and a non-robust topology
because if the backbone fails the topology crashes.
• In Bus Topology, various MAC (Media Access Control)
protocols are followed by LAN ethernet connections like
TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.

26
Advantages of Bus Topology
• If N devices are connected to each other in a bus
topology, then the number of cables required to connect
them is 1, known as backbone cable.
• Coaxial or twisted pair cables are mainly used in bus-
based networks that support up to 10 Mbps.
• The cost of the cable is less compared to other
topologies, but it is used to build small networks.
• Bus topology is familiar technology as installation and
troubleshooting techniques are well known.
• CSMA is the most common method for this type of
topology.

27
Drawbacks of Bus Topology

• A bus topology requires a lot of cabling.


• If the common cable fails, then the whole system
will crash down.
• If the network traffic is heavy, it increases
collisions in the network.
• To avoid this, various protocols are used in the
MAC layer known as Pure Aloha, Slotted Aloha,
CSMA/CD, etc.
• Adding new devices to the network would slow
down networks.
• Security is very low.

28
5. Ring Topology
• In Ring Topology, it forms a ring connecting
devices with exactly two neighboring devices.
• A number of repeaters are used for Ring
topology with a large number of nodes.

29
• Figure : A ring topology comprises 4 stations connected
with each forming a ring.
• The most common access method of ring topology is
token passing.
• Token passing: It is a network access method in which
a token is passed from one node to another node.
• Token: It is a frame that circulates around the network.

30
Advantages of Ring Topology
• The data transmission is high-speed.
• The possibility of collision is minimum in this type of
topology.
• Cheap to install and expand.
• It is less costly than a star topology.

Drawbacks of Ring Topology


• The failure of a single node in the network can cause the
entire network to fail.
• Troubleshooting is difficult in this topology.
• The addition of stations in between or the removal of
stations can disturb the whole topology.
• Less secure.

31
6. Tree Topology
• This is variation of the Star topology.
• This topology has a hierarchical flow of data.
• In Tree Topology, protocols like DHCP and SAC
(Standard Automatic Configuration ) are used.

32
• Figure: This data flow from top to bottom i.e. from
the central hub to the secondary and then to the
devices or from bottom to top i.e. devices to the
secondary hub and then to the central hub.

• It is a multi-point connection and a non-robust


topology because if the backbone fails the
topology crashes.

33
Advantages of Tree Topology
• It allows more devices to be attached to a single central
hub thus it decreases the distance that is traveled by the
signal to come to the devices.
• It allows the network to get isolated and also prioritize
from different computers.
• We can add new devices to the existing network.
• Error detection and error correction are very easy in a
tree topology.

Drawbacks of Tree Topology


• If the central hub gets fails the entire system fails.
• The cost is high because of the cabling.
• If new devices are added, it becomes difficult to
reconfigure.
34
7. Hybrid Topology

• This topological technology is the combination of all the


various types of topologies.
• Hybrid Topology is used when the nodes are free to take
any form.

35
7. Hybrid Topology
• It means these can be individuals such as Ring or Star
topology or can be a combination of various types of
topologies seen above.
Advantages of Hybrid Topology
• This topology is very flexible.
• The size of the network can be easily expanded
by adding new devices.
Drawbacks of Hybrid Topology
• It is challenging to design the architecture of the
Hybrid Network.
• Hubs used in this topology are very expensive.
• The infrastructure cost is very high as a hybrid
network requires a lot of cabling and network
devices.
36
Network Software
• NS defined as a wide range of software that streamlines
the operations, design, monitoring, and implementation.

• NS Helps administrators and security personally reduce


network complexities, and manage, monitor, and better
control network traffic.

• NS plays a crucial role in managing a network


infrastructure and simplifying IT operations by facilitating
communication, security, content, and data sharing.

37
Functions of network software
 User management allows administrators to add or
remove users from the network. This is particularly
useful when hiring or relieving.

 File management lets administrators decide the location


of data storage and control user access to that data.

 Access enables users to enjoy uninterrupted access to


network resources.

 Network security systems assist administrators in


looking after security and preventing data breaches.

38
39
1. Application layer: which refers to the applications and
services running on the network.
• It is a program that conveys network information, the
status of the network, and the network requirements for
particular resource availability and application.

2. Control layer : This layer is the intermediary that


facilitates communication between the top and bottom
layers through APIs interfaces.

3. Infrastructure layer: The primarily responsible for


moving or forwarding the data packets after receiving due
instructions from the control layer.

40
REFERENCE(OSI) Model
•Each layer has different functions. A list of seven layers
are given below:
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

41
42
43
1) Physical layer

o The physical layer transmit the individual bits


from one node to another node.
o It establishes, maintains and deactivates the
physical connection.
o It specifies the mechanical, electrical and
procedural network interface specifications. 44
Functions of a Physical layer:
o Line Configuration: It defines the way how two or more
devices can be connected physically.
o Data Transmission: It defines the transmission mode
whether it is simplex, half-duplex or full-duplex mode
between the two devices on the network.
o Topology: It defines the way how network devices are
arranged.
o Signals: It determines of the signal used for transmitting
the information.

45
2) Data-Link Layer

o This layer is responsible for the error-free transfer of data


frames.
o It provides a reliable and efficient communication between two or
more devices.
o It is mainly responsible for the unique identification of each
device that resides on a local network. 46
It contains two sub-layers:
1. Logical Link Control Layer
o It is responsible for transferring the packets to
Network layer of the receiver that is receiving.
o It identifies the address of the network layer
protocol from the header.
o It also provides flow control.
2. Media Access Control Layer
o This layer is link between Logical Link Control
layer and Network's physical layer.
o It is used for transferring the packets over the
network.

47
Functions of the Data-link layer

• Framing: The DLL translates the physical's raw bit


stream into packets known as Frames.
• The DLL adds the header and trailer to the frame.
• The header which is added to the frame contains the
destination and source address.

o Physical Addressing: The DLL adds a header to the


frame that contains a destination address.
o The frame is transmitted to the destination address
mentioned in the header.

48
Functions of the Data-link layer

o Flow Control: It is the technique through which the


constant data rate is maintained on both the sides so
that no data corrupted.
o Error Control: is adding a calculated value CRC (Cyclic
Redundancy Check) is added to the message frame
before it is sent to the physical layer in trailer’s.
o If any error seems to occur, then the receiver sends the
acknowledgment for the retransmission of the corrupted
frames.
o Access Control: When two or more devices are
connected to the same communication channel, then the
data link layer protocols are used to determine which
device has control over the link at a given time.
49
3) Network Layer

o Its manages device addressing, tracks the location of


devices on the network.
o It determines the best path to move data from source to
the destination based on the network conditions.

50
Network Layer
o The Data link layer is responsible for routing and
forwarding the packets.
o Routers are the layer 3 devices, they are specified in this
layer and used to provide the routing services within an
internetwork.
o The protocols used to route the network traffic are known
as Network layer protocols.
o Examples: protocols are IP and Ipv6.

51
Functions of Network Layer:

o Internetworking: It provides a logical connection between


different devices.
o Addressing: A Network layer adds the source and
destination address to the header of the frame.
Addressing is used to identify the device on the internet.
o Routing: Routing is the major component of the network
layer, and it determines the best optimal path out of the
multiple paths from source to the destination.
o Packetizing: A Network Layer receives the packets from
the upper layer and converts them into packets.
o This process is known as Packetizing. It is achieved by
internet protocol (IP).

52
4) Transport Layer

53
Transport Layer

o Transport Layer ensures that messages are


transmitted in the order and without duplication
of data.
o The main responsibility is to transfer the data
completely.
o It receives the data from the upper layer and
converts them into smaller units known as
segments.
o it provides a point-to-point connection between
source and destination to deliver the data
reliably.
54
The two protocols used in this layer are:
1. Transmission Control Protocol(TCP)
o It is allows the systems to communicate over the
internet.
o It establishes and maintains a connection between
hosts.
o When data is sent over the TCP connection, then
TCP protocol divides the data into smaller units
known as segments.
o Each segment travels over the internet using multiple
routes, and arrive in different orders at the
destination.
o TCP reorders the packets in the correct order at the
receiving end.
55
2. User Datagram Protocol (UDP)
o Its a transport layer protocol.
o It is an unreliable transport protocol bz,
receiver does not send any acknowledgment
when the packet is received, so, the sender
does not wait for any acknowledgment.
o Therefore, this makes a protocol unreliable.

56
Functions of Transport Layer
o 1. Service-Point Addressing: Computers run several
programs simultaneously due to this reason, the
transmission of data from source to the destination not
only from one computer to another computer but also
from one process to another process.
o The transport layer adds the header that contains the
address known as service-point address or port address.
o The responsibility of the network layer is to transmit the
data from one computer to another computer and
the responsibility of the transport layer is to transmit the
message to the correct process.

57
Functions of Transport Layer
o 2. Segmentation and Reassembly: When the transport
layer receives the message from the upper layer, it
divides the message into multiple segments, and each
segment is assigned with a sequence number that
uniquely identifies each segment.
o Reassembly: When the message has arrived at the
destination, then the transport layer reassembles the
message based on their sequence numbers.

58
Functions of Transport Layer

o 3. Connection control: Transport layer provides two


services are,
1. Connectionless Service, treats each segment as an
individual packet, and they all travel in different routes to
reach the destination.
2. Connection-Oriented Service, all the packets travel in
the single route.

59
Functions of Transport Layer

o Flow control: this layer is also responsible for flow


control but it is performed end-to-end rather than across
a single link.

o Error control: this layer is also responsible for error


control.
o Error control is performed end-to-end rather than across
the single link.
o The sender transport layer ensures that message reach
at the destination without any error.

60
5) Session Layer

• The Session layer is used to establish, maintain and


synchronizes the interaction between communicating
devices.

61
Functions of Session layer:

1. Dialog control: this layer creates a dialog between


two processes or it allows the communication between
two processes which can be either half-duplex or full-
duplex.
2. Synchronization: Session layer adds some
checkpoints when transmitting the data in a sequence.
• If some error occurs in the middle of the
transmission of data, then the transmission will take
place again from the checkpoint.
• This process is known as Synchronization and
recovery.

62
6) Presentation Layer

63
6) Presentation Layer
o This layer is mainly concerned with the syntax
and semantics of the information exchanged
between the two systems. It acts as a data
translator for a network.
o This layer converts the data from one
presentation format to another format.
o This layer also known as the syntax layer.

64
Functions of Presentation layer:
o Translation: is processes and its exchange the
information between two systems in the form of
character strings, numbers and so on.

o Different computers use different encoding methods,


so, It converts the data from sender-dependent
format into a common format and changes the
common format into receiver-dependent format at
the receiving end.

65
Functions of Presentation layer:
Encryption:
– Encryption is needed to maintain privacy.
– Encryption is a process of converting the sender-
transmitted information into another form and
sends the resulting message over the network.
Compression:
o Data compression is a process of compressing
the data, i.e., it reduces the number of bits to be
transmitted.
o Data compression is very important in multimedia
such as text, audio, video.

66
7) Application Layer

67
7) Application Layer

o An application layer serves as a window for users


and application processes to access network
service.
o It handles issues such as network transparency,
resource allocation, etc.
o An application layer is not an application, but it
performs the application layer functions.
o This layer provides the network services to the end-
users.

68
Functions of Application layer:

o File transfer, access, and management


(FTAM): An application layer allows a user to
access the files in a remote computer, to retrieve the
files from a computer and to manage the files in a
remote computer.
o Mail services: provides the facility for email
forwarding and storage.
o Directory services: provides the distributed
database sources and is used to provide that global
information about various objects.

69
Data Link Layer Design Issues
• The DLL uses the services of the physical layer to
send and receive bits over communication
channels. It has a number of functions, including:
The main functions are
 Providing services to the network layer
 Framing
 Error Control
 Flow Control
There are four methods:
1. Byte count
2. Flag bytes with byte stuffing
3. Flag bits with bit stuffing
4. Physical layer coding violation
70
Data Link Layer Design Issues
Goals of DLL:
• The DLL takes the packets from the network layer
and encapsulates them into frames for transmission.
• Each frame contains a frame header, payload field
for holding the packet, and a frame trailer,

71
Data Link Layer Design Issues

72
Bit Stuffing:

73
1. Services to the Network Layer

•The DLL uses the services offered by the physical layer.


•Primary function of this layer: provide a well defined
service interface to network layer.

74
Three Types of DLL services

 Unacknowledged connectionless service


 Acknowledged connectionless service
 Acknowledged connection - oriented service

75
2. Framing
•The DLL encapsulates each data packet from the
network layer into frames that are then transmitted.
A Frame has three parts, namely −
 Frame Header
 Payload field that contains the data packet from
network layer
 Trailer

76
3. Error Control

•The DLL ensures error free link for data transmission.


Respect to Error Control are −
 Dealing with transmission errors
 Sending acknowledgement frames in reliable
connections
 Retransmitting lost frames
 Identifying duplicate frames and deleting them
 Controlling access to shared channels in case of
broadcasting

77
4. Flow Control
•The DLL regulates flow control so that fast sender does
not drown a slow receiver.
•When the sender sends frames at very high speeds, a
slow receiver may not be able to handle it.
•There will be frame losses even if the transmission is
error-free.
•The two common approaches for flow control are −
 Feedback based flow control
 Rate based flow control

78
Elementary Data Link Protocols

•Protocols in the Data Link Layer are designed to perform


its basic functions:
– Framing,
– Error Control,
– Flow Control,
– Access control.
i) Framing The DLL translates the physical's raw bit stream
into packets known as Frames.
• The DLL adds the header and trailer to the frame.
• The header which is added to the frame contains the
destination and source address.
• Frame size ranges from Few Hundred to Few
Thousand bytes.
79
Frame

80
Frame

81
ii) Error control mechanisms deals with
– Transmission errors
– Retransmission of corrupted
– Lost frames.

82
83
84
iii) Flow control regulates speed of delivery and fast sender
does not drown a slow receiver.
• It is the technique and maintain the constant data rate on
both the sides so that no data corrupted.

85
iv) Access Control:
When two or more devices are connected to the same
communication channel, then DLL protocols are used
to determine which device has control over the link at
a given time.

86
Types of Data Link Protocols

• Data link protocols can divided into two categories,


depending on whether the transmission channel is
noiseless or noisy.

87
1. 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.
•The sender simply sends all its data available onto the
channel as 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.

88
2. Stop – and – Wait Protocol

•Its noiseless channel too.


•Its provide unidirectional data transmission without any
error control facilities.
• However, it provides for flow control so that 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 received
indication from the receiver that it is available for further
data processing.

89
3. Stop – and – Wait ARQ

•Stop – and – Wait Automatic Repeat Request.


•Its added error control mechanisms, appropriate for noisy
channels.
•The sender keeps a copy of the sent frame 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.

90
4. Go – Back – N ARQ Protocol

•Go – Back – N ARQ provides for sending multiple frames


before receiving the acknowledgement for the first frame.
•So it is 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 will be retransmitted.

91
5. Selective Repeat ARQ Protocol

•This protocol also provides for sending multiple frames


before receiving the acknowledgement for the first frame.
• However, if errors or lost frames are retransmitted, while
the good frames are received and buffered.

92
Sliding Window Protocol
•The sliding window is a technique for sending multiple
frames at a time.
•It controls the data packets between the two devices
where reliable and gradual delivery of data frames is
needed.
•In this technique, each frame has sent with the sequence
number.
•The sequence numbers are used to find the missing data
in the receiver end.
•The purpose of the sliding window technique is to avoid
duplicate data, so it uses the sequence number.

93
Sliding Window Protocol
• SWP is an error control protocol.
• how to data is transmitted?
• It has two parameter:
1. Sequence number is number is assign to each
frame.
2. Sliding window is buffers at transmitter and
reciever.

94
Types of Sliding Window Protocol
1. Go-Back-N ARQ
2. Selective Repeat ARQ
1. Go-Back-N ARQ
•N is the size of the sender window
•Reciver window size is always 1.
• in Go-Back-N ARQ protocol, multiple frames can be
sent by sender before receiving the ACK but the receiver
can buffer only one packet.
• if any frame is corrupted or lost, all subsequent frames
have to be sent again.

95
Types of Sliding Window Protocol
• If the ACK is not arrived in sender side, before the timer
expires, all the frames in the current window are
retransmitted.
• The ACK number is cumulative and it defines the
sequence number of the next frame expected to arrive.
• The sequence numbers are in modulo 2m

• the range of sequence number will be from 0 to


2m-1.
if m=2,
no. of sequence number =22=4(00,01,10,11)
range of sequence number =0 to 3 96
Example: sliding window protocol

97
98
99
100
101
102
2. Selective Repeat ARQ
•Selective Repeat Automatic Repeat Request.
•Go-back-N ARQ protocol works well But, if there is a lot of
error in the frame, lots of bandwidth loss in sending the
frames again.
•Selective Repeat ARQ protocol, the size of the sender
window is always equal to the size of the receiver window.
•If the receiver receives a corrupt frame, It sends a
negative acknowledgment to the sender.
•The sender sends that frame only again as soon as on the
receiving negative acknowledgment.
•There is no waiting for any time-out to send that frame.

103
Example: Selective Repeat ARQ

104
Selective Repeat ARQ

105
Difference between the Go-Back-N ARQ and Selective Repeat ARQ?

Go-Back-N ARQ Selective Repeat ARQ

If a frame is corrupted or lost in it,all In this, only the frame is sent again,
subsequent frames have to be sent which is corrupted or lost.
again.

If it has a high error rate,it wastes a lot There is a loss of low bandwidth.
of bandwidth.

It is less complex. It is more complex because it has to do


sorting and searching as well. And it
also requires more storage.

It does not require sorting. In this, sorting is done to get the frames
in the correct order.

It does not require searching. The search operation is performed in it.

It is used more. It is used less because it is more


complex.
106

You might also like