R-21 M.tech (DATA NETWORKS)
R-21 M.tech (DATA NETWORKS)
UNIT-1
INTRODUCTION TO NETWORKS
Data communication is the process of transferring data between devices. For successful
data communication, several essential components work together:
> Message: This is the information or data that needs to be communicated. It could be
text, audio, video, or any other form of data.
> Sender: The device or computer that originates and sends the data. It could be a
computer, phone, or other devices connected to a network.
> Receiver: The device that receives the message. This could be another computer,
mobile device, or any system that accepts data input.
> Medium: The physical path or channel over which data travels from sender to
receiver. Common examples include copper wires, fiber optics, and wireless channels.
> Protocol: A set of rules and conventions for effective communication between devices.
Protocols ensure that devices understand each other, even if they use different hardware or
software.
Protocols are the rules that define how data is transmitted and interpreted between
devices. They play a key role in ensuring the successful and accurate exchange of data. Major
aspects of protocols include:
Syntax:- The structure or format of the data. Protocols specify how the data packet
should be organized, including start and end signals, data format, and sequence.
> Semantics: This defines the meaning of each section of data. Semantics ensure that the
receiver understands the purpose of each part of the data packet.
> Timing: Timing is crucial for synchronizing sender and receiver devices. This can
involve determining when data should be sent and how fast it should travel.
> De facto Standards: These are standards that become widely adopted due to
popularity rather than official endorsement. For instance, PDF has become a de facto standard
for document exchange.
Standards ensure reliability, efficiency, and interoperability within the field of data
communication. They make it possible for a wide range of systems to connect and communicate
with each other, thus fueling the growth of global networks, including the internet.
Several organizations are dedicated to creating and maintaining standards for data
communication. Here are some key ones:
> ISO (International Organization for Standardization): ISO develops a broad range of
international standards, covering multiple fields, including technology. In data communication,
ISO is responsible for the OSI model, which standardizes the functions of communication
systems.
> IEEE (Institute of Electrical and Electronics Engineers): IEEE develops standards for a
variety of technology-related fields, including networking and data communication. The IEEE
802.11 standard, which defines Wi-Fi, is one of the most widely known standards created by
IEEE.
> IETF (Internet Engineering Task Force): IETF works on the technical standards
required for the internet to function. They’re responsible for standards like HTTP and TCP/IP,
which are foundational to the World Wide Web.
> ANSI (American National Standards Institute): ANSI oversees standards in the U.S.,
coordinating with international bodies like ISO to maintain consistency. ANSI standards cover
various aspects of data communication and networking in North America.
Data rate and channel capacity are crucial metrics in data communication, affecting how
fast and efficiently information can be transferred between devices.
> Data Rate: The data rate, often called bitrate, is the amount of data transmitted over a
network per second. It’s typically measured in bits per second (bps) or its multiples like Kbps,
Mbps, and Gbps. Higher data rates allow for faster transmission of data, which is essential for
applications that require high bandwidth, such as video streaming and online gaming.
> Channel Capacity: Channel capacity refers to the maximum data rate that a
communication channel can support under ideal conditions without error. Claude Shannon’s
theorem helps define the theoretical limits of channel capacity, which is determined by the
bandwidth of the channel and the signal-to-noise ratio (SNR). The formula for channel capacity
where \( B \) is the bandwidth of the channel, and \( SNR \) is the signal-to-noise ratio.
LINE CONFIGURATION
In data communication, line configuration (also called transmission mode or topology) refers to
the physical and logical arrangement of devices on a network. This determines how data is
transmitted between devices. There are two primary types of line configurations:
1. Point-to-Point Configuration
> In a point-to-point configuration, the communication link is directly established
between two devices. This setup provides a dedicated link for direct communication, allowing
data to flow between just those two endpoints without interference from other devices.
Advantages:
> High data security and privacy, as only two devices share the line.
> Optimal bandwidth utilization since the channel isn’t shared.
> Simpler error detection and correction due to fewer devices in the path.
Disadvantages:
> Not scalable for larger networks since each new device requires a separate link.
2. Multipoint Configuration
> In a multipoint (or multi-drop) configuration, a single link is shared among multiple
devices. In this setup, all connected devices share the same communication line, either
simultaneously (if the technology allows) or on a time-sharing basis.
> Advantages:
> Potential data collision or interference, requiring efficient access control methods (like
token passing or time division).
> Reduced bandwidth per device since all devices share the same link.
Example: A local network where multiple computers share the same Ethernet connection.
TOPOLOGY OF NETWORKS
Categories of Networks are typically classified based on the area they cover, ranging
from small, localized setups to global networks.
Definition:: A LAN is a network that connects devices within a limited geographic area,
such as a home, office, or school. LANs are often confined to a single building or a group of
closely situated buildings.
Characteristics:
> High data transfer rates within the network, often between 100 Mbps to 10 Gbps.
> Typically use Ethernet or Wi-Fi technologies for connectivity.
> LANs are usually managed and controlled by a single organization or individual.
Example:
> A corporate office where computers, printers, and servers are connected to a central
router or switch to share resources and communicate.
> A home Wi-Fi network where devices like laptops, smart TVs, and smartphones
connect through a router.
Definition:: A MAN is a network that covers a larger geographic area than a LAN,
typically a city or a large campus. MANs are often used to connect multiple LANs within a
metropolitan area, allowing for broader connectivity.
Characteristics:
> Typically spans several kilometers, connecting offices, schools, or hospitals across a
city.
> Often uses high-speed connections like fiber-optic cables to connect different LANs.
> MANs may be managed by a service provider or a consortium of organizations.
Example:
> A university campus network connecting different departments and buildings.
> A city-wide government network connecting public offices and facilities, such as a
police department, municipal offices, and libraries.
Characteristics:
Definition:: A PAN is a very small network, typically used for communication between
personal devices within the range of an individual user.
Characteristics:
Definition:: A CAN is a network that spans a larger area than a LAN but is confined to a
specific geographic location like a campus, industrial park, or military base.
Characteristics:
> Connects multiple buildings within a restricted area.
> Can combine LANs from different departments or buildings into a single network.
> Often uses fiber-optic cables or other high-speed connections for reliable
communication.
Example:
> A corporate campus where multiple buildings are networked together.
> A university with separate networks for departments, dormitories, and administrative
buildings.
Characteristics:
> Separate from the main network but connected to servers that require access to large
storage resources.
> Uses technologies like Fibre Channel or iSCSI for high-speed data transfer.
> Designed for efficient data storage, backup, and retrieval operations.
Example:
> A data center for a large company where multiple servers access shared storage
resources for high-speed data handling.
Characteristics:
> Typically covers a large geographic area but is privately owned and managed by the
organization.
> Often incorporates VPNs (Virtual Private Networks) for secure remote access.
> Common in large corporations that need a secure network for inter-office
communication.
Example:
> A bank with branches in different cities connected by an EPN for secure transactions
and data exchange.
> A multinational enterprise with an internal network that links regional offices,
manufacturing plants, and warehouses.
Definition:: A GAN is a network that spans the entire globe, connecting multiple WANs
across different continents. It’s essentially a larger scale of WAN, capable of connecting devices
and networks worldwide.
Characteristics:
> Relies on satellite communication and undersea cables to link multiple countries and
regions.
> Often managed by multiple telecom providers and international organizations.
> Enables global communication and internet access.
Example:
> The internet, considered a GAN, interconnecting billions of devices around the world.
> Multinational organizations using GANs to connect their offices and operations
globally.
Each network category serves specific needs, from individual device connections to
global enterprise networks, ensuring tailored solutions based on geographic scope and
communication requirements.
TRANSMISSION MODES
Transmission modes in data communication refer to how data is transmitted between devices,
typically categorized by the direction and timing of data flow.
1. Simplex Mode
Definition:: In simplex mode, data flows in only one direction from the sender to the
receiver, with no return communication or feedback.
- Aspects:
> Only one device sends data, and the other only receives.
> Useful for applications where only one-way communication is needed.
> No risk of data collision, as there's only one direction of data flow.
Example:
> Television broadcasting, where signals flow from the station to the TV set without any
response back from the TV to the broadcaster.
2. Half-Duplex Mode
Definition:: Half-duplex mode allows data to flow in both directions between devices,
but only one direction at a time.
- Aspects:
> Data transmission is bidirectional but not simultaneous; one device transmits while
the other receives.
> Each device takes turns in sending and receiving, often using a control signal to
indicate when one can send data.
> Suitable for situations where both devices need to communicate but don’t need real-
time, simultaneous responses.
Example:
> Walkie-talkies, where one person talks while the other listens, and they switch roles
after each transmission.
3. Full-Duplex Mode
- Aspects:
> Both devices can transmit and receive data concurrently.
> It is more efficient for real-time applications, as both parties can communicate without
waiting.
> Requires separate communication channels or more sophisticated technology to
manage bidirectional traffic.
Example:
> Telephones, where both people can speak and listen simultaneously without
interrupting each other.
Each transmission mode has applications based on the specific needs of the
communication, such as speed, real-time interaction, and data collision avoidance. These modes
form the basis of many network setups and affect how devices communicate and handle data
transfer.
Concepts :
1. Binary Transmission: Digital data transmission primarily uses binary encoding, with data
represented as a sequence of 0s and 1s.
2. Signal Levels: Digital signals use discrete voltage levels (high and low) to represent binary
bits.
3. Transmission Media: Digital data can be transmitted through various media, such as copper
wires, fiber-optic cables, or wireless channels, with each having different properties for speed,
reliability, and distance.
1. Parallel Transmission:
Definition:: Multiple bits are transmitted simultaneously across multiple channels, one
for each bit, making it faster but generally used for short distances.
Example: Data transfer in older printers where multiple wires transmit 8 bits simultaneously.
2. Serial Transmission:
Definition:: Bits are transmitted sequentially, one after another, through a single
communication channel.
> Example:: Preferred for long-distance communication due to reduced complexity and
interference risks, although it’s typically slower than parallel transmission.
Example: USB (Universal Serial Bus) transfers data serially, sending one bit at a time.
1. Synchronous Transmission:
Example: Ethernet networks use synchronous transmission, where a clock signal ensures that
data is read and written accurately.
2. Asynchronous Transmission:
Definition:: Asynchronous transmission sends data in small packets with start and stop
bits, allowing devices to work independently without a shared clock.
Example: Serial communication over older RS-232 connections, often used in keyboards and
other peripherals.
3. Isochronous Transmission:
How It Works :
Digital data transmission involves encoding data as electrical or optical signals, which
are then sent over a transmission medium. Each bit is represented by a unique voltage or light
pulse. The receiving device decodes these signals back into digital form, reassembling the
binary data to interpret the original information.
Example Applications
> Internet data transfer: Web browsing, email, and file sharing rely on digital data transmission
over both wired (fiber optics) and wireless (Wi-Fi) networks.
> Digital Telephony: Voice-over-IP (VoIP) and cellular networks convert voice data into digital
signals for efficient transmission over long distances.
> Data Storage Interfaces: Interfaces like SATA and USB transmit digital data between storage
devices (e.g., hard drives, USB drives) and computers.
Digital data transmission is essential for most modern communication systems, enabling
efficient, high-speed data sharing across distances and between devices.
CATEGORIES OF NETWORKS
Categories of networks describe different types of networks based on their size, scope,
and application.
- Aspects:
Example: An office network connecting computers, printers, and servers so employees can
share resources like files and internet access.
- Aspects:
> Usually spans several kilometers, connecting LANs within a metropolitan area.
> May be managed by a single organization or a service provider.
> Often uses high-speed connections like fiber-optic cables.
- Aspects:
> Connects multiple LANs or MANs over large distances.
> Generally slower than LANs due to longer-distance communication.
> Often managed by multiple organizations or service providers.
Example: The internet, connecting millions of LANs and WANs globally.
- Aspects:
> Used for connecting personal devices like smartphones, tablets, and laptops.
> Often uses Bluetooth, infrared, or USB for connectivity.
Example: A smartphone connecting to wireless earbuds or a smartwatch via Bluetooth.
Definition:: A CAN connects multiple LANs within a specific geographic area, such as a
university campus or industrial park.
- Aspects:
> Combines LANs from different departments or buildings into a single network.
> Provides high-speed communication across campus facilities.
Example: A corporate campus network where different buildings are networked together.
- Aspects:
> Separate from the main network but connected to servers for efficient data access.
> Typically used for large-scale data storage, backup, and retrieval.
Example: A data center network where multiple servers access shared storage resources.
- Aspects:
> Provides secure communication between different branches or offices.
> Common in large corporations needing secure and private data transmission.
Definition:: A GAN spans the globe, connecting multiple WANs worldwide, allowing
seamless communication across continents.
- Aspects:
> Relies on satellite, submarine cables, and large-scale telecom infrastructure.
> Often managed by international organizations or telecom providers.
Each of these network categories is designed to meet specific connectivity needs, from
small personal spaces to worldwide access, ensuring efficient and reliable data transmission for
various applications.
INTER-NETWORKS
Concepts of Inter-Networks
4. Security and Access Control: Internetworks often incorporate measures like firewalls,
encryption, and VPNs to secure data and control access between interconnected networks.
Components of an Internetwork
> Routers: Specialized devices that forward data packets between networks, determining the
best path based on routing protocols.
> Gateways: Devices that connect networks with different protocols, translating data formats to
ensure compatibility.
> Switches: Devices that connect devices within the same network and also assist in linking to
other networks within the internetwork.
> Protocols: The main protocol suite used in internetworks is the TCP/IP protocol, which
facilitates communication across diverse devices and networks.
1. Data Packet Routing: When data needs to move from one network to another, it’s broken
into packets, which are routed through routers. Routers read packet headers to determine the
best route for each packet to reach its destination.
3. Layered Communication: Internetworking follows the OSI model (or the simplified TCP/IP
model), where each layer (physical, data link, network, etc.) plays a role in preparing, sending,
and receiving data across networks.
Types of Internetworks
1. Extranet:
Example: A manufacturer allowing suppliers to access its inventory data for real-time
restocking.
2. Intranet:
> A private internetwork used within an organization.
> Accessible only by authorized users, often secured by firewalls and authentication
systems.
Example: A company’s internal network that allows employees to access resources like HR
portals, email servers, and document repositories.
3. Internet:
Example: The global Internet itself, which enables browsing, email, social networking, and
countless other applications.
When you send an email, the email data travels through your local network (LAN), then
to your ISP’s network, and finally across multiple networks on the Internet until it reaches the
recipient’s ISP network and LAN. This cross-network journey is made possible by routers,
gateways, and standardized protocols.
Benefits of Internetworking
> Enhanced Communication: Interconnected networks make it possible for people and
organizations to communicate globally.
> Resource Sharing: Allows for the sharing of resources like files, applications, and databases
across different locations.
> Scalability: Internetworks can grow as new networks are added, supporting more users and
devices.
> Flexibility and Efficiency: Internetworks connect diverse types of devices and networks,
enhancing compatibility and simplifying data exchange.
Real-World Examples
> Internet: The ultimate internetwork connecting users, organizations, and devices globally.
> Corporate WANs: Multi-location companies using internetworks to connect offices across
cities, states, or countries.
> Extranets: Collaborative networks used by businesses to securely link with external partners
or suppliers.
OSI MODEL
Function: This layer is responsible for the physical connection between devices and the
transmission of raw binary data (bits) over a physical medium.
- Aspects:
> Defines the hardware elements involved, such as cables, switches, and network
interface cards.
> Specifies the electrical, optical, or radio signal properties for data transfer.
> Manages data encoding, modulation, and bit synchronization.
Example: Ethernet cables, fiber-optic cables, and Wi-Fi signals that physically transmit data.
Function: Manages node-to-node data transfer and error detection, ensuring data reaches the
next node in the network reliably.
- Aspects:
Example: Switches operate at this layer, using MAC addresses to forward data frames to the
correct destination within a LAN.
Function: Handles routing, logical addressing, and packet forwarding, allowing data to move
across networks.
- Aspects:
> Assigns logical IP addresses to devices.
> Uses routing protocols to determine the best path for data to travel across
interconnected networks.
> Deals with packet forwarding and congestion control.
Example: Routers work at this layer, using IP addresses to route packets across the Internet.
Function: Manages end-to-end communication, providing error-checking and data flow control
to ensure complete data transfer.
- Aspects:
> Breaks data into segments and reassembles them at the destination.
> Uses protocols like TCP (Transmission Control Protocol) for reliable, connection-
oriented communication and UDP (User Datagram Protocol) for connectionless, faster
communication.
> Provides error detection and retransmission of lost packets.
Example: TCP is used for reliable applications like web browsing, while UDP is used for
streaming and gaming.
- Aspects:
> Manages dialog control and keeps track of session states (open, ongoing, closed).
> Responsible for setting up, coordinating, and terminating connections between
applications.
Example: In a video conference, the session layer controls multiple data streams (video, audio)
and ensures they remain synchronized.
Function: Ensures data is in a readable format and provides encryption, compression, and
translation of data formats.
- Aspects:
> Translates data between application and network formats, handling character
encoding and conversions.
> Encrypts and decrypts data for security.
> Compresses data to reduce transmission size and time.
Example: SSL (Secure Sockets Layer) encryption for secure web browsing is handled at the
presentation layer.
- Aspects:
> Manages protocols for user applications like HTTP (web browsing), FTP (file transfer),
and SMTP (email).
> Interfaces with user applications to interpret and process data.
> Coordinates communication between applications and lower layers.
Example: Web browsers, email clients, and file-sharing programs operate at the application
layer using protocols like HTTP, FTP, and SMTP.
When data is transmitted from one device to another, it flows down the OSI layers on
the sender’s side, is transmitted across the network, and then flows up the OSI layers on the
receiver’s side. Each layer only communicates with its corresponding layer on the other device
(e.g., the transport layer of one device communicates with the transport layer of another).
> Standardization: Provides a universal reference model that guides how different technologies
and protocols interact.
> Scalability: Each layer can be developed and modified independently, promoting easier
updates and enhancements.
The OSI model is essential in network design and management, serving as a foundation
for understanding network communication, troubleshooting, and optimizing system
performance.
TCP/IP Mode
The TCP/IP model, also known as the Internet Protocol Suite, is a more practical and
simplified framework than the OSI model. Developed by the U.S. Department of Defense in the
1970s, the TCP/IP model defines the rules and standards for data exchange over the internet. It
consists of four layers (compared to the OSI model's seven layers) and focuses on ensuring
reliable data communication over different types of networks.
Function: This layer is responsible for data transfer between two devices on the same network.
It includes both physical and data link functionalities.
- Aspects:
> Defines protocols for the physical connection, framing, addressing, and managing the
transmission of raw data across physical networks.
> Manages data encapsulation into frames, MAC addressing, and error detection for
data moving within a single network.
> Common Protocols: Ethernet, Wi-Fi (IEEE 802.11), ARP (Address Resolution Protocol),
PPP (Point-to-Point Protocol).
Example: When a device connects to a local network (LAN), the Network Access layer manages
data transfer within that network.
2. Internet Layer
Function: This layer is responsible for packet forwarding, routing, and logical addressing,
allowing data to move across multiple networks.
- Aspects:
> Uses IP addressing to identify devices and routers to direct packets to their
destinations.
> Provides "best-effort" delivery, meaning it does not guarantee packet delivery
(handled by higher layers if needed).
Common Protocols:
> IP (Internet Protocol): Core protocol that assigns IP addresses and routes packets
across networks.
> ICMP (Internet Control Message Protocol): Used for error messages and diagnostics
(e.g., ping).
> IGMP (Internet Group Management Protocol): Manages multicast group
memberships.
Example: When data is sent across the internet, the Internet layer uses IP addresses to direct
packets to the correct destination.
3. Transport Layer
Function: Ensures reliable data transfer between devices and manages end-to-end
communication, error checking, and flow control.
- Aspects:
> Provides error detection, retransmission of lost packets, and segmentation of data into
manageable chunks.
> Offers two main protocols: TCP for reliable, connection-oriented communication, and
UDP for faster, connectionless communication.
Common Protocols:
> TCP (Transmission Control Protocol): Provides reliable data delivery with error-
checking, acknowledgments, and retransmission.
> UDP (User Datagram Protocol): Provides faster, connectionless data delivery for real-
time applications.
Example: When you visit a website, TCP ensures that all data packets for the web page arrive
intact and in the correct order. Conversely, a video call might use UDP to reduce latency.
4. Application Layer
Function: Interfaces directly with user applications, enabling data access and exchange across
the network.
- Aspects:
> Provides protocols and services that applications use to communicate across the
network.
> Unlike the OSI model, which separates presentation and session layers, the TCP/IP
model includes those functions within the Application layer.
> Supports protocols for web browsing, email, file transfers, and more.
Common Protocols:
> HTTP/HTTPS (Hypertext Transfer Protocol): Used for web browsing.
> FTP (File Transfer Protocol): Transfers files between systems.
> SMTP (Simple Mail Transfer Protocol): Sends emails.
> DNS (Domain Name System): Resolves domain names to IP addresses.
Example: When you access a website, the HTTP protocol handles communication between your
browser and the web server, fetching the requested pages and data.
1. Application Layer: The application initiates communication by creating data packets using a
relevant protocol (e.g., HTTP for a web page request).
2. Transport Layer: This layer segments data for reliable transmission and ensures end-to-end
connectivity (using TCP or UDP).
3. Internet Layer: The data is encapsulated into packets with IP addresses and forwarded across
networks.
4. Network Access Layer: The data is converted into electrical or radio signals, transmitted over
the physical network to reach the next device in the path.
The TCP/IP model is fundamental for the internet and modern network communication,
simplifying interoperability across different devices, networks, and systems.
Networking Devices
These devices operate within a single network, managing communication and connectivity
between devices like computers, printers, and other hardware.
1. Hub
> A basic device that connects multiple devices in a LAN (Local Area Network).
> Operates at the physical layer of the OSI model.
> Broadcasts data to all connected devices, leading to possible network congestion.
2. Switch
> An advanced version of a hub that connects multiple devices within a LAN.
> Operates at the data link layer and can also work at the network layer (for Layer 3
switches).
> Sends data only to the intended recipient device, reducing network congestion and
improving performance.
3. Bridge
> Provides wireless connectivity within a network, extending the wired network.
> Often used in Wi-Fi networks to connect wireless devices to the wired network.
> A hardware component installed on computers and other devices, enabling network
connectivity.
> Can support wired (Ethernet) or wireless (Wi-Fi) connections.
6. Repeater
Internetworking Devices
These devices connect different networks, enabling data exchange across various
networks and network types (LANs, WANs, etc.).
1. Router.
2. Gateway
> A protocol converter that connects networks using different communication protocols.
> Operates at multiple layers of the OSI model.
> Translates data formats, encryption, and protocols, enabling interoperability between
diverse networks.
3. Modem (Modulator-Demodulator)
> Converts digital data from a computer to analog signals for transmission over
telephone lines, and vice versa.
> Essential for connecting a network to the internet through DSL or cable lines.
> Operates at the data link layer.
4. Firewall
> Provides network security by monitoring and controlling incoming and outgoing
traffic based on security rules.
> Operates at various OSI layers (network to application).
> Protects a network from unauthorized access, ensuring secure data transmission.
5. Multilayer Switch
> Combines the functionality of a switch and router, operating at both the data link and
network layers.
> Can perform routing tasks, making it useful for larger networks.
Each device plays a specific role in ensuring efficient, secure, and reliable data exchange
across networks, whether within a single network or between multiple interconnected
networks.
1. Circuit Switching
How It Works ::
1. The network sets up a dedicated physical path for the entire duration of the
communication.
2. This path stays open and reserved for the two communicating devices until the session
ends, ensuring consistent data transfer speed and bandwidth.
3. After the communication session is complete, the path is released, making resources
available for other users.
Characteristics:
> Connection-oriented: A fixed route is established before data transfer.
> High-quality, predictable data transmission with low latency.
> Efficient for long, continuous data streams but inefficient for intermittent or bursty
data.
Examples :
> Traditional telephone networks are based on circuit switching, where each phone call
reserves a path through the network.
> Dedicated circuits in some old telecommunication infrastructure.
Advantages:
> Consistent, reliable data transfer with minimal interference.
Disadvantages:
> Inefficient use of resources, as the dedicated path cannot be used by others even when
idle.
2. Packet Switching
Definition:: Packet switching breaks down data into smaller packets and sends each
packet independently through the network. Each packet finds its own path to the destination,
and they are reassembled into the original message upon arrival.
How It Works ::
1. Data is divided into packets, with each packet containing part of the data and routing
information (such as source and destination addresses).
2. Each packet is routed independently and may take different paths to reach the
destination.
3. Once all packets arrive, they are reassembled into the original message by the receiving
device.
> Characteristics:
> Connectionless: No dedicated path is established, allowing more flexible and efficient
use of network resources.
> Packets may arrive out of order and be reassembled at the destination.
> Suitable for networks with bursty data and mixed traffic loads.
Examples :
> Internet: Most data on the internet, including emails, web browsing, and streaming,
uses packet switching.
> TCP/IP protocols, which break data into packets, are foundational to internet
communication.
Advantages:
> Efficient use of network resources, as packets from different sessions can share
network paths.
> Flexibility and scalability, making it ideal for large, complex networks.
Disadvantages:
How It Works ::
1. The entire message is transmitted as a single unit, with each message containing all
necessary addressing information.
2. The message is stored temporarily at each intermediate node in the network before being
forwarded.
3. The process continues until the message reaches the destination node.
Characteristics:
> Store-and-forward approach: Messages are temporarily held at nodes until the path to
the next node is clear.
> Ideal for networks where messages can be delayed and do not require real-time
communication.
Examples :
> Email systems use message switching, where emails are stored and forwarded by mail
servers until they reach the recipient’s server.
> Early postal telecommunication systems, where messages would be forwarded
through different post offices.
Advantages:
> No need for a dedicated path, making it efficient for networks with lower real-time
requirements.
> Reduces congestion by temporarily storing messages.
Disadvantages:
DIGITAL-TO-DIGITAL CONVERSION
Digital-to-Digital Conversion
> Unipolar Encoding: Uses only one voltage level, typically positive, with 0 represented
by zero voltage.
> Polar Encoding: Uses two voltage levels (positive and negative) to represent binary
data, with one voltage level for 1 and another for 0.
> Bipolar Encoding: Alternates between positive and negative voltages to represent 1s,
while 0s remain at zero voltage.
4. Noise Resistance: Digital signals are more resistant to noise compared to analog
signals, but encoding schemes must still handle any potential signal degradation.
1. Unipolar Encoding:.
2. Polar Encoding:
> Utilizes two voltage levels, positive for binary 1 and negative for binary 0.
Example: Non-Return-to-Zero (NRZ) encoding, which uses a constant voltage level for the
duration of each bit.
3. Bipolar Encoding:
Examples :
> AMI (Alternate Mark Inversion): A common bipolar encoding method where binary 1
alternates between positive and negative voltages, and binary 0 is represented by zero voltage.
This scheme helps maintain synchronization and reduce bandwidth requirements.
4. Manchester Encoding:
> A popular encoding that combines data and clock signals for better synchronization.
> A binary 1 is represented by a low-to-high transition, and a binary 0 by a high-to-low
transition.
> Used in Ethernet and other networking technologies due to its high synchronization
accuracy.
1. Data Encoding: The digital binary data (1s and 0s) from the source device is encoded
using one of the schemes above. For example, if Manchester encoding is used, each 1 and 0 is
mapped to specific voltage transitions.
2. Transmission: The encoded data is sent over the network medium (e.g., twisted-pair
cables in a LAN or fiber-optic cables in high-speed networks).
3. Reception and Decoding: The receiver reads the digital signals and decodes them back
into binary data, following the specific encoding scheme used by the sender.
> Ethernet: Uses Manchester encoding for synchronization and error resistance,
allowing accurate data transfer between computers in a LAN.
Digital-to-digital conversion is critical for ensuring that digital data can be reliably and
accurately transmitted within digital communication systems, providing the foundation for
data exchange in modern networking.
ANALOG TO DIGITAL CONVERSION
Analog-to-Digital Conversion
2. Quantization: Each sampled point is mapped to a discrete digital value. This process
involves rounding the analog value to the nearest value that can be represented digitally. The
number of bits used in quantization defines the resolution; more bits allow for finer detail in the
digital representation.
3. Encoding: The quantized values are encoded as binary numbers for digital processing,
storage, or transmission. These binary numbers represent the final digital form of the original
analog signal.
4. Nyquist Theorem: This theorem states that to accurately capture an analog signal, the
sampling rate must be at least twice the highest frequency present in the signal. If the sampling
rate is too low, aliasing occurs, distorting the digital representation.
5. Dynamic Range: The range between the smallest and largest values the ADC can
represent. A higher dynamic range allows the ADC to handle signals with both low and high
amplitudes accurately.
1. Sampling: The analog signal is sampled at regular intervals based on the desired sampling
rate. For example, in audio processing, a sampling rate of 44.1 kHz is standard, meaning the
signal is sampled 44,100 times per second.
2. Quantization: Each sample is rounded to the nearest available discrete digital value.
Quantization introduces a small amount of error called quantization noise, which is the
difference between the actual analog value and the quantized digital value.
3. Encoding: The quantized values are then encoded into a binary format for digital processing
or transmission. For example, a 16-bit ADC provides 2^16 (65,536) possible levels to represent
each sampled value, resulting in a more precise digital representation.
Several types of ADCs exist, each suited to different applications based on speed,
accuracy, and power requirements:
2. Flash ADC:
> Converts the analog signal to digital in a single step, using a bank of comparators.
> Very fast but requires more hardware, making it suitable for high-speed applications,
like video.
3. Delta-Sigma ADC:
> Oversamples the signal and averages out noise, yielding high-resolution results.
> Often used in audio and low-frequency applications requiring high accuracy.
> Audio Recording: Analog sound waves are captured by a microphone and then
sampled at a high rate (e.g., 44.1 kHz for CD-quality audio). Each sample is quantized and
encoded into a digital format, allowing storage, playback, and processing on digital devices.
> Medical Imaging: Analog signals from medical sensors, such as EEG or MRI, are
digitized to allow for digital analysis, enhancing accuracy in diagnosis.
> Telecommunications: Converts voice signals into digital form for transmission over
digital networks.
> Video Processing: Converts analog video signals into digital frames for editing and
playback on digital screens.
> Instrumentation and Measurement: Captures sensor data (e.g., temperature, pressure)
for digital monitoring and control systems.
TRANSMISSION MODES
Transmission Modes
1. Simplex Mode: In simplex mode, data flows in only one direction, from sender to
receiver. The receiver has no capability to send data back to the sender. This mode is often used
in scenarios where the receiver only needs to receive information, such as broadcasting.
Example: Television and radio broadcasts, where signals are sent from the station to viewers or
listeners without any response back.
2. Half-Duplex Mode: In half-duplex mode, data flows in both directions, but not
simultaneously. A device can either send or receive data at any given time, but it cannot do both
simultaneously. This mode is efficient for situations where two-way communication is needed,
but not continuously.
Example: Walkie-talkies, where each user takes turns talking and listening.
Example: Telephone conversations, where both parties can speak and listen simultaneously.
1. Simplex Mode:.
2. Half-Duplex Mode:
3. Full-Duplex Mode:
> Represents digital data by varying the amplitude of the analog signal.
> A binary 1 may be represented by a high amplitude, while a binary 0 by a low
amplitude.
> Common in low-speed, short-distance communication.
> Represents digital data by changing the frequency of the analog signal.
> For instance, binary 1 might be represented by a higher frequency, while binary 0 by a
lower frequency.
> Used in applications like fax machines and radio transmission.
The digital data from a device is encoded using one of the methods above. For example,
with FSK, each binary bit is converted to a specific frequency and transmitted over the analog
medium. At the receiver end, the analog signal is demodulated, recovering the original binary
data.
Example:
Modems use DAC to transmit digital data over analog telephone lines. When sending
data from a computer (digital) over a phone line (analog), the modem converts the binary data
into an analog signal.
Analog-to-Digital Conversion:
1. Sampling:
> The analog signal is measured at regular intervals, known as the sampling rate.
> According to the Nyquist Theorem, the sampling rate must be at least twice the
highest frequency of the analog signal to accurately capture it without aliasing.
2. Quantization:
> Each sampled point is rounded to the nearest value within a fixed range.
> Quantization introduces some error, called quantization noise, as the analog signal is
approximated to discrete digital levels.
3. Encoding:
> The quantized values are then encoded as binary numbers, allowing digital systems to
store or process the data.
> Successive Approximation ADC: A binary search method used for moderate-speed, high-
accuracy applications, such as digital audio.
> Delta-Sigma ADC: Oversamples the signal to improve accuracy, commonly used in audio and
low-frequency applications.
> Flash ADC: Provides very fast conversion by using comparators for each quantization level,
suitable for high-speed applications.
Example:
In audio recording, sound waves are captured by a microphone as an analog signal, then
sampled and quantized in real-time to create a digital representation of the sound. The digital
audio can be stored, edited, or transmitted in digital formats.
Conversions
Both DAC and ADC are fundamental in bridging the gap between the digital world of
computers and the analog world of real-life signals, enabling seamless communication across
diverse media and applications.
UNIT-3
DIGITAL COMMUNICATION BASICS
TRANSMISSION MEDIA
Transmission Media refers to the physical pathways used to transmit data between
devices in a network. It plays a crucial role in determining the speed, reliability, and cost of
communication in various systems.
Transmission media can be broadly categorized into guided media (where the signal is
confined to a physical path) and unguided media (where the signal is transmitted through air or
space). Let's break down the different types of transmission media.
Guided media involves physical transmission paths such as cables, where data signals
travel from one point to another. These are typically cables or fiber optic links that guide the
signal along specific paths.
Definition:: Consists of pairs of insulated copper wires twisted together. It is the most
common form of cabling used in communication systems.
Categories:
> Unshielded Twisted Pair (UTP): This type is commonly used in telephone systems and
local area networks (LANs). It is inexpensive and easy to install but vulnerable to interference.
> Shielded Twisted Pair (STP): Has an additional shield around the wires to protect
against electromagnetic interference, offering better performance in noisy environments.
> Applications: Used in telephone networks, Ethernet LANs, and DSL connections.
> Bandwidth: Up to 100 Mbps (for UTP) and up to 1 Gbps or more (for STP).
2. Coaxial Cable:
Definition:: A single copper wire surrounded by insulation, a metal shield, and an outer
plastic layer. This provides better shielding from external interference compared to twisted pair
cables.
> Applications: Commonly used for cable TV, broadband internet, and in some local
area networks (although fiber optics are becoming more common for new installations).
> Bandwidth: Can support speeds up to 10 Gbps, depending on the specific technology.
> Distance: Can transmit data over longer distances (several kilometers) compared to
twisted pair cables.
Definition:: Uses light to transmit data through a fiber made of glass or plastic. It offers
extremely high bandwidth and is resistant to electromagnetic interference.
> Applications: Used for high-speed internet connections, intercontinental cables, and in
environments where data must travel over long distances with minimal signal degradation.
> Bandwidth: Can support data rates from 1 Gbps to several terabits per second (Tbps),
depending on the technology.
> Distance: Can transmit data over tens to hundreds of kilometers without significant
loss in signal quality.
Unguided media, also known as wireless media, transmits signals through the air or
space, without the need for physical cables. Wireless transmission is essential in environments
where running cables is impractical or costly.
1. Radio Waves:
Definition:: Radio waves are electromagnetic waves that travel through the air and can
cover long distances. They are widely used for communication systems such as AM/FM radio,
television broadcasts, and wireless networking.
> Applications: Used for radio and TV broadcasting, cell phones, Wi-Fi, and Bluetooth.
> Range: Can cover several kilometers to thousands of kilometers, depending on power
and frequency.
2. Microwaves:
Definition:: Microwaves are high-frequency radio waves that are used for point-to-
point communication. They are typically transmitted in straight lines between two ground
stations or satellites.
> Applications: Used in satellite communication, cellular networks, and for microwave
relay links between ground stations.
> Range: Typically operates over ranges of up to 50 km, with a line-of-sight requirement
for clear transmission.
> Limitations: Microwaves require a clear line of sight between transmitting and
receiving stations and can be affected by weather conditions like rain.
3. Infrared (IR):
> Range: Typically used for very short distances (up to 10 meters).
> Limitations: Requires clear line-of-sight and can be easily blocked by obstacles.
4. Satellite Communication:
Definition:: Satellites in geostationary or low Earth orbits can receive and transmit data
across vast distances. Satellite communication uses both microwaves and radio waves to link
ground stations with satellites.
> Applications: Used for GPS systems, satellite TV, global communication, and internet
access in remote areas.
> Efficiency: Choosing the right transmission media impacts the speed and quality of
communication. For example, fiber optics provide the highest data transfer rates and long-
distance transmission with minimal loss.
> Cost: Wired media such as twisted pair cables and coaxial cables are less expensive but
might not offer high speeds over long distances, while wireless media like satellites and
microwaves enable global coverage but can be costly to set up.
> Reliability: Guided media are less susceptible to environmental interference compared
to unguided media, which can be affected by weather, interference, and physical obstructions.
Understanding the different types of transmission media and their applications allows
for the selection of the most appropriate medium based on the specific needs of a
communication system, balancing speed, distance, cost, and reliability.
Sources of Signal Impairment refer to factors that can degrade the quality of a signal as it
travels through a transmission medium. These impairments can cause signal distortion, loss of
data, or reduced communication quality. Signal impairments affect both analog and digital
signals and are crucial considerations in designing communication systems, networks, and
channels.
1. Attenuation
> Cause: As the signal propagates, part of its energy is lost due to the resistance of the
medium, absorption by the medium, and scattering.
> Impact: Attenuation results in weaker signals, which can make it difficult to decode
the information correctly at the receiving end.
Example: In a long-distance telephone call, the signal strength may diminish as it travels
through the copper wires, requiring amplifiers or repeaters to boost the signal.
2. Noise
Definition:: Noise refers to unwanted electrical signals that interfere with the
transmission of the original signal.
Types of Noise:
> Thermal Noise (Johnson-Nyquist Noise): Caused by the random motion of electrons in a
conductor due to temperature.
> Intermodulation Noise: Occurs when signals at different frequencies mix and produce
additional unwanted frequencies.
> Cross-talk: Happens when signals from adjacent channels leak into each other, causing
interference.
> Impulse Noise: Short bursts of interference, usually caused by sudden electrical
disturbances, such as lightning strikes or switching equipment.
> Shot Noise: Caused by the discrete nature of current flow in semiconductors.
> Impact: Noise distorts the original signal, making it harder to interpret the data correctly at
the receiver.
Example: A radio station might experience interference from electrical equipment, leading to
static or distortion in the broadcast.
3. Distortion
Definition:: Distortion occurs when the shape or characteristics of the signal are altered
during transmission.
> Cause: Distortion can be caused by various factors such as the frequency response of the
transmission medium, the varying delay of different frequencies, or the presence of non-
linearities in the system.
Types of Distortion:
> Amplitude Distortion: Occurs when different frequencies in the signal are amplified
differently.
> Phase Distortion: Happens when different frequencies experience delays, causing shifts in
the phase of the signal.
> Impact: Distortion changes the signal in such a way that the original message may no longer
be recognizable or decipherable.
Example: In a telephone call, distortion might occur if higher frequencies are lost or altered due
to limitations of the network, making speech sound unnatural or unclear.
4. Delay
Definition:: Delay refers to the time it takes for a signal to travel from the sender to the
receiver.
Types of Delay:
> Propagation Delay: Time taken for the signal to travel through the transmission medium.
> Processing Delay: Time spent processing the signal at routers, switches, or other network
devices.
> Queuing Delay: Time spent in buffers or queues before the signal can be transmitted.
> Transmission Delay: Time taken to push the signal's bits onto the transmission medium.
> Impact: Delay can introduce latency in communication, which is particularly problematic in
real-time applications like video conferencing, online gaming, or VoIP calls.
Example: In satellite communication, the round-trip signal delay can be several hundred
milliseconds due to the long distance the signal travels.
5. Interference
Definition:: Interference occurs when unwanted signals from other sources mix with the
original signal, degrading the signal quality.
Types of Interference:
> Electromagnetic Interference (EMI): Results from the electromagnetic radiation from
electrical equipment or power lines.
> Radio Frequency Interference (RFI): Caused by other radio frequency signals that interfere
with the communication signal, often seen in wireless communication systems.
> Impact: Interference can cause a loss of data integrity, poor signal reception, and even
complete communication breakdowns.
Example: A Wi-Fi signal can experience interference from nearby microwave ovens, cordless
phones, or other Wi-Fi networks operating on the same frequency band.
6. Fading
Definition:: Fading refers to the variation in signal strength over time, particularly in
wireless communications.
> Cause: Fading is caused by the scattering, diffraction, and reflection of radio waves as they
travel through the air, which leads to constructive and destructive interference.
Types of Fading:
> Rayleigh Fading: Occurs when there are multiple indirect paths for the signal, leading to
constructive and destructive interference.
> Flat Fading: Occurs when all the frequency components of the signal fade similarly.
> Selective Fading: Occurs when different frequency components of the signal fade differently.
> Impact: Fading can result in poor signal quality, dropped connections, or data loss, especially
in mobile communication systems.
Example: A mobile phone call might experience poor reception when the user is moving
through areas with many obstacles, such as tunnels or crowded urban areas.
7. Attenuation Distortion
Definition:: Attenuation distortion occurs when the signal experiences different levels
of attenuation across different frequencies, leading to the distortion of the signal's waveform.
> Cause: It typically happens due to the characteristics of the transmission medium, where
higher frequencies are more attenuated than lower frequencies.
> Impact: The distortion can affect the integrity of the transmitted signal, especially in high-
frequency communication systems.
Example: In a long-distance fiber-optic link, higher frequency signals may experience greater
attenuation, leading to signal degradation over time.
Impairments:
ASYNCHRONOUS TRANSMISSION
Definition::
Asynchronous transmission is a type of data transmission where the data is sent without
a clock signal, meaning that each character is transmitted independently. Each character or byte
is preceded by a start bit and followed by one or more stop bits. The start bit signals the
beginning of the transmission, and the stop bit(s) signal the end.
In this method, the sender and receiver do not need to be synchronized continuously,
but they must be in sync at the start of the transmission of each byte.
How It Works ::
> Start Bit: Every data byte in asynchronous transmission begins with a start bit. This bit
is used to notify the receiver that the next bits are part of the data stream.
> Data Bits: These are the actual bits of the byte being transmitted. Typically, 7 or 8 bits
are used to represent one character (e.g., an ASCII character).
> Stop Bit: After the data bits, one or more stop bits are transmitted. These bits indicate
the end of the byte and allow the receiver to prepare for the next byte. The stop bit ensures the
receiver can correctly separate the characters.
> No Continuous Clock: Unlike synchronous transmission, where the sender and
receiver are continuously synchronized using a clock signal, asynchronous transmission only
synchronizes at the beginning of each byte. The receiver must have a timing mechanism to
correctly interpret the incoming data.
> Start and Stop Bits: Each transmitted byte is framed with a start bit and stop bit(s) to
mark its boundaries.
> Irregular Timing: Data is transmitted at irregular intervals, so there is no need for a
continuous clock. The start bit alerts the receiver when a new byte is arriving.
> Low Overhead: Since synchronization occurs only at the start of each byte, this
method requires less overhead and is simpler to implement compared to synchronous
transmission.
Error Checking: Some implementations use additional bits, such as parity bits, for error
checking.
> Simple to Implement: Asynchronous transmission requires minimal synchronization and can
be easily implemented in simple communication systems.
> Efficient for Short Transmissions: Ideal for systems where small amounts of data are sent
intermittently, such as in keyboard inputs, serial communication, or modem connections.
> Low Cost: Due to the absence of continuous clocking, this transmission method is cost-
effective and commonly used in applications like low-speed data transfer.
> Inefficiency for Large Data: It is not efficient for sending large amounts of data because each
byte has additional overhead due to the start and stop bits.
> Lack of Synchronization: Since each byte is transmitted independently, the absence of
synchronization may cause issues if large volumes of data need to be transmitted quickly or
without delay.
> Increased Overhead: The additional start and stop bits increase the total size of the data being
transmitted, reducing the effective data rate.
Examples of Asynchronous Transmission:
> Modems: Early dial-up modems used asynchronous transmission to send data in small,
discrete chunks of information, allowing data to be transmitted over telephone lines.
> Keyboard Inputs: When typing on a computer keyboard, each key press is transmitted as a
separate byte using asynchronous transmission. The start and stop bits frame each keypress's
data.
Examples:
> Data Acquisition Systems: Many remote data collection systems use asynchronous
transmission to send data in small packets to a central monitoring system.
> Data Bits (10110110) are the actual data being sent.
Summary:
Synchronous Transmission
Synchronous transmission is a data transfer method where the sender and receiver are
synchronized using a clock signal. This ensures that data is sent and received at a constant rate,
with each bit or block of data aligned to the same time intervals. Unlike asynchronous
transmission, which transmits one byte at a time with start and stop bits, synchronous
transmission sends large blocks (or frames) of data continuously, allowing for faster and more
efficient data transfer.
> Clock Synchronization: The sender and receiver share a common clock signal,
meaning both know when a bit begins and ends.
> Efficient for Large Data: Because it uses synchronized clocks, there’s no need for
additional bits like start and stop bits, making it more efficient than asynchronous transmission
for large data volumes.
> Continuous Data Flow: Data is transmitted in continuous streams (frames) of bits,
which reduces delays.
Examples:
> Ethernet: Ethernet networks use synchronous transmission to transfer data packets at
high speeds.
> HDLC (High-Level Data Link Control): A protocol used for synchronous data
communication over serial links.
Error detection methods are used to ensure that data transmitted over a network is
received accurately. These methods involve adding redundant bits to the data so that the
receiver can check for errors.
> Parity Bit: A single bit added to the data to indicate whether the number of bits set to 1
in the data is odd or even. A parity bit helps detect errors in the data stream.
> Even Parity: The number of 1s in the data plus the parity bit must be even.
> Odd Parity: The number of 1s in the data plus the parity bit must be odd.
> Checksums: A value derived from the data that is used to check for errors during
transmission. The checksum is calculated at the sender’s side, and the receiver performs the
same calculation to verify data integrity.
> Cyclic Redundancy Check (CRC): A more complex error-detection method than a
simple checksum. It uses polynomial division to check for errors in data. CRC is commonly
used in Ethernet and storage devices to detect changes to raw data.
> Hamming Code: A method that adds multiple parity bits at specific positions in the
data to allow for the detection and correction of single-bit errors.
Example:
> Ethernet networks use CRC to detect errors in the data transmission.
Protocol Basics
A protocol in networking is a set of rules and conventions that determine how data is
transmitted across a network. Protocols define how the sender and receiver of data interact,
ensuring that data is exchanged reliably and securely.
Components of Protocols:
Syntax:- Defines the structure of the data or message format (e.g., headers, message body).
> Semantics: Defines the meaning or interpretation of the bits in the message (e.g., what
the fields in the header represent).
> Timing: Defines when data can be sent and how to handle synchronization between
the sender and receiver.
Common Protocols:
> HTTP (Hypertext Transfer Protocol): Used for transferring web pages on the internet.
> TCP (Transmission Control Protocol): A connection-oriented protocol used for reliable
data transmission.
> FTP (File Transfer Protocol): Used for transferring files over the internet.
Examples:
> TCP/IP: A suite of protocols used in internet communications. TCP ensures reliable
delivery, while IP handles the addressing and routing of data.
> SMTP (Simple Mail Transfer Protocol): A protocol used for sending emails over the
internet.
These are the foundational concepts related to synchronous transmission, error detection
methods, and protocols that are essential for understanding network communications. Let me
know if you'd like more details on any of the topics!
UNIT-4
TRANSPORT LAYER
The Transport Layer is the fourth layer in the OSI (Open Systems Interconnection)
model. It plays a critical role in providing reliable data transfer services between two devices on
a network, ensuring that data is delivered accurately, completely, and in the correct sequence.
This layer acts as an intermediary between the application layer (layer 7) and the
network layer (layer 3), facilitating communication between applications and managing the
data's flow.
The transport layer is responsible for end-to-end communication and data integrity. It
segments data from the application layer, controls data flow, and ensures error correction
during transmission.
2. UDP (User Datagram Protocol): A connectionless protocol that provides faster, but
less reliable, communication. It is ideal for applications where speed is prioritized over
reliability, like video streaming or online gaming.
The transport layer offers a range of essential services to applications, enabling smooth
and efficient data transfer. Here are the primary services provided by this layer:
> For protocols like TCP, the transport layer establishes a connection between the sender
and receiver through a process called the three-way handshake. This process synchronizes both
devices and ensures that they are ready to send and receive data.
> After data transfer is complete, the connection is terminated, freeing up resources.
Connection management is essential for ensuring that communication is controlled and
resources are allocated efficiently.
2. Reliability and Error Control:
> The transport layer ensures that all data is delivered accurately and in the correct
sequence. For protocols like TCP, it implements error detection and retransmission mechanisms
to recover lost or corrupted data.
> When errors are detected (e.g., through checksums), the transport layer can request
retransmission, ensuring that the receiving application gets the complete data accurately.
> Data from applications is often too large to be sent as a single packet. The transport
layer splits (or segments) data into smaller packets for transmission.
> At the receiving end, the transport layer reassembles these segments in the correct
order, ensuring the original message is reconstructed accurately before being passed to the
application layer.
4. Flow Control:
> Flow control is necessary to prevent the sender from overwhelming the receiver with
data at a faster rate than it can process. The transport layer uses flow control mechanisms to
regulate the rate of data transmission.
> In TCP, flow control is managed by windowing, where the sender is permitted to send
only a certain amount of data (known as the window size) before waiting for an
acknowledgment from the receiver.
5. Congestion Control:
> The transport layer monitors network congestion and adjusts the data transmission
rate to prevent congestion collapse. This is particularly important in TCP, which uses
algorithms like Additive Increase/Multiplicative Decrease (AIMD) to control the amount of
data sent.
> Congestion control ensures the network remains stable and can efficiently handle data
traffic without excessive delays or packet loss.
> The transport layer allows multiple applications to use the network simultaneously by
assigning unique port numbers to each application.
> Multiplexing enables the transport layer to handle multiple communication sessions
from different applications on a single device. Demultiplexing ensures that data packets are
directed to the correct application based on the port number, allowing multiple applications to
receive their data independently.
> By controlling parameters such as delay, jitter, and throughput, QoS ensures that high-
priority applications receive the necessary bandwidth and response times.
> TCP (Transmission Control Protocol): Used for applications that require reliable data transfer,
such as web browsing (HTTP), email (SMTP), and file transfers (FTP). TCP provides error
correction, data sequencing, and flow control.
> UDP (User Datagram Protocol): Used for applications that prioritize speed over reliability,
like DNS queries, VoIP, online gaming, and video streaming. UDP does not provide connection-
oriented services, making it faster but less reliable.
It abstracts the complexity of data transfer from the application layer, allowing
developers to build applications without dealing with low-level networking details. This layer's
services enable essential internet applications, making it foundational to the functionality of the
internet and local network communications.
Multiplexing and Demultiplexing are core functions of the transport layer in network
communications. They enable efficient and simultaneous data transfer between multiple
applications or services on the same device, allowing different types of data (such as web traffic,
emails, and streaming media) to be sent and received without interference.
1. Multiplexing
> Each application or service on a device is assigned a unique port number. Port
numbers help identify different applications and services, enabling the transport layer to
differentiate and manage them.
> When an application wants to send data, it passes the data to the transport layer along
with its port number.
> The transport layer adds a header to each data packet, containing information such as
the source and destination IP addresses and port numbers.
> These packets are then multiplexed, or combined, and sent over the network. The
unique port numbers help the transport layer keep track of which data packet belongs to which
application.
Example:
Suppose you are browsing the web (port 80), checking email (port 25), and streaming a
video (port 1935) simultaneously on your device. Multiplexing allows these activities to share
the same network connection without waiting for one activity to complete before starting
another.
2. Demultiplexing
> When data packets reach the destination device, the transport layer reads the port
number in each packet header.
> Based on the port number, the transport layer identifies which application or service
should receive the data.
> The packets are then directed (demultiplexed) to the correct application on the
receiving device, where they can be processed by the intended software.
Example:
If you receive data on your device intended for multiple applications (e.g., video
streaming and file download), demultiplexing allows the transport layer to deliver each packet
to the correct application based on its port number.
Port numbers are essential for the process of multiplexing and demultiplexing. These
numbers identify the sending and receiving applications and allow the transport layer to
manage multiple connections simultaneously.
Port numbers are typically well-known (or standardized) for common applications. For
Example:
> HTTP uses port 80.
> Efficient Resource Use: Allows multiple applications to share a single network
connection, maximizing bandwidth use.
> Error Management: Helps manage and separate traffic, reducing the chance of data
being delivered to the wrong application.
> Application Support: Provides a robust way to run multiple applications (web
browsing, email, streaming) over the same network simultaneously.
UDP is a transport layer protocol that provides a fast, connectionless method to send
data across networks. It sacrifices reliability for speed, making it suitable for applications where
low latency is critical and occasional data loss is acceptable.
> No Handshake Process: Unlike TCP, UDP doesn’t establish a connection before
sending data, which means it skips the three-way handshake, reducing delay.
> Stateless Communication: UDP doesn’t keep track of sent or received data, meaning
there’s no way to confirm delivery, which can result in data loss without any notification to the
sender.
> Minimal Header Overhead: UDP headers are lightweight (8 bytes) and contain only
essential fields (source port, destination port, length, checksum), enabling faster data
transmission.
In UDP, data packets called datagrams are sent individually and independently, without
connection. Each datagram contains source and destination ports that help direct it to the
appropriate application on the receiving end. If any datagram is lost, it won’t be retransmitted,
as there’s no tracking of packet sequence.
> Live Streaming and VoIP: For real-time applications, UDP is preferred because it
minimizes latency; a minor packet loss is often unnoticeable in live audio/video.
> Online Gaming: Real-time gaming requires low latency. A few missed packets in
games are acceptable since UDP allows rapid data exchange, providing a smoother gaming
experience.
Reliable data transfer is about ensuring data packets arrive complete, uncorrupted, and
in the correct order. Protocols like TCP employ a variety of mechanisms to achieve reliability.
Core Principles:
> Error Detection: To ensure data integrity, techniques like checksums verify data for errors
during transmission. If the checksum values don’t match at the destination, the packet is
flagged as erroneous.
> Acknowledgments and Retransmissions: Receivers send back acknowledgments (ACKs) for
each packet received. If the sender doesn’t receive an ACK within a certain time (timeout), it
retransmits the packet, assuming it’s lost or corrupted.
> Sequencing and Reordering: Packets are assigned sequence numbers to ensure they’re
reassembled in the correct order. Out-of-order packets can be re-sequenced at the receiver end.
> Flow Control: Flow control prevents the sender from overwhelming the receiver by adjusting
the sender’s rate based on feedback. This avoids buffer overflow and ensures smooth data
delivery.
> TCP in Web Browsing: When loading a webpage, each element (images, scripts) must arrive
correctly and in the right order for the page to render properly. TCP’s reliable transfer ensures
this.
> Email Delivery (SMTP): Email requires complete data delivery for accuracy. Missing or
corrupt packets could change the email's contents, so protocols like TCP and SMTP rely on
reliable data transfer principles.
TCP establishes a connection between sender and receiver before data transfer,
providing a reliable, ordered stream of data. This makes it ideal for applications requiring
accuracy and data integrity.
2. Reliable Transmission and Sequencing: Data is sent in packets, each with a sequence
number, allowing the receiver to reorder packets if they arrive out of order.
3. Flow Control with Sliding Window: The sliding window protocol allows multiple
packets to be sent before waiting for an acknowledgment, adjusting the window size based on
network conditions.
> HTTP/HTTPS: Web browsing relies on TCP to load complete and correct webpages.
Without TCP, elements might load out of order, affecting page functionality.
> File Transfer Protocol (FTP): In file transfer, data integrity is crucial. TCP ensures that
files are transferred without corruption or missing parts, making it suitable for FTP.
Congestion control maintains network stability by adjusting the sender’s data rate to
prevent overloading the network, especially during high traffic.
> Slow Start: Initially, TCP sends data slowly, doubling the sending rate with each
acknowledgment received. This helps find the network’s capacity without causing congestion.
> Congestion Avoidance: Once a threshold is reached, the increase rate slows, growing linearly
rather than exponentially. This prevents congestion by gradually adjusting the send rate.
> Fast Retransmit and Recovery: When duplicate ACKs indicate a lost packet, TCP quickly
retransmits it and reduces the sending rate to avoid further loss.
> Additive Increase, Multiplicative Decrease (AIMD): AIMD increases the transmission rate by
a small increment but cuts it down significantly when congestion is detected. This balance helps
the network operate efficiently without overloading it.
Example:
> Feedback Mechanism: ABR uses a feedback-based congestion control where network
devices communicate congestion status to the sender. This feedback allows the sender to adjust
its rate.
> RM (Resource Management) Cells: Special cells in ATM networks carry congestion
information to senders, allowing them to adapt their data rate according to network load.
> Explicit Congestion Notification (ECN): The network marks RM cells to indicate
congestion, prompting the sender to slow down. This adaptive approach minimizes congestion
risk while allowing efficient data transfer.
Example:
ATM ABR is commonly used in broadband and multimedia applications where high-
quality service is required, but variable bandwidth can be tolerated, like video-on-demand
services.
> Slow Start: Initially, TCP sets a low transmission rate and gradually increases it to test the
available network capacity. As it receives positive feedback (ACKs), it ramps up the rate
exponentially.
> Congestion Avoidance: After slow start reaches a certain threshold, TCP shifts to a slower
growth rate to avoid overwhelming the network.
> Fast Retransmit and Fast Recovery: If a packet is presumed lost (indicated by multiple
duplicate ACKs), TCP resends the packet without waiting for a timeout and cuts the sending
rate. Fast recovery then gradually increases the rate again to stabilize data flow.
> AIMD: TCP’s AIMD approach balances bandwidth usage. After detecting congestion, TCP
multiplicatively decreases the transmission rate, and then additively increases it as congestion
reduces, balancing efficiency and stability.
Example:
For large file downloads, TCP congestion control helps prevent network bottlenecks by
adjusting the sending rate based on congestion, ensuring a steady data flow without
overwhelming any network path.
Example Applications DNS, VoIP, live gaming Web browsing, email, FTP
UNIT - V
DATA LINK LAYER AND WIRELESS NETWORKS
The Data Link Layer plays a critical role in preparing data for transmission and handling
error-free communication across physical links. It consists of two sub-layers:
> Logical Link Control (LLC): Manages flow and error control, and multiplexes multiple
network layer protocols.
> Media Access Control (MAC): Controls how devices access the physical transmission medium
and manage collision control.
Detailed Functions:
> Framing: Frames are units of data transfer at this layer. Each frame is wrapped with
headers (which may include MAC addresses) and trailers (often containing error-checking
information). This encapsulation allows each frame to be recognized and processed
independently.
> Addressing: The Data Link Layer uses MAC addresses that are unique to each device.
These 48-bit addresses (in hexadecimal) allow direct communication between devices on the
same network segment.
> Error Detection and Correction: This layer implements error-checking algorithms, allowing
corrupted frames to be detected (and sometimes corrected) before reaching the higher layers.
> Flow Control and Reliability: Flow control ensures the sender transmits data at a rate
the receiver can handle, avoiding buffer overflow. The Sliding Window Protocol is a core flow
control mechanism that keeps track of unacknowledged frames and regulates the sender’s
transmission rate.
> Vertical Redundancy Check (VRC): VRC, or parity checking, appends a bit to data
(even or odd) to make the count of 1s match a specified parity.
> Limitation: Effective for single-bit errors but weak against burst errors.
> Real-World Use: Used in early computer systems for parity-based error detection in
data storage and transmission.
> Longitudinal Redundancy Check (LRC): Extends VRC by adding parity across
multiple rows of data. This "block parity" increases error detection strength, especially for burst
errors (consecutive erroneous bits).
> Example:: Useful in magnetic tape storage and early data storage methods, where LRC
could identify entire lines of errors.
> Cyclic Redundancy Check (CRC): CRC generates a check value for each data block. On
the receiving end, the same algorithm verifies the integrity.
> Technical Insight: CRC is calculated using polynomial division on data bits. The
divisor (generator polynomial) determines error detection strength.
> Common Uses: Widely used in Ethernet, USB, and storage devices to ensure data
block integrity.
> Checksum: Adds all bits in data to create a sum (checksum), verifying data integrity
by comparing this value after transmission.
> Applications: Found in the Internet Protocol (IP) layer and transport protocols like
TCP and UDP to verify packet integrity.
Error correction improves data reliability by detecting and fixing errors without
retransmission.
> Hamming Code: Adds redundant bits at calculated positions within the data to
identify and correct errors in transmission.
> Technical Mechanism: The number and placement of bits are determined by
Hamming distance. For example, Hamming (7,4) adds three bits to a 4-bit data word, enabling
single-bit error correction.
> Applications: Often used in RAM and storage devices for correcting single-bit errors
without needing data retransmission.
Reliable Transmission
Reliable transmission methods ensure data integrity in environments where errors are
common or transmission rates vary.
Example: TCP uses a sliding window for efficient, reliable data transmission across
variable-speed networks.
> Stop-and-Wait Protocol: Sends a frame and waits for an acknowledgment before
proceeding, ensuring each frame is successfully received. However, it’s slow and inefficient in
high-latency networks.
> Automatic Repeat reQuest (ARQ): Resends data when errors are detected. Types:
> Go-Back-N ARQ: Resends all frames starting from the error point.
Token Bus and Token Ring ensure that only one device can transmit at a time,
minimizing data collisions.
Token Bus: Devices are connected logically in a bus structure, passing a token to grant
transmission access.
Token Ring: Devices are connected in a physical or logical ring, with the token
circulating to prevent collisions.
Application: Previously used by IBM in office networks for controlled and collision-free
access.
These methods manage how devices on a shared network medium gain access and
avoid collisions.
TDMA (Time Division Multiple Access): Allocates a specific time slot for each device’s
transmission. Each device transmits only in its assigned slot.
> FDMA (Frequency Division Multiple Access): Assigns each device a unique frequency
within the channel to allow simultaneous data flow.
> Example:: Used in traditional radio systems and analog cellular networks.
> CDMA (Code Division Multiple Access): Each device is assigned a unique code,
allowing simultaneous data transmission over the same frequency by differentiating data using
the codes.
> Application: Used in 3G and some 4G networks for enhanced security and efficient
channel usage.
Aloha Variants:
> Pure Aloha: Allows devices to transmit whenever ready, but collisions are high due to
lack of timing control.
> Slotted Aloha: Introduces time slots, reducing collisions and improving network
efficiency.
> CSMA/CA: Used in WiFi, this method checks for free channels and avoids collisions
through backoff timers.
> CSMA/CD: Previously used in Ethernet, this method detects collisions and has
devices pause and retry after a random backoff time.
Wireless Networks
Wireless networks rely on radio frequencies for data transfer and offer flexibility for
diverse applications.
WiFi (IEEE 802.11): Provides high-speed wireless LAN access. WiFi protocols
(802.11a/b/g/n/ac) enhance speed, range, and reliability.
> Application: Homes, offices, and public spaces for LAN connectivity.
Application: WiMAX has been adopted in countries needing last-mile broadband access
in remote areas.
MANET (Mobile Ad Hoc Network): A network of mobile devices with no central infrastructure.
Devices communicate in a self-organizing manner.
> Example:: Used in military, emergency relief, and sensor networks where
infrastructure is unavailable.
> VANET (Vehicular Ad Hoc Network): A type of MANET designed for vehicle
communication, supporting vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2I)
connectivity.
> Application: Intelligent Transportation Systems (ITS) for traffic management, collision
prevention, and autonomous driving.
> WSN (Wireless Sensor Network): A network of spatially distributed sensors that
collect and transmit data about environmental conditions.
> Application: Used in agriculture (soil and weather monitoring), healthcare (patient
monitoring), and industrial monitoring.
-: DOCUMENT BY :-
Expert’s in
Web & Mobile app development
Contact us : +91 7729034772