Data Communication and Computer Networks

Fundamentals of Data Communication

  • Definition: Exchange of data between two devices via a transmission medium using combined hardware and software systems.
  • Fundamental Effectiveness Criteria:
    • Delivery: Data must reach only the intended destination device or user.
    • Accuracy: Data must be delivered without uncorrected errors.
    • Timeliness: Data must arrive within a usable timeframe without significant delay (real-time transmission).
    • Jitter: The variation in packet arrival times, causing uneven delay in multimedia streams.
  • Five Core Components:
    • Message: The information to be communicated (text, numbers, audio, video, pictures).
    • Sender: Device that transmits the data.
    • Receiver: Device that accepts the transmitted data.
    • Transmission Medium: Physical pathway conveying the signal (e.g., twisted-pair, coaxial cable, fiber-optic cable, radio waves).
    • Protocol: Mutually agreed-upon set of rules governing data transmission.
  • Data Transmission Modes:
    • Simplex: Unidirectional transmission where one device only transmits and the other only receives (e.g., keyboard and monitor).
    • Half-Duplex: Bidirectional transmission where both devices can send and receive, but only one at a time (e.g., walkie-talkies).
    • Full-Duplex: Simultaneous bidirectional transmission where channel capacity is shared between both directions (e.g., telephone networks).

Network Structures and Topologies

  • Evaluation Criteria:
    • Performance: Evaluated via transit time and response time; influenced by user load, medium, hardware capacity, and software efficiency.
    • Reliability: Assessed by failure frequency, recovery duration, and system robustness under catastrophe.
    • Security: Enforces protection against unauthorized access, corruption, and operational data loss.
  • Connection Link Types:
    • Point-to-Point: Dedicated link reserving total channel capacity entirely for two connected devices.
    • Multipoint (Multidrop): A single link shared by more than two devices, divided either spatially (simultaneous sharing) or temporally (timeshared turns).
  • Network Topologies:
    • Mesh: Every device possesses a dedicated point-to-point link to every other device; requires n(n−1)2\frac{n(n - 1)}{2} duplex links and n−1n - 1 I/O ports per device. High fault isolation, privacy, and redundancy, but costly and cabling-heavy.
    • Star: Devices link directly to a central controller (hub) with point-to-point lines; relays traffic through the hub. Easy to install and isolate faults, but creates a single point of failure at the hub.
    • Bus: Multipoint architecture where a single central cable acts as a backbone connecting stations via drop lines and taps. Prone to signal reflection degradation, tap limits, and network-wide failure if the backbone breaks.
    • Ring: Devices link in a loop with point-to-point connections to their two immediate neighbors, using repeaters to regenerate signals unidirectionally. Simple reconfiguration and fault detection, but a break can disable the entire ring.
  • Network Geographic Categories:
    • Local Area Network (LAN): Privately owned networks covering a building or campus up to a few kilometers; typically operates between 10 Mbps10\,\text{Mbps} and 10 Gbps10\,\text{Gbps} with microsecond delays.
    • Metropolitan Area Network (MAN): Covers city-wide spans; examples include cable television networks and IEEE 802.16 wireless standards.
    • Wide Area Network (WAN): Spans countries or continents; separates application hosts from communication subnets (transmission lines and packet-switched/store-and-forward switching elements or satellite systems).

Signals, Impairments, and Data Rates

  • Signal Classification:
    • Analog: Continuous waves passing through an infinite spectrum of intensity levels over time.
    • Digital: Discrete signals possessing a limited count of defined voltage levels.
  • Periodic Analog Signals (Sine Wave Characteristics):
    • Peak Amplitude: Absolute value of highest signal intensity, measured in volts.
    • Period (TT) & Frequency (ff): TT is the time (in seconds) for 11 cycle; ff is cycles per second (in Hz\text{Hz}):     f=1Tf = \frac{1}{T}T=1fT = \frac{1}{f}
    • Phase: Waveform position relative to time 00 (0∘0^\circ, 90∘90^\circ, or 180∘180^\circ shifts).
    • Wavelength (λ\lambda): Distance traveled in one period through a medium with propagation speed cc:     λ=cf\lambda = \frac{c}{f}
    • Bandwidth: The difference between the highest and lowest frequencies contained within a composite signal.
  • Digital Signal Metrics:
    • Levels & Bits: A digital signal with LL discrete levels conveys log⁡2(L)\log_2(L) bits per level.
    • Bit Rate: Count of bits transmitted per second (bps\text{bps}).
  • Transmission Impairments:
    • Attenuation: Loss of signal energy converted to heat over distance; measured in Decibels (dB\text{dB}):     dB=10log⁡10(P2P1)\text{dB} = 10\log_{10}\left(\frac{P_2}{P_1}\right)
    • Distortion: Alteration of a composite signal's shape due to unequal component propagation speeds and differing arrival phases.
    • Noise: Unwanted external signal additions, including thermal noise (electron agitation), induced noise (motors), crosstalk (wire coupling), and impulse noise (voltage spikes).
    • Signal-to-Noise Ratio (SNR):SNR=Average Signal PowerAverage Noise Power\text{SNR} = \frac{\text{Average Signal Power}}{\text{Average Noise Power}}SNRdB=10log⁡10(SNR)\text{SNR}_{\text{dB}} = 10\log_{10}(\text{SNR})
  • Channel Data Rate Limits:
    • Nyquist Bit Rate (Noiseless Channel):BitRate=2×Bandwidth×log⁡2(L)\text{BitRate} = 2 \times \text{Bandwidth} \times \log_2(L)
    • Shannon Capacity (Noisy Channel):Capacity=Bandwidth×log⁡2(1+SNR)\text{Capacity} = \text{Bandwidth} \times \log_2(1 + \text{SNR})

Digital-to-Analog Modulation and Multiplexing

  • Modulation Techniques:
    • Amplitude Shift Keying (ASK): Carrier amplitude varies to represent binary states; frequency and phase remain fixed. Common as Binary ASK or On-Off Keying (OOK).
    • Frequency Shift Keying (FSK): Modulates between distinct carrier frequencies (f1f_1 and f2f_2) while amplitude and phase stay fixed.
    • Phase Shift Keying (PSK): Shifts carrier phase (e.g., 0∘0^\circ for bit 0, 180∘180^\circ for bit 1 in BPSK); most bandwidth-efficient method.
    • Signal Rate (Baud): Ratio of bit rate (NN) to data elements carried per signal element (rr):     S=Nr=Nlog⁡2(L)S = \frac{N}{r} = \frac{N}{\log_2(L)}
  • Multiplexing Techniques:
    • Frequency-Division Multiplexing (FDM): Analog technique combining multiple signals modulated at distinct carrier frequencies separated by unused frequency bands (guard bands).
    • Wavelength-Division Multiplexing (WDM): Analog technique combining narrow optical beams of differing wavelengths (λ1,λ2,…\lambda_1, \lambda_2, \dots) through a prism over a fiber-optic cable (e.g., SONET).
    • Time-Division Multiplexing (TDM): Digital technique where multiple connections share the entire link bandwidth sequentially by allocating individual time slots.

Transmission Media

  • Guided Media:
    • Twisted-Pair Cable: Two insulated copper conductors twisted around each other to equalize and cancel external electromagnetic interference and crosstalk; used in telephone local loops, DSL, 10Base-T, and 100Base-T.
    • Coaxial Cable: Central copper conductor surrounded by an insulating layer, braided outer conductor shield, and plastic cover; used in cable TV (RG-59) and early Ethernet.
    • Fiber-Optic Cable: Glass or plastic core surrounded by a lower-density cladding and protective Kevlar jacket; propagates signals via total internal reflection when the angle of incidence exceeds the critical angle (I>critical angleI > \text{critical angle}). Supports speeds up to 1600 Gbps1600\,\text{Gbps}, reaches 50 km50\,\text{km} without regeneration, and is immune to electromagnetic noise.
  • Unguided (Wireless) Media:
    • Ground Propagation: Low-frequency radio waves (<2 MHz< 2\,\text{MHz}) follow the planetary curvature through the lower atmosphere.
    • Sky Propagation: Medium-frequency waves (2–30 MHz2\text{--}30\,\text{MHz}) bounce off the ionosphere for long-range communications.
    • Line-of-Sight Propagation: High-frequency waves (>30 MHz> 30\,\text{MHz}) transmit straight from antenna to antenna.
    • Radio Waves (3 kHz–1 GHz3\,\text{kHz}\text{--}1\,\text{GHz}): Omnidirectional propagation; penetrates walls; suited for multicasting (AM/FM radio, cordless phones).
    • Microwaves (1–300 GHz1\text{--}300\,\text{GHz}): Unidirectional, narrow line-of-sight propagation; cannot penetrate walls; uses parabolic dish and horn antennas.
    • Infrared (300 GHz–400 THz300\,\text{GHz}\text{--}400\,\text{THz}): Short-range, line-of-sight communication; blocked by walls (preventing cross-room interference); standardized by IrDA (75 kbps75\,\text{kbps} up to 8 m8\,\text{m}, newer standards up to 4 Mbps4\,\text{Mbps}).

Switched Networks

  • Circuit-Switched Networks: Establish a dedicated physical transmission path consisting of connected channels across intermediate switches. Operates across three distinct phases: connection setup, data transfer, and connection teardown.
  • Datagram Networks: Connectionless packet-switched approach operating at the network layer via routers. Each packet (datagram) is treated as an independent entity routed dynamically without resource reservation; packets may arrive out of order or be dropped.
  • Virtual-Circuit Networks: Connection-oriented hybrid packet-switched approach implemented at the data link layer. Requires setup and teardown phases; all packets follow a pre-established virtual circuit carrying a local jurisdiction address identifier.

Transmission Modes and Error Detection

  • Data Transmission Modes:
    • Parallel Transmission: Transmits groups of nn bits simultaneously across nn separate physical wires per clock tick; fast but expensive, limiting use to short distances.
    • Serial Transmission: Transmits bits sequentially over a single physical channel:
    • Asynchronous: Data sent byte-by-byte framed by a start bit (00), one or more stop bits (11), and variable idle gaps; sender and receiver resynchronize on each byte.
    • Synchronous: Continuous bit stream grouped into frames without start/stop bits or gaps; receiver relies entirely on shared timing and clock synchronization.
    • Isochronous: Ensures constant bit arrival rates with zero variable delay, specifically designed for real-time video and audio.
  • Cyclic Redundancy Check (CRC):
    • Linear cyclic block code where a dataword of kk bits is augmented with n−kn - k zeros and divided by an agreed (n−k+1)(n - k + 1)-bit divisor using modulo-2 arithmetic (XOR operations).
    • The resulting remainder is appended to the dataword to form an nn-bit codeword.
    • The receiver divides the received codeword by the same divisor; a zero syndrome (000000) indicates an error-free transmission, whereas a non-zero syndrome signals corruption.

Modulo-2 division process in CRC encoder

  • Simple Parity-Check Code:
    • Generates an nn-bit codeword from a kk-bit dataword where n=k+1n = k + 1.
    • Appends a parity bit to make the count of 1s1\text{s} even (or odd).
    • Minimum Hamming distance dmin⁡=2d_{\min} = 2; detects single-bit errors but cannot correct errors.

High-Level Data Link Control (HDLC)

  • Operational Configurations & Modes:
    • Normal Response Mode (NRM): Unbalanced architecture with one primary station initiating commands and one or more secondary stations issuing responses.
    • Asynchronous Balanced Mode (ABM): Balanced point-to-point architecture where both stations act as combined peers capable of initiating commands and responses.
  • Frame Categories:
    • Information Frames (I-Frames): Transport user payload and control data; facilitate acknowledgment piggybacking.
    • Supervisory Frames (S-Frames): Carry flow and error control commands without information payloads:
    • Receive Ready (RR, code 00): Positive acknowledgment.
    • Receive Not Ready (RNR, code 10): Acknowledges receipt while signaling receiver congestion.
    • Reject (REJ, code 01): Negative acknowledgment for Go-Back-N ARQ.
    • Selective Reject (SREJ, code 11): Negative acknowledgment for Selective Repeat ARQ.
    • Unnumbered Frames (U-Frames): Transport link and session management commands.
  • Frame Format:

Structure of HDLC I-frame, S-frame, and U-frame formats

  • Flag Field: 8-bit delimiter pattern (01111110) at start and finish.
  • Address Field: Identifies the secondary station.
  • Control Field: 1 or 2 bytes defining frame type, sequence numbers (N(S)N(S)), acknowledgment numbers (N(R)N(R)), and Poll/Final (P/FP/F) bit.
  • FCS Field: Frame Check Sequence using CRC for error detection.

Network Architecture Models

  • OSI 7-Layer Reference Model:
    • Layer 1 (Physical): Mechanical, electrical, encoding, and transmission rate interface specifications.
    • Layer 2 (Data Link): Framing, physical MAC addressing, link flow control, error control (trailers), and medium access control.
    • Layer 3 (Network): End-to-end packet delivery across networks, logical addressing, and routing.
    • Layer 4 (Transport): Process-to-process message delivery, port addressing, segmentation, reassembly, connection control, end-to-end flow/error control.
    • Layer 5 (Session): Dialog management and checkpoint synchronization.
    • Layer 6 (Presentation): Data translation, character encoding interoperability, encryption, decryption, and data compression.
    • Layer 7 (Application): Direct user/network service interfaces (e.g., file transfers, remote login, mail).
  • TCP/IP Protocol Suite:
    • Four core layers: Host-to-network, Internet (IP), Transport (TCP, UDP, SCTP), and Application (HTTP, SMTP, FTP, TELNET, DNS).

Comparison of layers between OSI and TCP/IP reference models

  • Model Comparisons:
    • OSI clearly differentiates between services, interfaces, and protocols; protocols are better hidden and replaced.
    • OSI supports both connectionless and connection-oriented communication in the network layer, but only connection-oriented in the transport layer.
    • TCP/IP supports only connectionless communication in the network layer (IP), but provides a choice of connectionless (UDP) or connection-oriented (TCP) at the transport layer.

Network Interconnection Devices

  • Repeater: Physical layer (Layer 1) device that regenerates weakened electrical or optical signals bit-for-bit to connect segments of the same LAN.
  • Hub: Multiport Layer 1 device acting as a central connecting point that regenerates and broadcasts incoming signals to all outgoing ports except the port of origin.
  • Bridge / Link Layer Switch: Operates at Layers 1 and 2; inspects physical (MAC) destination addresses in frame headers and selectively filters or forwards frames based on internal port-to-address tables.
  • Router: Three-layer device (Layers 1, 2, and 3) routing packets across independent networks (LANs and WANs) based on logical IP addresses using dynamic routing tables.
  • Gateway: Operates across all layers (up to Layer 7) to interpret and translate protocols between disparate network architectures.

Network Addressing Schemes

  • Ethernet MAC Physical Address:
    • 48-bit48\text{-bit} (6-byte6\text{-byte}) address represented in hexadecimal format separated by colons (e.g., 06:01:02:01:2C:4B).
    • Unicast: The least significant bit of the first byte is 00 (transmitted first on the line).
    • Multicast: The least significant bit of the first byte is 11.
    • Broadcast: All 4848 bits set to 11 (FF:FF:FF:FF:FF:FF).
  • IPv4 Logical Address:
    • 32-bit32\text{-bit} (4-byte4\text{-byte}) address represented in dotted-decimal format (values 0–2550\text{--}255 per byte), yielding an address space of 232=4,294,967,2962^{32} = 4,294,967,296.
    • Classful Addressing Ranges:
    • Class A: First byte 0–1270\text{--}127 (starts with 0); 128128 blocks of 16,777,21616,777,216 addresses for large organizations.
    • Class B: First byte 128–191128\text{--}191 (starts with 10); 16,38416,384 blocks of 65,53665,536 addresses for midsize networks.
    • Class C: First byte 192–223192\text{--}223 (starts with 110); 2,097,1522,097,152 blocks of 256256 addresses for small networks.
    • Class D: First byte 224–239224\text{--}239 (starts with 1110); single block of 268,435,456268,435,456 addresses for multicasting.
    • Class E: First byte 240–255240\text{--}255 (starts with 1111); reserved addresses.

Application Layer Protocols

  • TELNET (Terminal Network):
    • Establishes a remote connection via terminal emulation.
    • Client converts keystrokes to Network Virtual Terminal (NVT) format; remote server uses a pseudoterminal driver to pass NVT inputs into operating system applications.
  • Electronic Mail Protocols:
    • User Agent (UA): Composes, reads, replies to, forwards, and manages mail in mailboxes.
    • Simple Mail Transfer Protocol (SMTP): Message Transfer Agent protocol exchanging commands (e.g., HELO, MAIL FROM, RCPT TO, DATA, QUIT) and 3-digit numeric responses between MTAs over TCP.
    • Post Office Protocol version 3 (POP3): Access protocol using TCP port 110110 to retrieve mail; operates in delete mode (removes from server) or keep mode (retains on server).
    • Internet Mail Access Protocol version 4 (IMAP4): Advanced retrieval protocol supporting partial message inspection, searching, and server-side folder hierarchies.
  • File Transfer Protocol (FTP):
    • Employs two separate TCP connections: a control connection on port 2121 (persists through session for commands/responses) and a data connection on port 2020 (opens and closes per file transfer).

FTP model showing separate control and data connections

  • Transmission Modes: Stream mode (default byte sequence), Block mode (prepended with a 3-byte descriptor header), and Compressed mode (run-length encoding).
    • Hypertext Transfer Protocol (HTTP):
  • Stateless request/response protocol operating on TCP port 8080.
  • Core Methods: GET (request resource), HEAD (request headers only), POST (send client data to server), PUT (upload document to server), TRACE, CONNECT, OPTIONS.
  • Status Code Classes: 1xx (Informational), 2xx (Success, e.g., 200 OK), 3xx (Redirection), 4xx (Client Error), 5xx (Server Error).