# 8.6 Data Communication

## 8.6 Data Communication

#### **Introduction to Data Communication and Networks**

Data communication is the exchange of digital information between two or more devices via a transmission medium, guided (e.g., cable) or unguided (e.g., air). It is the foundation of modern computer networks, enabling resource sharing, distributed applications, and global connectivity. This section covers the fundamental concepts that govern how data is transferred, including transmission modes, techniques to share a common channel, network physical layouts, and the layered architectural models that provide structure and standardization to complex network systems.

***

### 1. Overview of Data Communication and Networks

#### 1.1 Key Components of a Data Communication System

1. **Message**: The information (data) to be communicated.
2. **Sender/Transmitter**: The device that sends the data message.
3. **Receiver**: The device that receives the message.
4. **Transmission Medium**: The physical path (channel) by which a message travels from sender to receiver (e.g., twisted-pair cable, optical fiber, radio waves).
5. **Protocols**: A set of rules that govern data communications. They define the **format**, **timing**, **sequencing**, and **error control** for information exchange.

#### 1.2 Data Communication Networks

A network is a collection of interconnected devices (nodes) capable of exchanging data.

* **Types**:
  * **Local Area Network (LAN)**: Covers a small geographical area (e.g., a building, campus). High speed, low cost. (e.g., Ethernet LAN).
  * **Wide Area Network (WAN)**: Spans large geographical areas (cities, countries). Uses leased lines or public carriers. (e.g., the Internet).
  * **Metropolitan Area Network (MAN)**: Covers a city or metropolitan area.
  * **Personal Area Network (PAN)**: Very short-range (e.g., Bluetooth).
* **Key Network Criteria**:
  * **Performance**: Throughput (bps), delay (latency), jitter.
  * **Reliability**: Frequency of failure and recovery time.
  * **Security**: Protecting data from unauthorized access.

***

### 2. Parallel vs. Serial Communication

This defines how bits of a data word are transmitted over a link.

| Feature               | Parallel Communication                                                                                                                | Serial Communication                                                                              |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| **Principle**         | Multiple bits (e.g., 8, 16, 32) of a data word are transmitted **simultaneously**, each on a separate wire/channel.                   | Bits of a data word are transmitted **one after another** on a **single** wire/channel.           |
| **Speed**             | Potentially faster for short distances due to parallel transmission.                                                                  | Slower per-channel, but can achieve very high speeds with fast clock rates and advanced encoding. |
| **Cost & Complexity** | **High**. Requires multiple wires (wide bus), connectors, and synchronized circuitry. Costly cables.                                  | **Low**. Uses fewer wires (often just 2 or 3), simpler connectors, and cheaper cabling.           |
| **Distance**          | **Limited** (typically < 1m). Prone to **skew**—bits arriving at different times due to slight differences in wire length/properties. | **Suitable for long distances**. No skew problem, better noise immunity.                          |
| **Synchronization**   | Requires careful synchronization of all parallel lines.                                                                               | Requires precise synchronization of sender and receiver clocks.                                   |
| **Applications**      | Inside computers (CPU to memory - system bus), short-distance printer cables (Centronics).                                            | Long-distance communication (USB, SATA, Ethernet, RS-232, PCIe, Fiber Optics).                    |

**Modern Trend**: **Serial communication has become dominant** for both short and long distances due to its cost-effectiveness, ability to run at very high clock speeds, and simpler implementation (e.g., USB, SATA, PCIe replaced older parallel standards like Parallel ATA and PCI).

***

### 3. Multiplexing Techniques

Multiplexing is the technique of combining multiple signals into one signal over a **shared medium** to improve channel utilization and efficiency.

#### 3.1 Frequency Division Multiplexing (FDM)

1. **Principle**: The **total bandwidth** of the shared channel is divided into multiple **non-overlapping frequency sub-bands**. Each user is allocated a unique, fixed sub-band. All users transmit **simultaneously** but on different carrier frequencies.
2. **Process**:
   * Each input signal modulates a different carrier frequency.
   * The modulated signals are combined and transmitted.
   * At the receiver, bandpass filters separate the signals, which are then demodulated.
3. **Characteristics**:
   * **Analog Technique**: Originally used for analog signals.
   * **Continuous Transmission**: Each user has dedicated bandwidth at all times.
   * Requires **guard bands** between channels to prevent interference.
4. **Applications**: Traditional radio and TV broadcasting, analog cable TV, first-generation (1G) cellular telephony (AMPS).

#### 3.2 Time Division Multiplexing (TDM)

1. **Principle**: The **total time** on the shared channel is divided into fixed-length recurring **frames**. Each frame is subdivided into **time slots**. Each user is assigned one or more specific time slots per frame. Users transmit their **entire allotted bandwidth**, but only during their assigned time slots (i.e., they transmit in **round-robin** fashion).
2. **Process**:
   * The multiplexer scans each input line in sequence, takes a **sample** (or a chunk of data), and places it into the assigned time slot.
   * The composite signal is transmitted.
   * The demultiplexer uses precise **synchronization** to extract data from each time slot and direct it to the correct output line.
3. **Characteristics**:
   * **Digital Technique**: Naturally suited for digital signals.
   * **Burst Transmission**: Each user gets the full channel bandwidth, but only for a fraction of the time.
   * Requires strict **synchronization** between multiplexer and demultiplexer.
4. **Types**:
   * **Synchronous TDM**: Time slots are pre-assigned to sources, even if a source has no data to send (slot remains empty → inefficient).
   * **Statistical (Asynchronous) TDM**: Time slots are dynamically allocated only to active sources. More efficient but requires addressing information in each slot.
5. **Applications**: Digital telephony (T1/E1 lines at 1.544/2.048 Mbps), SONET/SDH, the basic structure of cellular network time slots (e.g., in GSM).

#### 3.3 Wavelength Division Multiplexing (WDM)

1. **Principle**: A technology used on **optical fibers**. It is the optical equivalent of FDM. Multiple optical carrier signals (laser beams) of **different wavelengths (colors)** are combined onto a single fiber. Each wavelength constitutes an independent channel.
2. **Process**:
   * Different data streams modulate lasers of different wavelengths ($$\lambda\_1, \lambda\_2, ..., \lambda\_n$$).
   * A multiplexer (optical combiner) merges these optical signals onto one fiber.
   * At the receiver, a demultiplexer (optical splitter/prism/grating) separates the wavelengths and directs them to different photodetectors.
3. **Types**:
   * **Coarse WDM (CWDM)**: Uses wider spacing (e.g., 20 nm) between wavelengths, fewer channels, lower cost.
   * **Dense WDM (DWDM)**: Uses very tight spacing (e.g., 0.8 nm, 0.4 nm), enabling dozens to hundreds of channels on a single fiber. High capacity.
4. **Applications**: The backbone of the modern internet (long-haul and metro optical networks), cable TV fiber trunks.

***

### 4. Network Topologies

Network topology refers to the **physical or logical arrangement** of links and nodes in a network.

| Topology   | Description                                                                                                                                                | Advantages                                                                                                             | Disadvantages                                                                                                                                            |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Bus**    | All nodes are connected to a single, long cable (the backbone) via drop lines.                                                                             | Simple, inexpensive, easy to install.                                                                                  | **Single point of failure**: A break in the backbone cable disables the entire network. Performance degrades with many nodes. Difficult to troubleshoot. |
| **Star**   | All nodes are connected to a central device (hub, switch).                                                                                                 | Easy to install & manage. Robust: Failure of one node/cable does not affect others. Easy to add/remove nodes.          | **Central point of failure**: If the central device fails, the entire network fails. Requires more cable than bus.                                       |
| **Ring**   | Nodes are connected in a closed loop. Each node connects to exactly two neighbors. Data travels in one direction (unidirectional) or both (bidirectional). | Orderly network access (token passing). No data collisions. Equal access.                                              | **Single point of failure**: Failure of one node or cable can break the ring (unless dual rings are used). Adding/removing nodes disrupts the network.   |
| **Mesh**   | Every node has a dedicated point-to-point link to every other node.                                                                                        | **Highly reliable**: Multiple paths provide redundancy. Robust to failure. Security and privacy. Easy to troubleshoot. | **Extremely expensive** due to huge amount of cabling and ports ($$n(n-1)/2$$ links for $$n$$ nodes). Complex installation and management.               |
| **Hybrid** | A combination of two or more basic topologies.                                                                                                             | Flexible, can be designed to leverage advantages of constituent topologies.                                            | Can be complex to design and manage.                                                                                                                     |

**Modern Practice**: The **star topology** is the de facto standard for wired LANs (Ethernet), with an **Ethernet switch** as the central device.

***

### 5. Layered Network Architecture

#### 5.1 The Concept of Layering

1. **Problem**: Network communication is an extremely complex task involving hardware, software, protocols, and standards.
2. **Solution: Layering (Modularity)**:
   * Breaks down the complex process into smaller, manageable **layers**.
   * Each layer performs a **specific subset** of the required functions.
   * It relies on the services of the layer **below** it and provides services to the layer **above** it.
   * Layers communicate with their **peer layers** on other machines using **protocols**.
3. **Key Benefits**:
   * **Modular Design**: Layers can be developed and updated independently.
   * **Interoperability**: Standardized interfaces between layers allow products from different vendors to work together.
   * **Easier Learning and Troubleshooting**.

#### 5.2 Protocol Data Units (PDUs) and Encapsulation

* **Data**: The message from the application.
* As data moves down the stack at the sender, each layer adds its own **header** (and sometimes trailer) to the data it receives from the layer above. This process is **encapsulation**.
* The packaged data at each layer has a specific name:
  * **Application Layer**: Message.
  * **Transport Layer**: **Segment** (TCP) or **Datagram** (UDP).
  * **Network Layer**: **Packet**.
  * **Data Link Layer**: **Frame**.
  * **Physical Layer**: **Bits**.
* At the receiver, the process is reversed (**decapsulation**), with each layer stripping off its header and passing the payload up.

***

### 6. Overview of the OSI Model and TCP/IP Protocol Suite

#### 6.1 The OSI Reference Model (Open Systems Interconnection)

A **theoretical**, seven-layer model developed by ISO to standardize network communication functions. It is a **conceptual framework**, not a protocol suite.

| Layer | Name             | Primary Function                                                                                                                                                             | Key Protocols/Devices (Examples)                                              |
| ----- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **7** | **Application**  | Provides network services to **user applications**. Interface between the application and the network.                                                                       | HTTP, SMTP, FTP, DNS                                                          |
| **6** | **Presentation** | **Translation**, **encryption**, and **compression** of data. Ensures data from the application layer of one system is readable by another.                                  | SSL/TLS, JPEG, MPEG                                                           |
| **5** | **Session**      | Establishes, manages, and terminates **sessions** (dialogues) between applications. Synchronization and dialog control.                                                      | NetBIOS, RPC                                                                  |
| **4** | **Transport**    | Provides **end-to-end** communication services. **Segmentation**, **flow control**, **error control**, and **reliable delivery**.                                            | **TCP** (Connection-oriented, reliable), **UDP** (Connectionless, unreliable) |
| **3** | **Network**      | **Logical addressing** and **routing** of packets across multiple networks. Determines the best path from source to destination.                                             | **IP** (IPv4, IPv6), ICMP, OSPF, **Routers**                                  |
| **2** | **Data Link**    | Provides **node-to-node** delivery on the same physical link. **Framing**, **physical addressing (MAC)**, **error detection** (e.g., CRC), **access control** to the medium. | Ethernet, PPP, HDLC, **Switches, Bridges**                                    |
| **1** | **Physical**     | Transmits raw **bits** over the physical medium. Defines electrical, mechanical, procedural, and functional specifications.                                                  | RS-232, 100BASE-TX, **Hubs, Repeaters, Cables**                               |

**Mnemonic**: **A**ll **P**eople **S**eem **T**o **N**eed **D**ata **P**rocessing.

#### 6.2 The TCP/IP Protocol Suite

Also known as the **Internet model**. This is the **practical**, four/five-layer model that forms the foundation of the Internet. It is a **set of protocols**.

| TCP/IP Layer | Name           | Corresponds to OSI Layers          | Primary Function                                                                                                               | Key Protocols                              |
| ------------ | -------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------ |
| **5**        | Application    | Application, Presentation, Session | Combines the functions of the top three OSI layers. User interface and support services.                                       | **HTTP, HTTPS, FTP, SMTP, DNS, DHCP, SSH** |
| **4**        | Transport      | Transport                          | Same as OSI Transport layer. Process-to-process communication.                                                                 | **TCP, UDP**                               |
| **3**        | Internet       | Network                            | Responsible for logical addressing and routing across an internetwork.                                                         | **IP (IPv4, IPv6), ICMP, IGMP, ARP**       |
| **2**        | Network Access | Data Link, Physical                | Also called Link Layer or Network Interface Layer. Handles hardware addressing and physical transmission on the local network. | **Ethernet, Wi-Fi (802.11), PPP**          |
| **1**        | Physical       | Physical                           | (Often considered part of the Network Access layer).                                                                           | (Hardware Specifications)                  |

#### 6.3 Comparison: OSI vs. TCP/IP

* **OSI**: A **theoretical standard** (what should be). Clearly defined layers and interfaces. Developed before protocols.
* **TCP/IP**: A **practical implementation** (what is). Developed through research and practice (protocols first, model later). The **de facto standard for the Internet**.

**Conclusion**: Data communication integrates concepts from transmission methods (parallel/serial), channel sharing (multiplexing), and physical layout (topology). The layered architecture, exemplified by the OSI and TCP/IP models, provides the essential framework that structures all modern networking, dividing complex tasks into manageable, standardized layers that enable the global, interoperable Internet we rely on today.
