Computer Networking and Data Communication
Computer Networking and Data Communication
Computer Networking
and
Data Communication
Author
Dr. Sanjaya Shankar Tripathy
Assistant Professor
Dept. of Electronics and Communication Engineering (ECE)
Birla Institute of Technology Mesra, Ranchi
Reviewer
Dr. Rahul Johari
Associate Professor
School of Automation and Robotics
Guru Gobind Singh Indraprastha University, Delhi.
ii
BOOK AUTHOR DETAILS
Dr. Sanjaya Shankar Tripathy, Assistant Professor, Dept. of Electronics and Communication Engineering (ECE), Birla
Institute of Technology Mesra, Ranchi.
Dr. Rahul Johari, Associate Professor, School of Automation and Robotics, Guru Gobind Singh Indraprastha University,
Delhi.
Email ID: [email protected]
1. Dr. Sunil Luthra, Director, Training and Learning Bureau, All India Council for Technical Education (AICTE), New
Delhi, India.
Email ID: [email protected]
2. Sanjoy Das, Assistant Director, Training and Learning Bureau, All India Council for Technical Education (AICTE),
New Delhi, India.
Email ID: [email protected]
3. Reena Sharma, Hindi Officer, Training and Learning Bureau, All India Council for Technical Education (AICTE),
New Delhi, India.
Email ID: [email protected]
4. Avdesh Kumar, JHT, Training and Learning Bureau, All India Council for Technical Education (AICTE),
New Delhi, India.
Email ID: [email protected]
February, 2025
ISBN : 978-93-6027-736-9
All rights reserved. No part of this work may be reproduced in any form, by mimeograph or any other means,
without permission in writing from the All India Council for Technical Education (AICTE).
Further information about All India Council for Technical Education (AICTE) courses may be obtained from the Council
Office at Nelson Mandela Marg, Vasant Kunj, New Delhi-110070.
Printed and published by All India Council for Technical Education (AICTE), New Delhi.
Disclaimer: The website links provided by the author in this book are placed for informational, educational & reference
purpose only. The Publisher do not endorse these website links or the views of the speaker / content of the said weblinks. In
case of any dispute, all legal matters to be settled under Delhi Jurisdiction, only.
iii
iv
ACKNOWLEDGEMENT
The authors are grateful to the authorities of AICTE, particularly Prof. (Dr.) T G Sitharam,
Chairman; Dr. Abhay Jere, Vice-Chairman, Prof. Rajive Kumar, Member-Secretary, Dr. Sunil Luthra,
Director and Reena Sharma, Hindi Officer Training and Learning Bureau for their planning to publish
the books on Computer Networking and Data Communication. I sincerely acknowledge the valuable
contributions of the reviewer of the book Dr. Rahul Johari, Associate Professor, School of Automation
and Robotics, Guru Gobind Singh Indraprastha University, Delhi. for his valuable suggestion in
shaping the book.
I would like to extend my deepest appreciation to my mentor, Prof. R. Sukesh Kumar, for his
invaluable guidance, constant encouragement, and insightful feedback. His expertise and dedication to
teaching have been a source of inspiration throughout my academic journey, and this book would not
have been possible without his unwavering support.
I would like to thank Prof. Sanjay Kumar, HOD, ECE for his constant encouragement and support.
I take this opportunity to thank Professor S. K. Ghorai and Dr. Priyank Saxena for their valuable inputs
in writing the book. Special thanks to Professor S.S. Solanki, Dean PG for his continuous monitoring
of the development in writing the book.
I sincerely thank my wife Dr. Lopamudra Satapathy for helping in proof reading and preparation
of figures. I also wish to acknowledge my colleagues of BIT Mesra, friends, and family for their
patience, understanding, and motivation during this endeavour.
This book is an outcome of various suggestions of AICTE members, experts and authors who
shared their opinion and thought to further develop the engineering education in our country.
Acknowledgements are due to the contributors and different workers in this field whose published
books, review articles, papers, photographs, footnotes, references and other valuable information
enriched us at the time of writing the book.
v
PREFACE
This book, Computer Networking and Data Communication, is designed to provide a comprehensive
introduction to the fundamental concepts, technologies, and protocols that are used in modern
networks. It is crafted with students, professionals, and enthusiasts in mind, guiding readers through
the basics of networking, the intricacies of data transmission, and the complexities of communication
protocols that ensure seamless and reliable data exchange.
Through structured chapters, this book covers key topics such as transmission media, network
architectures, data link protocols, TCP/IP, and the evolution of modern networking technologies.
Special attention has been given to real-world applications, making the theoretical concepts more
relatable and practical.
The journey of writing this book has been both challenging and rewarding. It has allowed me to delve
deeper into the fascinating world of networking, and I hope it will do the same for you as a reader. My
sincere aim is to simplify complex topics and foster a deeper understanding of the role networking
plays in the digital age.
I trust this book will serve as a helpful resource for anyone seeking to expand their knowledge in this
ever-evolving field.
vi
OUTCOME BASED EDUCATION
For the implementation of an outcome based education the first requirement is to develop an outcome
based curriculum and incorporate an outcome based assessment in the education system. By going
through outcome based assessments evaluators will be able to evaluate whether the students have
achieved the outlined standard, specific and measurable outcomes. With the proper incorporation of
outcome based education there will be a definite commitment to achieve a minimum standard for all
learners without giving up at any level. At the end of the programme running with the aid of outcome
based education, a student will be able to arrive at the following outcomes:
PO1. Basic and Discipline specific knowledge: Apply knowledge of basic mathematics, science
and engineering fundamentals and engineering specialization to solve the engineering
problems.
PO2. Problem analysis: Identify and analyses well-defined engineering problems using codified
standard methods.
PO3. Design/development of solutions: Design solutions for well-defined technical problems and
assist with the design of systems components or processes to meet specified needs.
PO4. Engineering Tools, Experimentation and Testing: Apply modern engineering tools and
appropriate technique to conduct standard tests and measurements.
PO5. Engineering practices for society, sustainability and environment: Apply appropriate
technology in context of society, sustainability, environment and ethical practices.
PO7. Life-long learning: Ability to analyse individual needs and engage in updating in the context
of technological changes.
vii
COURSE OUTCOMES
Mapping of Course Outcomes with Programme Outcomes to be done according to the matrix given
below:
CO-1 3 3 3 3 1 2 3
CO-2 3 3 3 3 1 2 3
CO-3 3 3 3 3 1 2 3
CO-4 3 3 2 3 1 2 3
CO-5 3 3 2 3 1 1 3
viii
GUIDELINES FOR TEACHERS
To implement Outcome Based Education (OBE) knowledge level and skill set of the students should
be enhanced. Teachers should take a major responsibility for the proper implementation of OBE. Some
of the responsibilities (not limited to) for the teachers in OBE system may be as follows:
● Within reasonable constraint, they should manoeuvre time to the best advantage of all students.
● They should assess the students only upon certain defined criterion without considering any other
potential ineligibility to discriminate them.
● They should try to grow the learning abilities of the students to a certain level before they leave
the institute.
● They should try to ensure that all the students are equipped with the quality knowledge as well as
competence after they finish their education.
● They should always encourage the students to develop their ultimate performance capabilities.
● They should facilitate and encourage group work and team work to consolidate newer approach.
● They should follow Bloom's taxonomy in every part of the assessment.
Bloom’s Taxonomy
Teacher should Student should be Possible Mode of
Level
Check able to Assessment
Students ability to
Create Design or Create Mini project
create
Students ability to
Evaluate Argue or Defend Assignment
justify
Students ability to
Understand Explain or Classify Presentation/Seminar
explain the ideas
Students ability to
Remember recall (or Define or Recall Quiz
remember)
ix
GUIDELINES FOR STUDENTS
Students should take equal responsibility for implementing the OBE. Some of the responsibilities (not
limited to) for the students in OBE system are as follows:
● Students should be well aware of each UO before the start of a unit in each and every course.
● Students should be well aware of each CO before the start of the course.
● Students should be well aware of each PO before the start of the programme.
● Students should think critically and reasonably with proper reflection and action.
● Learning of the students should be connected and integrated with practical and real life
consequences.
● Students should be well aware of their competency at every level of OBE.
x
ABBREVIATIONS
List of Abbreviations
DM - Delta Modulation
DS - Differentiated Services
IP - Internet Protocol
xi
LLC - Logical Link Control
xii
LIST OF FIGURES
xiii
Figure No. Figure Caption Page No.
Figure 4.1 Single bit error and burst error. 66
Figure 4.2 Generalize Error Detection process 66
Figure 4.3 Error Detection using CRC 67
Figure 4.4 Example of Modulo-2 Arithmetic 68
Figure 4.5 Time sequence diagram of a frame. 71
Figure 4.6 Successful transfer of one frame with time instances 72
Figure 4.7 Sequence of frames with window. 73
Figure 4.8 Window position after transmission of F0 and F1 74
Figure 4.9 Window position after reception of RR1 at the transmitter 74
Figure 4.10 Example of operation of sliding window protocol. 74
Figure 4.11 Successful and unsuccessful data transfer 76
Figure 4.12 Stop and wait ARQ 77
Figure 4.13 Go back-N ARQ mechanism 78
Figure 4.14 Selective reject mechanism 79
Figure 4.15 Frame format of HDLC 80
Figure 4.16 Example of bit stuffing 81
Figure 4.17 Address field of HDLC 81
Figure 4.18 8-bit Control field 82
Figure 4.19 HDLC operation 84
Figure 4.20 Generalised MAC frame 85
Figure 5.1 Block Diagram of the FDM system 92
Figure 5.2 Block Diagram of the Synchronous TDM system 94
Figure 5.3 Comparison of statistical TDM and Synchronous TDM 95
Figure 5.4 Example of circuit switching network 98
Figure 5.5 Data transfer in packet switching network 98
Figure 5.6 Network having six nodes 101
Figure 5.7 Flooding of a data packet in the Network 102
Figure 5.8 Example of a Network having bidirectional cost 104
Figure 5.9 Link cost and the node visited 105
Figure 5.10 The least cost path using bellman Ford algorithm 107
Figure 5.11 Data transfer in IP layer. 111
Figure 5.12 IPV4 Datagram 112
Figure 5.13 IPV4 address format 113
Figure 6.1 Different guided transmission media 124
Figure 6.2 Cross-sectional view of optical fiber 125
xiv
Figure No. Figure Caption Page No.
Figure 6.3 Light passing through Optical fiber 125
Figure 6.4 TCP header with options and padding 128
Figure 6.5 TCP Addressing 129
Figure 6.6 Example of TCP connection management. 131
Figure 6.7 Example of flow control in TCP 132
Figure 6.8 Slow start Mechanism 134
Figure 6.9 Linear growth of congestion window 135
xv
LIST OF TABLES
xvi
CONTENTS
Forward iv
Acknowledgement v
Preface vi
Outcome Based Education vii
Course Outcomes viii
Guidelines for Teachers ix
Guidelines for Students x
Abbreviations xi
List of Figures xiii
List of Tables xvi
xvii
1.4.1 Personal Area Network 9
1.4.2 Local Area Network 9
1.4.3 Metropolitan Area Network 9
1.4.4 Wide Area Network 9
1.4.5 Internetwork 9
1.5 Computer Network topologies 10
1.5.1 Point to point and multipoint connections 10
1.5.2 Bus Topology 10
1.5.3 Star Topology 10
1.5.4 Ring Topology 11
1.5.5 Mesh Topology 11
1.5.6 Tree Topology 12
1.5.7 Daisy Chain 12
1.5.8 Hybrid topology 13
1.6 Transmission Media 13
Unit Summary 13
Exercises 14
Know More 17
Reference and suggested readings 17
xix
Pre-requisites 65
Unit outcomes 65
4.1 Error Detection and Correction 66
4.1.1 Error in Data Communication 66
4.1.2 Error detection process 66
4.1.3 Cyclic Redundancy Check 67
4.1.4 Error Correction 70
4.2 Data link control protocol 71
4.2.1 Flow control 71
4.2.2 Error control 75
4.2.3 HDLC 79
4.3 LAN protocol 84
Unit Summary 86
Exercises 86
Know More 90
Reference and suggested readings 90
xxi
References for Further Learning 142
CO and PO Attainment Table 143
Index 144-149
xxii
1 INTRODUCTION TO DATA
COMMUNICATION
UNIT SPECIFICS
This unit discusses the following topics:
• Definition of data communication
RATIONALE
This foundational section introduces students to the basic elements and models of data communication.
It ensures that they understand the terminology and the role of data communication in networking.
Different network layouts and types of networks determine how communication happens across
systems. Protocols govern the rules of data communication. Understanding OSI and TCP/IP models is
key to troubleshooting, designing, and implementing networks efficiently.
The concepts in this unit will help the students to understand the fundamentals of data communication
and computer networking.
PRE-REQUISITES
Basic knowledge of electronics and communication
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
1
Computer Networking and Data Communication
U1-O1 3 2 1 - -
U1-O2 3 1 - 1 -
U1-O3 3 - - 2 2
U1-O4 3 - 1 - -
U1-O5 3 1 2 1 -
Source: This is where the information originates. It could be a person, a computer, or any device that
generates data.
Transmitter: It transform and encodes the information to electromagnetic signal so that it can reach
to the receiver through a transmission medium.
Channel: This represents the medium through which the message is transmitted. It could be wire or
wireless medium.
Receiver: The receiver accepts the electromagnetic signal and convert it into data.
Destination: Destination takes the incoming data from the receiver and interpret the information.
An example of a communication system is shown in Figure1.2.
2
Introduction to Data Communication
Analog data to digital signal Pulse Code Modulation, Delta Modulation Modem
Digital data to Analog signal Amplitude Shift Keying, Frequency Shift Codec
Keying, Phase Shift Keying, Quadrature
Phase Shift Keying
Digital data to digital signal RZ, NRZ, Manchester coding Digital Transmitter
3
Computer Networking and Data Communication
1.2.4 Data rate
Data rate, also known as bitrate, refers to the speed at which data is transmitted or processed over a
communication channel within a certain period of time. It is generally quantified in bits per second
(bps)
1.2.5 Bandwidth
Bandwidth refers to the capacity or range of frequencies available for data transmission within a
communication channel or network. Signal bandwidth is determined by the transmission system and
the communication channel. It is often measured in hertz (Hz).
1.2.6 SNR
SNR stands for Signal-to-Noise Ratio. It's a measure used in communication systems to quantify the
ratio of the strength of the desired signal (such as an audio signal or a data transmission) to the strength
of background noise or interference. A higher SNR indicates that the signal is stronger relative to the
noise, which typically results in better communication quality and more reliable transmission. SNR is
often expressed in decibels (dB)
The above signal in Figure-1. 3 is having two different signal level, that is High and Low. Now if we
change the number of voltage levels to 4, we can send two bits at a time. Figure 1.4 show the 4 voltage
levels So within 1 second time now we can send 4 bits. So the channel capacity also depends on number
of voltage levels.
For multilevel signaling, the generalized formula for channel capacity can be represented as
C=2Blog2M. where M is the number of distinct voltage levels.
4
Introduction to Data Communication
In a noisy environment channel capacity is represented by C=B log2(1+SNR).
This is also called as Shannon’s channel capacity.
11
10
01
00
1. The sender needs to either initiate the point to point link or notify the communication network
regarding the initiation of data transfer.
2. The sender needs to ensure that the receiver system is ready to accept data.
3. The file transfer application on the source system needs to verify that the file management
programme on the destination system is ready to receive and save the file for the specific user.
4. If there is a mismatch in file formats of the two system, then either one of them must execute a
format translation task.
1.3.2 Protocol
In data communication, a protocol refers to a set of rules and conventions governing the format and
exchange of data between devices or systems. It consists of both hardware and software. These rules
define how data is transmitted, received, and interpreted, ensuring that communication occurs
smoothly and accurately. Protocols cover various aspects of communication, including the structure of
messages, error detection and correction mechanisms, addressing, and routing. Examples of protocols
include TCP/IP (Transmission Control Protocol/Internet Protocol), HTTP (Hypertext Transfer
Protocol), SMTP (Simple Mail Transfer Protocol), and many others.
5
Computer Networking and Data Communication
Application Grants the user access to the OSI environment. Implements protocols for
specific applications, such as HTTP for web browsing, SMTP for email, and
FTP for file transfer.
Network Manages logical addressing and routing of data packets between devices in
different networks.
Physical Transmits raw data bits over the physical medium. Handles the physical
connection between devices.
6
Introduction to Data Communication
The application layer grants an access to the OSI environment. The user data is brought into the
application layer (for example an email message is written by using compose and the user is interested
to send to a specific user). Application layer of A appends its own header which can be interpreted by
the application layer of B. User data along with application header is called as Application protocol
data unit (A-PDU). This APDU goes down to the presentation layer where presentation layer appends
its header and does the format translation. Now this Presentation protocol data unit goes to the session
layer. Sessions layer establishes a session between application A and application B. Session layer
appends its header and sends the S-PDU to Transport layer. Transport layers looks after the end to end
reliability issue and appends its own header and sends the T-PDU to network layer. Network layer
manages the logical addressing routing of data packets between devices in different network. Network
header append the network header and send the N-PDU to the datalink layer. Datalink layer controls
the flow of data and detects error and control it by retransmission. It appends the header and trailer
before sending it to the physical layer. The trailer is generally responsible for the error detection. Then
the physical layer converts the data into signal (raw bit stream) then sends the data into the network.
Based on the routing information the raw bit stream reaches the intended destination and the reverse
process is done. Respective header and trailer will be verified and dropped on the layer of station B.
finally B will get the user data in the application layer.
7
Computer Networking and Data Communication
Table 1.3: TCP-IP layers and their functions
Application Responsible for providing network services directly to user applications. Handles
data formatting, encryption, and decryption. Provides an interface between the
user and the network
Host to host Ensures reliable end-to-end communication between devices. TCP and UDP are
layer the two primary protocol in this layer
Network access Responsible for transmitting data packets over the physical network by
employing medium access mechanism. Handles data framing, flow control, error
detection and control.
Physical The physical layer ensures connection between a source and a transmission
medium or network. Its focus lies in defining the characteristics of the channel,
the signal characteristics, data rate, and associated aspects.
Modularity Each layer has well-defined Layers are less strictly defined, with some
functions, focusing on specific functions overlapping between layers,
aspects of network especially in the Application and Transport
communication. layers
Adaptation Despite its conceptual elegance, Widely adopted and forms the basis of the
OSI has seen limited adoption in Internet
practice
1.4.5 Internetwork
"Internetwork" is a term used to describe a collection of interconnected networks. It refers to the global
network infrastructure that connects various individual networks, such as LANs, WANs, and MANs,
9
Computer Networking and Data Communication
into a larger, interconnected system. The Internet is the most prominent example of an internetwork,
comprising millions of interconnected networks worldwide.
10
Introduction to Data Communication
11
Computer Networking and Data Communication
12
Introduction to Data Communication
Advantages: Sequential connectivity, simplicity, scalability, Cost effective, Data transmission
efficiency
Disadvantages: Single point failure, limited scalability, performance degradation, Difficulty in trouble
shooting
UNIT SUMMARY
Sender, receiver and communication channel are the main components of data communication
system
User data is converted to signal before transmitting it in the communication channel.
Channel capacity depends on the band width and the signal to noise ratio.
A protocol is a set of rules and standards that allow different devices in a network to communicate
and exchange data in an organized way
Network topology refers to the arrangement or layout of different elements (like nodes, links,
and devices) in a computer network.
13
Computer Networking and Data Communication
Selection of topology depends on factors like budget, required speed, reliability, and the scale of
the network.
EXERCISES
Q1. Which of the following network topologies is having a central hub or switch with individual
devices connected to it?
A) Bus B) Mesh
C) Star D) Ring
Q2. In a bus topology, how are devices connected to the main communication line?
Q3. Which network topology provides redundancy and fault tolerance by allowing data to travel in
both clockwise and counter clockwise directions around the network?
A) Bus B) Mesh
C) Star D) Ring
Q4. In a mesh topology, how many links are required to connect each device to every other device
in the network?
A) n-1 B) n/2
C) n D) 2n
Q5. Which of the following network topologies is most susceptible to a single point of failure?
A) Mesh B) star
C) bus D) ring
Q6. Which network topology uses a hierarchical structure with multiple levels of interconnected
branches stemming from a central root node?
A) Tree B) Ring
C) Mesh D) Star
14
Introduction to Data Communication
Q8. Which network topology is characterized by a combination of two or more different topologies?
A) Mesh B) Star
C) Hybrid D) Bus
Q9. Which topology is commonly used in small office/home office (SOHO) networks and industrial
control systems?
A) star B) mesh
Q10. In a ring topology, what happens if one device or link in the ring fails?
A) The entire network is unaffected. B) Data transmission stops until the failed device is
repaired.
C) Data can still travel in both directions, D) The network automatically switches to a backup
bypassing the failed device. ring
Q11. Which protocol is responsible for addressing and routing packets across interconnected
networks
A) TCP B) IP
C) HTTP D) UDP
Q12. Which protocol is commonly used for secure communication over a computer network
A) HTTPS B) FTP
C) SMTP D) DNS
Q13. Which OSI layer is responsible for ensuring reliable end-to-end communication over a
network?
C) Transport D) Network
Q14. Which OSI layer is responsible for translating, encrypting, or compressing data for
transmission across a network?
A) Presentation B) Application
15
Computer Networking and Data Communication
Q16. In Multilevel signalling the Channel capacity is equal to --------------, where W is the band
width and M is the number of discrete signal levels.
A) 2W log e M B) W log2M
A) Frequency B) Temperature
Q19. What is the rate at which data has to be transmitted over a communication path, if the
bandwidth of the transmitted signal is 3.2 KHz and there are 8 discrete signal levels?
Q20. Which of the following guided media has the highest data transmission rate?
C) UTP D) STP
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
C A D A C A C C A B B A C A D C C B C A
16
Introduction to Data Communication
Q3. What are the main functions of different layers in OSI protocol. Compare between TCP/IP and
OSI layers.
Q4. What are the main functions of different layers in TCP/IP protocol. Compare it with OSI
protocol.
Q5. Define point to point communication. How is it different from multipoint connection
Q6. What are the primary characteristics of a star topology?
KNOW MORE
Transmission Impairments
17
2 DIGITAL & ANALOG
TRANSMISSION
UNIT SPECIFICS
This unit discusses the following topics:
• Data to signal conversion
• Characteristics of coding techniques
• Error detection and correction codes
• Different transmission modes and their applications
RATIONALE
Understanding data-to-signal conversion is essential for designing and optimizing data communication
systems. students need to understand how digital data is transformed into a format suitable for
transmission over physical communication channels. These units provide essential insights into the
performance, efficiency, and reliability of a communication system.
PRE-REQUISITES
Basic knowledge of electronics and communication
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
U2-O1: Understand the Principles of Signal Conversion
U2-O2: Differentiate between Bitrate and Baudrate Requirements
U2-O3: Evaluate Error Detection and Correction Techniques
U2-O4: Compare between analog and digital transmission
U2-O5: Understand the characteristics, types, and applications of different transmission modes.
U2-O1 1 3 - - -
U2-O2 1 3 1
U2-O3 - 3 - 2 1
U2-O4 1 3 1 - -
U2-O5 1 3 1 - -
18
Digital & Analog Transmission
Line Coding
Line coding is a method of converting each individual bit of the digital data stream into a corresponding
signal element. Line coding defines how digital 0s and 1s are represented as physical signals in the
communication channel. This ensures that the receiver can accurately interpret the transmitted data.
Let us take an example where bit 0 is represented as low level i.e. 0 volt and bit 1 is represented as
high level i.e. A volt. Line coding digital signal of 10010 is shown in Figure 2.1.
a. Signal level
b. DC component
R = Data rate(bits/second)
L = number of bits/signal element
Differential: If in a coding scheme the bit representation depends on the transition of voltage level
then it is called differential. Bit representation is not having fixed voltage level. Example Bipolar AMI.
In Bipolar AMI, bit 1 is not represented as a fixed voltage, it is represented as voltage pulse of
alternating polarity.
20
Digital & Analog Transmission
Synchronization capability: Synchronization capability can be provided in the digital signal if there
is every bit transition. If the receiver is delayed/ advanced by one bit, then at the receiver it will be
interpreted wrongly. This is shown in Figure 2.3.
Figure 2.3: Difference between transmitted signal and received signal for one-bit delay.
Error detection capability: Some of the coding scheme inherently exhibit error detection capability.
Example Bipolar AMI. If the signal level will not change alternatively in Bipolar AMI it is treated as
error. A typical example is shown in figure 2.4. Here both valid and invalid Bipolar AMI is shown.
Since the 4th bit in the example is the second 1, it has to be of opposite polarity of the 1st one. The
receiver will automatically detect the error if pulses are not coming with opposite polarity.
Different line coding techniques, their bit representation and properties is given in Table 2.1.
21
Computer Networking and Data Communication
Table 2.1: Coding techniques their bit representation and properties
1 = Low level
1= transition at the
beginning of the
interval
1 = Voltage level of
opposite polarity for
successive ones
1= Low to high
transition in the middle
of the interval
0= transition in the
beginning
1= No transition at the
beginning
Digital data is converted to digital signal to avoid the DC component and acquire good characteristics
like synchronization, error detection, differential.
22
Digital & Analog Transmission
Block Coding
Block coding is a method of converting data into fixed size blocks. In communication systems, block
coding is often used for error correction at the receiver itself. In the source side data is converted to
block of fixed size. Each block of data consisting of k-bit of data is converted into n-bit codeword
using forward error correction encoder. At the receiver end the reverse process is done to get back the
original data using forward error correction decoder. If the error occurs at the receiver end the decoder
could do the following operation:
1. Detect and correct the error
Block code for error correction: Let us take 2 bit block which will be converted to 5 bit codeword.
The codeword is given in table 2.2. For this example 00000, 00110,10001,11110 these are the valid
codeword. Any other five bit combination will be treated as invalid codeword.
Table 2.2: 5 bit codeword of 2 bit data
00 00000
01 00110
10 10001
11 11110
23
Computer Networking and Data Communication
For a bit string 10001101 the codeword will be 10001000001111000110.
This code word will be generated by the forward error correction encoder, at the receiver end the
forward error correction decoder will convert back the bit string from the codeword received.
Case 1: Error is detected and corrected
Let us take a typical example the codeword received by the receiver is 10001000001111000111. The
last bit is changed from 0 to 1. Now 10001 will be converted back to 10, 00000 will be converted back
to 00, 11110 will be converted back to 11 but 00111 is not a valid codeword. Hence 00111 can not be
converted directly. The decoder identifies there is some error. It tries to find out the hamming distance
of this invalid codeword from all the valid codeword.
DH(00111, 00000)=3
DH(00111, 00110)=1
DH(00111, 10001)=3
DH(00111, 11110)=3
The valid codeword which is having the minimum distance is replaced by the invalid codeword. 00111
in the received string is replaced by 00110. This is how the error is corrected by the receiver itself.
But this is not a full proof system.
Case 2: Error is detected but not corrected
If an invalid codeword is equidance from two valid code word, then the decoder will be able to detect
the error but it will not be able to rectify the error.
For example 00110 is changed to 00101. The decoder will find that 00101 is not a valid codeword, it
will detect that there is an error. It tries to find out the hamming distance of this invalid codeword from
all the valid codeword.
DH(00101, 00000)=2
DH(00101, 00110)=2
DH(00101, 10001)=2
DH(00101, 11110)=4
The minimum distance is 2. Three valid codewords are equidistance from the invalid codeword 00101.
Hence the decoder will not be able to correct the error.
Case3: Error goes undetected
When a valid codeword is changed to another valid codeword, the decoder will not be able to identify
the error
For example 00110 is changed to 00000. The decoder will not be able to identify the error. Block
coding plays a crucial role in providing mechanisms for error detection and correction, data encryption,
data compression, parallel processing, and improving the reliability and efficiency of communication
and storage systems.
24
Digital & Analog Transmission
2.1.2 Analog Data to Digital Signal conversion
Codec used for converting analog data to digital signal at the transmitter end and recovering analog
data from the digital signal at the receiver end. In general techniques like pulse code modulation
(PCM) or delta modulation (DM) is used to convert the analog data to digital signal.
Pulse Code Modulation: PCM is a method used to digitally represent analog signals. Block diagram
of the PCM is shown in Figure 2.6
Sampling: Analog signal is continuous in time and continuous in amplitude. The continuous analog
signal is sampled at uniform intervals of time. The frequency at which the signal is sampled is known
as the sampling rate or sampling frequency. The Nyquist-Shannon sampling theorem states that the
sampling rate must be at least twice the highest frequency in the analog signal to prevent aliasing.In
figure2.6 the continuous signal is sampled into 9 samples. The sampled signal are called pules
amplitude (PAM) signal. These samples are discrete in time but continuous in amplitude. This means
PAM signal is valid only at some specific time instances but the amplitude is any real number for
example the first sample value is 3.8 second sample value is 7.2 and so on.
Quantization: Each sampled value is then approximated to the nearest value within a range of discrete
levels. This process is called quantization. The number of discrete levels is determined by the bit depth
(or resolution) of the PCM system. A higher bit depth allows for a more accurate representation of the
analog signal but requires more data. In Figure 2.6 it is observed that the number of discrete level is
16. After quantization the first sample value is approximated to 4 and the second sample is
approximated to 7 and so on.
Encoding: The quantized values are then encoded into a digital form, typically binary. This involves
converting each quantized value into a binary number. In the given system shown in Figure 2.6 first
bit of the binary number is represented for sign. Binary 0 is for + and binary 1 is for -. The next three
bit represent the magnitude. For example +2 is represented as 0010, -2 is represented as 1010. The first
25
Computer Networking and Data Communication
quantized value 4 is encoded as 0100, the second quantized value 7 is coded as 0111 and so on. Final
digital signal is obtained after encoding all the sampled and quantized signal.
Delta Modulation:
Different techniques have been developed to improve PCM performance or reduce its complexity.
Delta modulation (DM) is one of the most efficient alternative to PCM. In delta modulation, the analog
input is approximated by a staircase function that increases or decreases by one quantization level Δ
at each sampling interval (𝑇𝑇𝑇𝑇). Original analog signal and its delta modulated signal is shown in Figure
2.7. Here the staircase function is superimposed on the analog signal.
The staircase function is binary in nature. At every sampling interval Ts, the function either moves up
or down by a predefined value Δ . Consequently, the output obtained from the delta modulation process
is encoded by a single bit for each sample. If the staircase is moving up during the next interval, then
the sample is converted to bit 1 and if the staircase is moving down the sample is converted to bit 0.
26
Digital & Analog Transmission
Transmission and reception of delta modulated signal is presented in figure 2.8. The transmitter
encodes the analog input into a binary sequence by comparing the input with a predicted signal. The
receiver reconstructs the analog signal by integrating the differences represented by the binary
sequence.
27
Computer Networking and Data Communication
FSK: In FSK, the frequency of the carrier signal is changed according to the digital data. The simplest
form of FSK is binary FSK (BFSK). In BFSK the two binary bits (1 and 0) are represented by carrier
of two different frequencies (fc ± Δf) near the carrier frequency fc (Figure 2.9 b). The output signal S(t)
can be represented as
S(t)= A Cos(2π(fc+ Δf)t) for bit 1
QPSK: Quadrature Phase Shift Keying (QPSK) is a digital modulation scheme that converts two bit
data at a time by changing the phase angle of the carrier signal. It is an extension of BPSK. It uses four
28
Digital & Analog Transmission
signal elements whose phase shifts are π/2 (90°) apart from each other as hown in figure 2.10. It is
having better bandwidth utilization as compared to Binary PSK (BPSK).
And C = f * λ
Where C= velocity of signal, λ=wavelength of the signal and f= frequency of the signal
The wavelength of the carrier λc = C/fc =(3×108 m/s)/(30×106 s-1) =10 Meter
Length of the antenna = λc / 4 = 10/4 =2.5 meter.
29
Computer Networking and Data Communication
This is an achievable antenna height.
Another advantage of modulation is that it allows combination of multiple analog data over a single
channel.
In this section we will discuss three different modulation techniques such as Amplitude modulation
(AM), Frequency modulation (FM) and Phase Modulation (PM).
Amplitude Modulation: The carrier's amplitude is modulated in accordance with the amplitude of the
message signal (analog data). The time domain representation of the Amplitude-modulated carrier
signal is as follows.
fm and fc are the frequency of the message signal and carrier respectively
𝐴𝐴𝐴𝐴
S(t) = [1+ 𝐴𝐴𝐴𝐴 cos(2πfmt) ] cos (2πfct)
30
Digital & Analog Transmission
Frequency modulation: The carrier's frequency is modulated in accordance to the amplitude of the
message signal (analog data). The time domain representation of the frequency-modulated carrier
signal is as follows.
S(t)=Ac cos(2πfct +mf sin2πfmt)
Where mf is the frequency modulation index. Frequency modulated carrier is shown in Figure 2.11d.
Phase modulation: Instantaneous phase of the carrier is modulated in accordance to the amplitude of
the message signal (analog data). The time domain representation of the phase-modulated carrier signal
is as follows.
Complexity and Cost Simpler and less expensive More complex, higher initial
cost
Both analog and digital transmission have their advantages and specific applications where they are
most effective. However, with the advent of digital technology, digital transmission has become more
prevalent due to its robustness, efficiency, and compatibility with modern communication needs.
31
Computer Networking and Data Communication
2.4 TRANSMISSION MODES
Transmission modes refer to the methods and protocols used for sending data between devices in a
communication system. Table 2.4 indicates different transmission mode, their directions,
characteristics and applications
Transmission
Direction Characteristics Applications
Mode
UNIT SUMMARY
There are four different methods for conversion of data to signal.
Important characteristics of line coding are signal level, DC component, modulation rate or baud
rate, synchronization capability and error detection capability.
Block coding is used for forward error correction.
Sampling and quantization are the two important process of PCM system.
32
Digital & Analog Transmission
Modulation is done to transmit the message signal to a longer distance.
digital transmission has become more prevalent due to its robustness, efficiency, and
compatibility with modern communication needs.
Mode of transmission has to be decided prior to the actual data transfer
EXERCISES
A) NRZ-L B) RZ
Q4. For which bit pattern, minimum baud rate occurs in Manchester coding?
C) 10101010 D) 11001100
Q5. What will be the normalized baud rate for bit pattern 101010…in Differential Manchester
coding technique?
A) 0 B) 1
C) 1.5 D) 2
C) Depends upon the amplitude of the signal D) Depends upon the frequency of the signal
33
Computer Networking and Data Communication
A) TDM B) PCM
C) PPM D) FDM
Q9. The bit rate of a signal is 3000 bps. What is the baud rate if each signal element encodes 6 bits?
Q10. If PCM sampling rate is 125 microseconds, the frequency of the input signal is
A) 4 KHz B) 8 KHz
C) 2 KHz D) 16 KHz
Q11. What is the primary advantage of using Quadrature Phase Shift Keying (QPSK) over Binary
Phase Shift Keying (BPSK)?
Q12. How many bits per symbol does Quadrature Phase Shift Keying (QPSK) transmit?
A) 1 B) 2
C) 3 D) 4
A) ASK B) BPSK
C) QPSK D) FSK
Q15. In the Bipolar AMI encoding scheme, how are binary '1's represented?
Q17. What is the key advantage of using Differential Manchester encoding over standard
Manchester encoding?
A) Simplex B) Half-duplex
Q20. In which transmission mode can data flow in only one direction?
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
A B D C C D A B A A B D B A D C D B B A
Q2. Define hamming distance. Where it is used? Find out the Hamming distance between A and B
where A=1011010101, B = 1101001010.
Q3. Define Baud rate. Find the relationship between data rate and baud rate. In Manchester coding,
find out the bit patterns for which the minimum and maximum baud rate will come.
Q4. Explain different mechanism used to convert data to signal
Q5. Write down the advantages of digital communication over analog communication.
KNOW MORE
36
3 WIRELESS
COMMUNICATION
UNIT SPECIFICS
This unit discusses the following topics:
• Electromagnetic spectrum in communication technology
• Wireless communication standards
• Mobility management in wireless networks
• Clustering techniques in wireless communication
RATIONALE
Wireless communication is integral to everyday life, powering mobile phones, laptops, IoT devices,
and smart homes. Understanding its principles is essential for anyone in the networking field. A
dedicated chapter introduces fundamental concepts such as frequency, modulation, and signal
propagation, which are crucial for grasping how wireless networks operate. By contrasting wireless
communication with traditional wired networks, students can appreciate the strengths and weaknesses
of each, guiding them in choosing the appropriate technology for specific applications.
PRE-REQUISITES
Basic knowledge of electronics and communication
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
U3-O1: Explain the significance of the electromagnetic spectrum in communication technology.
U3-O2: Understand key wireless communication standards (e.g., Wi-Fi, Bluetooth, LTE, 5G) and their
characteristics.
U3-O3: Describe the principles of mobility management in wireless networks, including handover
techniques, location management, and session continuity.
U3-O4: Gain insights into clustering techniques used in wireless communication networks, including
their role in improving network efficiency and resource allocation.
U3-O5: Explain the key concepts, protocols, and mechanisms involved in managing mobile devices
within an IP network.
37
Computer Networking and Data Communication
U3-O1 - 2 3 - -
U3-O2 1 - 3 1 -
U3-O3 1 1 3 - -
U3-O4 1 3 1 -
U3-O5 2 - 3 1 2
38
Wireless Communication
Gamma Above 30EHz Extremely high energy and Medical treatment, nuclear
Rays penetrating power, but like research.
X-rays, not used for
communication.
39
Computer Networking and Data Communication
3.2 INTRODUCTION TO WIRELESS COMMUNICATION
Wireless communication refers to the transmission of data between two or more devices without the
use of physical medium such as wires, cables or optical fibre. Instead, it uses electromagnetic waves,
such as radio frequencies, infrared, and microwaves, to transfer information. Block diagram of the
basic wireless communication model is shown in Figure 3.1.
Wi-Fi IEEE 802.11 standards. Uses unlicensed frequency Local area networks
802.11a/b/g/n/ac/ax band. (LANs), internet
access in homes,
(Wi-Fi 1-6) Range upto 100 meter.
offices, public
Different generations offer places.
varying speeds, ranges, and
capabilities.
Bluetooth IEEE 802.15.1 standards Low power, connects small Used in headsets,
devices and low coverage keyboards, mice, and
range upto 10 meter with a other peripherals.
data rate of 1Mbps
Bluetooth Low IEEE 802.15.1 standards Lower power consumption IoT devices, fitness
Energy (BLE) compared to classic trackers, beacons.
40
Wireless Communication
Z-Wave Z-wave protocol Low power, low data rate, Home automation,
operates in the sub-1 GHz smart home devices.
band, good range and
reliability.
Maximum number of devices
232. Maximum distance
between devices 100meter
NFC (Near Field ISO/IEC 18000-3 air Very short range (a few Contactless
Communication) interface standard centimeters), secure and fast payments, access
communication, used in control, data
mobile payments (e.g., Apple exchange.
Pay, Google Wallet).
13.56 MHz in the globally
available unlicensed radio
frequency ISM band,
LoRaWAN LoRa protocol Long-range, low power, low IoT, smart cities,
(Long Range data rate, suitable for agriculture, asset
Wide Area connecting large numbers of tracking.
Network) low-power devices.
41
Computer Networking and Data Communication
scale fading. Path loss occurs due to distance between the transmitter and the receiver. Large scale
fading occurs due to shadowing that is variation in signal strength due to obstacle in the line of sight
path. It causes slow variations in signal strength over large distances. Small scale fading occurs due
to different speed and multipath propagation of the signal. Multi path propagation is shown in
Figure 3.1.
Delay Spread: It is the time difference between the arrival of the first and the last multipath
components. When the spreading time is larger than the intersymbol period then part of the symbol
will run over the next symbol. it creates an interference between the symbol. This is called inter-symbol
interference (ISI) in communication systems.
Coherence Time: It is the Time duration for which the impulse response of the channel is considered
to remain unchanged. In this duration the channel is considered to be static and offers approximately
equal gain. It is inversely proportional to Doppler spread.
Coherence Bandwidth: It is the Range of frequencies over which the channel response is considered
to be uniform (i.e., all frequency components are equally affected). It is inversely proportional to the
delay spread.
42
Wireless Communication
Average duration of fade: Average duration of fade indicates the duration for which a signal remains
in fading condition. It is calculated by finding the durations for which the received signal remains
below the specific threshold value.
• Interference: Caused by other transmitting devices operating in the same frequency band.
Noise and interference degrades signal quality and affects the signal-to-noise ratio (SNR).
Linear Equalizers:
o Zero Forcing (ZF) Equalizer: Inverts the channel frequency response to eliminate ISI but can
amplify noise, especially in low SNR conditions.
o Minimum Mean Square Error (MMSE) Equalizer: Balances ISI suppression and noise
enhancement by minimizing the mean square error between the transmitted and received signals.
Non-linear Equalizers:
o Decision Feedback Equalizer (DFE): Uses previously detected symbols to cancel ISI from the
current symbol, providing better performance than linear equalizers in severe ISI conditions.
o Maximum Likelihood Sequence Estimation (MLSE): Finds the most likely transmitted
sequence by considering all possible transmitted sequences, offering optimal performance at the
cost of high computational complexity.
43
Computer Networking and Data Communication
2. Diversity Techniques: Diversity techniques exploit the availability of multiple signal paths to
improve the robustness of the communication system. Diversity improves the quality of a wireless
communication link without increasing the transmit power or bandwidth.
• Spatial Diversity: Uses multiple antennas at the transmitter and/or receiver (MIMO systems) to
receive multiple independent copies of the signal.
• Time Diversity: Transmits the same information at different times to combat deep fades.
• Frequency Diversity: Uses different frequency bands to transmit the same signal, mitigating
frequency-selective fading.
• Polarization diversity: Uses two antennas at the transmitter and two at receiver with different
polarization. Since the scattering angle relative to each polarization are randomly different, it is
relatively impossible that signal received by two different polarized antennas would suffer deep
fades simultaneously.
3. Rake Receiver: A Rake receiver is used in CDMA systems to take advantage of multipath
propagation by combining the received signals from different paths.
• Working Principle: When the signal undergoes multipath propagation, different versions are
delayed in time and they appear like uncorrelated signal components at the CDMA receiver.
Rake receiver utilizes multiple "fingers," each correlating with a different delayed version of the
transmitted signal, and combines their outputs to improve the signal-to-noise ratio (SNR).
4. Channel Coding: Channel coding aims to make the transmitted signal robust against channel errors.
It adds redundancy to the transmitted signal to detect and correct errors.
• Forward Error Correction (FEC): The error is corrected at the receiver end. No retransmission
is required. FEC introduces controlled redundancies while encoding so that detection and
correction can be done at the receiver. Different error-correcting codes such as convolutional
codes, Turbo codes, and LDPC (Low-Density Parity-Check) codes are used to correct errors.
• Interleaving: Interleaving breaks up the error burst and spreads the bits of a codeword over time
or frequency to combat burst errors by dispersing them over multiple codewords. This brings
improvement in performance of coding, which is also called as interleaving gain.
5. Adaptive Modulation and Coding (AMC): AMC dynamically adjusts the modulation scheme and
coding rate according to the current channel conditions.
• Objective: Maximizes data throughput while maintaining an acceptable error rate by adapting
to the channel's quality.
• Implementation: Commonly used in wireless communication standards.
6. Beamforming: Beamforming uses multiple antennas to direct the transmitted or received signal in
a specific direction, enhancing the desired signal and reducing interference. In beamforming, the
direction in which an array has the maximum gain is called as beam pointing direction. This is
determined by adjusting the phase difference among its elements.
44
Wireless Communication
• Transmit Beamforming: Adjusts the phase and amplitude of the transmitted signals at each
antenna to focus the energy in the direction of the receiver.
• Receive Beamforming: Combines signals received from multiple antennas to enhance the
desired signal and suppress interference.
7. MIMO (Multiple Input Multiple Output): MIMO technology employs multiple transmit and
receive antennas to improve capacity and reliability. MIMO minimizes the interference level in a
system by directing signal towards intended user.
• Spatial Multiplexing: Transmits independent data streams from each antenna to increase the
data rate.
• Diversity Gain: Combines multiple copies of the signal received through different antennas to
improve robustness against fading.
8. Cooperative Communication: In cooperative communication, nearby users or relay nodes assist
in transmitting the signal to improve coverage and reliability.
• Relaying: Intermediate nodes relay the signal to extend coverage and improve reliability.
• Network Coding: Combines multiple signals at relay nodes to enhance throughput and
robustness.
9. OFDM (Orthogonal Frequency Division Multiplexing): OFDM divides the wideband channel
into multiple narrowband subchannels, each experiencing flat fading.
• Implementation: Converts a frequency-selective fading channel into multiple flat-fading
channels, simplifying equalization.
• Advantages: Provides robustness against frequency-selective fading and ISI.
10. Channel Estimation and Tracking: Accurate channel estimation and tracking are essential for
effective equalization, diversity combining, and beamforming.
• Techniques: Pilot symbols, training sequences, and blind estimation methods are used to
estimate and track the channel state information (CSI).
These receiver techniques, either individually or in combination, help to mitigate the adverse effects
of fading and dispersion in wireless channels, ensuring reliable and efficient communication.
45
Computer Networking and Data Communication
• Registration/Update: Mobile devices periodically update their location with the network. This
can be based on time intervals, changes in location area, or certain events like power on/off.
• Location Area (LA): The network is divided into location areas, each managed by a set of base
stations. Mobile devices report their presence when they move from one LA to another.
• Paging: When there is an incoming call or data for a mobile device, the network pages the device
within its last known LA.
2. Handoff Management: While moving across the cell, connectivity of an end user (mobile station)
must be transferred form one base station to another. This process is known as handoff. Handoff
process in a cellular system is shown in Figure 3.2.
• Types of Handoffs:
o Hard Handoff: Hard hand off is based on the concept of break-before-make connection.
First the current connection is terminated from its serving base station before a new one is
established. Duration between the termination of the old connection and establishment of
the new connection is of the order of millisecond so that the interruption goes unnoticed by
the end user. Usually the change of frequency occurs in hard handoff.
o Soft Handoff: Soft handoff is based on the concept of make-before-break connection. The
end user is allowed to remain in contact with two base station simultaniously. The new
connection is established before the old one is terminated (common in CDMA networks).
Soft hand off does not involve frequency change only code has to be changed.
o Horizontal Handoff: Handoff taking place between cells in the same radio access
technology (e.g., from one GSM cell to another GSM cell).
46
Wireless Communication
o Vertical Handoff: Handoff taking place between two different radio access technology
cells (e.g., from GSM cell to a WCDMA cell).
3.6.1 Mobile IP
Mobile IP (Internet Protocol) is a protocol designed to allow mobile devices to roam across different
networks while keeping a permanent IP address. This capability is essential for ensuring continuous
communication and service access as users move from one network domain to another.
Terminology and concepts of Mobile IP: Before discussing the terminology and concepts of Mobile
IP, let us consider a scenario of Mobile IP environment as shown in Figure 3.3.
Mobile Node (MN): The mobile device (e.g., a smartphone or laptop) that changes its network
attachment point using Mobile IP, while keeping its home IP address. It generally moves between
home and foreign networks.
Home network: The network to which the mobile device's permanent IP address (home address)
belongs. Mobile IP support is not required when the MN is in the home network.
Foreign network: Any network other than the home network where the mobile device is currently
present.
Home Agent (HA): A router on the home network that maintains the mobile node's (MN) home
address and tunnels packets to the MN when it is away from home. It is placed on the mobile node’s
home network.
Foreign Agent (FA): A router on the foreign network that offers routing services to the MN during
its visit to foreign network. The FA assigns a care-of address (CoA) to the MN and helps in delivering
packets to the MN. It is placed on the foreign network where the MN is currently in.
Correspondent Node (CN): Any node that communicates with the MN, unaware of the MN’s
mobility.
Care-of Address (CoA): A temporary IP address assigned to the MN while it is on a foreign network.
The current location of the MN can be determined from the IP address of the CoA.
47
Computer Networking and Data Communication
There are two types of CoA:
o Co-located CoA: Acquired by the MN itself through dynamic host configuration protocol.
1. Tunneling: The HA tunnels packets destined for the MN to the MN's current CoA.
2. Encapsulation: IP-in-IP encapsulation is commonly used where the original packet is encapsulated
within a new IP packet with the CoA as the destination.
3. Decapsulation: The FA or the MN decapsulates the tunneled packets to retrieve the original packet
and deliver it to the MN.
Packets deliver in Mobile IP is described using an example network shown in figure 3.5.
48
Wireless Communication
Applications of MANETs
1. Military Communication: Provides robust and flexible communication in the battlefield where
fixed infrastructure is unavailable.
2. Disaster Recovery: Facilitates communication in areas affected by natural disasters where the
existing infrastructure is damaged or destroyed.
3. Vehicular Ad-hoc Networks (VANETs): Enhances road safety and traffic management by
enabling communication between vehicles and roadside units.
4. Mobile Sensor Networks: Used in environmental monitoring and other applications requiring
mobile sensor data collection.
5. Temporary Networks: Useful in conferences, exhibitions, or events where a temporary
communication network is needed.
50
Wireless Communication
Key Challenges in MANETs
1. Routing: Due to dynamic topology, designing efficient and scalable routing protocols is
challenging.
2. Security: Ensuring secure communication is difficult because of the absence of a centralized
authority and the dynamic nature of the network.
3. Quality of Service (QoS): Providing consistent QoS is challenging due to variable network
conditions and node mobility.
4. Energy Management: Nodes typically rely on battery power, so energy-efficient protocols are
crucial to prolong network lifetime.
5. Scalability: Managing a large number of nodes without degrading performance is challenging.
• Advantages:
• Disadvantages:
o High overhead due to frequent table updates, especially in highly dynamic networks.
• Examples:
o Optimized Link State Routing (OLSR): Uses multipoint relays (MPRs) to minimize the
number of transmissions required for routing table updates.
51
Computer Networking and Data Communication
• Advantages:
• Disadvantages:
o Higher latency for route discovery since routes are built on demand.
• Examples:
o Ad-hoc On-Demand Distance Vector (AODV): Creates routes using a route request
(RREQ) and route reply (RREP) mechanism. It keeps routes active as long as they are
required by the source node.
o Dynamic Source Routing (DSR): Uses source routing where the packet header includes
the complete route to reach the destination. Nodes cache routes to reduce route discovery
frequency.
3. Hybrid Routing Protocols: Hybrid routing protocols combine the strengths of both proactive and
reactive protocols to provide scalable and efficient routing.
• Advantages:
• Disadvantages:
• Examples:
o Zone Routing Protocol (ZRP): Divides the network into zones. Within each zone,
proactive routing is used, while inter-zone communication relies on reactive routing
52
Wireless Communication
DYNAMIC SOURCE ROUTING (DSR)
Overview: DSR is a reactive routing protocol that employs source routing for packet delivery. Each
packet carries the complete route to its destination, and nodes maintain route caches to store known
routes.
Key Characteristics
• Route Discovery: Initiated on-demand when a source node requires a complete route to a
destination.
• Route Maintenance: Uses route error messages to notify nodes of link failures.
• Route Caching: Nodes store routes they learn to reduce the frequency of route discoveries.
Performance Metrics:
1. Routing Overhead: DSR tends to have lower routing overhead due to route caching, which
reduces the need for frequent route discoveries. However, in highly dynamic networks, the
overhead can increase due to frequent route breakages and subsequent rediscoveries.
2. Packet Delivery Ratio (PDR): DSR generally provides a high packet delivery ratio, especially
in networks with moderate mobility and traffic. The effectiveness of route caching helps maintain
high delivery rates.
3. End-to-End Delay: The delay can be higher during initial route discovery but tends to be lower
once routes are cached. Frequent route breakages in highly dynamic networks can lead to
increased delays.
4. Scalability: DSR performs well in small to medium-sized networks but can suffer in large
networks due to the increased size of route caches and overhead associated with route
maintenance.
Key Characteristics
• Clustering: Nodes are grouped into clusters with one node acting as the cluster head.
• Intra-Cluster Routing: Within a cluster, routing is managed by the cluster head.
• Inter-Cluster Routing: Cluster heads communicate with each other to route packets between
clusters.
Performance Metrics
1. Routing Overhead: CBRP tends to have higher initial overhead due to the clustering process
and maintenance of cluster structures. However, once clusters are formed, intra-cluster
communication can be efficient, and the overall overhead can be lower than flat routing protocols
in large networks.
53
Computer Networking and Data Communication
2. Packet Delivery Ratio (PDR): CBRP can achieve high packet delivery ratios, particularly in
networks with stable cluster structures. The protocol can struggle with high mobility, which can
lead to frequent re-clustering and potential packet loss during cluster head transitions.
3. End-to-End Delay: The delay is generally low within clusters due to the localized nature of
routing. However, delays can increase for inter-cluster communication, especially in networks
with frequent cluster reformation.
4. Scalability: CBRP is highly scalable due to its hierarchical nature, making it suitable for large
networks. The clustering mechanism helps manage routing efficiently, reducing the burden on
individual nodes.
Comparative analysis of DSR and CBRP is presented in table 3.3. Selection of DSR or CBRP depends
on the specific requirements and characteristics of the network, such as size, mobility patterns, and the
need for scalability.
Packet Delivery Ratio High in moderate mobility High in stable clusters but
and traffic conditions. can be affected by frequent
Decreases in highly re-clustering in high
dynamic environments due mobility scenarios
to frequent route breakages
End-to-End Delay Higher during initial route Low within clusters; higher
discovery; lower once routes for inter-cluster
are cached. Can increase communication and during
with frequent route failures re-clustering events
54
Wireless Communication
3.7 CLUSTER TECHNIQUES
Cluster techniques in wireless communication are strategies used to organize network nodes into
clusters, where each cluster is managed by a central node called a cluster head. These techniques
enhance network performance, scalability, and management efficiency, particularly in large and
dynamic networks like Mobile Ad-hoc Networks (MANETs) and Wireless Sensor Networks (WSNs).
Clustering can significantly reduce the complexity of routing, improve resource utilization, and
enhance network stability.
2. Cluster Member (CM): Regular nodes within the cluster that communicate with the cluster head.
3. Cluster Gateway: Nodes that connect different clusters, facilitating inter-cluster communication.
Benefits of Clustering
• Scalability: Clustering reduces the number of direct connections each node needs to maintain,
making the network more scalable.
• Energy Efficiency: By reducing the number of direct transmissions, clustering can help conserve
energy, especially in battery-powered devices.
• Reduced Routing Overhead: Routing decisions can be simplified within clusters, reducing the
overall routing overhead.
• Load Balancing: Clustering can distribute the workload evenly across the network, preventing
any single node from becoming a bottleneck.
• Improved Network Stability: Clustering can localize the impact of mobility and topology
changes, enhancing overall network stability.
4. Mobility-Based Clustering
5. K-Hop Clustering Algorithms
• Overview: LEACH is a widely used clustering algorithm for WSNs that aims to minimize energy
consumption.
• Mechanism: Nodes self-organize into clusters, and cluster heads are selected based on a
probabilistic approach. Cluster heads aggregate data from cluster members and transmit it to the
base station.
55
Computer Networking and Data Communication
• Advantages:
o Reduces energy consumption through data aggregation.
• Disadvantages:
o Random selection of cluster heads can lead to suboptimal cluster configurations.
o Not suitable for highly dynamic networks.
Advantages:
o Improves network lifetime by considering energy levels.
o Provides better load balancing.
Disadvantages:
o Requires additional communication overhead for cluster head election.
Advantages:
o Flexible and adaptable to different network scenarios.
Disadvantages:
o Requires computation and communication overhead to determine weights.
o May be complex to implement in resource-constrained devices.
4. Mobility-Based Clustering
Overview: Designed for networks with high node mobility, such as VANETs.
Mechanism: Cluster heads are selected based on mobility patterns to maintain stable clusters.
Advantages:
56
Wireless Communication
o Enhances cluster stability in highly mobile environments.
o Reduces the frequency of re-clustering events.
Disadvantages:
o May not be energy-efficient if mobility patterns change frequently.
Mechanism: Nodes within k hops of a cluster head belong to the same cluster. The value of k
determines the cluster size.
Advantages:
o Flexible in terms of cluster size and network density.
• Disadvantages:
o Optimal value of k may vary with network conditions.
o Larger k values can increase intra-cluster communication overhead.
• Wireless Sensor Networks (WSNs): Clustering helps manage the limited energy resources of
sensor nodes, extend network lifetime, and improve data aggregation efficiency.
• Mobile Ad-hoc Networks (MANETs): Clustering aids in managing node mobility, reducing
routing overhead, and enhancing network scalability.
• Vehicular Ad-hoc Networks (VANETs): Clustering based on mobility patterns can improve
the stability and efficiency of communication among rapidly moving vehicles.
• Internet of Things (IoT): Clustering helps manage the vast number of connected devices,
improving communication efficiency and scalability.
57
Computer Networking and Data Communication
Key Concepts of Incremental Cluster Maintenance
1. Cluster Stability: Maintaining the stability of existing clusters as much as possible to reduce the
overhead associated with frequent re-clustering.
2. Localized Updates: Performing cluster maintenance operations locally to minimize the impact
on the entire network.
3. Energy Efficiency: Minimizing the energy consumption of nodes involved in maintenance
operations to prolong network lifetime.
4. Adaptability: Adapting to changes in network topology, such as node mobility and failures, with
minimal disruption.
• Trigger: Initiated when a cluster head (CH) is no longer able to serve due to reasons such as
energy depletion or mobility out of the cluster.
• Process:
1. Election: A new CH is elected from the existing cluster members based on criteria such as
residual energy, connectivity, and stability.
2. Notification: The new CH informs the cluster members about the change in leadership.
3. Reconfiguration: The cluster is reconfigured to operate under the new CH, with minimal
changes to the cluster structure.
• Advantages: Ensures continuous operation of the cluster with minimal disruption. Reduces the
need for complete re-clustering.
• Trigger: Occurs when a cluster member (CM) moves out of the communication range of its
current CH or when a new node joins the network.
• Process:
1. Detection: The CH detects the departure or arrival of a CM.
2. Reassignment: The departing CM joins a neighboring cluster with a closer CH, and the new
node is assigned to the most appropriate cluster based on proximity and cluster capacity.
3. Update: The CH updates its member list and informs other CHs of the changes if necessary.
• Advantages: Maintains efficient and balanced clusters. Reduces the overhead of frequent full
re-clustering by handling changes incrementally.
58
Wireless Communication
3. Cluster Merge and Split
• Trigger: Initiated when clusters become too large or too small, or when CHs detect overlapping
clusters.
• Process:
1. Merge:
• Detection: CHs of neighboring clusters detect that their clusters are overlapping or
too close.
• Decision: CHs decide to merge the clusters to improve efficiency and reduce
overhead.
• Execution: One CH becomes the leader of the merged cluster, and the other CH steps
down. Members of the combined cluster are notified.
2. Split:
• Detection: A CH detects that its cluster has grown too large to manage efficiently.
• Decision: The CH decides to split the cluster into smaller, more manageable clusters.
• Execution: New CHs are elected for the new clusters, and members are reassigned
accordingly.
• Advantages: Helps maintain optimal cluster sizes and balances the load across the
network. Improves routing efficiency and reduces congestion.
• Mobility Management: High node mobility can still cause frequent changes, requiring efficient
algorithms to manage these changes without excessive overhead.
• Coordination: Effective coordination between CHs is necessary to ensure seamless maintenance
operations and avoid conflicts.
• Resource Constraints: In resource-constrained environments, careful design is needed to
balance maintenance operations with energy and processing capabilities.
59
Computer Networking and Data Communication
3.9 SPACE TIME CODING FOR WIRELESS COMMUNICATION
Space-Time Coding (STC) is a technique used in wireless communication to improve the reliability
and performance of data transmission over multiple-input multiple-output (MIMO) channels. By
encoding the data across both spatial (multiple antennas) and temporal (time slots) dimensions, STC
exploits the diversity gain provided by multiple antennas to combat the detrimental effects of fading
and other channel impairments. This results in significant improvements in signal quality and data
rates.
2. Temporal Diversity: Spreading the transmission of data over different time slots to mitigate
the effects of time-varying channels.
3. Coding Gain: The improvement in signal-to-noise ratio (SNR) due to coding techniques that
spread the data over space and time.
4. Diversity Gain: The improvement in reliability and reduction in error rates due to the use of
multiple antennas and coding techniques.
UNIT SUMMARY
• Wireless communication standards govern how devices communicate wirelessly across the
electromagnetic spectrum. These include technologies such as Wi-Fi, Bluetooth, 4G, and 5G,
ensuring compatibility and interoperability between devices and networks.
• Wireless channels are characterized by factors like path loss, fading, and interference. The
environment plays a key role in determining signal strength and quality, and understanding these
characteristics is crucial for optimizing communication performance.
• Fading occurs due to signal reflection, scattering, and diffraction in wireless environments,
leading to signal degradation. Receiver techniques like diversity reception and equalization are
employed to mitigate fading effects and improve signal quality in dispersive channels.
• Mobility management involves ensuring seamless communication as devices move between
network regions. Mobile IP: Provides mechanisms for maintaining the same IP address while
60
Wireless Communication
moving across different networks, enabling continuous connectivity for mobile devices. Mobile
Ad-hoc Network (MANET) which is a decentralized wireless network where devices
dynamically form a network without the need for fixed infrastructure.
• Ad-hoc Routing Protocol defines how data is routed in ad-hoc networks, with protocols such as
Dynamic Source Routing (DSR) and Cluster-Based Routing Protocol (CBRP) enabling effective
communication between mobile nodes. Clustering techniques in wireless networks help manage
resources efficiently by grouping nodes into clusters. This reduces communication overhead and
enhances scalability, especially in large and complex networks.
• Incremental Cluster Maintenance Scheme involves maintaining clusters incrementally, which
reduces the need for frequent re-clustering, minimizing disruption and enhancing network
stability.
• Space-time coding techniques use multiple antennas to improve communication reliability and
data rates by exploiting both spatial and temporal diversity in wireless channels.
EXERCISES
Q6. What is RAKE receiver? Using block diagram explain its operation.
Q9. What do you mean by mobile adhoc network (MANET)? Discuss various characteristics of
MANET.
Q10. What are various design challenges for wireless adhoc network?
Q1. Signals in the frequency band 30-300 MHz can be named as?
61
Computer Networking and Data Communication
Q2. Coverage range of wireless local area network is usually considered upto___________ meters
A) 1 B) 10
C) 100 D) 500
Q3. Distributed coordination function (DCF) uses_____________ protocol for medium access
A) CSMA-CD B) CSMA-CA
Q4. The ratio between transmitted signal power and received signal power is known as
______________
Q5. In which type of handoff does the mobile device move from one cell to other cell while
maintaining the same frequency
C) soft handoff with frequency hopping D) hard handoff with frequency hopping
A) Mobile phone moves out of the network B) Signal strength drops below the threshold
area
Q8. What is the purpose of the Care-of Address (CoA) in Mobile IP?
A) Identifies the permanent address of the B) Acts as a temporary address for the mobile node
mobile node in a foreign network
62
Wireless Communication
Q10. Which of the following entities manages the Mobile Node’s location?
A) DSDV B) OLSR
C) AODV D) RIP
A) DSR B) OLSR
C) DSDV D) ZRP
Q18. In a clustered network, the node responsible for managing communication within a cluster is
called the:
A) In clustering, what role does the gateway B) It transfers data between clusters
node play?
A) MANETs B) WSNs
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
C C B A B D D B C A B A B C D A C C B D
KNOW MORE
64
4 DATA LINK LAYER
TECHNOLOGIES
UNIT SPECIFICS
This unit discusses the following topics:
• Error detection techniques
• Flow control and error control techniques
• HDLC protocols
• HDLC operations
RATIONALE
The Data Link Layer is a foundational component in computer networking, providing essential
technologies and protocols that enable reliable data transfer across physical networks. It handles
framing, error detection, and correction, ensuring data packets are accurately transmitted between
devices.
PRE-REQUISITES
Basic knowledge of electronics and communication
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
U4-O5: Analyse the flow control and error control mechanism of HDLC.
U4-O1 1 - - 3 -
U4-O2 - - - 3 -
65
Computer Networking and Data Communication
U4-O3 1 - 1 3 2
U4-O4 2 - - 3 -
U4-O5 2 - 1 3 1
Modulo 2 Algorithm:
Modulo 2 Algorithm uses binary addition without carry. This is simply ex-or of the two bit. Both
addition and subtraction are having the same result in Modulo-2 algorithm. Example of Modulo-2
addition, subtraction, multiplication and division is presented in Figure 4.4.
Let us define
D = User data of length ‘k’ bits
T=2n-k D+F
Multiplication of 2n-k with D means shifting the used data left by ‘n-k’ bits. This is as good as
appending ‘n-k’ number of 0s to the right of the user data.
After appending the ‘n-k’ bits zero to the right of the user data, this is divided with the pre defined
devisor also called as pattern. Now we will get Quotient Q and the Reminder R.
2𝑛𝑛−𝑘𝑘 𝐷𝐷 𝑅𝑅
𝑃𝑃
= 𝑄𝑄 + 𝑃𝑃 (4.1)
The size of the reminder R will be one less than the size of the pattern P. Now the reminder is appended
to the right of the user data to create the frame to be transmitted.
T=2n-k D+R
At the receiver the received frame is divided with the pattern, if the reminder comes zero, then it is
concluded that there is no error in the received frame. This can be observed from the mathematical
representation given below.
𝑇𝑇 2𝑛𝑛−𝑘𝑘 𝐷𝐷 𝑅𝑅
= +
𝑃𝑃 𝑃𝑃 𝑃𝑃
68
Data Link Layer Technologies
𝑇𝑇 𝑅𝑅 𝑅𝑅
= 𝑄𝑄 + +
𝑃𝑃 𝑃𝑃 𝑃𝑃
𝑇𝑇 𝑅𝑅 𝑅𝑅
𝑃𝑃
= 𝑄𝑄 , 𝑃𝑃
+ 𝑃𝑃
will be zero in Modulo-2 algorithm.
Example 4.1: The user data is 1101001011 and the pattern is 101101, calculate the frame to be
transmitted using CRC.
Solution: To calculate the frame to be transmitted using CRC with a given user data and pattern the
following steps are followed.
1. Append zeros
2. Divide
3. Append reminder
Append Zeros:
User data D=1101001011 of length 10 bits
Pattern P = 101101 of length 6 bits
FCS will be of size 6-1=5 bits, hence five zeros will be appended along with the user data. Now the
dividend is 101100101100000
Divide: Now 110100101100000 will be divided by 101101 using Modulo-2 algorithm.
69
Computer Networking and Data Communication
Example 4.2: if the frame received by the receiver is 1101001001111000 and the pattern is 101101,
check whether the frame received is having error or not.
Solution: Frame received by the receiver will be divided by the pattern. If the reminder is zero, then
the frame received will be having no error.
70
Data Link Layer Technologies
4.2 DATA LINK CONTROL PROTOCOL
Data link control protocol ensures reliable, efficient and error free communication between the devices
in the same network segment or link. Primary function of data link control protocol are framing,
addressing, flow control and error control. Framing involves dividing the data stream into manageable
units called frames. If the length of the frame is too high, then retransmission is difficult and the buffer
requirement at the receive will be high. If the length of the frame is too short, then overhead will be
more. So the length of the frame is decided optimally. Addressing ensures that the frames are delivered
to the correct device on the network. Flow control mechanisms ensure that the sender does not
overwhelm the receiver with too much data too quickly. Error control is mostly related to backward
error correction. It involves the retransmission of frame if the error free frame is not delivered at the
destination successfully.
At time t0 the first bit of the frame will come out of the transmitter.
At time tf the last bit of the frame will come out of the transmitter.
71
Computer Networking and Data Communication
At time tp the first bit of the frame will reach the receiver.
At time tp+ tf the last bit of the frame will reach the receiver.
tp+ tf –t0 is the time required for one frame to be received at the receiver.
Stop and wait flow control: Stop and wait flow control is the simplest form of flow control
mechanism. In this technique, the receiver will acknowledge every frame. Once a frame is transmitted
from transmitter, it stops the transmission and wait for the acknowledgement to come from the
receiver. After the frame is received at the receiver, the receiver deletes the overhead bits and applies
error detection like CRC to ensure frame received successfully. Time required to perform these
operations are termed as processing time. Then the receiver sends the acknowledgement to the
transmitter. So the receiver has the capability to slow down the transmission rate by withholding the
acknowledgement. Successful transfer of one frame is shown in figure 4.6.
The frame is received completely at time tp + tf. Now the frame will be processed at the receiver.
Typically error detection process is followed. tproc is the time required by the receiver to process the
frame. Once the processing is done acknowledgement frame will be sent from the receiver to the
transmitter. It will take tack time for the receiver to come out of the receiver. The ack will take another
one propagation time tp to reach to the transmitter. The transmitter will take one processing time tproc
to process the acknowledgement.
Total time required for successful transfer of one frame is = 2tp+tf + tack +2 tproc.
Time required to transmit one frame is tf.
72
Data Link Layer Technologies
Now assuming the processing time is too less and the number of bits in the acknowledgment is less,
tproc and tack can be neglected. The utilization efficiency becomes
Since the transmitter is waiting for the acknowledgement before sending the next frame, the utilization
efficiency is very less. For example if a = 1, U = 1/3 i.e. only the one third of the bandwidth is utilized.
For any non zero value of a, the utilization efficiency can not be 100%. To improve the utilization
efficiency, the sliding window protocol is used.
If k is the number of bits to assign the frame number, frame number will be from 0 to 2k-1.
Maximum window size will be 2k-1.
From the transmitter side when the transmitter transmits the frames, the window shrinks and when the
transmitter receives the acknowledgement, the starting point of the window will shift and the window
will expand.
Let us assume the starting point of the window is at 0 and the window size is 7 as shown in figure 4.6.
Now the transmitter will transmit two frames F0 and F1 , the window will shrink but the starting point
will remain at 0. Figure 4.8 shows the window position after transmission of F0 and F1.
73
Computer Networking and Data Communication
If the transmitter receives the acknowledgement RR1 that indicates the receiver has received frame F0
and ready to receive frame number F1. The starting point of the frame will shift to 1 and the window
will expand upto frame F7. Figure 4.9 shows the window position after transmission of F0 and F1.
74
Data Link Layer Technologies
Initially the source system is ready to transmit and the destination system is ready to receive frames in
sequence. The starting point of the window is at zero for bot source A and destination B. Source A
can transmit 7 frames F0 to F6 without waiting for any acknowledgement similarly B can receive 7
frames without sending any acknowledgement.
Time instance(TI) 1: A sends four frames F0, F1, F2 and F3. The transmitter window will shrink.
Window is present over F4, F5 and F6.
Time instance 2: Frames F0 and F1 are received at destination B, F2 and F3 are still in transit and No
acknowledgement is generated yet from B.
Time instance 3: Frames F2 and F3 are received at destination B and No acknowledgement is generated
yet from B.
Types of error
Data are sent as a sequence of frames. Successful transmission of one frame is shown in Figure 4.11.a.
Because of noise and interference, frame received at the receiver may differ from the transmitted
frame. This is called damaged frame or frame received with error shown in Figure 4.11.b. It may so
happen that frame is lost in the transit. i.e. the frame is transmitted from the source but it did not reach
75
Computer Networking and Data Communication
the receiver. this is called lost frame shown in Figure 4.11.c. In this case the receiver will not be able
to know that a frame has been transmitted. Frame is received successfully and the acknowledgement
is lost in the transit is shown in Figure 4.11. d. Frame received wit error and the acknowledgement is
lost in the transit is shown in Figure 4.11. e.
3. Selective Reject
Stop and wait ARQ: stop and wait ARQ works on the principle of stop and wait flow control
technique.
Frame received with error: when a frame is received at the receiver, error detection mechanism is
applied over the frame. To handle this error, the source initiate a timer as soon as it transmits the frame.
If it does not get any acknowledgement before the timer expire, it retransmit the frame again. . The
receiver will discard the erroneous frame. The transmitter keeps a copy of the frame until it gets a
positive acknowledgement from the receiver. The process is shown in figure 4.12.a. Source A sends a
frame F0 and gets an acknowledgement ACK1. Then it sends another frame F1 and it was received at
the destination B with error. The sender times out and then retransmit F1.
Frame lost: The transmitter sends a frame. The frame is lost in the transit. The receiver does not have
any idea of the frame. Once the transmitter sends a frame it sets a timer and expects the
acknowledgement before the timer expire. If it is not getting any acknowledgement with in that time,
76
Data Link Layer Technologies
the transmitter will retransmit the frame again. The process is shown in figure 4.12.b. The source sends
frame F1 and F1 is lost. The sender times out and then retransmit F1.
Damaged Acknowledgement: Frame received successfully and the acknowledgement is lost in the
transit. The source will time out and retransmit the frame. When this retransmitted frame reaches at
the receiver it wont be able to identify that it is a new frame or a retransmitted frame. To avoid this
problem frames are alternately labelled with 0 and 1. Upon reception of F0 a positive acknowledgement
of ACK 1 is generated. This indicates that F0 is successfully received and destination is ready to receive
next frame F1. Similarly, upon reception of F1 a positive acknowledgement of ACK 0 is generated.
This indicates that F1 is successfully received and destination is ready to receive next frame F0. The
process to resolve damaged acknowledgement is shown in figure 4.11.c. After successful reception of
Frame F0 at B, ACK1 is generated by B and is lost in the transit. The sender times out and then
retransmit F0. B is expecting F1. So when it receives F0, it discards the previous F0 and accepts the new
F0.
Go back-N ARQ
Go back-N ARQ works on the principle of sliding window protocol.
Frame Received with error: In Go back-N ARQ if the frame is received with error then the receiver
will initiate a negative acknowledgement and discard further frames received at the receiver. When
this negative acknowledgement reaches the source, the source will retransmit that frame and the
subsequent frames. If the negative acknowledgement does not reach before the timeout period, then
also the source will retransmit that frame and the subsequent frames. In other words if the Nth frame
77
Computer Networking and Data Communication
is having error, the transmitter will go back to the Nth frame and retransmit all the frames from Nth
frame onward. The process of error correction for frame received with error is shown in Figure 4.13.a.
in this example F0 and F1 are received successfully and F2 is received with error. The receiver initiates
REJ2. This means reject F2 onward. By the time REJ2 reaches A, A has already transmitted F3 and F4.
A will retransmit F2, F3, F4 etc.
Frame lost: If some intermediate frame is lost, when the receiver receives next frame, it could able to
identify that, the received frame is not in sequence, hence it rejects that frame onward and generate the
negative acknowledgement for the lost frame. The process of error correction for lost frame is shown
in Figure 4.13.b. in this example F0 and F1 are received successfully and F2 is lost in the transit. The
sender continues to transmit the next frame F3 without waiting for any acknowledgement. When the
receiver receives F3, it could identify that the frame received is not in sequence, hence it will discard
F3 and initiates REJ2. By the time REJ2 reaches A, A has already transmitted F3 and F4 . A will
retransmit F2, F3, F4 etc. If the lost frame is the last frame, timeout recovery is initiated as shown in
Figure 4.13.d.
78
Data Link Layer Technologies
initiated as shown in Figure 4.13.d. If the negative acknowledgement is lost, then the frame lost
process shown in Figure 4.13.b is initiated.
Selective reject: Selective reject also works on the principle of sliding window technique. But in this
case only the damaged frame or the lost frame is retransmitted. Even the frames are not in sequence,
frames will be accepted by the receiver. once the retransmitted frame arrives successfully at the
receiver end received will rearrange the frames in sequence. Here the window size is restricted to
2K-1.
4.2.3 HDLC
High-Level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-
point and multipoint links.
79
Computer Networking and Data Communication
HDLC stations
HDLC defines three types of stations such as Primary station, secondary station and combined stations.
Primary station is responsible for managing the link. Frames issued by primary is known as command.
Secondary station operates under the supervision of primary station. Frames issued by secondary is
called as response. Combined station possesses the features of both primary and secondary station.
Combined station can issue both command and response.
Flag field: Flag field indicates both beginning and end of the frame. Same flag can be treated as the
end of one frame and the beginning of other frame. Flag field is of 8 bit with a fixed pattern 01111110.
Each active station continues to search for this pattern 01111110. Once a station gets this pattern, it
has understood that the frame has started, now it continues to search for 01111110 again to determine
the end of the frame. Since HDLC allows any bit pattern in the side the frame, it may so happen
01111110 may appear in the data field and the station will misinterpret it as the end of the frame. Bit
stuffing is employed to ensure the flag pattern does not appear in the data fields. The transmitter will
80
Data Link Layer Technologies
insert an extra 0 bit after every five conjugative 1 bit in the frame. When this frame reaches at the
receiver end the receiver will remove the original flag from both the beginning and monitors the bit
stream. When conjugative five 1 appears the sixth bit is examined. If the sixth bit is 0, it is deleted. If
the sixth bit is 1 and the seventh bit is 0, it is treated as a flag. If both sixth and seventh bit are 1, then
it is an error. Example of bit stuffing is shown in figure 4.16.
With the help of bit stuffing, data of any bit pattern can be transmitted in HDLC. This is called data
transparency in HDLC.
Address field: Address field identifies the address of the secondary station that is going to receive the
data from the primary or send data to the primary. This field is not required in point to point link as
there are only two station in the link. But this field is kept in HDLC to maintain the uniformity.
11111111 is reserved for broadcast address. In multipoint configurations, it can be extended to multiple
bytes to accommodate more addresses. The normal address filed and extendable address field is shown
in figure 4.17.
If the address field is starting with bit 1, then the length of the address field is 8 bit as shown in figure
4.17.a. if we need to accommodate more address, then the address field will be of length multiple of
8. The first bit of this extendable address field is 0 and then 1 will come in the MSB of the last byte as
shown in figure 4.17.b.
Control field: Control field specifies the type of frame (I-frame, S-frame, or U-frame) and contains
control information. Control field for different types of frames are shown in Figure 4.18.
81
Computer Networking and Data Communication
10 REJ Reject that frame and all the subsequent frames already transmitted. Used
in Go back- N ARQ mechanism
11 SREJ Reject that particular frame only. Used in Selective Reject ARQ mechanism
Unnumbered frame control field: Unnumbered frames are used for link setup and disconnection. U
frame contains information field in which system information is transmitted. It dose not contain the
user data. U frame contains 5 bits management code. 32 different combinations are possible. some of
the frequently used codes and their description is given in Table 4.2.
82
Data Link Layer Technologies
Table 4.2: Management code and their description
Information field: Information field is present in I frame and some of the U frame. User data which
is coming from the higher layer is transmitted through I frame. Length of this field is variable and must
be multiple of 8 bits. Maximum length of this field is restricted by system defined maximum.
Frame Check Sequence Field: Frame check sequence is the error detecting code calculated by taking
the address, control and information field of the frame. The normal frame check sequence is the 16 bit
CRC-CCITT. Sometimes 32 bit CRC is also used for FCS calculation.
HDLC operation: Operation of HDLC contains the exchange of information between two stations
using I-frame, S-frame and U-frame. For a successful transfer of data three steps are followed. first the
link establishment, then link maintenance and finally termination. In the establishment and termination
phase generally the U-frames are used and in the maintenance phase actual data transfer takes place
using I-frame. I frame is capable of acknowledging the successfully received frames. If some error
occurs or piggybacking is not allowed then supervisory frame is used for informing the sender about
the error.
Two way data transfer: Successful 2 way data transfer using HDLC is shown in Figure 4.19.a. Let
us assume that the two stations A and B are combined stations. A initiated the data transfer by sending
an U-frame SABM to B. This indicates that A wants to connect with B in asynchronous balanced
mode. If B agrees to the condition laid by A, it will send unnumbered acknowledgement to A. Now
the actual data transfer can take place. Both A and B are having data to send. A will send its first
information frame I,0,0 to B. this indicate that A is sending information frame having frame number 0
and expecting frame 0 of the receiver. A send another frame I,1,0 to B. This indicate that A is sending
the next frame, frame-1 and expecting frame 0 of B. Now B sends its first frame Frame-0 and it has
already received frame-0 and frame-1 from A. so it expects the next frame that is frame 2 from A. So
the I frame sent by B will be I,0,2. Similarly B send I,1,2 and I,2,2. A sends I, 2,3. This is how two
way data transfer takes place. Now B wants to terminate the connection so it sends DISC to A. A will
respond with an Unnumbered acknowledgement UA.
83
Computer Networking and Data Communication
Busy condition: Busy condition in HDLC is shown in figure 4.19.b. A has transmitted I,0,0 and I,1,0.
B has successfully received both the frames but it does not want to receive any further frames. So it
had sent a RNR 2. This means that the receiver has received up to frame number-1, but it is not ready
to receive further frames. A will wait for some time and send RR,0,P. This indicates that A is ready to
receive frame 0 from A and wants to know the status of B by setting the P bit high. If B is still not
ready to receive further frames, then it will reply with RNR,2, F. F bit high means it is the response
of B towards the command sent by A. This process may continue for several times. When A send
RR,0,P again , If B is ready to receive further frames now it will reply with RR,2,F. once A receives
this RR,2,F it wiil send further frames I, 2,0. This is how the busy condition is handled in HDLC.
Reject Recovery: Reject recovery in HDLC is shown in Figure 4.19.c. Assuming unidirectional data
transfer, that is from A to B, A has sent I frame I,0,0 and it is successfully received at the receiver. The
next frame sent by A i.e. I,1,0 is lost in the transit. A send the next frame I,2,0. B receives I,2,0 and
noticed that the frame is not in sequence so it discards this frame. B was expecting frame I,1,0 but
received I,2,0. So B generates a negative acknowledgement REJ, 1. By the time this REJ,1 reaches A,
A might have sent some further frames I,3,0. A will retransmit Frame 1 onwards by sending I,1,0 ,
I,2,0 , I,3,0 . Since B has no data to send B may acknowledge by sending RR4.
84
Data Link Layer Technologies
1. Framing: It appends the header and trailer for address and error detection respectively at the
transmitter end.
2. Perform address recognition and error detection at the receiver and remove the header and trailer.
3. Provide the access to the medium.
LLC services: LLC is responsible for providing services that ensures reliable communication over a
network.
Unacknowledged connection less services: No established connection is needed between sender and
receiver. Frames are sent independently, and no acknowledgment or retransmission mechanisms are
used. Delivery of data is not guaranteed. Reliability issue is taken care by the higher layer.
Connection oriented services: LLC establishes a logical connection before sending data, ensuring
reliable transmission with acknowledgments and error correction (similar to HDLC)
Acknowledged connectionless services: No prior logical connection is set up before transmitting the
data. But the frames are acknowledged by the receiver. this ensures the reliability. Generalized MAC
frame is shown in Figure 4.20. LLC PDU is a part of the MAC frame.
LLC PDU consists of four fields. DSAP (Destination Service Access Point), SSAP (Source Service
Access Point), LLC control and Information. The DSAP and SSAP fields each contain a 7-bit address,
which specify the destination and source users of LLC. One bit of the DSAP indicates whether the
DSAP is an individual or group address. One bit of the SSAP indicates whether the PDU is a command
or response PDU. The format of the LLC control field is identical to that of HDLC control field (Figure
4.18), using extended (7-bit) sequence numbers.
85
Computer Networking and Data Communication
Medium Access Control: Access control is required for a device when it wants to transmit the data
in a shared medium. To receive the data from the medium no access control is required. The MAC
protocol governs how devices access the shared network medium, determining when a device can send
data and how to handle contention or collisions. The MAC layer uses MAC addresses (hardware
addresses) to uniquely identify devices on a network, ensuring that data is delivered to the correct
destination. Destination MAC address specifies the destination(s) for which the frame is intended. It
may be a unique physical address, group address or global address. Source MAC address specifies the
station that sends the frame. Frame check sequence is a 32 bit CRC used for error detection.
UNIT SUMMARY
• Techniques such as parity checks, cyclic redundancy checks (CRC) are used to detect the error.
• Techniques such as stop-and-wait and sliding window are used to regulate the rate at which the
sender transmits data, ensuring the receiver is not overwhelmed.
• Techniques like Stop and wait automatic repeat request (ARQ), Go back-N ARQ, Selective
Reject used in backward error correction technique.
• Hamming code is uses in Forward error correction techniques
• HDLC is a widely used protocol that provides error detection, flow control, and frame
synchronization, ensuring reliable communication between nodes.
• Local Area Network (LAN) protocols define the rules and conventions for communication in a
network confined to a specific geographic area (like Ethernet). It includes mechanisms for
addressing, routing, and managing traffic within a LAN.
EXERCISES
Multiple choice Questions with Answer
Q1. What will be the length of the frame to be transmitted in a CRC scheme, if the length of the
message is 12 bits and the length of the predefined divisor is 7 bits?
A) 12 B) 18
C) 19 D) 20
A) AND B) OR
C) Ex-OR D) Ex-NOR
Q3. If M is the message and R is the n-bit FCS, then the frame to be transmitted using CRC scheme
is
A) 2M n + R B) 2n M + R
C) M n + R D) M + n R
86
Data Link Layer Technologies
Q4. Utilization efficiency of the channel in Stop & Wait Flow control is (where “a” is the ratio of
propagation time to frame transmission time)
A) 1/(1+2a) B) a/(1+2a)
C) a/(a+2) D) 1+2a
Q5. What could be the maximum size of the Sliding window in Sliding Window Flow control, if 3
bits are used for sequence number of the frame?
A) 3 B) 6
C) 7 D) 8
Q6. What will be the Utilization efficiency of the channel in Sliding Window Flow control if
window size N > 2a+1?
A) 1 B) 1/ (1+2a)
C) N/ (N+2a) D) N/ (1+2a)
Q7. In HDLC protocol, which frame provides the ARQ mechanism, when piggybacking is used in
bidirectional data transfer?
A) Information B) supervisory
Q8. In a two way successful data transfer, the following sequence of events has occurred between
station A and station B.
I, 1, 0 from A to B
I, 2, 0 from A to B
I, 0, 3 from B to A,
A) I, 3, 2 B) I, 3, 0
C) I, 2, 2 D) I, 2, 3
C) To specify the sender’s address D) To indicate the start and end of a frame
Q10. What type of frames are used in HDLC for establishing and terminating communication?
87
Computer Networking and Data Communication
A) Adding extra bits to increase bandwidth B) Inserting bits to prevent the flag sequence from
appearing within the data
C) Compressing data to fit within the frame D) Removing redundant bits from data
Q12. Which HDLC frame type is used to acknowledge the receipt of I-frames when piggybacking
is not used?
Q13. Which HDLC mode allows both ends to transmit and receive data simultaneously?
Q16. Which of the following best describes the role of the LLC sublayer?
A) Error detection and flow control B) Accessing the physical transmission medium
Q18. In the OSI model, which layer do the MAC and LLC sublayers belong to?
C) Network D) Transport
88
Data Link Layer Technologies
Q19. What does the Cyclic Redundancy Check (CRC) technique do?
C) Controls data flow in networks D) Routes data packets to the correct destination
Q20. In the Go-Back-N ARQ version of the Sliding Window Protocol, what happens if a frame is
lost or corrupted?
C) All frames after the lost one are D) The receiver sends a request for a new connection
retransmitted
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
B C B A C D A A D C B B A D C C A B B C
Q3. Explain the operation of Stop and Wait ARQ in Error control.
Q4. Explain Goback-N ARQ using Sliding window protocol.
Q5. Explain how damaged frame error is controlled using Go-back N ARQ
Q6. Explain the frame format of HDLC. Explain how data transparency is achieved in HDLC
Q7. In sliding window flow control 3 bits are used to represent the frame number. Data transfer is
happening from station A to station B starting with F0. The following sequence of events has happened.
Draw the diagrammatic picture of this process and find out the window position in A and B.
89
Computer Networking and Data Communication
Q8. Explain the operation of HDLC
a. Two way data transfer
b. Reject recovery
c. Timeout recovery
Q9. With suitable example compare between REJ and SREJ in HDLC.
Q10. Draw the frame format of LAN protocol. Explain the function of each block.
KNOW MORE
Medium Access
90
5 NETWORK LAYER
TECHNOLOGIES
UNIT SPECIFICS
This unit discusses the following topics:
• Different multiplexing schemes
• Multiple access techniques
• Circuit switching and packet switching concepts
• Routing techniques
• IP addressing and subnetting
RATIONALE
Network Layer technologies empowers the students with essential knowledge on how data traverses
complex networks, providing an in-depth understanding of packet forwarding, routing, IP addressing,
subnetting, and routing protocols crucial for designing and managing scalable, interconnected
networks.
PRE-REQUISITES
Basic knowledge of electronics and communication
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
U5-O1: Comprehend Multiplexing Schemes
U5-O2: Analyze Multiple Access Techniques
U5-O3: Differentiate Circuit Switching and Packet Switching
U5-O4: Understand Routing Techniques
U5-O5: Develop proficiency in IP addressing and subnetting
U5-O1 - 1 - 2 3
U5-O2 1 - 1 2 3
U5-O3 - 1 - 1 3
U5-O4 1 - 1 - 3
U5-O5 2 - 1 - 3
91
Computer Networking and Data Communication
5.1 MULTIPLEXING
Multiplexing is a process of combining several message signals for their simultaneous transmissions
over a single communication medium. This process enhances the efficiency of data transmission by
making optimal use of available bandwidth. Let us take a small example to understand the multiplexing
scheme. Let us assume we have a communication channel of capacity 10 MB for 10 seconds and there
are 10 users are there. We can allocate 1MB to each user for the whole 10 second time. This means
the band width is divided among the users. In other wards the frequency is divided among the users.
This is the example of Frequency Division Multiplexing (FDM). Similarly, we can allocate the whole
10 MBs to each user for one second. In this scheme the time is divided among the users, hence it is
time division multiplexing (TDM). In the following section FDM and TDM are discussed in detail.
5.1.1 FDM
Frequency Division Multiplexing (FDM) is a technique used in communication systems to transmit
multiple signals simultaneously over a single communication channel by dividing the available
bandwidth into distinct frequency bands. Each signal is modulated onto a different carrier frequency
and occupies a unique frequency range, ensuring that multiple signals can be transmitted at the same
time without interfering with each other. Block diagram of the FDM transmitter and receiver is shown
below.
FDM Transmitter: Objective of the FDM transmitter is to combine multiple input signal so that it
can be transmitted on a single transmission medium. Each input signal is modulated onto different
carrier frequency. The frequency bands are carefully chosen to prevent overlap and interference
between signals. Guard bands are used between two frequency bands to minimize the interference.
92
Network Layer Technologies
The modulated signals are combined into a single composite signal for transmission over the
communication channel. The composite signal contains all the individual frequency bands, each
carrying a separate modulated signal. The composite signal is transmitted over the medium.
FDM Receiver: At the receiver end, the composite signal is separated into different modulated signals
using different band pass filters. Now the individual modulated signal is demodulated using the
specific carrier frequency used for transmission in that channel to get back the original signal.
Advantages of FDM
1. Simultaneous Transmission: Multiple signals can be transmitted at the same time over the same
communication channel.
2. Efficient Bandwidth Utilization: Makes efficient use of the available bandwidth by dividing it
into smaller frequency bands.
3. Low Latency: Signals are transmitted simultaneously, resulting in low latency for real-time
applications.
4. Compatibility with Analog Systems: Well-suited for analog signal transmission, making it
useful for traditional broadcasting systems like radio and TV.
Disadvantages of FDM
1. Complexity in Implementation: Requires complex filtering and multiplexing/demultiplexing
equipment.
2. Interference and Crosstalk: Signals can interfere with each other if frequency bands are not
properly separated, leading to crosstalk.
3. Guard Bands: The use of guard bands to prevent interference reduces the overall efficiency of
bandwidth utilization.
4. Limited Flexibility: Not as flexible as digital multiplexing techniques like TDM for dynamic
allocation of bandwidth.
Applications of FDM
1. Broadcasting: Used in radio and television broadcasting to transmit multiple channels over the
same frequency spectrum.
2. Telecommunications: Employed in telephone networks to carry multiple phone calls over a
single line.
3. Cable Television: Used to deliver multiple television channels over a single coaxial cable.
4. Internet Service: DSL (Digital Subscriber Line) technology uses FDM to separate voice and
internet data over the same telephone line.
5. Satellite Communication: Satellites use FDM to transmit multiple signals, such as TV channels
and data streams, simultaneously.
93
Computer Networking and Data Communication
5.1.2 Synchronous TDM
Synchronous TDM is a technique used to transmit multiple data streams over a single communication
channel by dividing the channel into fixed time slots. Each data stream is assigned a specific time slot,
and these slots are transmitted in a repeating sequence, ensuring that each data stream gets regular
access to the channel. TDM system is shown in Figure 5.2.
TDM transmitter: Each input data stream is assigned a specific time slot in the transmission frame.
The time slots are of fixed duration and are preassigned regardless of whether the data stream has data
to transmit in a given time slot. The incoming data from each source are buffered. The buffers are
scanned sequentially to form a composite digital data stream. The composite signal is then transmitted
over the communication channel.
TDM Receiver: At the receiver, the composite data de-multiplexed using another scan operation and
the splited data are routed to appropriate destination buffer. Then the data will be delivered from the
buffer at the same rate as transmitted.
94
Network Layer Technologies
3. Real-Time Suitability: Low latency and regular access to the channel make synchronous TDM
suitable for real-time applications like voice and video communication.
2. Digital Subscriber Line (DSL): Utilized in some DSL technologies to allocate fixed time slots
for voice and data transmission.
3. Circuit-Switched Networks: Employed in circuit-switched networks like the Public Switched
Telephone Network (PSTN) for predictable and reliable communication.
2. Multiplexing: The multiplexer combines the active data streams by placing their data into
available time slots within the transmission frame. A unique identifier or address is often included
with each piece of data to indicate the source stream.
3. Transmission: The combined signal, containing data from various streams, is transmitted over
the communication channel. The transmission frame is more efficiently used since time slots are
not wasted on idle data streams.
4. Demultiplexing: At the receiver end, the demultiplexer separates the received signal back into
the original data streams by reading the identifiers and routing the data to the correct destination.
Each data stream is reassembled from the dynamically allocated time slots.
96
Network Layer Technologies
3. Wireless Communication: Employed in wireless communication systems where dynamic
allocation of resources is essential for efficiency.
4. Digital Subscriber Line (DSL): Some DSL technologies use Asynchronous TDM to allocate
bandwidth dynamically based on user demand.
Time Division Different time slot is allocated to each GSM mobile phones.
Multiple Access user. Users share the same frequency
(TDMA): but transmit in different time slots.
97
Computer Networking and Data Communication
5.3 CIRCUIT AND PACKET SWITCHING
In data communication, circuit switching and packet switching are two different methods for
transmitting data:
Path is a connected sequence of link between nodes. The path remains active for the entire duration of
the communication. No overhead bits required after the connection is established. Provides a fixed
bandwidth for the entire session, which can lead to inefficiency if the channel is not fully utilized.
Blocking may come during the overload. Simultaneous availability of the sender and receiver are
required.
Examples: Traditional telephone networks.
98
Network Layer Technologies
Examples: The Internet and most modern data networks.
• Resource Utilization: Circuit switching can be less efficient as it reserves a path for the entire
session, whereas packet switching makes better use of available bandwidth by sharing it among
multiple users.
• Reliability: Circuit switching provides a consistent and reliable connection, which is beneficial
for real-time communication like voice calls. Packet switching can be less reliable due to variable
latency and potential packet loss, but it is generally sufficient for data transmission and can
implement protocols to manage these issues.
• Flexibility: Packet switching is more flexible and scalable, making it suitable for complex and
large networks like the Internet.
Latency The time taken for a packet to Minimize latency to improve the
travel from the source to the responsiveness of real-time
destination. applications
99
Computer Networking and Data Communication
Packet Loss The percentage of packets that are Minimize packet loss to ensure data
lost during transmission. integrity and improve the quality of
applications
Convergence The time taken for the routing Minimize convergence time to
Time tables to stabilize after a change in quickly restore optimal routing paths
the network topology. and maintain network stability.
100
Network Layer Technologies
cost. This information are updated based on different routing strategy. For fixed routing the
information is never updated or updated only when topological changes occur. For dynamic routing
the information is updated continuously to adapt the change in network conditions.
Fixed routing: Routes are manually configured and remain constant unless manually changed. Only
one permanent route is established for each source destination pair. Example of a network having 6
nodes is shown in Figure 5.6. cost involved in moving from node 1 to 2 is different from the cost
involved in moving from node 2 to 1.
In fixed routing a central routing matrix is created and stored on the network control centre. A central
routing matrix can be created form the example network given in Figure 5.6 by finding out the least
cost path. The matrix is presented in table 5.3
Table 5.3: Central routing table of Network shown in Figure 5.6
From Node
1 2 3 4 5 6
1 ----- 2 2 1 1 3
2 2 ----- 2 6 2 3
To
3 2 3 ----- 6 3 3
Node
4 2 5 5 ----- 4 4
5 5 5 5 6 ----- 3
6 5 5 6 6 4 -----
101
Computer Networking and Data Communication
Least cost path is determined for each pair of source and destination node. Each element of the matrix
contains the next node information while moving from source node to destination node. For example,
from source node 1 to destination node 3, the cost involved is 4 and the path is N1-N2 –N3. So the next
node is 2. This information is kept in the first column and the third row of the matrix. This indicates
that when the packet will move from node 1 to node 3, the next node after node 1 will be node 2. Form
the central touting table, routing table for each node can be derived and stored on each router. Node 1
routing table is shown in Table 5.4.
Table 5.4: Node 1 Directory
2 2
3 2
4 2
5 5
6 5
Cost involved in moving from 1 to 3 may not be same as the cost involved in moving from 3 to 1.
Form the network diagram it is observed that the cost involved in moving from 3 to 1 is 7 and the path
is N3-N2 –N1.
Advantages: Simplicity in implementation. Works fine with fixed load condition.
Disadvantages: incapable to respond to the network congestion or failure. No alternative path if a
particular link fails.
Flooding: Flooding is a routing technique used in network communication where every incoming
packet is sent through all outgoing links except the one it arrived on. This process continues until the
packet reaches its destination. Example of flooding is shown in Figure 5.7.
102
Network Layer Technologies
Advantages: Flooding doesn't require complex algorithms or routing tables. Every node forwards
packets indiscriminately. Given that packets are sent through all possible paths, they are guaranteed to
reach the destination if a path exists. Flooding is highly resilient to network changes and failures since
packets traverse all paths. Even if some paths fail, packets can still reach their destination through
other routes.
Disadvantages: Flooding generates a large number of duplicate packets, leading to excessive use of
network bandwidth. The large volume of packets can congest the network, leading to potential delays
and reduced performance. Nodes must process and forward many packets, consuming processing
power and memory.
Random Routing: Random routing is a routing technique where the next hop for a packet is chosen
randomly from the available neighbouring nodes. This method can be used in network routing
algorithms to distribute traffic across the network in a less predictable manner. Random routing is easy
to implement since it doesn't require complex algorithms or detailed knowledge of the network
topology.
Advantages: Helps in distributing network load more evenly across different paths, reducing the
likelihood of congestion on any single path. Because packets do not follow a fixed path, random
routing can be more resilient to network failures or attacks targeting specific routes.
Disadvantages: Packets may take longer and less direct routes to reach their destination, increasing
latency and possibly leading to higher overall network traffic. The unpredictable nature of random
routing can complicate network management and troubleshooting. There is no guarantee that packets
will always reach their destination efficiently, especially in large and complex networks.
Adaptive routing: Routes are dynamically adjusted based on real-time network conditions, such as
traffic load and link status. adaptive routing algorithms respond to changes in the network, such as
congestion, failures, and topology changes, to optimize the routing process.
Advantages: By dynamically adjusting routes, adaptive routing can optimize network performance,
reducing latency and avoiding congested paths.it improves network reliability by finding alternative
paths when primary paths fail. It helps in better utilization of network resources by distributing traffic
more evenly across the network.
Disadvantages: Adaptive routing algorithms are more complex to implement and manage compared
to static routing. Continuously gathering and processing network state information can consume
significant network and computational resources. In large networks, adaptive routing algorithms may
take time to converge on the optimal paths, which can temporarily affect network performance.
103
Computer Networking and Data Communication
Least cost algorithm: The least cost algorithm is a routing technique that aims to find the path with
the lowest cost between a source and a destination in a network. The cost can represent various metrics,
such as distance, delay, bandwidth, or any combination of these factors. Two of the most common
least cost algorithms are Dijkstra's algorithm and the Bellman-Ford algorithm.
Dijkstra's algorithm : Dijkstra's algorithm is widely used in link-state routing protocols like OSPF
(Open Shortest Path First). t finds the shortest path from a single source node to all other nodes in a
weighted graph, where the weights represent the cost of traversing each edge.
2. Selection: Select the unvisited node with the smallest known distance from the source (initially
the source node itself).
3. Relaxation: For the current node, consider all of its unvisited neighbours. Calculate their
tentative distances through the current node. If the calculated distance of a neighbour is less than
the known distance, update the shortest distance to that neighbour.
4. Mark as Visited: After considering all of its neighbours, mark the current node as visited. A
visited node will not be checked again.
5. Repeat: Repeat the process for the next unvisited node with the smallest known distance.
Continue until all nodes have been visited.
6. Completion: When all nodes have been visited, the shortest path to all nodes has been found.
Example of Dijkstra's Algorithm: Find out the least cost path from node 1 to Node 6 of the Figure
5.8. The cost specified in the link is the bidirectional cost.
Solution: In 1st iteration only the cost involved in the link attached with the immediate neighbours are
known. The information known to the algorithm can be shown in Figure 5.9.a
104
Network Layer Technologies
Figure 5.9. a: Link cost and the nodes Figure 5.9. b: Link cost and the nodes visited
visited in 1st iteration in 2nd iteration
Figure 5.9. e: Link cost and the nodes Figure 5.9. f: Link cost and the nodes visited
visited in 5th iteration in 6th iteration
Node visited is represented in orange colour. Now with this information the algorithm will try to find
out the shortest path to ach node in the network. We can observe that the packet can reach upto Node
number N2, N4 and N5 with the cost 1, 4 and 2 respectively. It can not reach N3 and N6. The algorithm
will move to the node which is having the least cost. In our case it is N2. So in second iteration Node
N1 and N2 and their corresponding link costs are known to the algorithm. Again the least cost path is
calculated for all the nodes. The algorithm will traverse to N5. Similarly it continues until all the nodes
in the networks are incorporated. The least cost and the path to reach from N1 to all other nodes are
given in Table 5.5.
105
Computer Networking and Data Communication
Table 5.5: Least cost table using Dijkstrar Algorithm for source node N1 in the network shown in
Figure 5.8.
Bellman ford algorithm: The Bellman-Ford algorithm is used in distance-vector routing protocols
like RIP (Routing Information Protocol). It works on the principles of hops/ jumps.
Initialization: Set the distance to the source node to zero and to all other nodes to infinity.
Relaxation: For each edge in the graph, update the cost to reach its destination node if a cheaper path
is found through the source node of the edge. Continue till there is no change of cost when we increase
the number of hops.
106
Network Layer Technologies
Figure 5.10. a: The least cost path considering only one hop (jump)
In 3rd iteration two jumps are allowed. Least cost path is chosen considering maximum number of
jumps to be 2. The least cost path considering two jumps are shown in Figure 5.10.b
Figure 5.10. b: The least cost path considering maximum tow hops (jumps)
It can be seen that the least cost path from N1 to N4 is changed. Now the modified cost is 3 and the
path is N1-N2-N3. Similarly the cost of reaching N6 is 5 and the path is N1-N4-N6. Cost to reach every
node and their respective path in the network with a maximum of two jumps are listed in 3rd row of
the Table 5.6. In 4th iteration three jumps are allowed. Least cost path is chosen considering maximum
number of jumps to be 3. The least cost path considering three jumps are shown in Figure 5.10.c
Figure 5.10. c: The least cost path considering maximum three hops (jumps)
107
Computer Networking and Data Communication
In this iterating the least cost path from N1 to N6 is modified as N1-N5-N4-N6 and the cost is changed
to 4. Other path and cost remains the same. Now we move to four allowed jumps. But the cost and
path for every node remains unchanged. So the algorithm will stop at this point. The obtained least
cost path is the final least cost path. Least cost and the corresponding cost is presented in Table 5.6.
Table 5.6: Least cost table using Bellman ford algorithm for source node N1 in the network in Figure
5.8.
N1 0 - 2 3 4
N2 5 N2 0 2 2
N3 6 N2 4 1 2
N4 2 N4 3 0 3
N5 7 N4 1 6 0
108
Network Layer Technologies
N6 5 N5 7 3 2
N7 10 N5 4 7 1
Node 1 routing table before Delay vectors sent to node1 Node1 routing table after
update from neighbouring node update
Solution: We need to find out the least cost form the source node 1 to other node. This can be obtained
form the existing routing table and the delay vector. Delay vector is indicating the cost involved in
moving to a specific destination through that node. For example, the 1st element in D4 is 3. This
indicate that the cost in moving from N4 to N1 is 3. The next element in D4 is 2. This indicate that the
cost in moving from N4 to N2 is 2.
Let us consider form N1 to N2
From the existing routing table cost (delay) in moving from N1 to N2 = 5
We need to determine the cost involved in moving from N1 to N2 through N4 and N1 to N2 through N5.
The cost involved in moving from N1 to N2 through N4 can be extracted from N1 to N4 and N4 to N2.
From N1 to N4 the cost is 2 and From N4 to N2 the cost is 2. Total cost is 4. N1 to N4 cost is derived
from the node 1 routing table. N4 to N2 cost is derived from the delay vector D4.
The minimum cost will be 4 and the path is N1-N4-N2 . The table will be updated
Similarly for N1-N3
N1-N3 cost =6
N1-N2-N3 cost = 5+ 4 = 9
N1-N4-N3 cost = 2+ 1 = 3
N1-N5-N3 cost = 7+ 2 = 9
The minimum cost is 3 and the path is N1-N4-N3, Table will be updated
N1-N4 cost =2
N1-N2-N4 cost = 5+ 3 = 8
N1-N5-N4 cost = 7+ 3 = 10
The minimum cost is 2 and the path is N1-N4 from the previous routing table. Hence there will not be
any change in the table for this row.
N1-N5 cost =7
N1-N2-N5 cost = 5+ 1 = 6
N1-N4-N5 cost = 2+ 6 = 8
109
Computer Networking and Data Communication
The minimum cost is 6 and the path is N1-N2-N5. The table will be updated
N1-N6 cost =5
N1-N2-N6 cost = 5+ 7 = 12
N1-N4-N6 cost = 2+ 3 = 5
N1-N5-N6 cost = 7+ 2 = 9
The minimum cost is 5 , it has come in two places. One in the previous routing table and one in moving
through N4. In this case the previous value will be obtained.
N1-N7 cost =10
N1-N2-N7 cost = 5+ 4 = 9
N1-N4-N7 cost = 2+ 7 = 9
N1-N5-N7 cost = 7+ 1 = 8
The minimum cost is 8 and the path is N1-N5-N7, Table will be updated
The updated table is presented below in Table 5.8.
Table 5.8: ARPANET algorithm example solution
N1 0 - 2 3 4 N1 0 -
N2 5 N2 0 2 2 N2 4 N4
N3 6 N2 4 1 2 N3 3 N4
N4 2 N4 3 0 3 N4 2 N4
N5 7 N4 1 6 0 N5 6 N2
N6 5 N5 7 3 2 N6 5 N5
N7 10 N5 4 7 1 N7 8 N5
Node 1 routing table before Delay vectors sent to node1 Node1 routing table after
update from neighbouring node update
The ARPANET routing algorithm's evolution from a simple distance-vector protocol to an adaptive
routing mechanism based on dynamic link costs marked a significant advancement in network routing.
Its emphasis on adaptability, efficiency, and stability paved the way for modern routing protocols,
ensuring that networks could efficiently handle dynamic and complex environments.
110
Network Layer Technologies
5.5 NETWORK LAYER PROTOCOLS
The network layer is responsible for several critical functions that ensure data packets are efficiently
routed from the source to the destination across multiple networks. The main functions of network
layer protocols are addressing, routing, packet forwarding, fragmentation and reassembly, error
handling, multicast and group management etc.
5.5.1 Internetworking
Internetworking refers to the process of connecting multiple networks together to form a larger, unified
network, allowing devices on different networks to communicate with each other. Physical layer,
Medium access control (MAC) layer and logical link control (LLC) layer of a network operates locally.
These layers are responsible for data delivery from one node to the other in the same network. Network
layer is responsible for delivering data (packets) between hosts and routing packets through routers or
switches. Packet delivery can be achieved through either a connection-oriented or connectionless
network service. In a connection-oriented service, the source first establishes a connection with the
destination before sending packets. Once the connection is set up, packets from the same source to the
same destination are sent sequentially along the same path. Each packet is logically linked to the ones
before and after it, and after all packets have been delivered, the connection is terminated.
In a connection-oriented protocol, the route for a sequence of packets with the same source and
destination addresses is determined when the connection is established, and switches do not recalculate
the route for each packet. This service is typical in virtual-circuit approaches to packet switching, such
as in Frame Relay and ATM.
In contrast, in a connectionless service, the network layer protocol handles each packet independently,
with no relationship between packets. Packets in a message may or may not follow the same path to
their destination. This type of service is used in the datagram approach to packet switching, such as in
the Internet, which has adopted this method at the network layer.Data transfer in IP layer is shown in
figure 5.11.
5.5.2 IP V4
Internet Protocol (IP) and is one of the core protocols of standards-based internetworking methods in
the Internet and other packet-switched networks. IPV4 is the most popular and widely used internet
protocol. IP header format is shown in figure 5.12.
Version (4 bits): It indicated the IP version. The value here is 0100, that is 4.
IHL (4 bits): Internet header length. It indicates the total length of the IP header in 32 bit word. The
minimum value is 5 and the maximum value is 20.
DS (6 bits): Used for Differentiated services.
112
Network Layer Technologies
Identification (16 bits): It is sixteen digit number assigned to each packet. This number with source
address and destination address uniquely identifies a packet in the network.
Flag (3 bits): Two bits are used one is reserved. More flag used when the fragmentation is done to
indicate that some more parts of the packet are expected to come. If More flag is reset means no more
part of the original data gram is going to come. It is the only segment or the last segment. If Do not
fragment flag is set then the datagram is not allowed to fragment.
Fragment offset (13 bits): Indicates the position of the current fragment in the original datagram in
64 bits units.
Time to live (8 bit): Life time of the segment in the internet in second. This value is updated by every
router the packet traverse.
Protocol (8 bits): Indicates the higher level protocols which will receive the data at the destination.
For example 6 for TCP, 17 for UDP etc.
Header Checksum (16 bits): User for error detection of the header only.
Source address (32 bits): 32 bits global internet address of the source.
Destination address (32 bits): 32 bits global internet address of the destination.
Options: Contains the options requested by the sending user. It is optional and the length is variable.
Some of the options are security, source routing, route recording, time stamping, stream identification
etc.
Padding: Padding is done to make the option field multiple of 32 bit word.
Payload: It is the user data coming from the higher layer. It is multiple of 32 bit. The maximum length
of the datagram can be 65,535 octets.
114
Network Layer Technologies
Table 5.10: Subnetting example
Number of bit borrowed from the host portion is 3. This is obtained by comparing the last 8 bit of the
default subnet mask and the subnet mask. In default subnet mask it is 00000000, it subnet mask it is
11100000. The sixth, seventh and eighth bit is used for subnetting. Hence the number of subnet can be
23 = 8. Last 5 bits are assigned for host number. Excluding 00000 and 11111, other numbers can be
given for any host. Hence the number of host will be 25-2 = 30.
Range of IP address for the subnet 2 will be 192.168.17.65 to 192.168.17.94
Explicit congestion signaling: In explicit congestion signaling, the network actively notifies the
sender or receiver about the presence of congestion. This is done through special bits or markers in
packet headers, allowing the network to provide congestion information without relying on packet loss
or increased delays.
Comparison between Implicit and Explicit congestion control is given in Table 5.11.
115
Computer Networking and Data Communication
Table 5.11: Comparison between Implicit and Explicit congestion control
Signaling method Determined by packet loss or delay Direct notification through specific
packets
Examples TCP packet loss, increased ECN, ICMP source quench packet
retransmission time
Congestion management Reactive (after packet loss) Proactive (before packet loss)
UNIT SUMMARY
• Multiplexing is the process of combining multiple signals for transmission over a single medium,
while multiple access methods enable several users to share the same transmission medium.
• In Circuit Switching a dedicated communication path is established between two nodes for the
duration of the communication session, commonly used in traditional telephony.
• In Packet Switching data is broken into smaller packets that are transmitted independently across
the network, with each packet taking different routes to the destination. This is the basis of
modern data networks like the Internet.
• Routing refers to the process of selecting the best path for data to travel across a network.
• IPv4 is the most widely used network protocol, responsible for addressing and routing packets
between hosts.
• IPv4 addresses are structured into network and host components, providing unique identifiers for
devices on a network.
• Internetworking is the process of connecting multiple networks and allowing them to function as
a single network.
• Subnetting divides a larger IP network into smaller, more manageable sub-networks, improving
routing efficiency and security.
• Congestion control ensures that data traffic does not overwhelm network resources, leading to
delays or packet loss.
• Implicit Congestion Control Involves techniques where congestion is inferred from network
conditions such as packet loss or delay.
• Explicit Congestion Control Involves direct signaling from network devices, such as routers, to
notify senders of congestion, allowing them to adjust their data transmission rates accordingly
116
Network Layer Technologies
EXERCISES
Multiple choice Questions with Answer
A) gives same amount of time to each device B) gives same amount of frequency to each device
C) gives variable time to each device D) gives variable frequency to each device
A) FDM B) TDM
C) WDM D) ALL
C) Synchronization D) Amplification
A) Connect devices within the same local B) Transmit packets between different networks
network
117
Computer Networking and Data Communication
Q9. Which fields of the IPv4 header change from router to router?
Q10. The value of the total length field in an IPv4 datagram is 36, and the value of the header length
field is 5. How many bytes of data is the packet carrying?
A) 16 B) 20
C) 31 D) 36
Q11. The value of Internet header length (IHL) in an IPv4 datagram is 7. How many option bytes
are present?
A) 5 B) 6
C) 7 D) 8
Q12. Calculate the internet header length (IHL) (in IPv4) value if the total length is 1200 bytes,
1176 of which is data from the upper layer.
A) 24 B) 4
C) 6 D) 12
A) Class-A B) Class-B
C) Class-C D) Class-D
A) 192-223 B) 128-223
C) 192-239 D) 128-239
Q15. the IP address 10101111 11000000 11111000 00011101 belongs to which class
A) Class-A B) Class-B
C) Class-C D) Class-D
Q16. An organization is granted the block 211.17.180.0/24. The administrator wants to create 32
subnets. The subnet mask will be
A) 255.255.255.248 B) 255.255.255.224
C) 255.255.255.252 D) 255.255.255.255
118
Network Layer Technologies
Q17. An organization is granted the block 211.17.180.0/24. The administrator wants to create 32
subnets. The number of usable addresses in each subnet.
A) 3 B) 4
C) 6 D) 8
Q18. An address space has a total of 1024 addresses. How many bits are needed to represent an
address?
A) 8 B) 10
C) 12 D) 32
Q19. A system with 16-bit addresses, what is the total number of addresses in the address space
A) 1024 B) 4096
C) 65536 D) 1048576
A) 255.0.0.0 B) 255.255.0.0
C) 255.255.255.0 D) 255.255.255.255
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
A B B A C D C B C A D C D A B A C B C B
Q7. Draw the frame format of IPV4 and explain the individual field.
119
Computer Networking and Data Communication
Q8. Define subnetting. Explain how subnetting helps in routing the packets in a network.
Q9. What are the differences between classful addressing and classless addressing in IPv4?
Q10. An IPv4 datagram is carrying 1024 bytes of data. If there is no option information, what is the
value of the header length field? What is the value of the total length field?
Find the least cost by bellman ford algorithm, considering Node 1 as the source Node
Q14. A packet switched Network with respective costs for each link marked aside is shown in Figure
Find the least cost paths for all nodes by Bell Man ford algorithm, considering Node 2 as the source
node.
Q15. In original Arpanet source node-3 routing table before update and delay vector sent to source
node from neighboring nodes are given below. Find out the source node routing table after update.
120
Network Layer Technologies
1 8 1 4 2 2
2 12 4 0 5 1
3 0 -- 3 4 6
4 5 4 5 0 4
5 10 3 2 2 3
6 4 6 8 3 0
7 14 4 6 2 8
8 12 8 4 5 3
9 3 2 2 8 4
KNOW MORE
121
6 TRANSMISSION MEDIA &
TRANSMISSION CONTROL PROTOCOL
UNIT SPECIFICS
This unit discusses the following topics:
• Wire and wireless transmission media
• TCP protocol and its operations
• Timer management in TCP
RATIONALE
Understanding wired and wireless transmission media is crucial for grasping how data physically
moves through networks, covering differences in speed, reliability, and application scenarios for
various media types. The TCP protocol section describes how reliable, connection-oriented
communication is established and maintained across the internet, ensuring accurate data delivery
between devices. Finally, timer management in TCP addresses mechanisms that control data flow,
retransmission, and network congestion, vital for optimizing network efficiency and reliability.
PRE-REQUISITES
Basic knowledge of HDLC
UNIT OUTCOMES
Upon completion of this unit, the student will be able to:
U6-O1: Understand Wired and Wireless Transmission
U6-O2: Comprehend the TCP Protocol Operations
U6-O3: Analyse TCP Flow Control and Congestion Control
U6-O4: Explain the use of different timer in TCP operation
U6-O5: Apply Knowledge in Network Troubleshooting.
U6-O1 - 1 1 - 3
U6-O2 2 - - 1 3
U6-O3 1 - - 2 3
U6-O4 - - - 1 3
U6-O5 1 1 1 1 3
122
Transmission Media & Transmission Control Protocol
6.1 TRANSMISSION MEDIA
In data communication, transmission media play an important role in facilitating the exchange of
information between devices. Transmission media can be broadly categorized into guided and
unguided types, each offering distinct advantages and limitations depending on the application. This
section explores various transmission media used in data communication systems, their characteristics,
and their applications.
123
Computer Networking and Data Communication
Transaction Processing: Magnetic stripe cards facilitate secure transactions and access control in
various applications, from banking to public transportation.
They include:
• Unshielded Twisted Pair (UTP): Used in most LAN applications, UTP cables are cost-effective
and flexible but are more susceptible to EMI.
• Shielded Twisted Pair (STP): These cables have additional shielding (usually metallic foil)
around each pair or around all pairs together to protect against EMI, making them suitable for
environments with high interference levels. Images of UTP and STP are shown in Figure 6.1 a
and b.
2. Coaxial Cable
Coaxial cables comprised of a conductor at the centre, surrounded by an insulating layer followed by
a metallic shield, and all enclosed by an outer insulating layer as shown in figure 6.1.c Due to the
124
Transmission Media & Transmission Control Protocol
ability to carry signals over longer distances with less interference compared to twisted pair cables,
Coaxial cables are used in backbone network, broadband internet, cable TV connections.
3. Optical Fiber
Optical fiber consists of core and clad as shown in figure 6.1 d. Plastic jacket is provided to give
mechanical strength to the optical fibre. Magnified cross-sectional view of the optical fibre is given in
Figure 6.2.
In optical fibers data are transmitted as pulses of light through core. The light is incident on to the core
with an angel less than the critical angle. The light gets reflected back at the core clad interface as
shown in figure 6.3.
Optical fibre offers high bandwidth, low attenuation, and immunity to electromagnetic interference.
Optical fibers are used in long-distance communication networks, internet backbone infrastructure,
and high-speed LANs where high data rates and reliability are critical.
125
Computer Networking and Data Communication
1. Radio Waves
Different wireless communication systems such as Wi-Fi, Bluetooth, and cellular networks uses radio
waves for transmission and reception of signal. They are suitable for short to medium-distance
communication and are less affected by physical barriers like walls compared to higher frequency
waves.
2. Microwaves
Microwaves have shorter wavelengths than radio waves and are used for point-to-point communication
over longer distances. Since microwave can penetrate the atmosphere and able to carry large volume
of data it is employed in satellite communication, long-distance telephone networks, and radar systems.
3. Infrared Waves
Infrared waves are used for short-range communication, typically within a room or between nearby
devices. They are commonly found in remote controls, some wireless LANs, and proximity sensors.
126
Transmission Media & Transmission Control Protocol
2. Reliable Data Transfer: TCP ensures accurate and in order delivery of data. It uses
acknowledgments and retransmissions to guarantee reliability.
3. Ordered Data Transfer: TCP numbers segments sequentially, ensuring that data is reassembled
in the correct order at the destination. TCP numbers all data bytes that are transmitted in a
connection. Numbering is independent in each direction. When TCP receives bytes of data from
a process, it stores them in the sending buffer and numbers them. The numbering does not
necessarily start from 0. Instead, TCP generates a random number between 0 and 232 -1 for the
number of the first byte. For example, if the random number is 1010 and the total data to be sent
are 5000 bytes, the bytes are numbered from 1010 to 6009.
4. Flow Control: TCP dynamically controls the data rate between a sender and receiver to prevent
overloading the receiver. This is achieved by byte oriented flow control using windowing
mechanisms.
5. Congestion Control: TCP applies credit based flow control mechanism based on network
congestion levels. The amount of data to be sent by a sender is decided by the level of congestion
in the network and the status of the receiver. Algorithms like window management and
congestion avoidance are used to manage congestion.
6. Segmentation and Reassembly: TCP breaks down large messages into smaller segments that are
transmitted separately and reassembled at the destination.
7. Error Detection and Correction: TCP includes error-checking mechanisms using checksums to
detect and correct errors in transmitted data.
8. Full-Duplex Communication: TCP allows data to be sent and received simultaneously between
two endpoints, supporting bidirectional data flow.
9. Port Numbers: TCP uses port numbers to differentiate between multiple applications on the
same device, enabling multiplexing and demultiplexing of data streams.
10. Timeout and Retransmission: TCP uses timers to detect lost segments and retransmit them,
ensuring that data reaches its destination even if some segments are lost or delayed.
11. Three-Way Handshake: TCP uses a three-step process (SYN, SYN-ACK, ACK) to establish a
connection between the sender and receiver before data transmission begins.
These features make TCP a robust and reliable protocol for data transmission over networks.
127
Computer Networking and Data Communication
Destination Port (16 bits): determines the receiving port number of the application program on the
destination machine.
Sequence Number (32 bits): Sequence number of the first data octet. Used to keep track of the order
of bytes sent from source to destination. If SYN flag is set it indicates the initial sequence number.
Flags (8 bits):
Urgent Pointer (16 bits): This is the distance from the sequence number of the last urgent data byte.
This is valid only when the URG flag is set. This indicates the urgency of the incoming data.
Options (variable): Optional information in the TCP header which can go up to 40 bytes. The length
of this field is decided by the Data Offset field. Options may include parameters like Maximum
Segment Size (MSS), Window Scale factor, etc.
128
Transmission Media & Transmission Control Protocol
Padding (variable): Extra bits appended along with the TCP header to ensure the TCP header is a
multiple of 32 bits.
129
Computer Networking and Data Communication
Connection Establishment
Three-way handshake is done to establish a TCP connection between the server and the client.
Generally, the connection is initiated by the client.
1. SYN: The client sends a segment with the SYN (synchronize) flag set to the server, indicating a
request to establish a connection.
2. SYN-ACK: The server responds to the client’s SYN by setting the ACK (acknowledge) flags
and Send its own SYN by setting the SYN flag using the same segment. This indicates that the
server is ready for the data transfer and wants to know the readiness of the client.
3. ACK: The client acknowledges server's SYN-ACK segment by sending a final segment with the
ACK flag set. The connection is now established and both server and client are ready for data
transfer.
• Sequence Numbers: Each byte of data sent over a TCP connection is assigned a sequence
number. This allows the receiver to reorder segments if they arrive out of order and to detect any
missing data.
• Acknowledgment Numbers: The receiver sends back acknowledgment numbers to the sender,
indicating the next expected byte. This helps in confirming the successful receipt of data and
managing flow control.
• Window Size: TCP uses a window size field to implement flow control, allowing the sender to
know how much data it can send before needing an acknowledgment.
130
Transmission Media & Transmission Control Protocol
its own synchronization number SYN 2000. The client responds to the server’s SYN by replying AN
2000. Now both are ready for the data transfer.
Let us understand the flow control in TCP with the example shown in Figure 6.7. for simplicity assume
that data flow is form transport entity A to B only and in each segment 200 bytes of data are sent. First
the sending and receiving sequence number are synchronised to 1001. B grants an initial credit of 1200
bytes. This means A can transmit 6 segments (1200 bytes) without waiting for the acknowledgement
to come. Now A has transmitted four segments with SN 1001, SN 1201, SN 1401 and SN 1601. B
received all the segments successfully and send an acknowledgement AN1801, W=800. This means
that the receiver is ready to receive further 800 bytes of data. This indicate that the receiver wants to
slow down the data transfer. Initially the credit allocation was 1200 byte now it reduced to 800 bytes.
When A receives this it got the conformation of all the segments upto the sequence number 1800. And
ready to receive sequence number 1801. But the allotted window size is 800. That means it can transmit
upto 2600 with out waiting for the acknowledgement. But it has already transmitted SN 1801, so the
window will lai between 2001 to 2600.
Then the receiver receives the next segment SN 1801. By this time the receiver is relatively free so it
increases the credit window to 1000. It can receive from 2001 to 3000. The receiver will send an
acknowledgement AN 2001 and W=1000. When the transmitter receives this acknowledgment, it
shifts its starting point to 2001 and window size to 1000. Finally the transmitter send SN 2001 and SN
2201. The transmitter window will shrink and it will lie between 2401 and 3000. When the receiver
receives this two segment the receiver window will also lie between 2401 and 3000. This is how the
flow control is managed in TCP.
132
Transmission Media & Transmission Control Protocol
If the receiver wants to stop the transmission temporarily, it can assign the credit window to 0. When
ever the receiver has free up its buffer space it can increase the credit to the highest allocated buffer
space, ie 1200 bytes.
For example: A web server (like Apache or Nginx) listens on port 80 (HTTP) or port 443 (HTTPS).
Multiple clients can connect to the server using different source ports (e.g., 10000, 10001, etc.) while
the server uses port 80 or 443. The server can handle multiple requests simultaneously by
differentiating them based on the client’s IP address and port number.
Window management
TCP of the sender calculates the allowed window to transmit segments by finding the minimum of the
credit allocated by the receiver and the congestion window.
Allowed window size =minimum of (rwnd, cwnd)
Where rwnd is the receive window , that is credit allocated by the receiver
cwnd is the congestion window.
133
Computer Networking and Data Communication
Value of the congestion window is varied based on the network congestion. Higher the network
congestion, the value of the congestion window should be low so that the congestion can be minimized.
Generally Slow start and dynamic window sizing is implemented to handle the congestion.
The larger the window size, the more segments TCP entity can send without getting any
acknowledgement. This may create problem when the connection is first established. One of the
approach to solve the problem is to fix the window to a larger value initially and then change the
window size based on the round trip time. But this approach may flood the internet by dumping large
number of segments before the TCP realizes that a congestion is there. TCP handles the congestion in
three phase: slow start, congestion avoidance and congestion detection.
Slow start: During the slow-start phase, the sender begins with the congestion window of size one
segment. It sends one segment and waits for the acknowledgement. When it receives the
acknowledgement TCP increases the congestion window size to 2. For every acknowledgement the
congestion window is increased by 1. Slow start mechanism is shown in Figure 6.8
134
Transmission Media & Transmission Control Protocol
The TCP entity continues to increase the congestion window size till a threshold value is reached. This
threshold is called as slow start threshold (ssthresh).
Congestion avoidance: in slow start the congestion window increases exponentially. To avoid the
congestion beforehand, the exponential growth of the congestion window has to slow down. In
congestion avoidance, Slow start mechanism is implemented till the congestion window reaches slow
start threshold, then the congestion window is allowed to grow linearly. This phase is called additive
phase. The congestion window grows by 1 for every round. The congestion window will be increased
by one after all the segments of that window are acknowledged. Linear growth of the congestion
window is shown in Figure 6.9.
Fast Retransmit: Detects packet loss by receiving multiple duplicate ACKs. Triggers retransmission
of the lost packet without waiting for the retransmission timer to expire. Hence the retransmission
becomes faster.
135
Computer Networking and Data Communication
Fast recovery: Adjusts the cwnd and ssthresh to avoid reducing the transmission rate too drastically.
cwnd is set to ssthresh plus three maximum segment length to quickly recover from packet loss and
continue transmission at a reduced rate.
Retransmission Timer
Persist Timer
• Purpose: Prevents deadlock situations that may occur due to a zero-window size (when the
receiver's buffer is full).
• Mechanism: When the sender receives a zero-window advertisement from the receiver, it
refrains itself from sending segments and starts the persist timer. Once the persist timer expires,
the sender sends small probe segments to check if the window size has increased. This continues
until the receiver's window size becomes non-zero.
Keepalive Timer
TIME-WAIT Timer
• Purpose: Ensures that all packets from a closed connection are properly transmitted and
acknowledged.
• Mechanism: After a connection is closed, the TIME-WAIT timer is started. This timer usually
lasts for twice the Maximum Segment Lifetime (2MSL), ensuring that any delayed packets in
the network are discarded before the connection resources are released. This helps prevent issues
with delayed duplicate packets.
136
Transmission Media & Transmission Control Protocol
Delayed ACK Timer
Push Timer
• Purpose: Forces the transmission of data that might be held back for optimization.
• Mechanism: This timer is used to ensure timely delivery of data when TCP's Nagle algorithm is
applied, which coalesces small segments to reduce overhead. The push timer ensures that
coalesced segments are sent within a reasonable time frame.
UNIT SUMMARY
• Transmission media refers to the physical pathways through which data is transmitted in a
network.
• Transmission media is of two types . Guided media and unguided media.
• The guided media includes Magnetic media, twisted pair cable, coaxial cable, optical fiber
• The unguided media includes air, sea water and free space.
• Magnetic Media is used in storage devices like hard disks and tapes.
• Twisted pair cable consists of pairs of copper wires twisted together to reduce electromagnetic
interference. It is widely used in telephone networks and local area networks (LANs).
137
Computer Networking and Data Communication
• Coaxial cable composed of a central conductor, insulating layer, metallic shield, and plastic
cover. co-axial cables are used for data transmission in television systems, internet, and long-
distance telephone lines.
• Optical fibers are highly resistant to electromagnetic interference, have a high data transmission
rate, and are suitable for long-distance communication.
• TCP is a connection-oriented protocol that ensures reliable data transmission over the internet.
• TCP manages connections using a three-way handshake process (SYN, SYN-ACK, ACK) to
establish and terminate connections between devices.
• TCP uses algorithms like slow start, congestion avoidance, and fast recovery to prevent network
congestion by controlling the rate at which data is sent.
EXERCISES
Multiple choice Questions with Answer
Q1. What is the main purpose of twisting the wire in unshielded twisted pair cable ?
C) To carry light signals over long distances D) To increase the bandwidth of data transmission
A) 20 bytes B) 40 bytes
C) 60 bytes D) 80 bytes
Q5. Which layer of the OSI model does TCP operate in?
C) Network D) Transport
A) FIN B) SYN
C) ACK D) RST
138
Transmission Media & Transmission Control Protocol
A) 20 bytes B) 40 bytes
C) 60 bytes D) 80 bytes
Q8. In the TCP three-way handshake, which message is sent after SYN?
A) SYN-ACK B) ACK
C) FIN D) RST
Q9. In the event of packet loss, TCP uses __________ to control congestion.
Q10. Which TCP flag is set in the last segment sent to terminate a connection?
A) ACK B) SYN
C) FIN D) RST
A) Indicate the sequence number of the next B) Identify the source port
expected byte
Q13. What is the purpose of the PUSH (PSH) flag in the TCP header?
Q15. Which TCP timer prevents a connection from hanging if the receiver’s advertised window size
is zero for too long?
139
Computer Networking and Data Communication
A) To check if the connection is still exist B) To adjust the window size dynamically
Q17. In TCP, if the retransmission timeout is doubled each time a packet is not acknowledged, this
mechanism is called:
Q18. Which field in the TCP header is specifically used for flow control?
Q19. If the receiver’s buffer is full, what value does the receiver send in the advertised window size
to stop the sender from transmitting more data?
Q20. Which TCP timer is used to prevent a connection from closing too quickly, ensuring that
delayed packets are not mistakenly considered part of a new connection?
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
B D A D D B C A A C C A B C C A B C B D
140
Transmission Media & Transmission Control Protocol
Q3. Write down the features of TCP that makes it a robust and reliable protocol for data communication
over a network.
Q4. Draw the frame format of TCP and explain the individual field.
Q5. With suitable diagram explain connection management in TCP
KNOW MORE
UDP
141
REFERENCES FOR FURTHER LEARNING
1. S. Misra, I. Woungang, and S. C. Misra, Guide to Wireless Ad Hoc Networks. New York, NY,
USA: Springer, 2009.
2. M. Usman, T. Dagiuklas, and M. Imran, "Blockchain-Based Secure Data Communication in
Internet of Things Networks," IEEE Internet Things J., vol. 6, no. 3, pp. 5097-5104, June 2019,
doi: 10.1109/JIOT.2019.2897163.
3. W. Stallings, Data and Computer Communications, 10th ed. Upper Saddle River, NJ, USA:
Prentice Hall, 2014.
4. R. K. Shukla and D. K. Lobiyal, "Energy-Efficient Multi-hop Routing for Mobile Ad Hoc
Networks," IEEE Access, vol. 8, pp. 216437-216450, Dec. 2020, doi:
10.1109/ACCESS.2020.3041936.
5. T. Han, N. Zhang, and X. Shen, "Enabling Mobile Edge Computing for Vehicular Networks: A
Distributed Auction Approach," IEEE Internet Things J., vol. 3, no. 3, pp. 464-478, June 2016,
doi: 10.1109/JIOT.2016.2520562.
6. M. Chen, Y. Hao, Y. Li, C. Lai, and D. Wu, "On the Computation Offloading at Ad Hoc Cloudlet:
Architecture and Service Modes," IEEE Commun. Mag., vol. 53, no. 6, pp. 18-24, June 2015,
doi: 10.1109/MCOM.2015.7120048.
7. A. Elgabli, Y. Zhang, and L. Liu, "Federated Learning for 6G: Challenges, Methods, and Future
Directions," IEEE Commun. Mag., vol. 60, no. 2, pp. 50-56, Feb. 2022, doi:
10.1109/MCOM.0001.2100474.
8. R. Yu, Y. Zhang, and S. Gjessing, "Toward Cloud-Based Vehicular Networks With Efficient
Resource Management," IEEE Netw., vol. 27, no. 5, pp. 48-55, Sept. 2013, doi:
10.1109/MNET.2013.6616111.
9. J. Wang, C. Lin, Y. Zhang, and L. Zhao, "A Survey on Blockchain for Internet of Things," IEEE
Internet Things J., vol. 8, no. 2, pp. 1202-1226, Jan. 2021, doi: 10.1109/JIOT.2020.3025006.
10. M. Mahalingam et al., "Datacenter TCP: Principles and Practices," IEEE Commun. Mag., vol.
58, no. 8, pp. 36-42, Aug. 2020, doi: 10.1109/MCOM.001.2000387.
142
CO AND PO ATTAINMENT TABLE
Course outcomes (COs) for this course can be mapped with the programme outcomes (POs) after the
completion of the course and a correlation can be made for the attainment of POs to analyze the gap.
After proper analysis of the gap in the attainment of POs necessary measures can be taken to overcome
the gaps.
CO-1
CO-2
CO-3
CO-4
CO-5
143
INDEX
A
Adaptive Modulation and Coding 44
Adaptive routing 103
Alternate mark inversion 20
Amplitude modulation 30
Amplitude shift keying 27
ARPANET Routing algorithm 108
Asynchronous 32
Asynchronous Balanced Mode 80
Asynchronous Response Mode 80
Asynchronous TDM 95
Automatic Repeat request 75
B
Backward error correction 70
Bandwidth 4
Beam width 43
Bellman ford algorithm 106
Bipolar-AMI 22
Block Coding 23
Bluetooth 40
burst error 66
Bus Topology 10
C
Care-of Address 47
Central routing matrix 101
Central routing table 101
Channel 2
Channel capacity 3
Channel Coding 44
Channel Estimation 45
Circuit Switching 98
Cluster Gateway 55
Cluster Head 55
Cluster Member 55
Cluster Member Reassignment 58
Cluster Merge and Split 58
Cluster techniques 55
Codeword 23
Coding Gain 60
Coherence Bandwidth 42
Coherence Time 42
Congestion avoidance 127
144
Index
Congestion Control 127,133
Connection oriented services 85
Connection-oriented protocol 111
Control field 81
Convergence Time 100
Cooperative Communication 45
Correspondent Node 47
Crash recovery 137
Cyclic Redundancy Check 67
D 12
Daisy Chain 16
Damaged Acknowledgement 77
Data rate 4
Decapsulation 48
Decision Feedback Equalizer 43
Decision place 99
Decision time 99
Delay Spread 42
Delayed ACK Timer 137
Delta modulation 26
Destination 2
Differential Manchester 22
Differential PSK 28
Digital Transmission 19
Dijkstra's algorithm 104
Diversity Gain 45
Diversity techniques 44
Doppler spread 42
Dynamic Source Routing 52
E
Electromagnetic spectrum 38
Encapsulation 48
Encoding 25
End-to-End Delay 53
Equalization 43
Error control 75
Error correction 23,70
Error detection 66
Error detection capability 19
Explicit congestion control 115
F
Fast recovery 136
Fixed routing 101
Flag 80
Flooding 102
Flow control 71,127
Foreign Agent 47
145
Computer Networking and Data Communication
Foreign network 47
Forward Error Correction 44
Four-way handshake 130
Frame check sequence 67
Frame lost 76
Frame Received with error 76
Frame transmission time 71
Frequency Allocation 39
Frequency Division Multiplexing 92
Frequency modulation 31
Frequency shift keying 27
Full-Duplex 32
G
Gamma Rays 39
Guided transmission media 124
H
Half-Duplex 32
Hamming code 23
Hamming Distance 23
Handoff Management 46
Hard Handoff 46
High-Level Data Link Control 70
Home Agent 47
Home network 47
Horizontal Handoff 46
Hybrid Topology 13
I
Implicit congestion signaling 115
Information frame 82
Infrared 38
Internet Protocol 7,112
Internetwork 9
Internetworking 111
IP V4 112
Isochronous 32
J
Jitter 100
K
Keepalive Timer 136
K-Hop Clustering Algorithms 57
L
LAN 9
Latency 96
Least cost algorithm 104
Line Coding 19
Linear Equalizers 43
146
Index
Location Area 46
Location Management 45
logical link control 84
LoRaWAN 41
M
Magnetic media 123
MAN 9
Manchester 22
Medium access control 84
Mesh Topology 11
Microwave 38
Mobile Ad-hoc Network 49
Mobile IP 47
Mobile Node 47
Mobility management 45
Mobility-Based Clustering 56
Modulation rate 20
Modulo 2 Algorithm 68
multipath propagation 42
Multiple access techniques 97
Multiplexing 92
N
Near Field Communication 41
Network Coding 45
Non-linear Equalizers 43
Normal Response Mode 80
NRZ 20
Nyquist criteria 4
O
OSI 6
P
Packet Delivery Ratio 52
Packet Loss 100
Packet Switching 98
Paging 46
PAN 9
Persist Timer 136
Phase Modulation 30
phase shift keying 27
Propagation Characteristics 39
Protocol 5
pulse code modulation 25
Push Timer 137
Q
Quadrature Phase Shift Keying 28
Quantization 25
R
147
Computer Networking and Data Communication
Radio waves 38
Rake receiver 44
Random Routing 103
Receiver 2
Relaying 45
Retransmission Timer 136
Retransmission timer management 133
Ring Topology 11
Route Caching 53
Route Discovery 53
Route Maintenance 53
Routing 91
Routing Overhead 52
S
Sampling 25
Scalability 49
Selective reject 79
Shannon’s channel capacity 5
Signal conversion 3
Signal-to-Noise Ratio 4
Simplex 32
single bit error 66
sliding window protocol 73
Soft Handoff 46
Source 2
Space-Time Coding 60
Spatial Diversity 60
Star Topology 10
Stop and wait flow control 72
Subnetting 114
Supervisory frame 82
Synchronization capability 19
Synchronous 32
Synchronous TDM 94
T
TCP addressing 129
TCP header 127
Temporal Diversity 69
Thermal noise 43
Three-way handshake 127
Throughput 100
Time division multiplexing 92
Timer management 136
TIME-WAIT Timer 136
Transmission Control Protocol 7,126
Transmission medium 13
Transmission Mode 32
Transmitter 2
148
Index
Tree Topology 12
Tunneling 48
U
Ultraviolet 39
Unguided Transmission Media 125
Unnumbered frame 82
Utilization efficiency 72
V
Vertical Handoff 47
Visible light 39
W
WAN 9
Wi-Fi 6E 40
Window management 133
X
X-Rays 39
Z
Zigbee 41
Z-Wave 41
149