UNIT 4: DATA COMMUNICATION
4.1 Foundations of Data Communication
-
Definition: The process of transmitting data from one device to another through a communication medium.
-
Characteristics: Delivery, Accuracy, Timeliness, Jitter.
-
Components: Sender, Receiver, Medium, Protocol.
-
Transmission Modes:
-
Simplex: One-way communication (e.g., TV broadcast).
-
Half-Duplex: Two-way but not simultaneous (e.g., walkie-talkie).
-
Full-Duplex: Simultaneous two-way (e.g., telephone).
-
-
Serial vs Parallel:
-
Serial: Bits sent sequentially over one channel (long distance, e.g., USB).
-
Parallel: Multiple bits sent simultaneously (short distance, e.g., printer port).
-
-
Network Classification:
-
PAN (Personal Area Network): ~10 m (Bluetooth).
-
LAN (Local Area Network): ~1–5 km (office, Ethernet).
-
MAN (Metropolitan Area Network): ~5–50 km (city, DQDB).
-
WAN (Wide Area Network): Country/globe (Internet, ATM).
-
-
Network Topologies:
| Topology | Description | Advantages | Disadvantages | |----------|-------------|------------|---------------| | Bus | Single central cable | Simple, cheap | Single point of failure, collisions | | Star | All nodes connect to hub/switch | Easy to manage, robust | Hub failure breaks network | | Ring | Nodes form closed loop | No collisions, orderly | Single node failure breaks ring | | Mesh | Every node connected to others | High redundancy, fault-tolerant | Expensive, complex | | Tree | Hierarchical (bus + star) | Scalable, easy to debug | Root node failure affects all | | Hybrid | Combination of above | Flexible | Complex design |
[!TIP] Exam Focus: Topology comparison and transmission mode examples are frequent 7-mark questions.
4.2 Physical Layer Fundamentals
-
Guided Media:
-
Twisted Pair: UTP/STP, up to 100 Mbps, susceptible to EMI.
-
Coaxial Cable: Thick/thin, higher bandwidth, better shielding.
-
Fiber Optic: Light pulses, very high speed (Gbps), low loss, immune to EMI.
-
-
Unguided Media: Radio (Wi-Fi), Microwave (point-to-point), Infrared (short-range).
-
Transmission Impairments:
-
Attenuation: Signal strength loss → use amplifiers/repeaters.
-
Distortion: Signal shape change → use equalization.
-
Noise: Unwanted energy (thermal, crosstalk) → shielding, filtering.
-
Interference: From other signals → frequency planning, spread spectrum.
-
-
Line Encoding Schemes:
| Scheme | Description | Example | |--------|-------------|---------| | Unipolar NRZ | 0=0V, 1=+V | DC component issue | | Polar NRZ-L | 0=+V, 1=-V | No DC if balanced | | Bipolar AMI | 0=0, 1 alternates ±V | No DC, error detection | | Manchester | Transition in middle (0=↑,1=↓) | Self-clocking, Ethernet | | Differential Manchester | Mid-bit transition always, presence/absence at start | Token Ring |
[!TIP] Common Pitfall: Confusing NRZ-L with NRZ-I. Manchester encoding includes clocking information.
4.3 Switching Techniques
-
Circuit Switching: Dedicated path established (e.g., PSTN). Guaranteed bandwidth, inefficient for bursty traffic.
-
Packet Switching:
-
Datagram (e.g., IP): Each packet independent, route may differ. No connection setup.
-
Virtual Circuit (e.g., Frame Relay): Path established before data, packets follow same route.
-
-
Message Switching: Store-and-forward entire message. No dedicated path, but high delay.
-
Comparison:
| Feature | Circuit | Packet (Datagram) | Packet (VC) | Message | |---------|---------|-------------------|-------------|---------| | Path | Dedicated | Dynamic | Predefined | Store-forward | | Delay | Low (after setup) | Variable | Low | High | | Efficiency | Low | High | High | Medium | | Use | Telephony | Internet | Frame Relay | Email (historical) |
[!TIP] Exam Key: Differentiate VC vs Datagram by connection establishment and packet ordering.
4.4 Network Architecture Models
-
OSI Reference Model (7 Layers):
-
Physical: Bits over medium.
-
Data Link: Frames, error control (HDLC, Ethernet).
-
Network: Routing, IP addresses.
-
Transport: End-to-end, TCP/UDP.
-
Session: Dialog control.
-
Presentation: Encryption, compression.
-
Application: User interface (HTTP, FTP).
-
-
TCP/IP Model (4 Layers):
-
Link (Network Interface): Corresponds to OSI Physical + Data Link.
-
Internet: OSI Network (IP).
-
Transport: OSI Transport (TCP, UDP).
-
Application: OSI Session + Presentation + Application.
-
-
OSI vs TCP/IP:
| Aspect | OSI | TCP/IP | |--------|-----|--------| | Layers | 7 | 4 | | Protocol Development | Theory-first | Implementation-first | | Communication | Horizontal (peer-to-peer) | Vertical (top-down) | | Examples | HDLC, X.25 | TCP, IP, HTTP |
[!TIP] Mnemonic: OSI layers: Please Do Not Throw Sausage Pizza Away.
4.5 Data Link Layer
5.1 Framing
-
Purpose: Delimit frame boundaries for error detection and addressing.
-
Methods:
-
Character-Oriented (BISYNC): Flag bytes (DLE, STX/ETX).
-
Bit-Oriented (HDLC): Flag sequence
01111110with bit stuffing. -
Length-Based: Length field in header.
-
-
Role: Enables receiver to synchronize and identify frame start/end.
5.2 Error Detection and Correction
-
Parity Check:
-
Single-bit: Even/odd parity for each byte. Detects single-bit errors.
-
Two-Dimensional: Block parity (row + column). Detects burst errors.
-
-
Checksum: Sum of data blocks (1’s complement). Used in IP/TCP.
-
Cyclic Redundancy Check (CRC):
-
Concept: Polynomial division modulo-2. Data as dividend, generator polynomial $G(x)$.
-
Steps:
-
Append $r$ zeros (where $r$ = degree of $G(x)$).
-
Divide by $G(x)$ using XOR.
-
Remainder = CRC bits.
-
Transmit data + CRC.
-
-
Example: For $$\displaystyle G(x) = x^3 + 1 $$ (binary
1001), data1010→ CRC001→ transmitted1010001. -
Detection: All single-bit, all double-bit, all odd-numbered errors, burst < $r+1$ bits.
-
-
Longitudinal Redundancy Check (LRC):
-
Organize data in matrix, compute column-wise parity.
-
Example: Data block:
1011001 1100110 0011011LRC = XOR of columns →
0100100. Transmit block + LRC row. -
Detects burst errors affecting one column.
-
[!TIP] Exam Calculation: Practice CRC with polynomials like $$\displaystyle x^8 + x^2 + x + 1 $$ (
100000111). Show division steps.
5.3 Error Control Protocols
-
Automatic Repeat Request (ARQ): Receiver requests retransmission on error.
-
Stop-and-Wait:
-
Sender sends one frame, waits for ACK.
-
Efficiency $$\displaystyle \eta = \frac{1}{1 + 2a} $$ where $$\displaystyle a = \frac{\text{propagation time}}{\text{frame transmission time}} $$.
-
Low utilization for long propagation delays.
-
-
Sliding Window:
-
Go-Back-N: Sender can send up to $N$ frames without ACK. On error, retransmit from error frame onward.
-
Selective Repeat: Retransmit only erroneous frames. Requires larger window, buffering.
-
Efficiency: Higher than Stop-and-Wait, window size $N$ affects throughput.
-
5.4 Data Link Protocols
-
High-Level Data Link Control (HDLC):
-
Frame Structure:
Flag (01111110) | Address | Control | Info | FCS | Flag -
Modes:
-
NRM (Normal Response): Primary/secondary stations.
-
ABM (Asynchronous Balanced): Balanced configuration (most common).
-
ARM (Asynchronous Response): Secondary can transmit anytime.
-
-
Features: Bit stuffing, 3-bit sequence numbers, supervisory frames (RR, RNR, REJ), unnumbered frames (SABM, DISC).
-
[!TIP] HDLC Control Field: Bits 1-2 indicate frame type (I-frame, S-frame, U-frame).
4.6 Local Area Networks (LAN)
-
Ethernet (IEEE 802.3):
-
CSMA/CD: Carrier Sense Multiple Access with Collision Detection.
-
Operation: Listen before transmit, collision → backoff (binary exponential).
-
Frame: Preamble, Dest/Src MAC, Type, Data, FCS.
-
-
Token Ring (IEEE 802.5):
-
Operation: Token passed sequentially. Station with token transmits.
-
Advantages: Deterministic access, no collisions.
-
Disadvantages: Token overhead, single point failure (ring break).
-
-
Token Bus (IEEE 802.4):
-
Token passed in logical order on physical bus.
-
Comparison with Token Ring:
| Feature | Token Ring | Token Bus | |---------|------------|-----------| | Topology | Ring | Bus | | Access | Physical order | Logical order | | Fault tolerance | Medium-dependent | Easier to add/remove nodes |
-
-
FDDI (Fiber Distributed Data Interface):
-
Architecture: Dual counter-rotating rings (primary/secondary).
-
Fault Tolerance: Ring wraps on failure (single ring operation).
-
Speed: 100 Mbps over fiber.
-
Use: Backbone networks, high-speed LANs.
-
[!TIP] Token Passing: Token Ring uses physical order; Token Bus uses logical addressing order.
4.7 Metropolitan Area Networks (MAN)
-
DQDB (Distributed Queue Dual Bus, IEEE 802.6):
-
Architecture: Two unidirectional buses (A and B). Each station queues requests.
-
Operation:
-
Upstream (bus A): Stations request slots on downstream (bus B).
-
Distributed Queue: Requests queued in order of arrival.
-
Slot Reuse: After destination reads, slot available for downstream.
-
-
Advantages: Fair access, supports isochronous traffic.
-
-
SMDS (Switched Multi-megabit Data Service):
-
Connectionless, datagram service over MAN.
-
Comparison with DQDB:
| Feature | DQDB | SMDS | |---------|------|------| | Access | Distributed queue | Stateless | | Service | Connection-oriented-like | Pure datagram | | Use | Integrated services | High-speed data |
-
4.8 Network Layer
-
Routing Algorithms:
-
Distance Vector (Bellman-Ford):
-
Each node maintains distance vector (cost to destination).
-
Update: $$\displaystyle D_x(y) = \min_v \{ \text{cost}(x,v) + D_v(y) \} $$.
-
Example: Node A updates via neighbor B: $$\displaystyle D_A(C) = \min( \text{cost}(A,B)+D_B(C), ... ) $$.
-
Problems: Count-to-infinity, slow convergence.
-
-
Link State (Dijkstra):
-
Each node has complete map (LSA flood).
-
Algorithm: Shortest path first (SPF).
-
Steps:
-
Initialize: $$\displaystyle N' = \{ \text{self} \} $$, $$\displaystyle D(v) = \text{cost}(self,v) $$.
-
Find $w \notin N'$ with min $D(w)$, add to $N'$.
-
Update $D(v)$ for neighbors: $$\displaystyle D(v) = \min(D(v), D(w) + \text{cost}(w,v)) $$.
-
Repeat until all nodes in $N'$.
-
-
Advantage: Fast convergence, no count-to-infinity.
-
-
-
Internet Protocol (IP):
-
Addressing: IPv4 (32-bit), IPv6 (128-bit).
-
Packet Format: Version, IHL, Type of Service, Total Length, Identification, Flags, Fragment Offset, TTL, Protocol, Header Checksum, Source/Dest IP, Options, Data.
-
[!TIP] Routing Comparison: Distance vector shares entire table periodically; link state shares only its own links.
4.9 Wide Area Networks and Protocols
-
ATM (Asynchronous Transfer Mode):
-
Cell Structure: Fixed 53 bytes (5-byte header, 48-byte payload).
-
Switching: Virtual circuit (VPI/VCI). Cell relay, high speed (155 Mbps+).
-
Advantages: QoS support, low delay, scalability.
-
Disadvantages: Overhead from small cells, complex.
-
-
Frame Relay:
-
Operation: Packet switching over virtual circuits. No error correction (rely on upper layers).
-
Efficiency: High throughput, low overhead (2–4 bytes header).
-
Limitations: No flow control, bursty traffic can cause congestion.
-
-
X.25:
-
Early packet switching protocol. Three layers: Physical, Data Link (LAPB), Packet (virtual circuits).
-
Reliable but high overhead → obsolete for backbone.
-
-
SONET (Synchronous Optical Network):
-
Architecture: Hierarchical (STS-1: 51.84 Mbps, STS-3: 155.52 Mbps).
-
Layers: Section, Line, Path.
-
Features: Synchronous multiplexing, ring protection (UPSR, BLSR).
-
4.10 Network Devices
| Device | OSI Layer | Function | Example |
|---|---|---|---|
| Repeater | Physical | Regenerates signal | Extends cable length |
| Hub | Physical | Multiport repeater (broadcast) | Shared medium |
| Bridge | Data Link | Filters frames by MAC, segments collision domains | Transparent bridge |
| Switch | Data Link | Multiport bridge, MAC table, full-duplex | Ethernet switch |
| Router | Network | Routes packets by IP, connects networks | Home router |
| Gateway | Application | Protocol conversion (e.g., SMTP↱HTTP) | Email gateway |
[!TIP] Key Difference: Switch operates at Data Link (MAC), Router at Network (IP). Hub is physical layer, broadcasts to all ports.
4.11 Additional Topics and Standards
-
Standards Organizations:
-
ISO: OSI model.
-
IEEE: 802.x (Ethernet, Token Ring).
-
ITU-T: X.25, ISDN.
-
ANSI: US standards (e.g., T1 lines).
-
-
TCP/IP Protocol Suite:
-
Layers:
-
Application: HTTP, FTP, SMTP, DNS.
-
Transport: TCP (reliable), UDP (unreliable).
-
Internet: IP (routing), ICMP (errors), ARP (MAC resolution).
-
Link: Ethernet, PPP, Wi-Fi.
-
-
Importance: Foundation of Internet, interoperable, scalable.
-
-
Internetworking: Connecting multiple networks using routers and standard protocols (IP).
[!TIP] TCP vs UDP: TCP = connection-oriented, flow control, congestion control; UDP = connectionless, no reliability.
Key Formulas & Concepts Boxed
-
Stop-and-Wait Efficiency: $$\displaystyle \boxed{\eta = \frac{1}{1 + 2a}} $$, where $$\displaystyle a = \frac{\text{propagation time}}{\text{frame transmission time}} $$.
-
CRC Generation: Data $D(x)$ appended with $r$ zeros, divide by $G(x)$, remainder $R(x)$ → transmitted $$\displaystyle D(x) \cdot x^r + R(x) $$.
-
Dijkstra’s Algorithm: $$\displaystyle \boxed{D(v) = \min(D(v), D(w) + \text{cost}(w,v))} $$ for each neighbor $v$ of $w$.
-
Ethernet Minimum Frame Size: $\boxed{512 \text{ bits}}$ (for 10 Mbps, 51.2 µs slot time).
-
ATM Cell Rate: $\boxed{53 \text{ bytes/cell}}$ (5 header + 48 payload).
Frequently Asked Diagrams
-
OSI Model: Seven layers with peer communication.
-
HDLC Frame: Flag, Address, Control, Info, FCS, Flag.
-
Ethernet Frame: Preamble, Dest MAC, Src MAC, Type, Data, FCS.
-
FDDI Dual Ring: Primary (clockwise), Secondary (counter-clockwise).
-
DQDB Architecture: Two unidirectional buses with stations tapping both.
-
ATM Cell: 5-byte header (VPI/VCI, PT, CLP, HEC), 48-byte payload.
-
Sliding Window: Sender/receiver windows, sequence numbers.
[!TIP] Exam Strategy: For 7-mark questions, always include diagram + explanation. For calculations (CRC, routing), show step-by-step working. Compare using tables for clarity.