0% found this document useful (0 votes)
168 views68 pages

CN Unit 5 Notes

Unit V of the Computer Networks document covers the Data Link and Physical Layers of the OSI model, detailing responsibilities such as framing, flow control, error control, and various protocols like HDLC and PPP. It explains the communication between nodes, link-layer addressing, and the Address Resolution Protocol (ARP) for mapping IP addresses to MAC addresses. Additionally, it discusses flow control methods including Stop-and-Wait and Sliding Window techniques, along with framing techniques like byte and bit stuffing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views68 pages

CN Unit 5 Notes

Unit V of the Computer Networks document covers the Data Link and Physical Layers of the OSI model, detailing responsibilities such as framing, flow control, error control, and various protocols like HDLC and PPP. It explains the communication between nodes, link-layer addressing, and the Address Resolution Protocol (ARP) for mapping IP addresses to MAC addresses. Additionally, it discusses flow control methods including Stop-and-Wait and Sliding Window techniques, along with framing techniques like byte and bit stuffing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Computer Networks Unit- V

UNIT V :
DATA LINK AND PHYSICAL LAYERS 12
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
1. INTRODUCTION

 In the OSI model, the data link layer is the 2nd layer from the bottom.
 It is responsible for transmitting frames from one node to next node.
 The main responsibility of the Data Link Layer is to transfer the datagram
across an individual link.
 An important characteristic of a Data Link Layer is that datagram can be
handled by different link layer protocols on different links in a path.
 The other responsibilities of this layer are
o Framing - Divides the stream of bits received into data units called
frames.
o Physical addressing – If frames are to be distributed to different
systems on the same network, data link layer adds a header to the
frame to define the sender and receiver.
o Flow control- If the rate at which the data are absorbed by the receiver
is less than the rate produced in the sender ,the Data link layer imposes
a flow control mechanism.
o Error control- Used for detecting and retransmitting damaged or lost
frames and to prevent duplication of frames. This is achieved through
a trailer added at the end of the frame.
o Medium Access control - Used to determine which device has control
over the link at any given time.

Nodes and Links


 Communication at the data-link layer is node-to-node.
 The communication channel that connects the adjacent nodes is known as
links, and in order to move the datagram from source to the destination, the
datagram must be moved across an individual link.
 A data unit from one point in the Internet needs to pass through many
networks (LAN and WAN) to reach another point.
 Theses LANs and WANs are connected by routers.
 The two end hosts and the routers are nodes and the networks in- between are
links.

1
Computer Networks Unit- V

 The first node is the source host; the last node is the destination host.
 The other four nodes are four routers.
 The first, the third, and the fifth links represent the three LANs; the second
and the fourth links represent the two WANs.

Two Categories of Links


Point- to-Point link and Broadcast link.
 In a point-to-point link, the link is dedicated to the two devices
 In a broadcast link, the link is shared between several pairs of devices.

Data Link Layer Services


 The data-link layer is located between the physical and the network layers.
 The datalink layer provides services to the network layer; it receives services
from the physical layer.
 When a packet is travelling, the data-link layer of a node (host or router) is
responsible for delivering a datagram to the next node in the path.
 For this purpose, the data-link layer of the sending node needs to encapsulate
the datagram and the data-link layer of the receiving node needs to
decapsulate the datagram.

 The datagram received by the data-link layer of the source host is


encapsulated in a frame.
 The frame is logically transported from the source host to the router.

2
Computer Networks Unit- V

 The frame is decapsulated at the data-link layer of the router and


encapsulated at another frame.
 The new frame is logically transported from the router to the destination
host.

Sublayers in Data Link layer


 We can divide the data-link layer into two sublayers: data link control
(DLC) and media access control (MAC).
 The data link control sublayer deals with all issues common to both point-
to-point and broadcast links
 The media access control sublayer deals only with issues specific to
broadcast links.

2. LINK-LAYER ADDRESSING
 A link-layer address is sometimes called a link address, sometimes a physical
address, and sometimes a MAC address.
 Since a link is controlled at the data-link layer, the addresses need to belong
to the data-link layer.
 When a datagram passes from the network layer to the data-link layer, the
datagram will be encapsulated in a frame and two data-link addresses are
added to the frame header.
 These two addresses are changed every time the frame moves from one link
to another.

THREE TYPES OF ADDRESSES


The link-layer protocols define three types of addresses: unicast, multicast, and
broadcast.

3
Computer Networks Unit- V

Unicast Address :
Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication. A frame with a unicast address
destination is destined only for one entity in the link.

Multicast Address :
Link-layer protocols define multicast addresses. Multicasting means one-to-
many Communication but not all.

Broadcast Address :
Link-layer protocols define a broadcast address. Broadcasting means one- to-
all communication. A frame with a destination broadcast address is sent to all
entities in the link.

ADDRESS RESOLUTION PROTOCOL (ARP)


o ARP stands for Address Resolution Protocol.
o ARP is the most important protocol of the Data Link Layer.
o ARP is a network layer protocol used to convert a IP address
(Network/Logical address) into a MAC Address (Hardware /Physical
address).

o The computer programs/applications use logical address (IP address) to


send/receive messages, however the actual communication happens over the
physical address (MAC address).
o To send a datagram over a network, we need both the logical and physical
address.
o IP addresses are made up of 32 bits whereas MAC addresses are made up of
48 bits.
o ARP enables each host to build a table of IP address and corresponding
physical address.
o ARP relies on broadcast support from physical networks.
o The Address Resolution Protocol is a request and response protocol.
o The types of ARP messages are:
1. ARP request
2. ARP reply

4
Computer Networks Unit- V

ARP Operation
o ARP maintains a cache table in which MAC addresses are mapped to IP
addresses.
o If a host wants to send an IP datagram to a host,it first checks for a mapping
in the cache table.
o If no mapping is found, it needs to invoke the Address Resolution Protocol
over the network.
o It does this by broadcasting an ARP query onto the network.
o This query contains the target IP address.
o Each host receives the query and checks to see if it matches its IP address.
o If it does match, the host sends a response message that contains its link-
layer address (MAC Address) back to the originator of the query.
o The originator adds the information contained in this response to its ARP
table.
o For example,
To determine system B’s physical (MAC) address, system A broadcasts
an ARP request containing B’s IP address to all machines on its
network.

o All nodes except the destination discard the packet but update their ARP
table.
o Destination host (System B)constructs an ARP Response packet
o ARP Response is unicast and sent back to the source host (System A).
o Source stores target Logical & Physical address pair in its ARP table from
ARP Response.
o If target node does not exist on same network, ARP request is sent to
default router.

5
Computer Networks Unit- V

ARP Packet

Hardware Type – Defines the hardware type that the network needs to transmit
the ARP message.
Protocol Type - Defines the protocol type that the network needs to transmit the
ARP message.
Hardware Length – Specifies the length of the physical address.(48 bits =6 bytes)
Protocol Length - Specifies the length of the logical address.(32 bits =4 bytes)
Operation – Determines the type of ARP message (1-Request ; 2-Reply)
Source Hardware Address – Specifies the physical address of the sender.
Source Protocol Address - Specifies the logical address of the sender.
Destination Hardware Address – Specifies the physical address of the receiver.
Destination Protocol Address - Specifies the logical address of the receiver.

RARP – Reverse ARP


o Reverse Address Resolution protocol (RARP) allows a host to convert its
MAC address to the corresponding IP address.

3. DLC SERVICES
 The data link control (DLC) deals with procedures for communication
between two adjacent nodes—node-to-node communication—no matter
whether the link is dedicated or broadcast.

 Data link control service include


(1) Framing (2) Flow Control (3) Error Control

6
Computer Networks Unit- V

1. FRAMING

 The data-link layer packs the bits of a message into frames, so that each
frame is distinguishable from another.

 Although the whole message could be packed in one frame, that is not
normally done.
 One reason is that a frame can be very large, making flow and error control
very inefficient.
 When a message is carried in one very large frame, even a single-bit error
would require the retransmission of the whole frame.
 When a message is divided into smaller frames, a single-bit error affects
only that small frame.
 Framing in the data-link layer separates a message from one source to a
destination by adding a sender address and a destination address.
 The destination address defines where the packet is to go; the sender
address helps the recipient acknowledge the receipt.
Frame Size
 Frames can be of fixed or variable size.
 Frames of fixed size are called cells. In fixed-size framing, there is no need
for defining the boundaries of the frames; the size itself can be used as a
delimiter.
 In variable-size framing, we need a way to define the end of one frame and
the beginning of the next. Two approaches were used for this purpose: a
character-oriented approach and a bit-oriented approach.

Character-Oriented Framing
 In character-oriented (or byte-oriented) framing, data to be carried are 8-bit
characters.
 To separate one frame from the next, an 8-bit (1-byte) flag is added at the
beginning and the end of a frame.
 The flag, composed of protocol-dependent special characters, signals the
start or end of a frame.

 Any character used for the flag could also be part of the information.

7
Computer Networks Unit- V

 If this happens, when it encounters this pattern in the middle of the data,the
receiver thinks it has reached the end of the frame.
 To fix this problem, a byte-stuffing strategy was added to character-
oriented framing.

Byte Stuffing (or) Character Stuffing


 Byte stuffing is the process of adding one extra byte whenever there is a
flag or escape character in the text.

Bit-Oriented Framing
 In bit-oriented framing, the data section of a frame is a sequence of bits to
be interpreted by the upper layer as text, graphic, audio, video, and so on.
 In addition to headers and trailers), we still need a delimiter to separate one
frame from the other.
 Most protocols use a special 8-bit pattern flag, 01111110, as the delimiter to
define the beginning and the end of the frame

 If the flag pattern appears in the data, the receiver must be informed that
this is not the end of the frame.
 This is done by stuffing 1 single bit (instead of 1 byte) to prevent the pattern
from looking like a flag. The strategy is called bit stuffing.

Bit Stuffing
 Bit stuffing is the process of adding one extra 0 whenever five consecutive
1s follow a 0 in the data, so that the receiver does not mistake the pattern
0111110 for a flag.

2. FLOW CONTROL
o Flow control refers to a set of procedures used to restrict the amount
of data that the sender can send before waiting for acknowledgment.
o The receiving device has limited speed and limited memory to store the
data.
o Therefore, the receiving device must be able to inform the sending device to
stop the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they
are processed.

8
Computer Networks Unit- V

Two methods have been developed to control the flow of data:


o Stop-and-Wait Flow Control
o Sliding Window Flow Control

STOP-AND-WAIT FLOW CONTROL


o The simplest scheme is the stop-and-wait algorithm.
o In the Stop-and-wait method, the sender waits for an acknowledgement
after every frame it sends.
o When acknowledgement is received, then only next frame is sent.
o The process of alternately sending and waiting of a frame continues until
the sender transmits the EOT (End of transmission) frame.

o If the acknowledgement is not received within the allotted time, then the
sender assumes that the frame is lost during the transmission, so it will
retransmit the frame.
o The acknowledgement may not arrive because of the following three
scenarios :
1. Original frame is lost
2. ACK is lost
3. ACK arrives after the timeout

9
Computer Networks Unit- V

Advantage of Stop-and-wait
o The Stop-and-wait method is simple as each frame is checked and
acknowledged before the next frame is sent.

Disadvantages of Stop-And-Wait
o In stop-and-wait, at any point in time, there is only one frame that is sent
and waiting to be acknowledged.
o This is not a good use of transmission medium.
o To improve efficiency, multiple frames should be in transition while
waiting for ACK.

PIGGYBACKING

A method to combine a data


frame with ACK.
Piggybacking saves bandwidth
Station A and B both have data to
send.
Instead of sending separately,
station A sends a data frame that
includes an ACK.
Station B does the same thing.

SLIDING WINDOW FLOW CONTROL


o The Sliding Window is a method of flow control in which a sender can
transmit several frames before getting an acknowledgement.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary box(window) at both the sender and

10
Computer Networks Unit- V
receiver end.
o Frames can be acknowledged even when the window is not completely
filled.
o The window has a specific size in which they are numbered as modulo-n
means that they are numbered from 0 to n-1.
o For example, if n = 8, the frames are numbered from
0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1
frames can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame
that it wants to receive.
o For example, to acknowledge the string of frames ending with frame
number 4, the receiver will send the ACK containing the number 5.
o When the sender sees the ACK with the number 5, it got to know that the
frames from 0 through 4 have been received.

Sender Window Receiver Window

o At the beginning of a transmission, the o At the beginning of transmission, the


sender window contains n-1 frames. receiver window does not contain n frames,
o When a frame is sent, the size of the but it contains n-1 spaces for frames.
window shrinks. o When the new frame arrives, the size of the
o For example, if the size of the window window shrinks.
is ‘w’ and if three frames are sent out, o For example, the size of the window is w and
then the number of frames left out in if three frames are received then the number
the sender window is w-3. of spaces available in the window is (w-3).
o Once the ACK has arrived, then the o Once the acknowledgement is sent, the
sender window expands to the number receiver window expands by the number
which will be equal to the number of equal to the number of frames
frames acknowledged by ACK. acknowledged.

11
Computer Networks Unit- V

Example of Sliding Window

3. ERROR CONTROL

Data can be corrupted during transmission. For reliable communication, errors must
be detected and corrected. Error Control is a technique of error detection and
retransmission.
TYPES OF ERRORS
SINGLE-BIT ERROR
The term Single-bit error means that only one bit of a given data unit (such as byte,
character, data unit or packet) is changed from 1 to 0 or from 0 to 1.

BURST ERROR
The term Burst Error means that two or more bits in the data unit have changed
from 1 to 0 or from 0 to 1.

12
Computer Networks Unit- V
ERROR DETECTION TECHNIQUES / METHODS
The basic idea behind any error detection scheme is to add additional information
to a frame that can be used to determine if errors have been introduced.

PARITY CHECK
 One bit, called parity bit is added to every data unit so that the total number
of 1’s in the data unit becomes even (or) odd.
 The source then transmits this data via a link, and bits are checked and
verified at the destination.
 Data is considered accurate if the number of bits (even or odd) matches the
number transmitted from the source.
 This techniques is the most common and least complex method.
1. Even parity – Maintain even number of 1s
E.g., 1011 → 1011 1
2. Odd parity – Maintain odd number of 1s
E.g., 1011 → 1011 0

CYCLIC REDUNDANCY CHECK


 Cyclic codes refers to encoding messages by adding a fixed-length check
value.
 CRCs are popular because they are simple to implement, easy to analyze
mathematically and particularly good at detecting common errors caused in
transmission channels.

Steps Involved :
Sender Side:
 Consider the original message (dataword) as M(x) consisting of ‘k’ bits and
the divisor as C(x) consists of ‘n+1’ bits.
 The original message M(x) is appended by ‘n’ bits of zero’s. Let us call
this zero-extended message as T(x).
 Divide T(x) by C(x) and find the remainder.
 The division operation is performed using XOR operation.
 The remainder is appended to the original message M(x) as CRC and sent
by the sender(codeword).

Receiver Side:
 The division operation is performed using XOR operation with the
received Codeword.
 If the remainder is all Zero’s, then the dataword is received correctly

13
Computer Networks Unit- V
without any errors. The message is accepted.
 If the remainder is not all Zero’s, then the dataword is received incorrectly
with errors. The message is rejected and discarded.

Example 1:
 Consider the Dataword / Message M(x) = 1001
 Divisor C(x) = 1011 (n+1=4)
 Appending ‘n’ zeros to the original Message M(x).
 The resultant messages is called T(x) = 1001 000. (here n=3)
 Divide T(x) by the divisor C(x) using XOR operation.

Sender Side :

14
Computer Networks Unit- V

Receiver Side:
(For Both Case – Without Error and With Error)

Polynomials
 A pattern of 0s and 1s can be represented as a polynomial with coefficients
of 0 and 1.
 The power of each term shows the position of the bit; the coefficient shows
the value of the bit.

15
Computer Networks Unit- V

INTERNET CHECKSUM

 Checksum is a calculated value that is used to determine the integrity of


data.

Example : Let the message to be transmitted be 7,11,12,0,6.

16
Computer Networks Unit- V
ERROR CONTROL

 Error control includes both error detection and error correction.


 Whenever an error is detected, specified frames are retransmitted
 It allows the receiver to inform the sender if a frame is lost or damaged during
transmission and coordinates the retransmission of those frames by the
sender.
 Includes the following actions:
o Error detection
o Positive Acknowledgement (ACK): if the frame arrived with no
errors
o Negative Acknowledgement (NAK): if the frame arrived with errors
o Retransmissions after Timeout: Frame is retransmitted after certain
amount of time if no acknowledgement was received
 Error control in the data link layer is based on automatic repeat request
(ARQ).

Categories of Error Control

STOP-AND-WAIT ARQ
 Stop-and-wait ARQ is a technique used to retransmit the data in case of
damaged or lost frames.
 This technique works on the principle that the sender will not transmit the
next frame until it receives the acknowledgement of the last transmitted
frame.

Two possibilities of the retransmission in Stop and Wait ARQ:

o Damaged Frame: When the receiver receives a damaged frame(i.e., the


frame contains an error), then it returns the NAK frame. For example, when
the frame DATA 1 is sent, and then the receiver sends the ACK 0 frame
means that the data 1 has arrived correctly. The sender transmits the next
frame: DATA 0. It reaches undamaged, and the receiver returns ACK 1. The
sender transmits the third frame: DATA 1. The receiver reports an error and
returns the NAK frame. The sender retransmits the DATA 1 frame.

17
Computer Networks Unit- V

o Lost Frame: Sender is equipped with the timer and starts when the frame is
transmitted. Sometimes the frame has not arrived at the receiving end so that
it cannot be acknowledged either positively or negatively. The sender waits
for acknowledgement until the timer goes off. If the timer goes off, it
retransmits the last transmitted frame.

SLIDING WINDOW ARQ

Sliding Window ARQ is a technique used for continuous transmission error


control.

Two protocols used in sliding window ARQ:

1. GO-BACK-N ARQ
o In Go-Back-N ARQ protocol, if one frame is lost or damaged, then it
retransmits all the frames after which it does not receive the positive ACK.

18
Computer Networks Unit- V

o In the above figure, three frames (Data 0,1,2) have been transmitted before
an error discovered in the third frame.
o The receiver discovers the error in Data 2 frame, so it returns the NAK 2
frame.
o All the frames including the damaged frame (Data 2,3,4) are discarded as it
is transmitted after the damaged frame.
o Therefore, the sender retransmits the frames (Data2,3,4).

2. SELECTIVE-REJECT(REPEAT) ARQ

o Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.


o In this technique, only those frames are retransmitted for which negative
acknowledgement (NAK) has been received.
o The receiver storage buffer keeps all the damaged frames on hold until the
frame in error is correctly received.
o The receiver must have an appropriate logic for reinserting the frames in a
correct order.
o The sender must consist of a searching mechanism that selects only the
requested frame for retransmission.

o In the above figure, three frames (Data 0,1,2) have been transmitted before

19
Computer Networks Unit- V
an error discovered in the third frame.
o The receiver discovers the error in Data 2 frame, so it returns the NAK 2
frame.
o The damaged frame only (Data 2) is discarded.
o The other subsequent frames (Data 3,4) are accepted.
o Therefore, the sender retransmits only the damaged frame (Data2).

4. DATA-LINK LAYER PROTOCOLS


Four protocols have been defined for the data-link layer controls.
They are
1. Simple Protocol
2. Stop-and-Wait Protocol
3. Go-Back-N Protocol
4. Selective-Repeat Protocol

1. SIMPLE PROTOCOL

o The first protocol is a simple protocol with neither flow nor error control.
o We assume that the receiver can immediately handle any frame it receives.
o In other words, the receiver can never be overwhelmed with incoming
frames.
o The data-link layers of the sender and receiver provide transmission
services for their network layers.
o The data-link layer at the sender gets a packet from its network layer, makes
a frame out of it, and sends the frame.
o The data-link layer at the receiver receives a frame from the link, extracts
the packet from the frame, and delivers the packet to its network layer.

20
Computer Networks Unit- V

NOTE :

2. STOP-AND-WAIT PROTOCOL
REFER STOP AND WAIT FROM FLOW CONTROL

3. GO-BACK-N PROTOCOL
REFER GO-BACK-N ARQ FROM ERROR CONTROL

4. SELECTIVE-REPEAT PROTOCOL
REFER SELECTIVE-REPEAT ARQ FROM ERROR CONTROL

5. HDLC (HIGH-LEVEL DATA LINK CONTROL)

o High-level Data Link Control (HDLC) is a bit-oriented protocol


o HDLC is used for communication over point-to-point and multipoint links.
o HDLC implements the Stop-and-Wait protocol.

HDLC CONFIGURATIONS AND TRANSFER MODES


HDLC provides two common transfer modes that can be used in different
configurations:
1. Normal response mode (NRM)
2. Asynchronous balanced mode (ABM).

Normal response mode (NRM)


o In normal response mode (NRM), the station configuration is unbalanced.
o We have one primary station and multiple secondary stations.
o A primary station can send commands; a secondary station can only
respond.
o The NRM is used for both point-to-point and multipoint links.

21
Computer Networks Unit- V

Asynchronous balanced mode (ABM)


o In ABM, the configuration is balanced.
o The link is point-to-point, and each station can function as a primary and a
secondary (acting as peers).
o This is the common mode today.

HDLC FRAMES
HDLC defines three types of frames:
1. Information frames (I-frames) - used to carry user data
2. Supervisory frames (S-frames) - used to carry control information
3. Unnumbered frames (U-frames) – reserved for system management

Each type of frame serves as an envelope for the transmission of a different type of
message.
Each frame in HDLC may contain up to six fields:
1. Beginning flag field
2. Address field
3. Control field
4. Information field (User Information/ Management Information)
5. Frame check sequence (FCS) field
6. Ending flag field

In multiple-frame transmissions, the ending flag of one frame can serve as the
beginning flag of the next frame.

o Flag field - This field contains synchronization pattern 01111110, which


identifies both the beginning and the end of a frame.
22
Computer Networks Unit- V
o Address field - This field contains the address of the secondary station. If a
primary station created the frame, it contains a ‘to’ address. If a secondary
station creates the frame, it contains a ‘from’ address. The address field can
be one byte or several bytes long, depending on the needs of the network.
o Control field. The control field is one or two bytes used for flow and error
control.
o Information field. The information field contains the user’s data from the
network layer or management information. Its length can vary from one
network to another.
o FCS field. The frame check sequence (FCS) is the HDLC error detection
field. It can contain either a 16- bit or 32-bit CRC.

CONTROL FIELD FORMAT FOR THE DIFFERENT FRAME TYPES


Control Field for I-Frames
o I-frames are designed to carry user data from the network layer. In addition,
they can include flow-control and error-control information

o The first bit defines the type. If the first bit of the control field is 0, this
means the frame is an I-frame.
o The next 3 bits, called N(S), define the sequence number of the frame.
o The last 3 bits, called N(R), correspond to the acknowledgment number
when piggybacking is used.
o The single bit between N(S) and N(R) is called the P/F bit. If this bit is 1 it
means poll (the frame is sent by a primary station to a secondary).
o If this bit is 0 it means final(the frame is sent by a secondary to a Primary).

Control Field for S-Frames


o Supervisory frames are used for flow and error control whenever
piggybacking is either impossible or inappropriate.
o S-frames do not have information fields

o If the first 2 bits of the control field are 10, this means the frame is an S-
frame.
o The last 3 bits, called N(R),correspond to the acknowledgment number
(ACK) or negative acknowledgment number (NAK), depending on the type
of S-frame.
o The 2 bits called code are used to define the type of S-frame itself.
o With 2 bits, we can have four types of S-frames –
Receive ready (RR), Receive not ready (RNR), Reject (REJ) and
Selective reject (SREJ).
23
Computer Networks Unit- V
Control Field for U-Frames
o Unnumbered frames are used to exchange session management and control
information between connected devices.
o U-frames contain an information field, but used only for system
management information and not user data.

o If the first 2 bits of the control field are 11, this means the frame is an U-
frame.
o U-frame codes are divided into two sections: a 2-bit prefix before the P/F
bit and a 3-bit suffix after the P/F bit.
o Together, these two segments (5 bits) can be used to create up to 32
different types of U-frames.

6. POINT-TO-POINT PROTOCOL (PPP)


o Point-to-Point Protocol (PPP) was devised by IETF (Internet Engineering
Task Force) in 1990 as a Serial Line Internet Protocol (SLIP).
o PPP is a data link layer communications protocol used to establish a direct
connection between two nodes.
o It connects two routers directly without any host or any other networking
device in between.
o It is used to connect the Home PC to the server of ISP via a modem.
o It is a byte - oriented protocol that is widely used in broadband
communications having heavy loads and high speeds.
o Since it is a data link layer protocol, data is transmitted in frames. It is also
known as RFC 1661.

Services Provided by PPP


The main services provided by Point - to - Point Protocol are −
1. Defining the frame format of the data to be transmitted.
2. Defining the procedure of establishing link between two points and
exchange of data.
3. Stating the method of encapsulation of network layer data in the frame.
4. Stating authentication rules of the communicating devices.
5. Providing address for network communication.
6. Providing connections over multiple links.
7. Supporting a variety of network layer protocols by providing a range os
services.

24
Computer Networks Unit- V
PPP Frame
PPP is a byte - oriented protocol where each field of the frame is composed of one
or more bytes.

1. Flag − 1 byte that marks the beginning and the end of the frame. The bit
pattern of the flag is 01111110.
2. Address − 1 byte which is set to 11111111 in case of broadcast.
3. Control − 1 byte set to a constant value of 11000000.
4. Protocol − 1 or 2 bytes that define the type of data contained in the payload
field.
5. Payload − This carries the data from the network layer. The maximum
length of the payload field is 1500 bytes.
6. FCS − It is a 2 byte(16-bit) or 4 bytes(32-bit) frame check sequence for
error detection. The standard code used is CRC.

Transition Phases in PPP


The PPP connection goes through different states as shown in a transition phase
diagram.

 Dead: In dead phase the link is not used. There is no active carrier and the
line is quiet.
 Establish: Connection goes into this phase when one of the nodes start
communication. In this phase, two parties negotiate the options. If negotiation
is successful, the system goes into authentication phase or directly to
networking phase.
 Authenticate: This phase is optional. The two nodes may decide whether
they need this phase during the establishment phase. If they decide toproceed
with authentication, they send several authentication packets. If the result is
successful, the connection goes to the networking phase; otherwise, it goes to
the termination phase.
 Network: In network phase, negotiation for the network layer protocols
25
Computer Networks Unit- V
takes place.PPP specifies that two nodes establish a network layer agreement
before data at the network layer can be exchanged. This is because PPP
supports several protocols at network layer. If a node is running multiple
protocols simultaneously at the network layer, the receiving node needs to
know which protocol will receive the data.
 Open: In this phase, data transfer takes place. The connection remains in this
phase until one of the endpoints wants to end the connection.
 Terminate: In this phase connection is terminated.

Components/Protocols of PPP
Three sets of components/protocols are defined to make PPP powerful:
 Link Control Protocol (LCP)
 Authentication Protocols (AP)
 Network Control Protocols (NCP)

Link Control Protocol (LCP) − It is responsible for establishing, configuring,


testing, maintaining and terminating links for transmission. It also provides
negotiation mechanisms to set options between the two endpoints. Both endpoints
of the link must reach an agreement about the options before the link can be
established.

Authentication Protocols (AP) − Authentication means validating the identity of


a user who needs to access a set of resources. PPP has created two protocols for
authentication -Password Authentication Protocol and Challenge Handshake
Authentication Protocol.

PAP
The Password Authentication Protocol (PAP) is a simple authentication procedure
with a two-step process:
a. The user who wants to access a system sends an authentication
identification (usually the user name) and a password.
b. The system checks the validity of the identification and password and
either accepts or denies connection.

CHAP
The Challenge Handshake Authentication Protocol (CHAP) is a three-way
handshaking authentication protocol that provides greater security than PAP. In this
method, the password is kept secret; it is never sent online.
a. The system sends the user a challenge packet containing a challenge
value.
b. The user applies a predefined function that takes the challenge value and
the user’s own password and creates a result. The user sends the result in
the response packet to the system.
c. The system does the same. It applies the same function to the password of
the user (known to the system) and the challenge value to create a result.
If the result created is the same as the result sent in the response packet,
access is granted; otherwise, it is denied.
26
Computer Networks Unit- V
CHAP is more secure than PAP, especially if the system continuously changes the
challenge value. Even if the intruder learns the challenge value and the result, the
password is still secret.

Network Control Protocols (NCP) − PPP is a multiple-network-layer protocol. It


can carry a network-layer data packet from protocols defined by the Internet. PPP
has defined a specific Network Control Protocol for each network protocol. These
protocols are used for negotiating the parameters and facilities for the network layer.
For every higher-layer protocol supported by PPP, one NCP is there.

7. MEDIA ACCESS CONTROL (MAC)


 When two or more nodes transmit data at the same time, their frames will
collide and the link bandwidth is wasted during collision.
 To coordinate the access of multiple sending/receiving nodes to the shared
link, we need a protocol to coordinate the transmission.
 These protocols are called Medium or Multiple Access Control (MAC)
Protocols. MAC belongs to the data link layer of OSI model
 MAC defines rules for orderly access to the shared medium. It tries to
ensure that no two nodes are interfering with each other’s transmissions,
and deals with the situation when they do.

Issues involved in MAC


The key issues involved are –
 Where the control is exercised - refers to whether the control is exercised
in a centralized or distributed manner
 How the control is exercised - refers to in what manner the control is
exercised

Goals of MAC
1. Fairness in sharing
2. Efficient sharing of bandwidth
3. Need to avoid packet collisions at the receiver due to interference

MAC Management
 Medium allocation (collision avoidance)
 Contention resolution (collision handling)
27
Computer Networks Unit- V

MAC Types
 Round-Robin : – Each station is given opportunity to transmit in turns.
Either a central controller polls a station to permit to go, or stations can
coordinate among themselves.
 Reservation : - Station wishing to transmit makes reservations for time
slots in advance. (Centralized or distributed).
 Contention (Random Access) : - No control on who tries; If collision‖
occurs, retransmission takes place.

MECHANISMS USED
 Wired Networks :
o CSMA / CD – Carrier Sense Multiple Access / Collision Detection
 Wireless Networks :
o CSMA / CA – Carrier Sense Multiple Access / Collision Avoidance

CARRIER SENSE MULTIPLE ACCESS / COLLISION DETECTION


(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.

Flowchart of CSMA/CD Operation

28
Computer Networks Unit- V

Transmitter Algorithm in CSMA/CD


 Transmitter Algorithm defines the procedures for a node that senses a busy
medium.
 Three types of Transmitter Algorithm exist.
 They are
1. Non-Persistent Strategy
2. Persistent Strategy : 1-Persistent & P-Persistent

Non-Persistent Strategy
 In the non-persistent method, a station that has a frame to send senses the
line.
 If the line is idle, it sends immediately.
 If the line is not idle, it waits a random amount of time and then senses the
line again.

 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 :
 The 1-persistent method is simple and straightforward.
 In this method, after the station finds the line idle, it sends its frame
immediately (with probability 1).

 This method has the highest chance of collision because two or more stations
may find the line idle and send their frames immediately.

29
Computer Networks Unit- V

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
it waits before trying again.
 This strategy of doubling the delay interval between each retransmission
attempt is a general technique known as exponential back-off.

30
Computer Networks Unit- V

CARRIER SENSE MULTIPLE ACCESS / COLLISION AVOIDANCE


(CSMA/CA)
 Carrier sense multiple access with collision avoidance (CSMA/CA) was
invented for wireless networks.
 Wireless protocol would follow exactly the same algorithm as the Ethernet—
Wait until the link becomes idle before transmitting and back off should a
collision occur.
 Collisions are avoided through the use of CSMA/CA’s three strategies: the
interframe space, the contention window, and acknowledgments

Interframe Space (IFS) - First, collisions are avoided by deferring transmission


even if the channel is found idle. When an idle channel is found, the station does not
send immediately. It waits for a period of time called the interframe space or IFS.

Contention Window - The contention window is an amount of time divided into


slots. A station that is ready to send chooses a random number of slots as its wait
time. The number of slots in the window changes according to the binary exponential
backoff strategy. This means that it is set to one slot the first time and then doubles
each time the station cannot detect an idle channel after the IFS time.

Acknowledgment - In addition, the data may be corrupted during the


transmission.The positive acknowledgment and the time-out timer can help
guarantee that the receiver has received the frame.

8. WIRED LAN : ETHERNET (IEEE 802.3)


 Ethernet was developed in the mid-1970’s at the Xerox Palo Alto Research
Center (PARC),
 IEEE controls the Ethernet standards.
 The Ethernet is the most successful local area networking technology, that
uses bus topology.
 The Ethernet is multiple-access networks that is set of nodes send and
receive frames over a shared link.
 Ethernet uses the CSMA / CD ( Carrier Sense Multiple Access with
Collision Detection) mechanism.

EVOLUTION OF ETHERNET

31
Computer Networks Unit- V

Standard Ethernet (10 Mbps)


The original Ethernet technology with the data rate of 10 Mbps as the Standard
Ethernet.
Standard Ethernet types are
1. 10Base5: Thick Ethernet,
2. 10Base2: Thin Ethernet ,
3. 10Base-T: Twisted-Pair Ethernet
4. 10Base-F: Fiber Ethernet.

10Base5: Thick Ethernet 10Base2: Thin Ethernet

 The first implementation is called  The second implementation iscalled


10Base5, thick Ethernet, orThicknet. 10Base2, thin Ethernet, or
 10Base5 was the first Ethernet Cheapernet.
specification to use a bus topology  10Base2 also uses a bus topology,
with an external but the cable is much thinner and
transceiver(transmitter/receiver) more flexible.
connected via a tap to a thick coaxial  In this case, the transceiver is
cable. normally part of the network
interface card (NIC), which is
installed inside the station.

10Base-T: Twisted-Pair Ethernet 10Base-F: Fiber Ethernet

 The third implementation is called


 Although there are several types of
10Base-T or twisted-pair Ethernet.
optical fiber 10-Mbps Ethernet, the
 10Base-T uses a physical star most common is called 10Base-F.
topology. The stations are connected
 10Base-F uses a star topology to
to a hub via two pairs of twisted cable.
connect stations to a hub.
 The stations are connected to the
hub using two fiber-optic cables.

32
Computer Networks Unit- V

Fast Ethernet (100 Mbps)

Fast Ethernet or 100BASE-T provides transmission speeds up to 100 megabits per


second and is typically used for LAN backbone systems.
The 100BASE-T standard consists of three different component specifications –
1. 100 BASE-TX
2. 100BASE-T4
3. 100BASE-FX

100 BASE-TX 100BASE-T4 100BASE-FX


100Base-TX uses two A new standard, called 100Base-FX uses two
pairs of twisted-paircable 100Base-T4, was pairs of fiber-optic cables.
either UTP or STP. A designed to use four pairs Optical fiber can easily
100Base-TX network can of UTP for transmitting handle high bandwidth
provide a data rate of100 100 Mbps. requirements.
Mbps.

Gigabit Ethernet (1 Gbps)


 The Gigabit Ethernet upgrades the data rate to 1 Gbps(1000 Mbps).
 Gigabit Ethernet can be categorized as either a two-wire or a four-wire
implementation.
 The two-wire implementations use fiber-optic cable (1000Base-SX, short-
wave, or 1000Base-LX, long-wave), or STP (1000Base-CX).
 The four-wire version uses category 5 twisted-pair cable (1000Base-T).

10 Gigabit Ethernet(10 Gbps)


 10 Gigabit Ethernet is an upcoming Ethernet technology that transmits at 10
Gbps.
 10 Gigabit Ethernet enables a familiar network technology to be used in
LAN, MAN and WAN architectures.
 10 Gigabit Ethernet uses multimode optical fiber up to 300 meters and
single mode fiber up to 40 kilometers.
 Four implementations are the most common: 10GBase-SR, 10GBase-LR,
10GBase-EW, and 10GBase-X4.

33
Computer Networks Unit- V

ACCESS METHOD/ PROTOCOL OF ETHERNET


The access method of Ethernet is CSMA/CD.
Note : Refer CSMA/CD from MAC

COLLISION DETECTION IN ETHERNET


 As the Ethernet supports collision detection, senders are able to determine a
collision.
 At the moment an adaptor detects that its frame is colliding with another, it
first makes sure to transmit a 32-bit jamming sequence along with the 64-
bit preamble (totally 96 bits) and then stops the transmission.
 These 96 bits are sometimes called Runt Frame.

FRAME FORMAT OF ETHERNET


The Ethernet frame is defined by the format given in the Fig.

 The 64-bit preamble allows the receiver to synchronize with the signal; it is
a sequence of alternating 0’s and 1’s.
 Both the source and destination hosts are identified with a 48-bit address.
 The packet type field serves as the demultiplexing key.
 Each frame contains up to 1500 bytes of data(Body).
 CRC is used for Error detection

Ethernet Addresses
 Every Ethernet host has a unique Ethernet address (48 bits – 6 bytes).
 Ethernet address is represented by sequence of six numbers separated by
colons.
 Each number corresponds to 1 byte of the 6 byte address and is given by
pair of hexadecimal digits.
 Eg: 8:0:2b:e4:b1:2 is the representation of
00001000 00000000 00101011 11100100 10110001 00000010
 Each frame transmitted on an Ethernet is received by every adaptor
connected to the Ethernet.
 In addition to unicast addresses an Ethernet address consisting of all 1s is
treated as broadcast address.
 Similarly the address that has the first bit set to 1 but it is not the broadcast
address is called multicast address.

34
Computer Networks Unit- V

ADVANTAGES OF ETHERNET
Ethernets are successful because
 It is extremely easy to administer and maintain. There are no switches that
can fail, no routing or configuration tables that have to be kept up-to-date,
and it is easy to add a new host to the network.

 It is inexpensive: Cable is cheap, and the only other cost is the network
adaptor on each host.

9. WIRELESS LAN ( IEEE 802.11)


 Wireless communication is one of the fastest-growing technologies.
 The demand for connecting devices without the use of cables is increasing
everywhere.
 Wireless LANs can be found on college campuses, in office buildings, and
in many public areas.

ADVANTAGES OF WLAN / 802.11


1. Flexibility: Within radio coverage, nodes can access each other as radio
waves can penetrate even partition walls.
2. Planning : No prior planning is required for connectivity as long as
devices follow standard convention
3. Design : Allows to design and develop mobile devices.
4. Robustness : Wireless network can survive disaster. If the devices survive,
communication can still be established.

DISADVANTAGES OF WLAN / 802.11


1. Quality of Service : Low bandwidth (1 – 10 Mbps), higher error rates due to
interference, delay due to error correction and detection.
2. Cost : Wireless LAN adapters are costly compared to wired adapters.
3. Proprietary Solution : Due to slow standardization process, many solution
are proprietary that limit the homogeneity of operation.
4. Restriction : Individual countries have their own radio spectral policies. This
restricts the development of the technology
5. Safety and Security : Wireless Radio waves may interfere with other
devices. Eg; In a hospital, radio waves may interfere with high-tech
equipment.

35
Computer Networks Unit- V

TECHNOLOGY USED IN WLAN / 802.11


 WLAN’s uses Spread Spectrum (SS) technology.
 The idea behind Spread spectrum technique is to spread the signal over a
wider frequency band than normal, so as to minimize the impact of
interference from other devices.
 There are two types of Spread Spectrum:
 Frequency Hopping Spread Spectrum (FHSS)
 Direct Sequence Spread Spectrum (DSSS)

TOPOLOGY IN WLAN / 802.11


WLANs can be built with either of the following two topologies /architecture:
 Infra-Structure Network Topology
 Ad Hoc Network Topology

Infra-Structure Topology Ad-Hoc Topology


(AP based Topology) (Peer-to-Peer Topology)

 An infrastructure network is the  An adhoc network is the architecture


network architecture for providing that is used to support mutual
communication between wireless communication between wireless
clients and wired network resources. clients.
 The transition of data from the  Typically, an ad- hoc network is
wireless to wired medium occurs via created spontaneously and does not
a Base Station called AP(Access support access to wired networks.
Point).  An adhoc network does not require
 An AP and its associated wireless an AP.
clients define the coverage area.

36
Computer Networks Unit- V

ARCHITECURE OF WLAN / 802.11


 The standard defines two kinds of services: the Basic Service Set (BSS) and the
Extended Service Set (ESS).

Basic Service Set (BSS)


 IEEE 802.11 defines the basic service set (BSS) as the building blocks of a
wireless LAN.
 A basic service set is made of stationary or mobile wireless stations and an
optional central base station, known as the access point (AP).

Extended Service Set (ESS)


 An extended service set (ESS) is made up of two or more BSSs with APs.
 In this case, the BSSs are connected through a distribution system, which is a
wired or a wireless network.
 The distribution system connects the APs in the BSSs. The extended service set
uses two types of stations: mobile and stationary.
 The mobile stations are normal stations inside a BSS.
 The stationary stations are AP stations that are part of a wired LAN.

Station Types
IEEE 802.11 defines three types of stations based on their mobility in a wireless
LAN:
1. No-transition - A station with no-transition mobility is either stationary
(not moving) or moving only inside a BSS.
2. BSS-transition - A station with BSS-transition mobility can move from
one BSS to another, but the movement is confined inside one ESS
ESS-transition - A station with ESS-transition mobility can move from one
ESS to another.
37
Computer Networks Unit- V

COLLISION AVOIDANCE IN WLAN / 802.11


Wireless protocol would follow exactly the same algorithm as the Ethernet—Wait
until the link becomes idle before transmitting and back off should a collision
occur.

Hidden Node Problem

 Consider the situation shown in the Figure.


 Here A and C are both within range of B but not with each other.
 Suppose both A and C want to communicate with B and so they each send a
frame to B.
 A and C are unaware of each other since their signals do not carry that far.
 These two frames collide with each other at B, but neither A nor C is aware
of this collision.
 A and C are said to be hidden nodes with respect to each other.

Exposed Node Problem

 Each of the four nodes is able to send and receive signals that reach just the
nodes to its immediate left and right.
 For example, B can exchange frames with A and C but it cannot reach D,
while C can reach B and D but not A.
 Suppose B is sending to A. Node C is aware of this communication because
it hears B’s transmission.

38
Computer Networks Unit- V

 If at the same time, C wants to transmit to node D.


 It would be a mistake, however, for C to conclude that it cannot transmit to
anyone just because it can hear B’s transmission.
 This is not a problem since C’s transmission to D will not interfere with A’s
ability to receive from B.
 This is called exposed problem.
 Although B and C are exposed to each other’s signals, there is no
interference if B transmits to A while C transmits to D.

MULTIPLE ACCESS WITH COLLISION AVOIDANCE (MACA)


 MACA is used to avoid collisions caused by the hidden terminal problem
and exposed terminal problem.
 MACA uses short signaling packets called RTS and CTS for collision
avoidance.
 The RTS and CTS signals helps us to determine who else is in the
transmission range or who is busy.
 When a sender wants to transmit, it sends a signal called Request-To-Send
(RTS).
 If the receiver allows the transmission, it replies to the sender a signal called
Clear-To-Send (CTS).
 Any node that sees the CTS frame knows that it is close to the receiver, and
therefore cannot transmit for the period of time.
 Any node that sees the RTS frame but not the CTS frame is not
closeenough to the receiver to interfere with it, and so is free to
transmit.
 The Signaling packets RTS and CTS contains information such as
 sender address
 receiver address
 length of the data to be sent/received

 The receiver sends an ACK to the sender after successfully receiving a


frame.
 All nodes must wait for this ACK before trying to transmit.
 When two or more nodes detect an idle link and try to transmit an RTS frame at
the same time, their RTS frames will collide with each other.

39
Computer Networks Unit- V

 802.11 do not support collision detection, but instead, the senders realize the
collision has happened when they do not receive the CTS frame after a period
of time.
 Each node waits for a random amount of time before trying again.
 The amount of time a given node delays is defined by exponential back-off
algorithm.

DISTRIBUTION SYSTEM IN WLAN / 802.11


In wireless network, nodes can move freely. Some nodes are allowed to roam and
some are connected to a wired network infrastructure called access points (AP), and
they are connected to each other by a so-called distribution system.

 Two nodes can communicate directly with each other if they are within reach
of each other,
 When the nodes are at different range, for example when node A wish to
communicate with node E, A first sends a frame to its access point (AP-1),
which forwards the frame across the distribution system to AP-3, which
finally transmits the frame to E.

Scanning Process in Distribution System


 The technique for selecting an Access Point is called scanning.
 Scanning will take place whenever a node joins the network as well as
when it is not satisfied with the current access point signal.
 It involves the following four steps:
 The node sends a Probe Request frame.
 All AP’s within reach reply with a Probe Response frame.
 The node selects one of the access points and sends that AP an
Association Request frame.
 The AP replies with an Association Response frame.

40
Computer Networks Unit- V

 There are two types of Scanning. They are


1. Active Scanning
2. Passive Scanning
Active Scanning
When node C moves from the cell serviced by AP-1 to the cell serviced by AP-2.
As it moves, it sends Probe frames, which eventually result in Probe Response. Since
the node is actively searching for an access point it is called active scanning.

Passive Scanning
AP’s periodically send a Beacon frame to the nodes that advertises the capabilities
of the access point which includes the transmission rates supported by the AP. This
is called passive scanning and a node can change to this AP based on the Beacon
frame simply by sending it an Association Request frame back to the access point.
FRAME FORMAT OF WLAN / 802.11

 Control field - contains three subfields :


 Type field - Indicates whether the frame carries data, RTS or CTS frame
 To DS - Data frame sent to DS
 From DS – ACK sent from DS
When both the DS bits are set to 0, it indicates that one node is sending
directly to another . Addr l identifies the target node and Addr2
identifies the source node.

When both the DS bits are set to 1, it indicates that one node is sending
the message to another indirectly using the distribution system.

41
Computer Networks Unit- V

 Duration - contains the duration of time the medium is occupied by the nodes.
 Addr l - identifies the final original destination
 Addr 2 - identifies the immediate sender (the one that forwarded the frame
from the distribution system to the ultimate destination)
 Addr 3 - identifies the intermediate destination (the one that accepted the
frame from a wireless node and forwarded it across the distribution
system)
 Addr 4 - identifies the original source
 Sequence Control - to avoid duplication of frames sequence number is
assigned to each frame
 Payload - Data from sender to receiver
 CRC - used for Error detection of the frame.

10. BLUETOOTH (IEEE 802.15.1 )


 A Bluetooth is an ad hoc network, which means that the network is formed
spontaneously.
 Bluetooth is a wireless LAN technology designed to connect devices of
different functions such as telephones, notebooks, computers (desktop and
laptop), cameras, printers, when they are at a short distance from each other.
 Bluetooth technology is the implementation of a protocol defined by the
IEEE 802.15 standard.
 The standard defines a wireless personal-area network (PAN)
 Bluetooth operates in the 2.4 GHz Unlicensed ISM band.
 The range for Bluetooth communication is 0-30 feet.
 This distance can be increased to 100 meters by amplifying the power.
 Bluetooth links have typical bandwidths around 1 to 3 Mbps.
 Bluetooth is specified by an industry consortium called the Bluetooth Special
Interest Group.
 Upto eight devices can be connected through Bluetooth.
 One device will function as a Master and the other seven devices will
function as slaves.
 Bluetooth uses Frequency Hopping Spread Spectrum (FHSS) to avoid any
interference.
 Bluetooth supports two kinds of links:
 Asynchronous Connectionless (ACL) links - for data
 Synchronous Connection oriented (SCO) links - for audio/voice

42
Computer Networks
BLUETOOTH ARCHITECTURE
Bluetooth defines two types of networks: Piconet and Scatternet.

PICONET
 The basic Bluetooth network configuration is called a Piconet
 A Piconet is a collection of eight bluetooth devices which are synchronized.
 One device in the piconet can act as Primary (Master), all other devices
connected to the master act as Secondary (Slaves).
 All the secondary stations synchronize their clocks and hopping sequence
with the primary.

 Any communication is between the primary/master and a secondary/slave.


 The communication between the primary and secondary stations can be
one-to-one or one-to-many.
 The slaves do not communicate directly with each other.
 The devices in a piconet can be in any one of the three types/states.
 They are
 Active Device / State
1. Connected to the piconet and participates in the communication.
2. Can be a Master or a Slave device.
3. All active devices are assigned a 3-bit address (AMA).
 Parked Device / State
1. Connected to the piconet, but does not actively articipate in the
communication.
2. More than 200 devices can be parked.
3. All parked devices use an 8-bit parked member address (PMA).
 Stand-by Device / State
1. Not connected to the piconet.
2. They do not participate in the piconet currently but may take part at a
later time.
3. Devices in stand-by do not need an address.

43
- Computer Networks

 If a parked device wants to communicate and there are already seven active
slaves, one slave has to switch to park state to allow the parked device to switch
to active state.
SCATTERNET
 Piconets can be combined to form what is called a scatternet.
 Many piconets with overlapping coverage can exist simultaneously,called
Scatternet.
 A secondary station in one piconet can be the primary in another piconet.
 This station can receive messages from the primary in the first piconet (as a
secondary) and, acting as a primary, deliver them to secondaries in the second
piconet.
 A station can be a member of two piconets.

 In the example given below, there are two piconets, in which one slave
participates in two different piconets.
 Master of one piconet cannot act as the master of another piconet.
 But the Master of one piconet can act as a Slave in another piconet

BLUETOOTH LAYERS

44
- Computer Networks

Radio Layer
 The radio layer is roughly equivalent to the physical layer of the Internet
model.
 Bluetooth uses the frequency-hopping spread spectrum (FHSS) method
in the physical layer to avoid interference from other devices or other
networks.
 Bluetooth hops 1600 times per second, which means that each device changes
its modulation frequency 1600 times per second.
 To transform bits to a signal, Bluetooth uses a sophisticated version of FSK,
called GFSK.

Baseband Layer
 The baseband layer is roughly equivalent to the MAC sublayer in LANs.
 The access method is TDMA.
 The primary and secondary stations communicate with each other using
time slots. The length of a time slot is exactly 625 µs.
 During that time, a primary sends a frame to a secondary, or a secondary
sends a frame to the primary.

L2CAP
 The Logical Link Control and Adaptation Protocol, or L2CAP (L2 here
means LL) is equivalent to the LLC sublayer in LANs.
 It is used for data exchange on an ACL link.
 SCO channels do not use L2CAP.
 The L2CAP functions are : multiplexing, segmentation and reassembly,
quality of service (QoS), and group management.

11. ZIGBEE (IEEE 802.15.4)

 ZigBee is a standard that addresses the need for very low-cost implementation of
low power devices with Low data rates for short-range wireless communications.
 ZigBee is a Personal Area Network task group with low rate task group 4.
 It is a technology of home networking.
 ZigBee is a technological standard created for controlling and sensing the network.

Types of ZigBee Devices:

 Zigbee Coordinator Device: It communicates with routers.


This device is used for connecting the devices.
 Zigbee Router: It is used for passing the data between devices.
 Zigbee End Device: It is the device that is going to be controlled.

45
- Computer Networks

General Characteristics of Zigbee Standard

 Low Power Consumption


 Low Data Rate (20- 250 kbps)
 Short-Range (75-100 meters)
 Network Join Time (~ 30 msec)
 Support Small and Large Networks (up to 65000 devices (Theory) &
240 devices (Practically))
 Low Cost of Products and Cheap Implementation (Open Source Protocol)
 Extremely low duty cycle.
 3 frequency bands with 27 channels.

Operating Frequency Bands


 Channel 0: 868 MHz (Europe)
 Channel 1-10: 915 MHz (the US and Australia)
 Channel 11-26: 2.4 GHz (Across the World)

Zigbee Network Topologies


 Star Topology (ZigBee Smart Energy): Consists of a coordinator and
several end devices, end devices communicate only with the coordinator.

 Mesh Topology (Self Healing Process): Mesh topology consists of one


coordinator, several routers, and end devices.

 Tree Topology: In this topology, the network consists of a central node


which is a coordinator, several routers, and end devices. the function of the
router is to extend the network coverage.

46
- Computer Networks

Architecture of Zigbee

Zigbee architecture is a combination of 6 layers.


1. Application Layer
2. Application Interface Layer
3. Security Layer
4. Network Layer
5. Medium Access Control Layer
6. Physical Layer

 Physical layer: The lowest two layers i.e the physical and the MAC (Medium
Access Control) Layer are defined by the IEEE 802.15.4 specifications. The
Physical layer is closest to the hardware and directly controls and communicates
with the Zigbee radio. The physical layer translates the data packets in the over-
the-air bits for transmission and vice- versa during the reception.

 Medium Access Control layer (MAC layer): The layer is responsible for
the interface between the physical and network layer. The MAC layer is also
responsible for providing PAN ID and also network discovery through beacon
requests.

 Network layer: This layer acts as an interface between the MAC layer and the
application layer. It is responsible for mesh networking.

 Application layer: The application layer in the Zigbee stack is the highest
protocol layer and it consists of the application support sub-layer and Zigbee
device object. It contains manufacturer-defined applications.

47
- Computer Networks
Channel Access
 Contention Based Method
Carrier-Sense Multiple Access With Collision Avoidance Mechanism

 Contention Free Method


Coordinator dedicates a specific time slot to each device

Zigbee Applications

 Home Automation
 Medical Data Collection
 Industrial Control Systems
 Meter reading system
 Light control system

48
– Computer Networks Unit-V

TRANSMISSION MEDIA
o Transmission media is a communication channel that carries the information from
the sender to the receiver.
o Data is transmitted through the electromagnetic signals.
o The main functionality of the transmission media is to carry the information in
the form of bits (Either as Electrical signals or Light pulses).
o It is a physical path between transmitter and receiver in data communication.

13
– Computer Networks Unit-V

o The characteristics and quality of data transmission are determined by the


characteristics of medium and signal.
o Transmission media is of two types : Guided Media (Wired) and UnGuided
Media (wireless).
o In guided (wired) media, medium characteristics are more important whereas,
in unguided (wireless) media, signal characteristics are more important.
o Different transmission media have different properties such as bandwidth, delay,
cost and ease of installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference model,
i.e., Physical layer.

FACTORS FOR DESIGNING THE TRANSMISSION MEDIA


o Bandwidth: All the factors are remaining constant, the greater the bandwidth of a
medium, the higher the data transmission rate of a signal.
o Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals
will get destroyed due to transmission impairment.
o Interference: An interference is defined as the process of disrupting a signal when
it travels over a communication medium on the addition of some unwanted signal.

CAUSES OF TRANSMISSION IMPAIRMENT

o Attenuation: Attenuation means the loss of energy, i.e., the strength of the signal
decreases with increasing the distance which causes the loss of energy.
o Distortion: Distortion occurs when there is a change in the shape of the signal.
This type of distortion is examined from different signals having different
frequencies. Each frequency component has its own propagation speed, so they
reach at a different time which leads to the delay distortion.

14
– Computer Networks Unit-V

o Noise: When data is travelled over a transmission medium, some unwanted signal
is added to it which creates the noise.

TYPES / CLASSES OF TRANSMISSION MEDIA

GUIDED MEDIA
 It is defined as the physical medium through which the signals are transmitted.
 It is also known as Bounded media.
 Types of Guided media: Twisted Pair Cable, Coaxial Cable , Fibre Optic Cable

TWISTED PAIR CABLE

 Twisted pair is a physical media made up of a pair of cables twisted with each
other.
 A twisted pair cable is cheap as compared to other transmission media.
 Installation of the twisted pair cable is easy, and it is a lightweight cable.
 The frequency range for twisted pair cable is from 0 to 3.5KHz.
 A twisted pair consists of two insulated copper wires arranged in a regular spiral
pattern.

Unshielded Twisted Pair


An unshielded twisted pair is widely used in telecommunication.

15
– Computer Networks Unit-V

Following are the categories of the unshielded twisted pair cable:


o Category 1: Suports low-speed data.
o Category 2: It can support upto 4Mbps.
o Category 3: It can support upto 16Mbps.
o Category 4: It can support upto 20Mbps.
o Category 5: It can support upto 200Mbps.

Advantages :
o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.

Disadvantage:
o This cable can only be used for shorter distances because of attenuation.

Shielded Twisted Pair

A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows
the higher transmission rate.

Advantages :
o The cost of the shielded twisted pair cable is not very high and not very low.
o Installation of STP is easy.
o It has higher capacity as compared to unshielded twisted pair cable.
o It has a higher attenuation.
o It is shielded that provides the higher data transmission rate.

Disadvantages:
o It is more expensive as compared to UTP and coaxial cable.
o It has a higher attenuation rate.

16
– Computer Networks Unit-V

COAXIAL CABLE

o Coaxial cable(Coax) is a very commonly used transmission media, for example,


TV wire is usually a coaxial cable.
o The name of the cable is coaxial as it contains two conductors parallel to each
other.
o It has a higher frequency as compared to Twisted pair cable.
o The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh.
o The middle core is made up of non-conductive cover that separates the inner
conductor from the outer conductor.
o The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).
o Common applications of coaxial cable are Cable TV networks and traditional
Ethernet LANs.

Coaxial Cable Standards


 Coaxial cables are categorized by their Radio Government (RG) ratings.
 Each RG number denotes a unique set of physical specifications, including the wire
gauge of the inner conductor, the thickness and type of the inner insulator, the
construction of the shield, and the size and type of the outer casing.
 Each cable defined by an RG rating is adapted for a specialized function.

Types of Coaxial cable :


1. Baseband transmission: It is defined as the process of transmitting a single
signal at high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple
signals simultaneously.

17
– Computer Networks Unit-V

Advantages :
o The data can be transmitted at high speed.
o It has better shielding as compared to twisted pair cable.
o It provides higher bandwidth.

Disadvantages :
o It is more expensive as compared to twisted pair cable.
o If any fault occurs in the cable causes the failure in the entire network.

FIBRE OPTIC CABLE

o Fibre optic cable is a cable that uses electrical signals for communication.
o Fibre optic is a cable that holds the optical fibres coated in plastic that are used to
send the data by pulses of light.
o The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
o Fibre optics provide faster data transmission than copper wires.

Basic elements of Fibre optic cable:


o Core: The optical fibre consists of a narrow strand of glass or plastic known as a
core. A core is a light transmission area of the fibre. The more the area of thecore,
the more light will be transmitted into the fibre.
o Cladding: The concentric layer of glass is known as cladding. The main
functionality of the cladding is to provide the lower refractive index at the core
interface as to cause the reflection within the core so that the light waves are
transmitted through the fibre.
o Jacket: The protective coating consisting of plastic is known as a jacket. The
main purpose of a jacket is to preserve the fibre strength, absorb shock and extra
fibre protection.

Advantages:
o Greater Bandwidth
o Less signal attenuation
o Immunity to electromagnetic interference
o Resistance to corrosive materials

18
– Computer Networks Unit-V

o Light weight
o Greater immunity to tapping

Disadvantages :
o Requires Expertise for Installation and maintenance
o Unidirectional light propagation.
o Higher Cost.

Propagation Modes of Fibre Optics


 Current technology supports two modes (multimode and single mode) for
propagating light along optical channels, each requiring fiber with different
physical characteristics.
 Multimode can be implemented in two forms: step-index or graded-index.

Multimode Propagation
 Multimode is so named because multiple beams from a light source move through
the core in different paths.
 How these beams move within the cable depends on the structure of the core.

Multimode Step-index fiber Multimode Graded-index fiber

In multimode step-index fiber, the density The multimode graded-index fiber,


of the core remains constant from the decreases this distortion of the signal
center to the edges. through the cable.
A beam of light moves through this The word index here refers to the index
constant density in a straight line until it of refraction.
reaches the interface of the core and the The index of refraction is related to
cladding. density.
At the interface, there is an abrupt change A graded index fiber, therefore, is one
due to a lower density; this alters the angle with varying densities.
of the beam’s motion. Density is highest at the center of the
□ The term step-index refers to the core and decreases gradually to its
suddenness of this change, which lowest at the edge.
contributes to the distortion of the signal
as it passes through the fiber.

19
21CS1403 – Computer Networks Unit-1

Single-Mode Propagation

 Single-mode uses step-index fiber and a highly focused source of light that limits
beams to a small range of angles, all close to the horizontal.
 The single-mode fiber itself is manufactured with a much smaller diameter than
that of multimode fiber, and with substantially lower density (index of refraction).
 The decrease in density results in a critical angle that is close enough to 90° to make
the propagation of beams almost horizontal.
 In this case, propagation of different beams is almost identical, and delays are
negligible. All the beams arrive at the destination “together” and can be recombined
with little distortion to the signal.

UNGUIDED MEDIA
o An unguided transmission transmits the electromagnetic waves without using any
physical medium. Therefore it is also known as wireless transmission.
o In unguided media, air is the media through which the electromagnetic energy
can flow easily.

o Unguided transmission is broadly classified into three categories :


Radio Waves, Microwaves , Infrared

RADIO WAVES

o Radio waves are the electromagnetic waves that are transmitted in all the
directions of free space.
o Radio waves are omnidirectional, i.e., the signals are propagated in all the
directions.
o The range in frequencies of radio waves is from 3Khz to 1Ghz.
o In the case of radio waves, the sending and receiving antenna are not aligned, i.e.,
the wave sent by the sending antenna can be received by any receiving antenna.
o An example of the radio wave is FM radio.

20
Computer Networks Unit-
VVV1
VV

Applications of Radio waves:


o A Radio wave is useful for multicasting when there is one sender and many
receivers.
o An FM radio, television, cordless phones are examples of a radio wave.

Advantages of Radio waves:


o Radio transmission is mainly used for wide area networks and mobile cellular
phones.
o Radio waves cover a large area, and they can penetrate the walls.
o Radio transmission provides a higher transmission rate.

MICROWAVES

Microwaves are of two types - Terrestrial microwave & Satellite microwave

Terrestrial Microwave
o Terrestrial Microwave transmission is a technology that transmits the focused beam
of a radio signal from one ground-based microwave transmission antenna to
another.
o Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 300 GHz.
o Microwaves are unidirectional as the sending and receiving antenna is to be
aligned, i.e., the waves sent by the sending antenna are narrowly focused.
o In this case, antennas are mounted on the towers to send a beam to another antenna
which is km away.
o It works on the line of sight transmission, i.e., the antennas mounted on the towers
are at the direct sight of each other.

21
Computer Networks Unit-
VVV1
Characteristics of Terrestrial Microwave: VV
o Frequency range: The more commonly used frequency range of terrestrial
microwave is from 4-6 GHz to 21-23 GHz.
o Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
o Short distance: It is inexpensive for short distance.
o Long distance: It is expensive as it requires a higher tower for a longer distance.
o Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.

Advantages of Terrestrial Microwave:


o Microwave transmission is cheaper than using cables.
o It is free from land acquisition as it does not require any land for the installation
of cables.
o Microwave transmission provides an easy communication in terrains as the
installation of cable in terrain is quite a difficult task.
o Communication over oceans can be achieved by using microwave transmission.

Disadvantages of Terrestrial Microwave:


o Eavesdropping.
o Out of phase signal
o Susceptible to weather condition
o Bandwidth limited

Satellite Microwave
o A satellite is a physical object that revolves around the earth at a known height.
o Satellite communication is more reliable nowadays as it offers more flexibility
than cable and fibre optic systems.
o We can communicate with any point on the globe by using satellite
communication.
o The satellite accepts the signal that is transmitted from the earth station, and it
amplifies the signal. The amplified signal is retransmitted to another earth station.

22
Computer Networks Unit-
VVV1
Advantages of Satellite Microwave: VV
o The coverage area of a satellite microwave is more than the terrestrial microwave.
o The transmission cost of the satellite is independent of the distance from the
centre of the coverage area.
o Satellite communication is used in mobile and wireless communication
applications.
o It is easy to install.
o It is used in a wide variety of applications such as weather forecasting, radio/TV
signal broadcasting, mobile communication, etc.

Disadvantages of Satellite Microwave:


o Satellite designing and development requires more time and higher cost.
o The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
o The life of the satellite is about 12-15 years. Due to this reason, another launch of
the satellite has to be planned before it becomes non-functional.

INFRARED WAVES

o An infrared transmission is a wireless technology used for communication over


short ranges.
o The frequency of the infrared in the range from 300 GHz to 400 THz.
o It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone and
devices that resides in the same closed area.

Characteristics of Infrared:
o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared communication
in one room cannot be interrupted by the nearby rooms.
o An infrared communication provides better security with minimum interference.
o Infrared communication is unreliable outside the building because the sun rays
will interfere with the infrared waves.

SWITCHING
o The technique of transferring the information from one computer to another is
known as switching.
o Switching in a computer network is achieved by using switches.
o A switch is a small hardware device which is used to join multiple computers
together with one local area network (LAN).

23
Computer Networks Unit-
VVV1
o VV two or
Switches are devices capable of creating temporary connections between
more devices linked to the switch.
o Switches are used to forward the packets based on MAC addresses.
o A Switch is used to transfer the data only to the device that has been addressed. It
verifies the destination address to route the packet appropriately.
o It is operated in full duplex mode.
o It does not broadcast the message as it works with limited bandwidth.

Advantages of Switching:
o Switch increases the bandwidth of the network.
o It reduces the workload on individual PCs as it sends the information to only that
device which has been addressed.
o It increases the overall performance of the network by reducing the traffic on the
network.
o There will be less frame collision as switch creates the collision domain for each
connection.

Disadvantages of Switching:
o A Switch is more expensive than network bridges.
o A Switch cannot determine the network connectivity issues easily.
o Proper designing and configuration of the switch are required to handle multicast
packets.

Types of Switching

24
Computer Networks Unit-
VVV1
CIRCUIT SWITCHING VV

o Circuit switching is a switching technique that establishes a dedicated path


between sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
o In case of circuit switching technique, when any user wants to send the data, voice,
video, a request signal is sent to the receiver then the receiver sends back the
acknowledgment to ensure the availability of the dedicated path. After receiving
the acknowledgment, dedicated path transfers the data.
o Circuit switching is used in public telephone network. It is used for voice
transmission.
o Fixed data can be transferred at a time in circuit switching technology.

Phases in Circuit Switching


Communication through circuit switching has 3 phases:

1. Connection Setup / Establishment - In this phase, a dedicated circuit is


established from the source to the destination through a number of intermediate
switching centres. The sender and receiver transmits communication signals to
request and acknowledge establishment of circuits.

2. Data transfer - Once the circuit has been established, data and voice are
transferred from the source to the destination. The dedicated connection remains as
long as the end parties communicate.

3. Connection teardown / Termination - When data transfer is complete, the


connection is relinquished. The disconnection is initiated by any one of the user.
Disconnection involves removal of all intermediate links from the sender to the
receiver.

25
Computer Networks Unit-
VVV1
Advantages VV
 It is suitable for long continuous transmission, since a continuous transmission
route is established, that remains throughout the conversation.
 The dedicated path ensures a steady data rate of communication.
 No intermediate delays are found once the circuit is established. So, they are
suitable for real time communication of both voice and data transmission.

Disadvantages
 Circuit switching establishes a dedicated connection between the end parties. This
dedicated connection cannot be used for transmitting any other data, even if the
data load is very low.
 Bandwidth requirement is high even in cases of low data volume.
 There is underutilization of system resources. Once resources are allocated to a
particular connection, they cannot be used for other connections.
 Time required to establish connection may be high.
 It is more expensive than other switching techniques as a dedicated path isrequired
for each connection.

PACKET SWITCHING

o The packet switching is a switching technique in which the message is divided


into smaller pieces and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
o Every packet contains some information in its headers such as source address,
destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the
message.
o If the correct order of the packets is reached, then the acknowledgment message
will be sent.

26
Computer Networks Unit-
VVV1
Advantages of Packet Switching: VV
o Cost-effective: In packet switching technique, switching devices do not require
massive secondary storage to store the packets, so cost is minimized to some extent.
Therefore, we can say that the packet switching technique is a cost- effective
technique.
o Reliable: If any node is busy, then the packets can be rerouted. This ensures that
the Packet Switching technique provides reliable communication.
o Efficient: Packet Switching is an efficient technique. It does not require any
established path prior to the transmission, and many users can use the same
communication channel simultaneously, hence makes use of available bandwidth
very efficiently.

Disadvantages of Packet Switching:


o Packet Switching technique cannot be implemented in those applications that
require low delay and high-quality services.
o The protocols used in a packet switching technique are very complex and requires
high implementation cost.
o If the network is overloaded or corrupted, then it requires retransmission of lost
packets. It can also lead to the loss of critical information if errors are norrecovered.

APPROACHES OF PACKET SWITCHING


There are two approaches to Packet Switching:
o Datagram Switching Approach
o Virtual Circuit Switching Approach

Datagram Switching
o It is a packet switching technology in which packet is known as a datagram, is
considered as an independent entity.
o Each packet contains the information about the destination and switch uses this
information to forward the packet to the correct destination.
o The packets are reassembled at the receiving end in correct order.
o In Datagram Packet Switching technique, the path is not fixed.
o Intermediate nodes take the routing decisions to forward the packets.
o Datagram Packet Switching is also known as connectionless switching.
o There are no setup or teardown phases.
o Each packet is treated the same by a switch regardless of its source or destination.

27
– Computer Networks Unit-V

NETWORK PERFORMANCE
Network performance is measured in using:
Bandwidth, Throughput, Latency, Jitter, RoundTrip Time

BANDWIDTH
 The bandwidth of a network is given by the number of bits that can be transmitted
over the network in a certain period of time.
 Bandwidth can be measured in two different values: bandwidth in hertz and
bandwidth in bits per second.

Bandwidth in Hertz
o Bandwidth in hertz refers to the range of frequencies contained in a composite
signal or the range of frequencies a channel can pass.

40
Computer Networks Unit-5

o For example, we can say the bandwidth of a subscriber telephone line is 4 kHz.

Bandwidth in Bits per Seconds


o Bandwidth in Bits per Seconds refers to the number of bits transmitted per
second.
o For example, the bandwidth of a network is a maximum of 100 Mbps. This means
that this network can send 100 Mbps.

Relationship
o There is an explicit relationship between the bandwidth in hertz and bandwidth in
bits per second.
o Basically, an increase in bandwidth in hertz means an increase in bandwidth
in bits per second.

THROUGHPUT
 Throughput is a measure of how fast we can actually send data through anetwork.
 Bandwidth in bits per second and throughput may seem to be same, but they are
different.
 A link may have a bandwidth of B bps, but we can only send T bps through this
link. (T always less than B).
 In other words, the bandwidth is a potential measurement of a link; the throughput
is an actual measurement of how fast we can send data.
 For example, we may have a link with a bandwidth of 1 Mbps, but the devices
connected to the end of the link may handle only 200 kbps. This means that we
cannot send more than 200 kbps through this link.

Problem :
A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames
per minute with each frame carrying an average of 10,000 bits. What is the
throughput of this network?
Solution
We can calculate the throughput as

The throughput is almost one-fifth of the bandwidth in this case.

LATENCY (DELAY)
 The latency or delay defines how long it takes for an entire message to travel from
one end of a network to the other.
 Latency is made up of four components: Propagation time, Transmission time,
Queuing time and Processing delay.

41
Computer Networks Unit-5

Propagation Time
o Propagation time measures the time required for a bit to travel from the source to
the destination.
o The propagation time is calculated by dividing the distance by the propagation
speed.
o The propagation speed of electromagnetic signals depends on the medium and on
the frequency of the signal.

Transmission Time
o In data communications we don’t send just 1 bit, we send a message.
o The first bit may take a time equal to the propagation time to reach its destination.
o The last bit also may take the same amount of time.
o However, there is a time between the first bit leaving the sender and the last bit
arriving at the receiver.
o The first bit leaves earlier and arrives earlier.
o The last bit leaves later and arrives later.
o The transmission time of a message depends on the size of the message and the
bandwidth of the channel.

Queuing Time
o Queuing time is the time needed for each intermediate or end device to hold the
message before it can be processed.
o The queuing time is not a fixed factor. It changes with the load imposed on the
network. When there is heavy traffic on the network, the queuing time increases.
o An intermediate device, such as a router, queues the arrived messages and
processes them one by one.
o If there are many messages, each message will have to wait.

Processing Delay
o Processing delay is the time that the nodes take to process the packet header.
o Processing delay is a key component in network delay.
o During processing of a packet, nodes may check for bit-level errors in the packet
that occurred during transmission as well as determining where the packet's next
destination is.

42
Computer Networks Unit-5

Bandwidth - Delay Product


o Bandwidth and delay are two performance metrics of a link.
o The bandwidth-delay product defines the number of bits that can fill the
link.
o This measurement is important if we need to send data in bursts and wait for the
acknowledgment of each burst before sending the next one.

JITTER

o Another performance issue that is related to delay is jitter.


o Jitter is a problem that if different packets of data encounter different delays and
the application using the data at the receiver site is time-sensitive (audio and video
data, for example).
o If the delay for the first packet is 20 ms, for the second is 45 ms, and for the third
is 40 ms, then the real-time application that uses the packets endures jitter.

ROUND-TRIP TIME (RTT)

o RTT refers to how long it takes to send a message from one end of a network to the
other and back, rather than the one-way latency. This is called as round-trip time
(RTT) of the network.

43
Computer Networks Unit-5

SOLVED PROBLEMS – PERFORMANCE

Problem 1:
What is the propagation time if the distance between the two points is 12,000 km?
Assume the propagation speed to be 2.4 × 108 m/s .
Solution :
Propagation time = (12000 * 1000) / (2.4 × 108) = 50 ms

Problem 2:
What are the propagation time and the transmission time for a 2.5-KB (kilobyte)
message (an email) if the bandwidth of the network is 1 Gbps? Assume that the
distance between the sender and the receiver is 12,000 km and that light travels at
2.4 * 108 m/s.
Solution:
Propagation time = (12000 * 1000) / (2.4 * 108 ) = 50 ms
Transmission time = (2500 * 8) / 109 = 0.02 ms

Problem 3:
What are the propagation time and the transmission time for a 5-MB (megabyte)
message (an image) if the bandwidth of the network is 1 Mbps? Assume that the
distance between the sender and the receiver is 12,000 km and that light travels at
2.4 * 108m/s.
Solution:
Propagation time = (12000 * 1000) / (2.4 * 108 ) = 50 ms
Transmission time = (5000000 * 8) / 106 = 40 s

44

You might also like