Short note on CN
Short note on CN
Data communication involves transmitting data between two or more devices through a
transmission medium. The data can be represented in various formats, such as:
Flow of Data:
2. Networks
Networks are collections of interconnected devices that share resources and exchange
information.
• Types of Networks:
o LAN (Local Area Network): Covers a small geographical area like a
building.
o MAN (Metropolitan Area Network): Covers a city or campus.
o WAN (Wide Area Network): Covers large geographical areas like countries.
o PAN (Personal Area Network): Covers short distances, typically for personal
devices.
• Bus Topology: All devices share a single communication line; cheap but not fault-
tolerant.
• Star Topology: Devices connect to a central hub; easy to manage but hub-dependent.
• Ring Topology: Devices connect in a closed-loop; data flows in one or both
directions.
• Mesh Topology: Every device is interconnected; robust but expensive.
• Hybrid Topology: Combines two or more topologies for flexibility.
Protocols: Set of rules governing data communication (e.g., TCP/IP, HTTP, FTP, SMTP).
Standards: Established guidelines for hardware and software interoperability (e.g., IEEE,
ISO).
6. Transmission Media
• Wired:
o Twisted Pair Cable: Shielded (STP) or unshielded (UTP).
o Coaxial Cable: Used in older networks.
o Fiber Optic Cable: High-speed, long-distance communication.
• Wireless:
o Radio Waves: Long-distance communication.
o Microwaves: Line-of-sight communication.
o Infrared: Short-distance communication.
o Satellite: Global communication.
7. LAN
• Wired LAN: Uses Ethernet cables and switches; stable and fast.
• Wireless LAN (WLAN): Uses Wi-Fi (IEEE 802.11 standards); more flexible but less
secure.
• Connecting LANs: Through routers, switches, and bridges.
• Virtual LAN (VLAN): Logically segments networks within a single physical LAN.
8. Techniques for Bandwidth Utilization
• Multiplexing:
o Frequency Division Multiplexing (FDM): Divides bandwidth into frequency
bands.
o Time Division Multiplexing (TDM): Allocates time slots for devices.
o Wave Division Multiplexing (WDM): Uses different wavelengths for
transmitting signals (commonly used in fiber optics).
• Spread Spectrum:
o Frequency Hopping Spread Spectrum (FHSS): Rapid switching of
frequencies.
o Direct Sequence Spread Spectrum (DSSS): Spreads signal over a wide
frequency band for better resistance to interference.
Spread spectrum techniques are used to enhance the reliability and security of data
communication, especially in wireless networks. These methods spread the signal over a
wider frequency range than the minimum required bandwidth.
Efficient bandwidth utilization is crucial to optimize network performance and ensure the
quality of service (QoS).
Multiplexing in Detail:
The Data Link Layer (DLL) is the second layer in the OSI model, responsible for reliable
data transfer across a physical link. It provides error detection, error correction, framing, and
medium access control to ensure smooth communication between devices.
The Medium Access Sub-Layer (a subset of the DLL) focuses on controlling how devices
share a common communication medium efficiently, avoiding collisions, and maximizing
throughput.
Errors can occur during data transmission due to noise, attenuation, or interference. The Data
Link Layer ensures reliable communication by employing error detection and error
correction techniques.
Error Detection
1. Block Coding:
o Data is divided into blocks, and redundancy is added to each block.
o Common examples:
▪ Parity Bits: Add a single bit to ensure the total number of 1s is even
(even parity) or odd (odd parity).
▪ Checksums: Sum of all data blocks, verified at the receiver.
2. Hamming Distance:
o Measures the number of bit changes required to convert one binary string to
another.
o Used to determine error-detection and correction capability:
▪ Minimum Hamming Distance = dmind_{min}
▪ Error detection = dmin−1d_{min} - 1
▪ Error correction = dmin−12\frac{d_{min} - 1}{2}
3. Cyclic Redundancy Check (CRC):
o A powerful method for error detection.
o Transmitter divides data by a predefined polynomial (generator) and appends
the remainder as a CRC code.
o Receiver performs the same division; if the remainder is zero, data is error-
free.
Error Correction
Flow control prevents the sender from overwhelming the receiver with data.
1. Stop-and-Wait Protocol:
o Sender transmits one frame at a time and waits for an ACK before sending the
next frame.
o Simple but inefficient, as the link remains idle during waiting time.
2. Sliding Window Protocol:
o Sender can transmit multiple frames before requiring an ACK, determined by
the window size.
o Two types:
▪ Go-Back-N: Sender retransmits from the error point.
▪ Selective Repeat: Only the erroneous frames are retransmitted.
3. Piggybacking:
o Combines data and acknowledgment frames, reducing the number of
transmissions and improving efficiency.
In random access, no prior coordination exists between devices; they transmit based on rules
to minimize collisions.
1. Pure ALOHA:
o Devices transmit whenever data is ready.
o Collisions occur when multiple devices transmit simultaneously.
o Efficiency: 18.4% (maximum throughput).
2. Slotted ALOHA:
o Time is divided into slots, and devices transmit at the beginning of a slot.
o Reduces collisions compared to Pure ALOHA.
o Efficiency: 36.8% (maximum throughput).
3. Carrier Sense Multiple Access (CSMA):
o Devices sense the medium before transmitting to avoid collisions.
o Variants:
▪ CSMA/CD (Collision Detection): Stops transmission when a collision
is detected (used in Ethernet).
▪ CSMA/CA (Collision Avoidance): Uses mechanisms like
acknowledgments and backoff times to avoid collisions (used in Wi-
Fi).
These protocols allow multiple devices to share the communication medium efficiently.
4. Performance Analysis
• Stop-and-Wait:
o Simple, but low efficiency due to idle time.
• Go-Back-N:
o Higher throughput but wastes bandwidth for retransmissions.
• Selective Repeat:
o Efficient in bandwidth utilization, especially in high-error environments.
• CSMA/CD vs. CSMA/CA:
o CSMA/CD is suitable for wired networks, while CSMA/CA is preferred for
wireless networks where collision detection is challenging.
The Network Layer is the third layer in the OSI model, responsible for enabling the transfer
of data packets between devices across different networks. Its primary functions include
switching, logical addressing, routing, and address mapping.
1. Switching
Switching refers to the process of forwarding data packets between devices within or across
networks. The three main types of switching are:
2. Logical Addressing
• Address Format: 32-bit address divided into four octets (e.g., 192.168.1.1).
• Classes:
o Class A: Large networks (1.0.0.0 – 126.255.255.255).
o Class B: Medium networks (128.0.0.0 – 191.255.255.255).
o Class C: Small networks (192.0.0.0 – 223.255.255.255).
o Class D: Multicasting (224.0.0.0 – 239.255.255.255).
o Class E: Reserved (240.0.0.0 – 255.255.255.255).
• Limitations: Limited address space, no built-in security, and inefficient routing.
3. Address Mapping
Address mapping translates between different types of addresses (e.g., logical to physical).
• Automates the assignment of IP addresses, subnet masks, default gateways, and other
configuration details.
• Offers dynamic and static configurations.
• Key messages:
o Discover: Client broadcasts to locate a DHCP server.
o Offer: Server responds with an available IP address.
o Request: Client requests the offered IP address.
o Acknowledgment (ACK): Server assigns the IP and confirms the lease.
4.1 Delivery
Delivery refers to the process of transferring packets to their correct destination. Types
include:
• Direct Delivery: The source and destination are on the same network.
• Indirect Delivery: The source and destination are on different networks, requiring
routing through intermediate devices.
4.2 Forwarding
Forwarding is the process of determining the next hop for a packet based on the routing table.
It involves:
• Routing Table: Contains information about destination networks and next hops.
• Longest Prefix Match: Used to match the destination IP address to the most specific
route.
4.3 Routing
Routing is the process of determining the best path for a packet to travel from source to
destination.
Unicast routing protocols are responsible for routing packets to a single destination.
• Routers exchange information about the state of their links to build a complete map of
the network.
• Example: OSPF (Open Shortest Path First).
• Features: Fast convergence, supports large networks, and uses Dijkstra's algorithm.
The Transport Layer is the fourth layer in the OSI model, responsible for reliable process-
to-process communication, ensuring data integrity, delivery, and flow control between
applications. It provides essential services like connection establishment, error recovery, and
congestion control, and supports both reliable and unreliable data transfer protocols.
1. Process-to-Process Communication
• Characteristics:
o Connectionless protocol.
o Does not guarantee delivery, order, or error correction.
o Lightweight and faster compared to TCP.
• Features:
o Low overhead.
o Suitable for time-sensitive applications like video streaming, VoIP, and DNS.
• Header Structure:
o Includes source port, destination port, length, and checksum.
• Characteristics:
o Connection-oriented protocol.
o Guarantees reliable, ordered, and error-checked delivery of data.
o Uses a handshake mechanism for connection establishment.
• Features:
o Segmentation: Divides data into smaller packets.
o Acknowledgment (ACK): Confirms successful data delivery.
o Flow Control: Adjusts the sender’s rate to match the receiver’s capacity.
o Error Detection: Uses checksums for error detection.
• Header Structure:
o Includes sequence numbers, acknowledgment numbers, flags (SYN, ACK,
FIN), and a checksum.
• Characteristics:
o Combines features of TCP and UDP.
o Provides reliable, message-oriented transport.
o Supports multistreaming (transmission of multiple data streams in one
connection).
o Ensures fault tolerance with multi-homing (support for multiple IP addresses).
• Use Cases:
o Applications like signaling in telecom systems (e.g., SS7 over IP).
3. Congestion Control
Congestion occurs when the network is overloaded with data, leading to packet loss and
delays. Congestion control techniques aim to manage and prevent such issues.
• Slow Start: Increases the transmission rate exponentially until congestion is detected.
• Congestion Avoidance: Increases the transmission rate linearly after reaching a
threshold.
• Fast Retransmit: Retransmits lost packets quickly without waiting for the
retransmission timer.
• Fast Recovery: Avoids reducing the transmission rate too drastically after packet
loss.
QoS refers to mechanisms that ensure a specific level of performance for data flows in a
network. Key parameters include:
• Concept:
o Controls the data flow by allowing it to "leak" at a constant rate, irrespective
of bursty input.
o If the bucket (buffer) overflows due to excessive input, packets are discarded.
• Steps:
1. Data enters the bucket (buffer).
2. Data is transmitted at a fixed rate.
3. Excess data beyond the bucket's capacity is dropped.
• Use Case: Ensures smooth data transmission and prevents burst traffic from
overwhelming the network.
• Concept:
o Allows data transmission as long as tokens (representing permission to send
data) are available in the bucket.
o Tokens are generated at a constant rate and stored in the bucket.
o Allows for bursty data flow while maintaining overall rate control.
• Steps:
1. Tokens are generated at a regular interval.
2. A token is required to transmit each packet.
3. If tokens are exhausted, the transmission waits until new tokens are generated.
• Use Case: Provides flexibility by supporting bursty traffic while controlling the
overall traffic rate.
1. Process-to-Process Communication
• Characteristics:
o Connectionless protocol.
o Does not guarantee delivery, order, or error correction.
o Lightweight and faster compared to TCP.
• Features:
o Low overhead.
o Suitable for time-sensitive applications like video streaming, VoIP, and DNS.
• Header Structure:
o Includes source port, destination port, length, and checksum.
• Characteristics:
o Connection-oriented protocol.
o Guarantees reliable, ordered, and error-checked delivery of data.
o Uses a handshake mechanism for connection establishment.
• Features:
o Segmentation: Divides data into smaller packets.
o Acknowledgment (ACK): Confirms successful data delivery.
o Flow Control: Adjusts the sender’s rate to match the receiver’s capacity.
o Error Detection: Uses checksums for error detection.
• Header Structure:
o Includes sequence numbers, acknowledgment numbers, flags (SYN, ACK,
FIN), and a checksum.
2.3 Stream Control Transmission Protocol (SCTP)
• Characteristics:
o Combines features of TCP and UDP.
o Provides reliable, message-oriented transport.
o Supports multistreaming (transmission of multiple data streams in one
connection).
o Ensures fault tolerance with multi-homing (support for multiple IP addresses).
• Use Cases:
o Applications like signaling in telecom systems (e.g., SS7 over IP).
3. Congestion Control
Congestion occurs when the network is overloaded with data, leading to packet loss and
delays. Congestion control techniques aim to manage and prevent such issues.
• Slow Start: Increases the transmission rate exponentially until congestion is detected.
• Congestion Avoidance: Increases the transmission rate linearly after reaching a
threshold.
• Fast Retransmit: Retransmits lost packets quickly without waiting for the
retransmission timer.
• Fast Recovery: Avoids reducing the transmission rate too drastically after packet
loss.
QoS refers to mechanisms that ensure a specific level of performance for data flows in a
network. Key parameters include:
• Concept:
o Controls the data flow by allowing it to "leak" at a constant rate, irrespective
of bursty input.
o If the bucket (buffer) overflows due to excessive input, packets are discarded.
• Steps:
1. Data enters the bucket (buffer).
2. Data is transmitted at a fixed rate.
3. Excess data beyond the bucket's capacity is dropped.
• Use Case: Ensures smooth data transmission and prevents burst traffic from
overwhelming the network.
• Concept:
o Allows data transmission as long as tokens (representing permission to send
data) are available in the bucket.
o Tokens are generated at a constant rate and stored in the bucket.
o Allows for bursty data flow while maintaining overall rate control.
• Steps:
1. Tokens are generated at a regular interval.
2. A token is required to transmit each packet.
3. If tokens are exhausted, the transmission waits until new tokens are generated.
• Use Case: Provides flexibility by supporting bursty traffic while controlling the
overall traffic rate.