Overview
Introduction: This chapter introduces Data Communication — the exchange of information between devices over a transmission medium. It covers fundamental concepts such as the components of a communication system (sender, receiver, medium, message, protocol), different transmission modes (simplex, half-duplex, full-duplex), types of transmission (serial vs parallel), and classification of signals (analog vs digital). Importance: Data communication is the foundation of computer networks and the Internet; understanding it enables students to grasp how devices connect, how information is encoded, transmitted, and protected, and prepares them for advanced networking, cybersecurity, and software that uses networked resources. Key themes: transmission media (guided and unguided), bandwidth, latency, bit rate vs baud rate, modulation and demodulation (basic analog and digital techniques), multiplexing (FDM, TDM), switching (circuit vs packet), error detection and correction techniques (parity, checksum, CRC, Hamming code), network devices (repeater, hub, switch, router, gateway), and an introduction to protocols and layered models (high-level overview of OSI/TCP‑IP concepts). What the…
Learning Objectives
- Define key data communication terms such as data, signal, bandwidth, latency, throughput, and channel.
- Explain modes and directions of data transmission: serial vs parallel and simplex, half‑duplex, full‑duplex.
- Differentiate between analog and digital signals and between baseband and broadband transmission.
- Describe guided and unguided transmission media (twisted pair, coaxial, optical fiber, wireless) and their characteristics.
- Apply Nyquist theorem to calculate maximum bit rate for a noiseless channel given bandwidth and signal levels.
- Calculate channel capacity using Shannon's formula for a noisy channel and interpret the effect of SNR and bandwidth.
- Explain basic modulation techniques (ASK, FSK, PSK) and their applications in data communication.
- Illustrate multiplexing techniques (FDM, TDM, WDM) and state their advantages and typical uses.
Topics in this chapter
21 topics · tap a topic title to jump straight to it.
Introduction to Data Communication
Introduction to Data Communication
Key Point: Bit rate and baud rate: bit_rate = baud_rate × bits_per_symbol (bits per baud). If each symbol encodes m bits, bits_per_symbol = log2(M) where M = number of signal levels.
What is Data Communication?
Data communication is the exchange of digital or analog information between two or more devices through a transmission medium such that the received information is an accurate representation of the sent information. It enables computers, sensors and other devices to share information and coordinate actions.
Key components
- Sender / Transmitter: Originates the message (e.g., a computer, sensor).
- Receiver: Destination that accepts the message.
- Message: The data (text, voice, video, control signals).
- Medium / Channel: Physical path (cable, optical fibre) or wireless (radio waves).
- Protocol: Rules that govern communication (format, timing, error handling).
Basic concepts and characteristics
- Bandwidth: The range of frequencies a channel can carry (Hz). Higher bandwidth → can carry more data.
- Data Rate / Bit Rate: Number of bits transmitted per second (bps).
- Latency / Propagation delay: Time for a bit to travel from sender to receiver.
- Throughput: Actual rate of successful data transfer (bps), often lower than theoretical maximum.
- Jitter: Variation in packet arrival times (important for audio/video).
- Error rate (BER): Bit Error Rate — fraction of bits received in error.
Types of signals
- Analog signals: Continuous signals (voice on telephone).
- Digital signals: Discrete levels (0 and 1) used by computers.
Transmission modes
- Simplex: One-way only (e.g., keyboard → CPU).
- Half-duplex: Two-way but not simultaneously (e.g., walkie-talkie).
- Full-duplex: Two-way simultaneously (e.g., phone call, modern Ethernet).
Transmission methods
- Serial: Bits sent one after another over a single channel (common for long-distance links).
- Parallel: Multiple bits sent simultaneously over multiple wires (used inside computers for short distances).
Transmission media
- Guided: Twisted pair cable, coaxial cable, optical fibre.
- Unguided / Wireless: Radio waves, microwaves, infrared.
Role of protocols and layering
Protocols (e.g., TCP/IP) define how devices format, address, transmit and error-check data. Layered models (OSI or TCP/IP) separate concerns so hardware and software can interoperate.
Why it matters
Data communication is the foundation of the Internet, mobile telephony, video conferencing, online banking, IoT and all distributed computing systems. Reliable, timely and secure data communication enables modern digital services.
- Email: Your computer (sender) sends a message via the Internet (channel) to a mail server and then to the recipient (receiver). Protocols: SMTP, IMAP/POP.
- Video call: Two users exchange real-time audio/video. Needs high bandwidth, low latency and low jitter (e.g., WhatsApp/Zoom).
- Streaming service (Netflix): Server sends continuous video data to many clients; throughput and buffering are important to avoid interruptions.
- Online gaming: Requires very low latency and consistent packet delivery for smooth gameplay.
- IoT sensor network: Sensors send periodic readings wirelessly to a gateway; low power and efficient protocols are crucial.
- Bank ATM transactions / POS card swipe: Secure, reliable data transfer between ATM/POS and bank servers.
- \[Bit rate and baud rate: bit_rate = baud_rate × bits_per_symbol (bits per baud)\]\[If each symbol encodes m bits\]\[bits_per_symbol = log2(M) where M = number of signal levels.\]
- \[Nyquist (noiseless channel): Maximum bit rate = 2 × B × log2(M) bits/s\]\[where B = bandwidth (Hz) and M = signal levels\]\[For binary (M=2): max = 2B bits/s.\]
- \[Shannon Capacity (noisy channel): C = B × log2(1 + S/N) bits/s\]\[where B = bandwidth (Hz)\]\[S/N = signal-to-noise power ratio (linear).\]
- \[Signal-to-noise ratio in decibels: SNR(dB) = 10 × log10(Signal/Noise).\]
- \[Propagation delay: t_prop = distance / propagation_speed (e.g., ~2 × 10^8 m/s in cable or ~3 × 10^8 m/s in vacuum).\]
- \[Transmission delay: t_trans = packet_size (bits) / bandwidth (bps).\]
Modes of Transmission
Modes of Transmission
Key Point: Serial data rate: R (bits per second, bps) — the channel transmits R bits each second.
Overview
Modes of transmission describe how data moves between devices: the direction(s) data can flow and the physical method used to send bits. Choosing a mode depends on required speed, distance, cost and whether simultaneous two‑way communication is needed.
1. By direction
- Simplex – One-way communication only. The transmitter sends and the receiver only receives. There is no return channel.
Example behaviour: sender -> receiver. - Half‑duplex – Two‑way communication but not at the same time. Devices take turns transmitting and receiving. A single channel is shared in time.
Example behaviour: A ⇄ B but only one direction at any moment. - Full‑duplex (Duplex) – Two‑way simultaneous communication. Both ends can transmit and receive at the same time, using separate channels or techniques such as echo cancellation.
Example behaviour: A ⇄⇄ B (simultaneous).
2. By physical implementation
- Serial transmission – Bits are sent sequentially over a single channel/wire. Simpler wiring, suitable for long distances and high speeds (modern high‑speed links like USB, Ethernet, SATA are serial).
- Parallel transmission – Multiple bits are sent simultaneously over multiple wires (one bit per wire). Provides high throughput over short distances but suffers from skew, crosstalk and cost issues for long runs (example: CPU bus, old parallel printer ports, PATA).
3. Framing / timing aspects (related modes)
Synchronous vs asynchronous determines how bit/byte boundaries are established:
- Synchronous – Sender and receiver share a clock or timing; data is sent in large blocks with little per‑byte overhead (used for LANs, high‑speed links).
- Asynchronous – Data sent in small units (bytes/characters) with start/stop bits; convenient for sporadic transmission (e.g., serial RS‑232). Has extra overhead per character.
Key trade-offs & selection points
- Simplex is simplest and cheapest but only for one‑way feeds (e.g., broadcast).
- Half‑duplex saves channel resources when traffic is mostly one way or intermittent.
- Full‑duplex is required for natural two‑way conversation (telephone, video conferencing) and offers best responsiveness at higher cost/complexity.
- Serial is preferred for long distances and high speeds today; parallel is useful where many bits must be transferred in parallel over short distances (e.g., within a board).
- Simplex: TV broadcast, FM/AM radio, digital signage — content flows from station to many receivers only.
- Half‑duplex: Walkie‑talkies, CB radio, old Ethernet with hubs (CSMA/CD) — users take turns; 'push‑to‑talk' is common.
- Full‑duplex: Telephone calls, mobile phones, video calls, modern switched Ethernet — both ends speak and listen simultaneously.
- Serial transmission: USB, RS‑232 serial ports, Ethernet (physical layer), SATA — bits in sequence over one pair or wire.
- Parallel transmission: CPU data bus, older parallel printer port, Parallel ATA (PATA) cables — multiple wires carrying multiple bits at once.
- \[Serial data rate: R (bits per second\]\[bps) — the channel transmits R bits each second.\]
- \[Parallel effective bit rate: R_parallel = m × R_line (where m = number of parallel lines\]\[R_line = per‑line bit rate).\]
- \[Full‑duplex aggregate throughput: T_total = R_up + R_down (if upstream and downstream rates are R_up and R_down).\]
- \[Half‑duplex effective per‑direction when time‑shared equally: average_rate_per_direction = R × 0.5 (R = channel rate)\]\[since channel is shared.\]
- \[Asynchronous framing efficiency: Efficiency = (data_bits) / (data_bits + overhead_bits) × 100% (e.g.\]\[for 8 data bits + 1 start + 1 stop = 8/10 = 80%).\]
Signals: Analog and Digital
Signals: Analog and Digital
Key Point: s(t) = A · sin(2πft + φ) — general sinusoidal analog signal (A: amplitude, f: frequency, φ: phase).
Definition: A signal is a function that conveys information. In data communication we commonly distinguish two classes:
- Analog signals are continuous in time and amplitude. They vary smoothly and can take any value in a range (e.g., a pure sine wave).
- Digital signals are discrete in time and/or amplitude. They take a finite set of values (typically two levels: 0 and 1) and change at distinct instants.
Characteristics of analog signals:
- Continuous amplitude and time.
- Described by parameters such as amplitude, frequency, and phase.
- Susceptible to noise and distortion; quality degrades with transmission and repeats.
Characteristics of digital signals:
- Discrete levels (binary or multi-level) and usually discrete time samples.
- More immune to noise—regeneration and error detection/correction possible.
- Easy to store, process, and compress using digital techniques.
Conversion between analog and digital: To send analog information over digital systems we use an ADC (Analog-to-Digital Converter) with three main steps:
- Sampling: measure the analog signal at regular time intervals.
- Quantization: map each sample to the nearest of a finite number of amplitude levels.
- Encoding: represent each quantized level as a binary code (bits).
Sampling theorem (Nyquist): To perfectly reconstruct a band-limited analog signal of maximum frequency B Hz, sample at a rate fs ≥ 2B samples/second (Nyquist rate). If sampled below this rate, aliasing occurs and information is lost.
Noise and quantization: Quantization introduces an error (quantization noise). Increasing the number of bits per sample reduces quantization error and increases Signal-to-Noise Ratio (SNR).
When to use which? Use analog when the source is inherently continuous and minimal processing is required (simple sensors, some radio transmissions). Use digital when you need robust transmission, storage, processing, encryption, or multiplexing (computers, CD/DVD, digital telephony).
- Analog: Human voice captured by a microphone, radio FM broadcast, analog temperature sensor output, vinyl record grooves.
- Digital: Computer network data packets, audio on a CD (PCM), digital camera images (pixels and bits), VoIP and digital telephony.
- \[s(t) = A · sin(2πft + φ) — general sinusoidal analog signal (A: amplitude\]\[f: frequency, φ: phase).\]
- \[Period and frequency: T = 1/f and f = 1/T.\]
- \[Angular frequency: ω = 2πf.\]
- \[Nyquist sampling rate: f_s ≥ 2B (where B is the highest frequency in the analog signal).\]
- \[Quantization step (for uniform quantizer): Δ = (V_max − V_min) / 2^n\]\[where n is number of bits.\]
- \[Approximate SNR for n-bit PCM: SNR(dB) ≈ 6.02·n + 1.76 dB (ideal case).\]
Transmission Media
Transmission Media
Key Point: Shannon Capacity: C = B · log2(1 + S/N) (bits/sec). B = bandwidth in Hz, S/N = signal-to-noise power ratio (linear).
Definition: Transmission media are physical pathways that carry information signals from a transmitter to a receiver. They are classified into guided (wired) media and unguided (wireless) media.
Key characteristics: bandwidth (available frequency range), attenuation (signal loss with distance), noise/interference susceptibility, propagation speed, cost, installation complexity, security.
Guided (Wired) Media
1. Twisted Pair (UTP/STP): Two insulated copper wires twisted to reduce electromagnetic interference. Common in telephone lines and Ethernet (Cat5e/Cat6).
Advantages: cheap, easy to install. Disadvantages: limited bandwidth (up to several hundred MHz for high categories), higher attenuation, susceptible to EMI.
2. Coaxial Cable: Central conductor, insulating layer, metallic shield, outer jacket. Used for cable TV and some broadband networks.
Advantages: higher bandwidth and lower interference than twisted pair. Disadvantages: bulkier, more expensive than twisted pair.
3. Optical Fiber: Thin glass or plastic fibers that transmit light pulses. Types: multimode (larger core, short distances) and single-mode (small core, long distances).
Advantages: extremely high bandwidth, very low attenuation, immune to EMI, long-distance transmission (undersea cables, backbone networks). Disadvantages: higher cost (though falling), specialized connectors, fragility.
Unguided (Wireless) Media
1. Radio Waves: Broadcast and mobile communications (AM/FM, Wi-Fi, cellular). Good for omnidirectional coverage and short/long distances depending on frequency and power.
2. Microwaves: Line-of-sight point-to-point links, satellite uplinks/downlinks. Higher frequency than general radio, used for backhaul and long-distance terrestrial links.
3. Infrared: Short-range, line-of-sight (remote controls, some indoor optical links). Limited to short distances and blocked by obstacles.
4. Satellite: Radio/microwave signals relayed via satellites for global coverage (TV, GPS, international communications).
Comparison summary: Fiber provides highest bandwidth and lowest attenuation; coaxial and twisted pair serve local networks; wireless provides mobility and wide coverage but is more susceptible to interference and has stricter regulatory/spectrum limits.
Selection criteria: required data rate, distance, environment (EMI, physical obstacles), cost, mobility needs, security/privacy requirements.
Practical notes: Propagation speed differs by medium (near c in vacuum; ~2 x 10^8 m/s in fiber/copper). Real link design considers attenuation, connector loss, repeaters/amplifiers, and regulatory spectrum limits for wireless.
- Home Ethernet: Cat5e/Cat6 twisted-pair cables connecting router to PC
- Cable TV / Internet: Coaxial cable from street node to households
- Fiber backbone: Undersea optical-fiber cables connecting continents
- Wi‑Fi: 2.4 GHz or 5 GHz radio links providing wireless LAN in homes/offices
- Cellular: 4G/5G mobile networks using radio/microwave spectrum
- Microwave point-to-point: Line-of-sight links between cellular towers
- \[Shannon Capacity: C = B · log2(1 + S/N) (bits/sec)\]\[B = bandwidth in Hz\]\[S/N = signal-to-noise power ratio (linear).\]
- \[Nyquist (noiseless\]\[M-ary): C = 2B · log2(M) (bits/sec)\]\[M = number of discrete signal levels.\]
- \[Attenuation (dB): A(dB) = 10 · log10(Pin / Pout). (Also often given as dB/km for cables.)\]
- \[SNR in dB: SNR(dB) = 10 · log10(S/N).\]
- \[Propagation Delay: t = d / v (seconds). d = distance\]\[v = propagation speed (~3×10^8 m/s in vacuum, ~2×10^8 m/s in fiber/copper).\]
- \[Bandwidth–Delay Product: BDP = Bandwidth (bits/sec) × RTT or propagation delay (sec) (gives bits in flight).\]
Bandwidth, Data Rate and Throughput
Bandwidth, Data Rate and Throughput
Key Point: Nyquist (noiseless channel): R_max = 2 · B · log2(M) bits/s, where B is bandwidth in Hz and M is number of discrete signal levels.
Overview: In data communications, 'bandwidth', 'data rate' and 'throughput' describe capacity and performance of a communication link but mean different things. Bandwidth is a property of the physical channel (frequency range). Data rate (bit rate) is the maximum number of bits that can be transmitted per second in ideal conditions. Throughput is the actual number of useful bits delivered per second in practice.
Bandwidth (frequency domain): Bandwidth is the width of the frequency band that a channel can carry, measured in hertz (Hz). For example, a channel that passes frequencies from 1 MHz to 4 MHz has a bandwidth of 3 MHz. In networking people sometimes use 'bandwidth' informally to mean 'data capacity' (bits per second) — be careful with context.
Data rate / Bit rate: Data rate is the theoretical maximum number of bits transmitted per second (bps) over the link given modulation and signalling. Units: bits per second (bps), Kbps, Mbps, Gbps. The Nyquist and Shannon formulas give theoretical upper bounds:
• Nyquist (noiseless, M-level signaling): R_max = 2 B log2(M) bits/s, where B is bandwidth (Hz) and M is number of signal levels.
• Shannon-Hartley (noisy channel): C = B · log2(1 + S/N) bits/s, where B is channel bandwidth (Hz) and S/N is signal-to-noise ratio (linear).
Throughput (effective data rate): Throughput (also called goodput) is what applications actually receive — the rate of successful delivery of payload bits per second. Throughput is always ≤ data rate and is affected by protocol overhead, retransmissions, collisions, latency, network congestion, and hardware limits. Units are the same as data rate (bps).
Key differences (concise): Bandwidth (Hz) describes the frequency span of the channel. Data rate (bps) is the theoretical maximum bit transmission speed for a given modulation and bandwidth. Throughput (bps) is the real, measured useful bits/sec after overhead and losses.
Factors reducing throughput relative to advertised data rate:
- Protocol overhead (headers, acknowledgements, encryption)
- Retransmissions due to errors or collisions
- Shared medium: multiple users split capacity
- Latency effects (e.g., TCP windowing)
- Physical factors: interference, distance, SNR
Practical note: Internet service providers advertise a link data rate (e.g., 100 Mbps). Your observed throughput will typically be lower. Tools like speed tests measure throughput (download/upload) not the frequency bandwidth.
- Home broadband: ISP advertises 100 Mbps download (data rate). Measured speed test shows 85 Mbps download (throughput) because of protocol overhead, ISP routing, and congestion.
- Wi‑Fi 802.11ac: The PHY rate might be 1.3 Gbps (data rate) but real throughput for a single device is often ~600–800 Mbps due to MAC overhead and collisions.
- Streaming video: A 4K Netflix stream needs about 15–25 Mbps of throughput. If your link data rate is 50 Mbps but other devices are active or Wi‑Fi signal is weak, your throughput may drop and video will buffer or downgrade quality.
- Ethernet: A 100 Mbps Ethernet link has a raw data rate of 100 Mbps. After Ethernet/IP/TCP headers and occasional retransmissions, the maximum achievable throughput for a file transfer might be slightly less (e.g., ~94–98 Mbps).
- Mobile networks: 4G/LTE may advertise peak data rates (e.g., 150 Mbps) but real throughput varies with user density, signal quality, and backhaul capacity.
- \[Nyquist (noiseless channel): R_max = 2 · B · log2(M) bits/s\]\[where B is bandwidth in Hz and M is number of discrete signal levels.\]
- \[Shannon-Hartley (noisy channel maximum capacity): C = B · log2(1 + S/N) bits/s\]\[where S/N is the linear signal-to-noise ratio (not in dB).\]
- \[Convert SNR(dB) to linear: S/N_linear = 10^(SNR_dB / 10).\]
- \[Throughput (approximate effective payload rate): Throughput ≈ Raw_data_rate × Efficiency\]\[where Efficiency = payload_size / (payload_size + overhead) × (1 − retransmission_fraction).\]
- \[Example calculation (Shannon): If B = 3 MHz and SNR = 30 dB → S/N = 10^(30/10) = 1000\]\[then C = 3×10^6 · log2(1+1000) ≈ 3×10^6 · 9.97 ≈ 29.9 Mbps.\]
- \[Example calculation (efficiency): For a 1500‑byte Ethernet frame with 1460 bytes payload\]\[Efficiency ≈ 1460/1500 ≈ 0.973\]\[If raw rate = 100 Mbps\]\[ideal throughput ≈ 100 × 0.973 = 97.3 Mbps (ignoring other headers and retransmits).\]
Transmission Impairments and Noise
Transmission Impairments and Noise
Key Point: Gain (dB) = 10 log10(P_out / P_in)
Overview
When data travels over a communication medium (copper, fiber, wireless), the transmitted signal undergoes changes before reaching the receiver. These undesirable changes are called transmission impairments. Impairments reduce signal strength and fidelity and increase the probability of errors. The main categories are attenuation, distortion and noise. Understanding them and how to measure/mitigate them is essential for reliable communication.
1. Attenuation
- Definition: The reduction in signal power as it propagates through a medium. Attenuation increases with distance and frequency (in many media).
- Effect: Lower received signal power; if too weak, the receiver cannot distinguish signal from noise, causing bit errors or loss of connectivity.
- Causes: Resistive losses in conductors, dielectric losses, radiation loss, absorption in the medium.
- Mitigation: Use amplifiers/repeaters, higher transmission power, lower-loss media (fiber), or shorter link segments.
2. Distortion
- Definition: Change in the waveform shape of the signal due to the medium not transmitting all frequency components equally.
- Types:
- Frequency (Amplitude) distortion — channel gain varies with frequency (non-flat frequency response).
- Delay/Phase distortion — different frequency components travel with different delays (non-linear phase vs frequency), causing pulse spreading.
- Intersymbol Interference (ISI) — pulses spread and overlap adjacent symbol intervals, making symbols indistinguishable.
- Effect: Increased bit errors; reduced maximum data rate for a given medium.
- Mitigation: Equalization, pulse-shaping, matched filtering, using channels with flatter frequency response, limiting data rate to channel capacity.
3. Noise
Noise is unwanted random electrical signals that get added to the transmitted signal. Noise reduces the Signal-to-Noise Ratio (SNR) and increases bit-error-rate (BER).
- Thermal (Johnson–Nyquist) noise: Generated by thermal agitation of electrons in resistors and electronic components. It is white (flat spectrum) and unavoidable. Noise power ∝ temperature and bandwidth.
- Intermodulation noise: Nonlinear devices create new frequencies that interfere; e.g., two signals mixing in a transmitter amplifier produce sum/difference frequencies.
- Crosstalk: Signal from one wire/cable couples into another (nearby pairs in cable bundles, adjacent telephone lines, or channels).
- Impulse noise: Short-duration, high-amplitude spikes caused by switching, lightning, motor brushes, etc. Particularly harmful to digital signals (can corrupt many bits).
- Shot noise: Due to discrete nature of electric charge in devices (important in photodetectors).
Measurements and important concepts
- Signal-to-Noise Ratio (SNR): Ratio of signal power (S) to noise power (N). Higher SNR means cleaner reception. Often expressed in decibels (dB).
- Decibel (dB): Logarithmic unit to express power ratios: Gain(dB) = 10 log10(Pout / Pin). For voltages with same impedance: 20 log10(Vout / Vin).
- Channel capacity: Noise limits the maximum reliable data rate. Two key formulas:
- Nyquist (noiseless channel): C = 2 B log2 M (bits/sec) — B is bandwidth in Hz, M is number of discrete signal levels.
- Shannon (noisy channel): C = B log2(1 + S/N) (bits/sec) — B is bandwidth, S/N is linear SNR.
Effects on communication
Impairments reduce usable SNR, limit achievable bit rates, increase BER, and may require retransmissions. The design of a communication system selects coding, modulation, equalization and physical medium to trade off cost, complexity and performance.
Mitigation techniques (summary)
- Attenuation: amplifiers/repeaters, optical fiber, higher transmit power.
- Distortion/ISI: equalization, pulse shaping, limiting symbol rate, channel coding.
- Noise: shielding, twisted-pair, filtering, low-noise amplifiers, error detection and correction, increasing bandwidth or SNR.
End of summary suitable for Class 12 Data Communication study: focus on definitions, causes, effects, measurements (SNR, dB), key formulas and common mitigation methods.
- Phone call with static: Attenuation and thermal noise reduce volume and clarity; impulse noise (switching) may cause clicks.
- DSL Internet speed drops with copper distance: Greater attenuation and distortion over longer phone lines reduce data rate.
- TV 'snow' or fuzzy picture in analog TV: Low SNR and interference (crosstalk, impulse noise) degrade the received image.
- Wi‑Fi dropouts near microwave ovens: Interference (electromagnetic noise) and multipath distortion reduce throughput.
- Crosstalk in bundled Ethernet cables: Signals from adjacent pairs induce unwanted voltages, increasing bit errors unless cable is twisted/shielded.
- Lightning strike causes impulse noise on power and phone lines resulting in many corrupted packets or a temporary loss of service.
- \[Gain (dB) = 10 log10(P_out / P_in)\]
- \[Attenuation (loss) in dB = 10 log10(P_in / P_out) = -Gain(dB)\]
- \[Voltage ratio in dB (same impedance) = 20 log10(V_out / V_in)\]
- \[Exponential power decay with distance: P(d) = P(0) · e^{-α d} (α = attenuation coefficient)\]
- \[Signal-to-Noise Ratio (linear): SNR = S / N\]
- \[SNR in decibels: SNR(dB) = 10 log10(S / N)\]
Line Coding and Data Encoding
Line Coding and Data Encoding
Key Point: Bit duration: Tb = 1 / Rb (Tb in seconds, Rb = bit rate in bits/sec)
What is Line Coding?
Line coding is the process of converting a digital bit stream (0s and 1s) into a digital signal suitable for transmission over a physical medium. It determines the waveform level assigned to each bit interval so the receiver can recover the transmitted bits.
Why line coding? (Objectives)
- Make the signal suitable for the channel (match voltage levels, reduce DC component).
- Provide synchronization between sender and receiver (clock recovery).
- Reduce bandwidth requirement and inter-symbol interference (ISI).
- Provide simple error detection and reduce baseline wander.
Basic parameters and definitions
- Bit rate (Rb): number of bits per second.
- Bit duration (Tb): Tb = 1 / Rb.
- Baud (symbol rate): number of signal changes (symbols) per second. Baud = Rb / (bits per symbol).
- DC component (average voltage): Vavg = (1/T) ∫ v(t) dt over a long interval. Some codes aim to make Vavg = 0 (DC-balanced).
Common line coding schemes (with short descriptions)
- Unipolar NRZ (Non-Return-to-Zero): Logical '1' = high voltage, '0' = zero voltage. Simple but has DC component and poor synchronization for long runs of zeros or ones.
- Polar NRZ-L: '1' = +V, '0' = -V (level-based). No baseline wander is better than unipolar but still has synchronization issues for long runs.
- NRZ-I (Invert on ones): A transition at the start of a '1' bit; no transition on '0'. Helpful for clock recovery in some protocols.
- Return-to-Zero (RZ): Signal returns to zero in middle of bit interval. Easier synchronization but uses more bandwidth.
- Manchester: Each bit interval has a transition: '0' = high-to-low, '1' = low-to-high (convention may vary). Self-clocking and no DC component; bandwidth roughly equals bit rate.
- Differential Manchester: Transition at middle of interval always; the presence/absence of transition at the start encodes bits. Robust to polarity inversion.
- AMI (Alternate Mark Inversion): '0' = 0V, '1' = alternating +V and -V. DC-free but long runs of zeros cause loss of synchronization.
- Pseudoternary: Like AMI but zeros and ones swapped (zero is bipolar, one is zero).
- Bipolar with 8-Zero Substitution (B8ZS): AMI with special replacement patterns for runs of eight zeros (used in T1 lines) to maintain synchronization and preserve bipolar violations for detection.
- HDB3 (High Density Bipolar 3): Used in E1 lines; replaces runs of four zeros with sequences containing bipolar violations to maintain synchronization and DC balance.
- Multilevel (MLT-3): Uses three voltage levels and cycles through them to represent transitions (used in some Ethernet variants).
- Block/line encodings (4B/5B, 8B/10B): Map groups of bits to codewords that guarantee enough transitions (clocking) and DC balance; used before physical layer line coding in high-speed links.
Data encoding vs. line coding
Data encoding refers to transformations applied to the bit stream (e.g., block coding like 4B/5B, bit stuffing, scrambling, 8B/10B) to ensure properties such as enough transitions and DC balance. Line coding is the actual waveform assignment (NRZ, Manchester, AMI, etc.). Often they are used together: data encoding first, then line coding.
Advantages & disadvantages — summary
- NRZ: low bandwidth, simple, but poor synchronization and DC component issues.
- Manchester: self-clocking and no DC but uses more bandwidth (about twice NRZ bandwidth).
- AMI/Bipolar with B8ZS/HDB3: DC balanced and good for long-distance digital transmission with substitutions to maintain sync.
- Block codes (4B/5B, 8B/10B): ensure enough transitions and DC balance at the cost of overhead (extra bits).
How a receiver recovers clock
Clock recovery uses transitions in the signal. Codes that guarantee frequent transitions (Manchester, 4B/5B+NRZ) make synchronization simpler. For codes that allow long runs without transitions, additional mechanisms (bit stuffing, substitution codes like B8ZS) are used.
Practical usage / where you see these in real life
- Ethernet (10BASE-T): Manchester encoding used in early 10 Mbps Ethernet.
- USB (low-level): NRZI with bit stuffing for synchronization.
- T1 lines (North America): AMI with B8ZS substitution.
- E1 lines (Europe): HDB3 substitution on bipolar signals.
- High-speed serial links (Gigabit, PCIe et al.): 8B/10B or other block encodings combined with appropriate line coding for DC balance and transitions.
Summary
Line coding and data encoding are essential steps that transform raw bits into a transmitted waveform that supports synchronization, reduces errors and suits the physical channel. Choice of scheme is a trade-off among bandwidth, complexity, power/voltage levels, DC balance and synchronization ability.
- Manchester encoding in 10BASE-T Ethernet: each bit has a transition, making the signal self-clocking; a 1011 sequence produces a waveform with mid-bit transitions for each bit.
- NRZI (Non-Return-to-Zero Inverted) in USB: a '1' is represented by a transition, '0' by no transition; bit stuffing inserts a '0' after six consecutive '1's to maintain clocking.
- T1 carrier using AMI with B8ZS: long runs of zeros are replaced by special bipolar violation patterns so the receiver can maintain synchronization and detect errors.
- E1 lines using HDB3: runs of four zeros are substituted with patterns containing bipolar violations that keep the signal DC-balanced and provide transitions for clock recovery.
- \[Bit duration: Tb = 1 / Rb (Tb in seconds\]\[Rb = bit rate in bits/sec)\]
- \[Baud (symbol rate): baud = Rb / (bits per symbol)\]
- \[Nyquist relation for noiseless baseband channel: maximum bit rate = 2B * log2(M) (for M signal levels\]\[B = channel bandwidth)\]
- \[Approximate minimum baseband bandwidth for binary signalling: B >= Rb / 2 (ideal Nyquist baseband\]\[practical codes may need more)\]
- \[Average (DC) voltage over interval T: Vavg = (1/T) * integral from 0 to T of v(t) dt (used to check DC component of a code)\]
Analog and Digital Modulation
Analog and Digital Modulation
Key Point: Carrier signal: c(t) = A_c cos(2π f_c t + φ_c)
What is modulation? Modulation is the process of varying one or more properties of a high-frequency carrier signal (usually a sinusoid) in accordance with a lower-frequency information (message) signal so that the message can be efficiently transmitted over a channel.
Why modulate? To shift the spectrum of the message to a carrier frequency for efficient transmission, to allow multiplexing many signals on one medium, to match channel characteristics (antennas, cables), and to improve signal-to-noise performance.
Two broad categories
1. Analog modulation: The information (message) is an analog waveform and it continuously varies some property of the carrier.
- Amplitude Modulation (AM) — the carrier amplitude is varied in proportion to the message. Common in medium-wave radio broadcasting.
- Frequency Modulation (FM) — the instantaneous frequency of the carrier is varied by the message. Used in FM radio and audio transmission where noise immunity is important.
- Phase Modulation (PM) — the instantaneous phase of the carrier is varied by the message. PM and FM are closely related (PM alters phase directly; FM alters phase over time through frequency changes).
2. Digital modulation: The information is digital (bits). The carrier is changed between a finite set of states representing bit patterns.
- ASK (Amplitude Shift Keying) — carrier amplitude switched between two or more levels (binary ASK uses two: presence/absence).
- FSK (Frequency Shift Keying) — carrier frequency switches between discrete frequencies for different bit values (used in modems, Bluetooth variants).
- PSK (Phase Shift Keying) — carrier phase is shifted to represent bits (BPSK = 2 phases, QPSK = 4 phases). Widely used in digital cellular and satellite links.
- QAM (Quadrature Amplitude Modulation) — combination of amplitude and phase shifts to increase bits per symbol (used in Wi‑Fi, cable modems).
Key differences (summary)
- Analog modulation transmits continuous amplitudes; digital modulation transmits discrete symbols (bits).
- Digital modulation is generally more spectrally efficient and more robust to noise (with error-control coding), while analog methods can be simpler and still useful for continuous signals (e.g., analog broadcast audio).
Performance measures: bandwidth required, power efficiency, noise immunity, bit/symbol rate, and spectral efficiency.
Practical considerations & examples
- AM radio: simple transmitter/receiver, susceptible to noise (noise adds to amplitude).
- FM radio: larger bandwidth but better noise immunity for audio.
- Cellular/Wi‑Fi: use PSK/QAM and OFDM to pack many bits into constrained spectrum with error correction.
- Modems: convert digital data to analog signals for phone lines using techniques such as QAM or PSK.
- AM radio broadcasting: audio signal modulates carrier amplitude; typical at medium wave (MW) bands.
- FM radio broadcasting: audio modulates carrier frequency, providing noise-resistant stereo audio.
- Wi‑Fi (802.11) and LTE use QAM and PSK (e.g., 16-QAM, 64-QAM, QPSK) to send multiple bits per symbol.
- Bluetooth (classic) uses Gaussian FSK (GFSK) for digital data transmission.
- A dial-up modem converts a computer's digital bits into analog tones (FSK/PSK/QAM) to send over telephone lines.
- \[Carrier signal: c(t) = A_c cos(2π f_c t + φ_c)\]
- \[AM modulated signal (simple\]\[DSB-TC): s_AM(t) = [1 + m(t)] · A_c cos(2π f_c t)\]\[where m(t) is normalized message and |m(t)| < 1 for no overmodulation.\]
- \[AM modulation index (depth): μ = A_m / A_c (or μ = (V_max - V_min) / (V_max + V_min) measured from envelope).\]
- \[FM instantaneous frequency: f_i(t) = f_c + k_f · m(t)\]\[The FM signal: s_FM(t) = A_c cos(2π ∫ f_i(t) dt + φ_0).\]
- \[PM signal: s_PM(t) = A_c cos(2π f_c t + k_p · m(t)).\]
- \[Carson's rule (approx\]\[FM bandwidth): BW ≈ 2(Δf + f_m)\]\[where Δf is peak frequency deviation and f_m is highest modulating frequency.\]
Multiplexing
Multiplexing
Key Point: FDM total bandwidth: B_total = Σ B_i + Σ Guard_Bands (where B_i is bandwidth of each channel)
Definition: Multiplexing is a technique that combines multiple independent signals or data streams for transmission over a single shared communication channel or medium. At the sender a multiplexer (MUX) combines signals; at the receiver a demultiplexer (DEMUX) separates them.
Why needed: To use expensive channel resources efficiently (reduce cost), increase channel utilization, and enable many users/devices to share the same physical link.
Basic idea: Each input signal is assigned a distinct resource (frequency band, time slot, wavelength, code, or space) so signals can be transmitted simultaneously without interfering.
Common types:
- Space Division Multiplexing (SDM): Each channel uses a separate physical path (different wires, fiber cores, or antenna elements). Simple but requires separate physical media.
- Frequency Division Multiplexing (FDM): Each signal is modulated onto a different carrier frequency and occupies a distinct frequency band. Bands are separated by guard bands to avoid overlap. Typical in analog radio/TV and cable systems.
- Wavelength Division Multiplexing (WDM): Optical equivalent of FDM: different data streams use different wavelengths (colors) of light on the same optical fiber. DWDM (Dense WDM) packs many closely spaced wavelengths for high-capacity backbone links.
- Time Division Multiplexing (TDM): Each signal is allocated recurring time slots on the channel. In synchronous (fixed) TDM slots are preassigned even if empty. In statistical (asynchronous) TDM slots are assigned dynamically to active users, improving utilization.
- Code Division Multiplexing (CDM / CDMA): All users transmit simultaneously over the same frequency and time but use different orthogonal or pseudo‑random codes (spreading sequences). Receiver correlates with the user’s code to extract the signal.
Key components: Multiplexer (combines inputs), channel/medium, demultiplexer (separates outputs), guard bands or time synchronization or codes as needed.
Advantages and trade-offs: Multiplexing increases channel efficiency and capacity. Each technique has trade-offs: FDM/WDM need filtering and guard bands; TDM needs tight timing synchronization and buffering; CDM requires complex code management and receiver processing.
How to choose: Choice depends on medium (optical favors WDM), traffic type (bursty traffic favors statistical TDM), cost, complexity, and required capacity.
- FDM: Radio broadcasting – different radio stations occupy different frequency bands on the FM/AM spectrum.
- FDM/WDM: Cable TV and analog/digital cable systems where many TV channels share the same coax/fiber.
- WDM: Internet backbone fiber networks use DWDM to carry many high-speed channels (wavelengths) on a single fiber.
- TDM: Digital telephone systems (e.g., T1/E1) and multiplexing of many voice calls into one digital trunk using assigned time slots.
- Statistical TDM: Packet-switched networks or multiplexers that allocate transmission slots based on active users, improving utilization for bursty data.
- CDM/CDMA: Mobile cellular systems (3G CDMA family) and GPS signals where different satellites use distinct spreading codes.
- \[FDM total bandwidth: B_total = Σ B_i + Σ Guard_Bands (where B_i is bandwidth of each channel)\]
- \[TDM frame duration: T_frame = N × T_slot (N = number of channels\]\[T_slot = duration of one slot)\]
- \[TDM bit-rate relation: R_total = N × R_channel (if each channel has same data rate R_channel and slots are fully used)\]
- \[Channel throughput per user (TDM): R_user = (bits_per_slot) / T_frame × (frames_per_second) = bits_per_slot × frame_rate\]
- \[Statistical TDM utilization ≈ (number_of_active_channels / total_channels) × 100% (depends on traffic statistics)\]
- \[CDM capacity (rough notion): maximum simultaneous users ≤ spreading_factor (code length) for orthogonal codes under ideal conditions\]
Switching Techniques
Switching Techniques
Key Point: Transmission delay = L / R (L = packet size in bits, R = link bandwidth in bits/sec)
Overview
Switching techniques are methods used in networks to move data from a source to a destination across intermediate devices (switches, routers). The main switching types taught in Class 12 are circuit switching, message switching and packet switching (including virtual circuit and datagram approaches). Each technique differs in how resources (bandwidth, buffers) are allocated, how data is segmented, and how delays occur.
Circuit Switching
- Definition: A dedicated communication path (circuit) is established between sender and receiver before data transfer begins and held for the entire session.
- Working: Three phases — (1) circuit setup (signalling), (2) data transfer along the dedicated path, (3) circuit release.
- Advantages: Constant delay and steady bandwidth, suitable for real-time voice.
- Disadvantages: Inefficient if channel is idle (resources reserved even when not sending data); setup overhead.
Message Switching (Store-and-Forward)
- Definition: Entire messages are sent to intermediate switches which store the whole message, then forward it when the next link is free.
- Working: No dedicated path. Each intermediate node stores the whole message and forwards it when possible (hence 'store-and-forward').
- Advantages: No need for end-to-end dedicated path; flexible routing.
- Disadvantages: Large storage needed at switches; high delay for long messages; inefficient for large messages.
Packet Switching
- Definition: Data is broken into smaller units called packets. Each packet is routed independently (datagram) or follows a pre-established virtual circuit (virtual circuit).
- Datagram (connectionless): Each packet carries full addressing and may take different paths. Examples: IP packets on the Internet.
- Virtual Circuit (connection-oriented): A route is established and packets are labeled to follow that route (e.g., Frame Relay, ATM).
- Advantages: Efficient use of network resources, good for bursty traffic, scalable.
- Disadvantages: Variable delay (jitter); packets can be reordered or dropped and need reassembly/error control.
Delay Components (used in all switching types)
- Processing delay: Time routers/switches take to examine header and determine forwarding.
- Queuing delay: Time packets wait in queues when outgoing link is busy.
- Transmission delay (L/R): Time to push all packet bits onto the link — depends on packet length L (bits) and link bandwidth R (bits/sec).
- Propagation delay (d/s): Time for signal to travel physical link distance d at propagation speed s.
When to Use Which Technique
- Circuit switching: best for constant-rate, real-time services (classic telephone voice).
- Message switching: historical/legacy store-and-forward systems (telex; some email relay behavior).
- Packet switching: best for bursty data and modern networks (Internet, LAN/WAN data traffic).
Summary Comparison (short)
- Circuit: dedicated path, fixed bandwidth, low jitter, inefficient for idle times.
- Message: whole-message store-and-forward, high storage & delay for large messages.
- Packet: segmented data, statistical multiplexing, efficient but variable delay.
Class 12 Key Points to Remember
- Packet switching underlies the Internet (IP uses datagram model; TCP provides reliability above it).
- Virtual circuits combine advantages of circuit (ordered delivery) and packet (resource sharing).
- Know the four delay components and the basic formulas for transmission and propagation delays.
- Circuit switching: Traditional landline telephone system establishing a dedicated call path between two phones.
- Message switching: Early telegraph/telex systems and some email relay behavior where whole messages are stored and forwarded.
- Packet switching (datagram): The Internet (IP) where web pages and emails are split into packets that travel independently.
- Packet switching (virtual circuit): Frame Relay and ATM networks where a logical path is set up before data transfer.
- \[Transmission delay = L / R (L = packet size in bits\]\[R = link bandwidth in bits/sec)\]
- \[Propagation delay = d / s (d = link length in meters\]\[s = propagation speed ≈ 2×10^8 m/s in copper/fiber approx.)\]
- \[Total node-to-node delay = processing_delay + queuing_delay + transmission_delay + propagation_delay\]
- \[End-to-end store-and-forward delay through N links ≈ Σ_i (processing_i + queuing_i + L/R_i + d_i/s_i) (sum over all links i)\]
Network Topologies
Network Topologies
Key Point: Links in a full mesh (undirected): L = n(n - 1) / 2, where n = number of nodes.
What is a network topology? A network topology is the arrangement or layout of nodes (computers, printers, routers) and the links (cables, wireless connections) that connect them. Topology determines how devices communicate, how data flows, and the network's reliability, scalability and cost.
Why it matters: Different topologies affect performance, fault tolerance, installation/maintenance cost and ease of expansion. Understanding topologies helps choose the right design for a given requirement (small office, campus, WAN backbone, etc.).
Common physical topologies:
- Bus topology: Single backbone cable to which all nodes are attached. Data sent by a node travels along the bus and is seen by all devices.
- Advantages: simple, low cable cost for few nodes.
- Disadvantages: single point of failure (backbone fault), performance degrades as nodes increase, collisions on shared medium.
- Typical use: historical Ethernet (coax) and small temporary networks.
- Star topology: All nodes connect to a central device (hub, switch or router). Communication between two nodes passes through the central device.
- Advantages: easy to install and manage, single cable failure affects only one node, centralized troubleshooting.
- Disadvantages: central device is a single point of failure; more cabling than bus.
- Typical use: modern LANs (offices, homes with Wi‑Fi/AP or switches).
- Ring topology: Nodes are connected in a closed loop. Each node has two neighbors and data travels in one or both directions around the ring.
- Advantages: predictable performance under moderate load; can implement token passing to avoid collisions.
- Disadvantages: failure of one link/node can break the ring unless dual rings or bypass mechanisms exist.
- Typical use: some MANs (e.g., legacy Token Ring, FDDI).
- Mesh topology: Every node connects to one or more other nodes. In a full mesh, every node connects directly to every other node.
- Advantages: very high redundancy and fault tolerance; alternate paths exist for traffic.
- Disadvantages: cabling and port cost grows quickly; complex to install (especially full mesh).
- Typical use: WAN backbones, critical links between routers (partial/full mesh).
- Tree (hierarchical) topology: Groups of star-configured networks are connected to a linear bus backbone. It’s hierarchical—root at top, branches below.
- Advantages: scalable, easy to expand by adding branches; centralised management within branches.
- Disadvantages: backbone failure can impact entire branches; more complex than simple star.
- Typical use: campus networks, large organizations with departmental subnets.
- Hybrid topology: Combination of two or more different topologies (e.g., star-bus, star-ring) to meet specific needs.
- Advantages: can be tailored for performance, reliability and cost.
- Disadvantages: complexity in design and troubleshooting.
Comparison criteria:
- Reliability: Mesh > Star > Tree > Ring > Bus (approx.).
- Scalability: Tree/Hierarchical and hybrid designs scale better than simple bus or ring.
- Cost: Bus (low for few nodes) < Star < Mesh (very high for full mesh).
- Performance: Depends on medium access method and load. Shared-media (bus) suffers as nodes increase; switched star gives dedicated bandwidth per link.
Physical vs Logical topology: Physical topology is the actual layout of cables and devices. Logical topology is how data flows over the network (for example, a physically-star network can behave logically like a bus if hubs are used).
Design tips for real networks: use star or hierarchical designs for LANs; use partial/full mesh between critical routers in a WAN for redundancy; prefer switches over hubs to reduce collisions; plan for redundancy and scalability.
- Small office LAN using a star: computers connect to a central switch. If one computer fails, others keep working; if the switch fails, network goes down.
- Old Ethernet (coax) and some cable TV distribution resemble bus topology where a single coaxial cable carries signals to all taps.
- Token Ring / FDDI metropolitan networks used a ring physical or logical topology to manage media access.
- Internet service provider backbone often uses partial/full mesh between major routers to provide redundancy and multiple paths.
- Campus network in a school using tree topology: central core router connects to department switches (branches) which connect to classroom PCs.
- Peer-to-peer applications and some ad-hoc wireless networks form mesh-like topologies where many nodes connect directly to several neighbours.
- \[Links in a full mesh (undirected): L = n(n - 1) / 2\]\[where n = number of nodes.\]
- \[Links in a star topology: L = n - 1 (each node has one link to central device).\]
- \[Links in a ring topology: L = n (each node connects to two neighbours\]\[total distinct links equals n).\]
- \[Links in a tree (connected acyclic graph) with n nodes: L = n - 1.\]
- \[Approximate shared-bandwidth per node in a simple shared medium (bus): effective_bandwidth ≈ B / n (B = total medium bandwidth\]\[n = active contending nodes).\]
Network Devices
Network Devices
Key Point: Propagation delay (s) = distance (m) / propagation speed (m/s) — time for a signal to travel the medium.
Network devices are hardware components that connect computers and other devices to form a communication network. Each device performs one or more functions such as signal regeneration, switching, routing, protocol translation, security, or wireless access. In the context of CBSE Class 12 Data Communication, the main devices to know are: repeater, hub, bridge, switch, router, gateway, modem, NIC (Network Interface Card), access point, and firewall.
How they work and OSI-layer mapping
- Repeater (Physical layer): Regenerates and amplifies electrical or optical signals to extend transmission distance. It does not inspect frames.
- Hub (Physical layer): A multiport repeater that broadcasts incoming bits to all ports; causes collisions in Ethernet shared media.
- Bridge (Data Link layer): Filters and forwards frames based on MAC addresses; segments collision domains but keeps one broadcast domain.
- Switch (Data Link layer): Maintains a MAC address table to forward frames only to the destination port; reduces collisions and increases throughput. Managed switches can operate at higher layers for VLANs.
- Router (Network layer): Forwards packets between networks using IP addresses and routing tables; determines best path and connects different network types.
- Gateway (Application/Transport/Network layers as needed): Translates between different protocols or architectures (for example, email gateway, VoIP gateway); often implemented in software appliances.
- Modem (Physical/Data Link): Modulates digital data to analog signals (and demodulates back) for transmission over telephone or cable lines (e.g., DSL/Cable modems).
- NIC (Physical/Data Link): Provides the physical connection and MAC addressing for a host to join a LAN or wireless network.
- Access Point (AP) (Data Link/Physical): Enables wireless devices to join a wired network; acts as a bridge between wireless clients and the wired switch.
- Firewall / Proxy (Network/Application): Enforces security policies by filtering traffic (packet/port/application level), NAT, proxying requests, and logging connections.
Key differences and usage
- Repeaters and hubs are simple signal extenders/broadcasters — low intelligence, low cost, suited only for basic physical extension.
- Switches and bridges provide frame-level intelligence — appropriate for LAN segmentation and performance improvement.
- Routers and gateways connect different networks and handle inter-network traffic, IP routing, NAT, and often firewalling.
- Modems and access points enable connectivity across media (telephone/cable lines, wireless air).
Advantages/Disadvantages (summary)
- Switches: high performance, reduces collisions, supports VLANs; but costlier than hubs.
- Routers: enable internetworking and policy control; add latency and require configuration.
- Firewalls/Gateways: essential for security and protocol translation; can become bottlenecks if underpowered.
Understanding where each device sits in a network and what problem it solves helps design robust, scalable, and secure networks used in homes, offices, and the Internet.
- Home broadband: a single device that acts as modem + router + wireless access point to connect home devices to the ISP and provide Wi‑Fi.
- Office LAN: managed switches connect desktop PCs in a star topology; a router connects the office LAN to the company WAN/Internet; a firewall appliance protects the network perimeter.
- Wi‑Fi hotspot in a cafe: access point bridges wireless customers to the cafe's wired network and often to a captive-portal gateway for authentication.
- Repeater (or range extender): placed in a large house to amplify Wi‑Fi signals so distant rooms get usable coverage.
- ISP backbone: high-performance routers forward traffic between autonomous systems; switches/optical multiplexers operate inside data centers.
- \[Propagation delay (s) = distance (m) / propagation speed (m/s) — time for a signal to travel the medium.\]
- \[Transmission delay (s) = packet size (bits) / link bandwidth (bits/s) — time to put all packet bits onto the link.\]
- \[Total end-to-end delay ≈ transmission delay + propagation delay + processing delay + queuing delay.\]
- \[Bandwidth-Delay Product (bits) = bandwidth (bits/s) × round-trip time (s) — amount of data 'in flight'.\]
- \[Shannon capacity (bps): C = B × log2(1 + S/N)\]\[where B is bandwidth (Hz)\]\[S/N is signal-to-noise power ratio.\]
- \[Nyquist (noiseless) maximum data rate: C = 2 × B × log2(M)\]\[where M = number of signal levels per symbol.\]
Protocols and Standards
Protocols and Standards
Key Point: Bandwidth (bits/sec) = Data size (bits) / Time (seconds)
Introduction
In data communication, a protocol is a set of rules that govern how data is formatted, transmitted, received and interpreted between communicating devices. A standard is a formally agreed specification (by a standards body) that ensures interoperable implementation of protocols, hardware and formats across vendors and networks.
Key components of a protocol
- Syntax — structure and format of the data (e.g., packet/frame layout, headers).
- Semantics — meaning of each field and control information (what actions to take).
- Timing — when data should be sent, synchronization, sequencing and timeout rules.
- Error control — detection and correction mechanisms (checksums, CRC, ARQ).
- Flow control — prevents sender from overwhelming receiver (stop-and-wait, sliding window).
- Addressing & naming — how endpoints are identified (IP addresses, MAC addresses, domain names).
Layering and encapsulation
Protocols are usually organized in layers (OSI or TCP/IP models). Each layer provides services to the layer above and uses services from the layer below. Data is encapsulated with headers/trailers as it goes down the stack and decapsulated on the receiving side.
Common protocol examples (by function)
- Application layer: HTTP/HTTPS (web), FTP/SFTP (file transfer), SMTP/POP3/IMAP (email), DNS (name resolution), DHCP (address assignment).
- Transport layer: TCP (reliable, connection-oriented), UDP (unreliable, connectionless), SCTP.
- Network/Internet layer: IP (IPv4/IPv6), ICMP (control messages).
- Link/Physical layer: Ethernet (IEEE 802.3), Wi‑Fi (IEEE 802.11), Bluetooth (IEEE 802.15).
- Security: SSL/TLS (encryption for web), IPSec (secure IP), SSH (secure shell).
Standards bodies
- ISO (International Organization for Standardization) — OSI model.
- IEEE — LAN/WAN standards (802.3 Ethernet, 802.11 Wi‑Fi).
- IETF — Internet standards (RFCs) for TCP/IP protocols.
- W3C — Web standards (HTML, CSS).
- ITU‑T — telecommunication standards.
- ICANN — domain name administration.
Why protocols and standards matter
- Interoperability: devices from different vendors can communicate.
- Scalability and modularity via layering.
- Security and reliability by defining tested mechanisms.
- Ease of development: developers follow standard rules rather than reinventing behavior.
Typical protocol behaviors and mechanisms
- Handshaking: setup steps before data transfer (e.g., TCP three‑way handshake).
- Segmentation & reassembly: large messages split into smaller packets and reassembled at receiver.
- Retransmission: if acknowledgment not received, packets are resent (ARQ).
- Congestion control: algorithms to avoid network congestion (TCP congestion window, AIMD).
- Encoding & character standards: ASCII, Unicode, MIME for e‑mail content types.
Class 12 focus points: Understand the role of major protocols (HTTP, TCP/UDP, IP, DNS, SMTP), the concept of layering and encapsulation, how handshakes and flow/error control work, and why standards bodies exist.
- Browsing a website: DNS resolves the domain name to an IP address, TCP establishes a connection with a three‑way handshake, HTTP requests and responses transfer the web page, and TLS/HTTPS can encrypt the session.
- Sending email: A mail client uses SMTP to send outgoing mail to an SMTP server; recipients retrieve mail using POP3 or IMAP.
- Streaming video: Video chunks delivered over HTTP or RTP/UDP; adaptive bitrate algorithms adjust quality based on network conditions.
- File transfer: FTP or SFTP (secure) is used to upload/download files between client and server.
- Wi‑Fi network access: IEEE 802.11 defines PHY and MAC layers; DHCP assigns IP addresses automatically to devices.
- Bluetooth file or audio transfer: Uses IEEE 802.15.x standards for short‑range communication between devices.
- \[Bandwidth (bits/sec) = Data size (bits) / Time (seconds)\]
- \[Transmission time (seconds) = Frame size (bits) / Bandwidth (bits/sec)\]
- \[Propagation delay (seconds) = Distance (meters) / Propagation speed (≈2×10^8 m/s in copper/fiber\]\[≈3×10^8 m/s in vacuum)\]
- \[Round‑Trip Time (RTT) ≈ 2 × Propagation delay (for two‑way trip)\]
- \[Bandwidth‑Delay Product = Bandwidth (bits/sec) × RTT (seconds) — amount of data 'in flight' in the network\]
- \[Stop‑and‑Wait efficiency ≈ TransTime / (TransTime + RTT) where TransTime = Transmission time of a frame\]
OSI and TCP/IP Models
OSI and TCP/IP Models
Key Point: Transmission delay (time to push bits onto link) = L / R, where L = packet length (bits), R = link bandwidth (bits/sec).
Introduction: The OSI (Open Systems Interconnection) and TCP/IP models are layered frameworks that describe how data is transmitted over a network. They divide networking tasks into layers so that each layer can perform a specific function and interact with adjacent layers.
OSI Model (7 layers) — conceptual model used for teaching and design. Layers (top to bottom):
- Application (Layer 7): Interface for end-user applications (web browser, email client). Provides services like HTTP, SMTP, FTP, DNS.
- Presentation (Layer 6): Data representation, encryption/decryption, compression (e.g., SSL/TLS encoding, character encoding).
- Session (Layer 5): Manages sessions/ dialogues between applications (establishes, maintains, terminates connections).
- Transport (Layer 4): End-to-end communication, flow control, error control, segmentation/reassembly. Main protocols: TCP (reliable) and UDP (unreliable).
- Network (Layer 3): Logical addressing and routing (IP), fragmentation, forwarding. Protocols: IP, ICMP.
- Data Link (Layer 2): Node-to-node delivery on the same network, framing, error detection (Ethernet, Wi‑Fi, ARP). Sublayers: LLC and MAC.
- Physical (Layer 1): Transmission of raw bits over physical medium (cables, radio, voltage levels, connectors).
TCP/IP Model (4 layers) — practical model used for the Internet. Layers:
- Application Layer: Combines OSI’s Application, Presentation and Session layers. Protocols: HTTP, HTTPS, FTP, SMTP, DNS.
- Transport Layer: TCP and UDP — segmentation, ports, flow and error control.
- Internet (Network) Layer: Routing and logical addressing: IP, ICMP.
- Network Access (Link) Layer: Combines OSI Data Link + Physical: Ethernet, Wi‑Fi, ARP, physical transmission.
Key concepts:
- Encapsulation: Each layer adds its own header (and sometimes trailer). Data at each layer is called a Protocol Data Unit (PDU): Application data → Segment (Transport) → Packet (Network) → Frame (Data Link) → Bits (Physical).
- Ports & Addresses: IP addresses identify hosts (Network layer); port numbers identify processes/services (Transport layer). Well-known ports: 80 (HTTP), 443 (HTTPS), 25 (SMTP), 53 (DNS), 21 (FTP).
- Reliability & Flow Control: TCP provides retransmission, ACKs, sequence numbers, sliding window. UDP is connectionless with minimal overhead.
- Routing vs Switching: Routers operate at the Network layer (forward packets by IP); switches/bridges operate at the Data Link layer (forward frames by MAC).
How a typical web request flows (summary): User types URL → Application layer (HTTP) creates request → Transport (TCP) segments and adds source/destination ports → Network (IP) adds source/destination IPs → Data Link frames and Physical bits sent. At receiver, each layer strips its header (decapsulation) and passes payload up.
Comparison & Practical Use: OSI is a detailed teaching model; TCP/IP is the de facto standard implemented on the Internet. Mapping is straightforward: OSI Layers 5–7 map to TCP/IP Application; OSI 4 to TCP/IP Transport; OSI 3 to TCP/IP Internet; OSI 1–2 to TCP/IP Network Access.
- Web browsing: Browser (Application) sends HTTP request. TCP (Transport) establishes connection and ensures reliable delivery. IP (Internet) routes packets. Ethernet/Wi‑Fi (Link/Physical) deliver frames on the local network.
- Sending email (SMTP): Mail client composes message at Application layer. SMTP uses TCP (port 25/587) to reliably send message to mail server, IP routes it across networks.
- DNS lookup: Application issues DNS query (UDP typically on port 53). If query is large, TCP may be used. The resolver uses IP to reach DNS server and the Link layer to reach the gateway.
- Video streaming: Uses UDP or TCP depending on protocol (e.g., RTP over UDP for low latency). Transport layer manages packetization; IP handles routing; Link/Physical transmit frames.
- Local network communication: ARP (Address Resolution Protocol) maps IP addresses to MAC addresses on the Data Link layer so hosts can construct frames for local delivery.
- \[Transmission delay (time to push bits onto link) = L / R\]\[where L = packet length (bits)\]\[R = link bandwidth (bits/sec).\]
- \[Propagation delay = d / s\]\[where d = distance (meters)\]\[s = propagation speed in medium (~2×10^8 m/s for copper/fiber near light speed).\]
- \[Bandwidth-delay product = R × RTT\]\[where R is bandwidth and RTT is round-trip time\]\[represents bytes 'in flight'.\]
- \[Throughput (approx for TCP with windowing) ≈ Window_size / RTT (bytes/sec).\]
- \[Stop-and-wait efficiency = Transmission_delay / (RTT + Transmission_delay) = (L/R) / (RTT + L/R).\]
- \[Total packet size = Payload_size + Sum_of_headers (e.g.\]\[total = application_data + TCP_header + IP_header + Ethernet_header).\]
Addressing and Naming
Addressing and Naming
Key Point: Number of distinct addresses with n bits = 2^n
What is Addressing and Naming?
Addressing and naming is the set of methods used in networks to identify end devices, services and processes so that data can be correctly delivered. "Addressing" gives a numeric or structured identifier that routing and switching equipment use to forward packets. "Naming" provides human-friendly, symbolic identifiers (like domain names, hostnames, or email addresses) that are easier for people to remember. Name resolution maps names to addresses so communication can occur.
Types of Addresses
- Physical (Link-layer) address: MAC address (usually 48-bit) assigned to network interface cards. Used inside a local network (LAN) for frame delivery.
- Logical (Network-layer) address: IP address (IPv4 or IPv6) used for routing between networks and global identification of interfaces.
- Port (Transport-layer) address: Numbers (e.g., TCP/UDP ports) that identify processes or services on a host. Socket = IP address + port.
- Application/Service names: URLs, domain names, email addresses that map to lower-layer addresses via resolution services (DNS, SMTP routing).
Key properties required for addresses and names
- Uniqueness: No two entities on the same addressing domain should share an address.
- Scalability and aggregatability: Addresses should support routing aggregation (e.g., CIDR) to keep routing tables small.
- Persistence vs. locality: Some addresses are permanent (MAC), some change with network/connection (IP via DHCP).
- Readability: Names are human-readable; addresses are machine-optimized.
Schemes of addressing
- Flat addressing: Every entity gets a unique flat identifier (fast lookup but poor scaling).
- Hierarchical addressing: Addresses are structured (e.g., network prefix + host part in IP). Good for aggregation and routing.
- Multicast addressing: Special addresses to reach a group of receivers.
Name resolution
Resolution systems map human names to addresses. Examples: DNS maps domain names to IP addresses, ARP maps IPv4 addresses to MAC addresses in a LAN, and DHCP provides dynamic IP assignment. Name resolution often has caching to speed up lookups.
Addressing in IP (practical details)
- IPv4: 32-bit addresses (written as dotted decimal, e.g., 192.168.1.10). Consists of a network prefix and host part; prefix length is shown with CIDR notation (e.g., /24).
- IPv6: 128-bit addresses (hexadecimal colon separated). Provides a vastly larger address space for global assignment.
- Socket: A socket = <IP address, port number> (e.g., 203.0.113.5:443 identifies web server process).
Address assignment methods
- Static/manual: Administrator configures the address.
- Dynamic: DHCP assigns addresses automatically for a lease period.
- Automatic (link-local): Some systems self-assign addresses in absence of DHCP (e.g., APIPA for IPv4).
Mapping and translation
Network Address Translation (NAT) shows how private logical addresses can be mapped to public addresses for Internet access. ARP and Neighbor Discovery (IPv6) are used to discover link-layer addresses for a known network-layer address.
Why addressing and naming matter
They enable correct delivery of data across complex networks, allow services to be located and reached, support security controls (e.g., access by address/port), and help network administrators organize and scale networks.
Simple calculations and examples
Using bit-length formulas you can compute address-space sizes and hosts per subnet (see formulas).
Note: While names are convenient for people, underlying communication always uses numeric addresses after resolution.
- Postal-address analogy: A postal address (country, city, street, house number) is like hierarchical addressing. The mail is routed first by country/state, then city, then local delivery—similar to IP routing using network prefixes.
- DNS resolution: When you type www.example.com, your computer asks a DNS server to translate that name into an IP address (e.g., 93.184.216.34). The browser then opens a TCP socket to that IP and port 80/443.
- MAC vs IP: A laptop on a Wi‑Fi network has a MAC address like 00:1A:2B:3C:4D:5E (link-layer) and an IP address like 192.168.0.10 (network-layer). Inside the LAN ARP maps the IP to the MAC so frames can be delivered.
- IPv4 subnetting example: For a network 192.168.1.0/26, prefix length = 26, host bits = 6, so usable hosts = 2^6 - 2 = 62 (network and broadcast are excluded).
- Socket addressing: A web server might listen on TCP port 443. A client opening https://server.example makes a connection to socket 203.0.113.5:443 which identifies the exact service process.
- \[Number of distinct addresses with n bits = 2^n\]
- \[IPv4 total addresses = 2^32 ≈ 4.29 × 10^9\]
- \[IPv6 total addresses = 2^128\]
- \[Hosts per subnet (IPv4) = 2^(host_bits) - 2 (subtract network and broadcast for traditional IPv4 subnets)\]
- \[Host bits = 32 - prefix_length (for IPv4 CIDR notation)\]
- \[Number of subnets created by adding s subnet bits = 2^s\]
Error Detection and Correction
Error Detection and Correction
Key Point: Parity bit (even): P = (sum of data bits) mod 2
What is an error?
An error is any unintended change to bits during transmission or storage caused by noise, interference, hardware faults or other impairments. Error detection determines whether errors occurred; error correction recovers the original data.
Types of errors
• Single-bit error: exactly one bit flipped.
• Multiple-bit error: several isolated bits flipped.
• Burst error: a contiguous run of bits corrupted (common in physical channels).
Two main strategies
1) Retransmission (ARQ – Automatic Repeat reQuest): receiver detects an error and asks sender to resend (e.g., Stop-and-Wait, Go-Back-N, Selective Repeat).
2) Forward Error Correction (FEC): sender adds redundant information so receiver can correct some errors without retransmission (e.g., Hamming codes, Reed–Solomon, convolutional codes).
Common detection methods
• Parity bit (VRC): add one bit so total 1s are even (even parity) or odd (odd parity). Simple but catches only odd number of bit flips.
• Longitudinal Redundancy Check (LRC): parity computed across blocks (like column parity).
• Checksum: treat data as groups (bytes/words), sum them (mod 2^k), send one's complement; used in some transport protocols.
• Cyclic Redundancy Check (CRC): treat data as polynomial, divide by a generator polynomial; remainder is transmitted. Very strong for burst errors.
Common correction methods
• Hamming codes: single-bit error detection and correction using parity bits placed at positions that are powers of two.
• Reed–Solomon: block codes that correct multiple symbol (byte) errors; used in CDs, DVDs, QR codes.
• Convolutional codes with Viterbi decoding: streaming codes used in wireless links and deep-space.
How CRC works (concept)
Treat message bits as coefficients of a polynomial M(x). Choose generator polynomial G(x) of degree r. Compute T(x)=M(x)·x^r; divide T(x) by G(x) using modulo-2 arithmetic; remainder R(x) (degree < r) is appended to the message. At receiver: divide received polynomial by G(x); if remainder ≠ 0, error detected.
Hamming code idea (concept)
For m data bits choose r parity bits so that 2^r ≥ m + r + 1. Number positions 1..(m+r). Parity bits are placed at positions 1,2,4,8,... (powers of two). Each parity bit covers positions whose binary index has that parity bit's bit set. The receiver computes parity checks to form a syndrome; nonzero syndrome gives error position to correct a single-bit error.
Performance metrics
• Bit Error Rate (BER) = (# erroneous bits) / (total bits transmitted).
• Packet error probability (for independent bit errors): Prob(no error in n-bit packet) = (1 - p)^n, where p = bit error probability. Prob(at least one error) = 1 - (1 - p)^n.
ARQ (throughput concept)
Stop-and-Wait has poor utilization if propagation delay is large. Define a = propagation_time / transmission_time. Utilization U ≈ 1 / (1 + 2a) (when acknowledgements are small). Sliding-window schemes (Go-Back-N, Selective Repeat) improve throughput by allowing multiple outstanding frames.
Short Hamming (7,4) example (illustration)
Data bits (m=4): d3 d5 d6 d7 = 1 0 1 1
Positions: 1 2 3 4 5 6 7
p1 p2 d3 p4 d5 d6 d7
Place data: _ _ 1 _ 0 1 1
Compute parity (even):
p1 covers positions 1,3,5,7 => p1 ^1 ^0 ^1 = even => p1 = 0
p2 covers positions 2,3,6,7 => p2 ^1 ^1 ^1 = even => p2 = 1
p4 covers positions 4,5,6,7 => p4 ^0 ^1 ^1 = even => p4 = 0
Hamming code word: 0 1 1 0 0 1 1
Notes on limitations
• Parity detects only odd-numbered bit errors; cannot correct.
• Hamming corrects single-bit errors but fails for multiple-bit/burst errors (extended Hamming or additional parity can detect double-bit errors).
• CRC designs (choice of generator polynomial) determine which burst lengths are guaranteed to be detected.
- File download: HTTP/TCP uses checksums/CRC to detect corrupted packets and retransmit via ARQ.
- Ethernet frames: use CRC-32 to detect errors in LAN frames; corrupt frames are dropped and higher layer retransmission occurs.
- Memory (ECC RAM): stores extra parity/ECC bits so single-bit memory errors are automatically corrected and double-bit errors detected.
- Storage media & CDs/DVDs: Reed–Solomon codes correct burst errors from scratches or dust.
- QR codes and barcodes: include Reed–Solomon error correction so damaged areas can still be read.
- RAID-5 disk arrays: use parity blocks to recover data from a single failed disk.
- \[Parity bit (even): P = (sum of data bits) mod 2\]
- \[Hamming parity bits minimum: 2^r ≥ m + r + 1 (where m = data bits\]\[r = parity bits)\]
- \[Bit Error Rate (BER): BER = (number of erroneous bits) / (total bits transmitted)\]
- \[Packet-no-error probability: P_no_error = (1 - p)^n\]\[where p = bit-error probability\]\[n = packet length in bits\]
- \[Packet-error probability: P_error = 1 - (1 - p)^n\]
- \[CRC transmission polynomial: T(x) = M(x)·x^r + R(x)\]\[where R(x) = (M(x)·x^r) mod G(x) and degree[R] <\]\[degree[G]\]
Flow Control and Error Control Protocols
Flow Control and Error Control Protocols
Key Point: Frame transmission time: Ts = L / R (L = frame length in bits, R = link bit rate in b/s)
Overview: Flow control and error control are two complementary sets of techniques used in data communication to ensure reliable and orderly delivery of frames/packets between sender and receiver. Flow control prevents a fast sender from overwhelming a slow receiver. Error control detects and recovers from corrupted or lost frames.
Flow Control
Purpose: match sender output rate to receiver processing rate; avoid buffer overflow at receiver.
- Stop-and-Wait: Sender transmits one frame and waits for its ACK before sending the next. Simple but has low utilization when propagation delay is large.
- Sliding Window: Sender may transmit multiple frames up to a window size W without waiting for ACKs (pipelining). Receiver advertises a receive window (how many frames it can accept). Sliding window improves link utilization and throughput.
Key concepts: sequence numbers (modulo 2^n), sender window and receiver window, cumulative ACKs (acknowledge highest in-order frame), window updates.
Error Control
Purpose: detect corrupted frames and recover lost or damaged frames by retransmission or other methods.
- Error detection: parity bit, checksum (sum of words, often 1's complement), CRC (cyclic redundancy check) — a polynomial remainder method widely used for strong detection.
- ARQ (Automatic Repeat reQuest) protocols: mechanisms that combine error detection and retransmission. Main ARQ types:
- Stop-and-Wait ARQ: retransmit when timeout or NAK; simple but inefficient for large RTT.
- Go-Back-N (GBN) ARQ: sender can send up to W frames (W ≤ 2^n − 1). If an error or timeout occurs for frame k, the sender retransmits frame k and all subsequent frames in the window (even if some were received correctly).
- Selective Repeat (SR) ARQ: sender retransmits only the specific frames that were lost/corrupted. Receiver buffers out-of-order frames within its window. Requires larger state and a constraint on window: W ≤ 2^(n−1) to avoid ambiguity.
Interactions: Sliding-window flow control and ARQ error control are often combined (e.g., GBN and SR are sliding-window ARQ protocols). TCP is an example of a transport protocol that implements sliding-window flow control plus ARQ-like retransmission behavior (with more features).
Practical notes: Choice of protocol depends on error rate, RTT, and buffer resources. Stop-and-wait is used in extremely simple or low-latency links. Sliding window ARQ (GBN or SR) is used in high-latency or high-bandwidth links and in protocols such as HDLC, X.25, and aspects of TCP.
- Stop-and-Wait: Simple sensor node sending periodic status packets to a base station with low traffic — the node sends one frame and waits for ACK before sending next.
- Sliding Window (real-life TCP): Web server sending a large file to a client. TCP uses a sliding window to keep the pipe full and adapt the send rate to receiver capacity and network conditions.
- Go-Back-N: A wireless link protocol that retransmits a burst of frames starting from the lost one when the receiver only supports limited buffering and cumulative ACKs.
- Selective Repeat: Streaming over a lossy link where retransmitting only missing packets reduces overhead — e.g., reliable data transfer in some link-layer protocols and selective-ACK mechanisms in TCP (SACK).
- CRC usage: Ethernet and Wi‑Fi frames include a CRC field computed by polynomial division; receivers recompute CRC to detect bit errors.
- \[Frame transmission time: Ts = L / R (L = frame length in bits\]\[R = link bit rate in b/s)\]
- \[Round-trip (propagation) delay (approx): RTT ≈ 2 * Tp (Tp = one-way propagation delay)\]
- \[Stop-and-Wait utilization (efficiency): U_sw = Ts / (Ts + 2*Tp) (or U = Ts / (Ts + RTT))\]
- \[Sliding-window utilization (upper bound): U_swnd = min(1\]\[(W * Ts) / (Ts + 2*Tp)) (W = window size)\]
- \[Throughput = U * R (where U is utilization\]\[R is link rate)\]
- \[Sequence number range: 0 ... (2^n − 1) for n-bit sequence numbers\]
Data Compression
Data Compression
Key Point: Entropy (average information per symbol): H = - Σ p_i * log2(p_i), where p_i is probability of symbol i.
What is Data Compression? Data compression is the process of encoding information using fewer bits than the original representation. It reduces storage space and transmission time by removing or reducing redundancy while trying to preserve required information.
Why compress? To save disk space, reduce transmission bandwidth, lower transmission cost, and speed up data transfer. Compression is essential for web delivery, multimedia streaming, backups and mobile applications.
Two main types
- Lossless compression: Original data can be perfectly reconstructed from the compressed data. Used for text, code, executable files and some images (e.g., ZIP, PNG, GIF). Common techniques: Huffman coding, LZW, Run-Length Encoding (RLE), Arithmetic coding.
- Lossy compression: Some information is discarded to achieve higher compression ratios; reconstruction is approximate. Used for audio, images and video where exact perfection is not required (e.g., JPEG, MP3, MPEG, H.264). Techniques use transform (DCT, wavelets), quantization and entropy coding.
Basic ideas and concepts
- Redundancy: Repeated or predictable parts of data that can be represented more compactly.
- Entropy: A measure of average information per symbol; sets the theoretical lower bound for average code length.
- Source coding theorem: No lossless code can have average length less than the entropy (in bits) of the source.
Common algorithms (brief)
- Huffman coding: Build a binary tree from symbol frequencies, assign shorter codes to frequent symbols; optimal for symbol-by-symbol prefix codes.
- LZW (Lempel–Ziv–Welch): A dictionary-based method that replaces repeated sequences with single codes; widely used in GIF and some file compressors.
- RLE (Run-Length Encoding): Replace runs of repeated symbols with a count + symbol (good for simple images or repeated-character data).
- Arithmetic coding: Encodes the whole message as a fractional interval; often achieves compression close to entropy.
- Transform + Quantize + Entropy coding (lossy): E.g., JPEG uses DCT, quantization (lossy) and Huffman/arithmetic coding for the output.
Trade-offs: Lossless preserves all data but gives lower compression ratios. Lossy achieves higher compression but loses detail; quality vs size must be balanced. Also consider computational cost (encoding/decoding speed) and memory.
Simple example (RLE): String "AAAAAABBBCC" → "6A3B2C" (counts stored instead of repeated letters). For Huffman, symbols with higher frequency receive shorter codewords.
When to use which: Use lossless for text, program files, databases; use lossy for photos, audio and video where some degradation is acceptable to save bandwidth and space.
Practical examples: ZIP/GZIP (general-purpose lossless), PNG (lossless images), JPEG/HEIF (lossy images), MP3/AAC (lossy audio), H.264/H.265 (lossy video).
- Compressing a text file with gzip/ZIP to reduce backup storage and speed up uploads.
- PNG images use lossless compression for screenshots and graphics with sharp edges.
- JPEG compresses photos for websites to reduce load times (lossy, transform + quantize).
- MP3/AAC compress music by removing perceptually irrelevant audio (lossy).
- Streaming video (YouTube, Netflix) uses H.264/H.265 to transmit high-resolution video over limited bandwidth.
- GIF uses LZW and RLE-like ideas to compress short animations with repeated patterns.
- \[Entropy (average information per symbol): H = - Σ p_i * log2(p_i)\]\[where p_i is probability of symbol i.\]
- \[Average code length: L_avg = Σ p_i * l_i\]\[where l_i is length (in bits) of codeword for symbol i.\]
- \[Compression Ratio (CR): CR = Uncompressed size / Compressed size. (e.g., 10 → file is 10 times smaller after compression).\]
- \[Compression Percentage (space saved): %Saved = (1 - Compressed / Uncompressed) * 100%.\]
- \[Coding Efficiency: Efficiency = H / L_avg (≤ 1 for any prefix-free code).\]
- \[Kraft inequality (prefix code lengths l_i): Σ 2^{-l_i} ≤ 1 (necessary and sufficient for existence of a prefix-free binary code).\]
Network Performance Metrics
Network Performance Metrics
Key Point: Transmission delay = Packet size (bits) / Link bandwidth (bps)
What are Network Performance Metrics?
Network performance metrics are measurable quantities that describe how well a network carries data. They help evaluate speed, reliability, responsiveness and quality of experience for applications such as web browsing, video streaming, online gaming and VoIP.
Key metrics and what they mean
- Bandwidth (Capacity): The maximum rate at which data can be transmitted over a link, measured in bits per second (bps). It is a property of the media and equipment (e.g., 100 Mbps Ethernet, 1 Gbps fiber).
- Throughput: The actual rate of successful data transfer observed on the network (bps). Throughput is usually ≤ bandwidth because of overheads, congestion and errors.
- Goodput: The useful application-level data rate (bps) — excludes protocol overhead, retransmissions and headers. Goodput ≤ Throughput.
- Latency (Delay): Time taken for a packet to travel from source to destination. It is the sum of several components: transmission delay, propagation delay, processing delay and queuing delay. Measured in milliseconds (ms).
- Round-Trip Time (RTT): Time for a signal to go to the destination and back. Important for interactive applications and TCP performance.
- Jitter: Variation in packet delay over time. High jitter degrades real-time media (voice/video).
- Packet Loss: Fraction or percentage of packets that never reach their destination. Causes retransmissions and reduced application quality.
- Bit Error Rate (BER): Probability that a transmitted bit is received in error. Usually expressed as errors per number of bits (e.g., 10^-6).
- Availability: The fraction of time the network or service is up and usable (often given as a percentage uptime).
- Utilization: The fraction of bandwidth currently being used: high utilization may cause congestion and higher delays.
Why these metrics matter
Different applications prioritize different metrics. For example, file download cares mostly about throughput/goodput, while video calls and online gaming need low latency and low jitter. Network administrators use these metrics to troubleshoot problems, plan capacity and guarantee service-level agreements (SLAs).
How metrics interact (overview)
- Increasing utilization approaches bandwidth limits and usually reduces throughput and increases delay and packet loss.
- High packet loss forces retransmissions, reducing goodput and increasing effective delay.
- High jitter hurts smooth playback; buffering can hide jitter at the cost of added delay.
Measurement tools and methods (brief)
- Throughput/goodput: measured by file transfers or tools like iperf; capture headers to separate overhead from payload for goodput.
- Latency/RTT: measured with ping (ICMP) or TCP-based measurements.
- Packet loss and BER: measured with repeated test transfers or specialized hardware/testers.
- Jitter: measured as variation/standard deviation of successive packet delays.
Understanding these metrics and their formulas lets students analyse why a network behaves a certain way and what to change to improve performance.
- Video streaming (Netflix): Requires high throughput and stable bandwidth; also needs low packet loss and moderate latency. If bandwidth drops, video quality is reduced (adaptive bitrate), and if jitter increases a bigger player buffer is used.
- Online gaming: Sensitive to latency and jitter. Even small increases in RTT (e.g., from 30 ms to 120 ms) cause noticeable lag, making gameplay poor despite high bandwidth.
- VoIP/Video calls (Zoom/Teams): Need low latency (<150 ms preferred), low jitter and low packet loss (<1-2%). Jitter buffers are used to smooth out variations at the cost of small added delay.
- Large file download (FTP, HTTP): Throughput and goodput are most important. High throughput with low retransmissions produces fast downloads; packet loss/retransmissions reduce effective download speed.
- IoT sensor network: Constrained bandwidth and energy; BER and packet loss are critical because retransmissions may be expensive in power and time.
- \[Transmission delay = Packet size (bits) / Link bandwidth (bps)\]
- \[Propagation delay = Distance (meters) / Propagation speed (m/s) (propagation speed ≈ 2x10^8 m/s in copper/fibre, ~3x10^8 m/s in vacuum)\]
- \[RTT ≈ 2 × Propagation delay + Processing delay + Queuing delay (sum of forward and return path delays)\]
- \[Throughput ≤ Bandwidth (throughput measured in bps)\]
- \[Utilization = (Observed throughput) / (Link bandwidth) (often shown as a percentage)\]
- \[Packet loss rate = Number of lost packets / Number of packets sent\]
Security Basics in Data Communication
Security Basics in Data Communication
Key Point: Keyspace size for a k-bit symmetric key = 2^k (number of possible keys)
What is Security in Data Communication?
Security in data communication means protecting data while it is being transmitted between systems so that unauthorized parties cannot read, alter or disrupt it. The main objectives are commonly summarized by the CIA triad:
- Confidentiality: Only authorized parties can read the data.
- Integrity: Data is not altered in transit (or unauthorized changes are detectable).
- Availability: Legitimate users can access data and services when needed.
Supporting goals include authentication (proving the identity of users or systems), non-repudiation (ensuring senders cannot deny sending a message), and access control (restricting what authenticated users may do).
Common Threats
- Passive attacks: eavesdropping, traffic analysis (attacker listens but does not change data).
- Active attacks: message modification, injection, replay attacks, man-in-the-middle, spoofing.
- Denial of Service (DoS): attackers flood a service to make it unavailable.
Basic Countermeasures
- Encryption: Transforming readable data into ciphertext. Two main types:
- Symmetric-key (same key for encryption and decryption) – faster, used for bulk data (e.g., AES).
- Asymmetric-key (public/private key pair) – used for secure key exchange, digital signatures (e.g., RSA, ECC).
- Hash functions: One-way functions that produce fixed-size digests used to verify integrity (e.g., SHA family).
- Digital signatures: Provide authentication and non-repudiation by signing digests with a private key.
- Certificates and PKI: Certificate Authorities (CAs) bind public keys to identities to enable trust.
- Secure protocols: TLS/SSL for web, IPSec and VPNs for secure network tunnels, S/MIME for secure email.
- Network defenses: Firewalls, intrusion detection/prevention systems (IDS/IPS), segmentation, rate limiting.
- Authentication methods: Passwords, OTPs, multi-factor authentication (MFA), biometrics.
- Operational practices: Regular patches, backups, least privilege, logging and monitoring.
How encryption and authentication fit together (high-level)
Typical secure communication uses a combination of asymmetric and symmetric techniques: asymmetric cryptography establishes a secure channel and authenticates peers (e.g., exchanging a symmetric session key securely), then symmetric encryption is used for efficient bulk data transfer. Hashes and MACs (message authentication codes) ensure integrity.
Example protocol flow (TLS/SSL simplified)
- ClientHello: client proposes cipher suites and sends a nonce.
- ServerHello + Certificate: server sends chosen cipher, its certificate containing its public key.
- Key exchange: client verifies certificate, encrypts a random session key with server's public key (or uses Diffie-Hellman) and sends it.
- Both sides compute session keys and start encrypted communication.
Security trade-offs
Stronger security (longer keys, more checks) costs more CPU, memory and latency. Practical designs balance security level with performance and usability.
- Online banking (HTTPS/TLS): The browser verifies the bank's certificate, establishes a TLS session, and all transactions are encrypted and integrity-protected so an eavesdropper cannot read or tamper with account details.
- Wi-Fi security (WPA2/WPA3): Home Wi-Fi uses WPA2/WPA3 to encrypt wireless traffic so neighbors cannot read packets; stronger versions add improved key management and protection against offline password guessing.
- Virtual Private Network (VPN): A remote worker uses a VPN to create an encrypted tunnel to the company network, ensuring confidentiality and integrity of corporate traffic over the public Internet.
- Email signing and encryption (S/MIME or PGP): A sender encrypts an email to protect its content and signs it with a private key so the recipient can verify the sender and detect message tampering.
- Two-factor authentication (2FA) for services: A user logs in with a password (something they know) and then confirms a code on their phone (something they have) to reduce risk from stolen passwords.
- \[Keyspace size for a k-bit symmetric key = 2^k (number of possible keys)\]
- \[Probability of guessing a random k-bit key by one try = 1 / 2^k\]
- \[RSA encryption: ciphertext c = m^e mod n\]\[where n = p * q (p,q are primes) and e is public exponent\]
- \[RSA decryption: message m = c^d mod n\]\[where d · e ≡ 1 (mod φ(n)) and φ(n) = (p-1)(q-1)\]
- \[Shannon entropy (measure of unpredictability): H = -Σ p_i log2(p_i) (bits of entropy)\]
- \[Birthday bound for collision on n-bit hash ≈ 1.2 × 2^(n/2) operations (approximate work to find a collision)\]
Practical Aspects and Examples
Practical Aspects and Examples
Key Point: Bandwidth-Delay Product (BDP) = Bandwidth (bits/s) × RTT (s). Interpret as bits 'in flight' or buffer size to fill the pipe.
Overview
This topic covers the practical considerations when designing, measuring and troubleshooting data-communication systems: how physical media, protocols and tuning parameters affect real throughput, delay, reliability and user experience. It links theory (bandwidth, modulation, error control) to everyday tasks like copying files, streaming video or running web applications.
Key practical aspects
- Physical medium and limits: Copper (UTP, coax), fiber and wireless each have characteristic bandwidths, attenuation, maximum cable lengths and susceptibility to interference. Installation constraints (cable length, connectors, grounding) affect performance.
- Bandwidth vs throughput: Bandwidth is the raw channel capacity (bps). Throughput is the actual data rate achieved and can be lower due to protocol overhead, retransmissions, congestion and application limits.
- Latency and jitter: Latency (delay) includes propagation, transmission, processing and queuing delays. Jitter is variation in packet delay — important for real-time apps (VoIP, video conferencing).
- Error control and reliability: Practical systems use parity, checksums, CRC, ARQ (retransmission) and FEC. Higher error rates reduce useful throughput because of retransmissions.
- Multiplexing and statistical sharing: Time-division (TDM), frequency-division (FDM), wavelength-division (WDM) and packet-switching determine how many users share a link and how resources are scheduled.
- Protocol behavior (TCP/UDP): TCP throughput depends on window size and RTT (round-trip time); UDP is connectionless and used where low latency is preferred but reliability is not guaranteed.
- Quality of Service (QoS): Prioritizing traffic (voice over data), managing buffers and policing bandwidth prevents critical traffic from being delayed or dropped.
- Wireless-specific practicalities: Path loss, fading, interference, link budget (transmit power, antenna gain, loss) and mobility affect coverage and capacity. Capacity planning uses SNR and Shannon/Nyquist formulas to estimate achievable rates.
Measurement and tools
Common practical tools: iperf/iperf3 for throughput tests, ping/traceroute for latency and path info, Wireshark for packet captures and protocol analysis, spectrum analyzers for RF diagnostics. Always measure under realistic conditions (concurrent users, peak load).
Design tips
- Match cable type and connectors to required speed and distance (e.g., Cat6 for 1 Gbps up to 100 m, single-mode fiber for long-distance).
- Account for protocol overhead: TCP/IP, Ethernet frames and headers reduce payload throughput.
- Use proper MTU to avoid excessive fragmentation; tune TCP window for high-latency links.
- Provide margin in wireless link budget for fading and interference.
- Example 1 — File transfer time and Bandwidth-Delay Product (BDP): Transfer a 10 MB file over a 10 Mbps link with negligible other delays. File size = 10 MB = 80 Mb. Transmission time ≈ 80 Mb / 10 Mbps = 8 s. If RTT = 50 ms, BDP = bandwidth × RTT = 10 Mbps × 0.05 s = 0.5 Mb = 62.5 KB. This means to fully utilize the link the TCP window should be at least 62.5 KB.
- Example 2 — TCP throughput limited by window size: If TCP window size = 64 KB (524288 bits) and RTT = 100 ms, maximum steady throughput ≈ window / RTT = 524288 bits / 0.1 s = 5,242,880 bps ≈ 5.24 Mbps. To get higher throughput on high-latency links increase the window.
- Example 3 — Shannon capacity for a wireless channel: Given bandwidth B = 3 MHz and signal-to-noise ratio S/N = 10 (linear), Shannon capacity C = B × log2(1 + S/N) ≈ 3×10^6 × log2(11) ≈ 3×10^6 × 3.459 ≈ 10.38 Mbps. This is the theoretical upper bound for reliable communications under those conditions.
- Example 4 — Effect of attenuation in dB: If a link has 20 dB attenuation, power ratio = 10^(−20/10) = 0.01, so output power is 1% of input. For long copper runs or weak wireless signals this shows why amplifiers or repeaters are needed.
- Example 5 — Impact of packet loss on throughput: A TCP connection experiencing frequent packet loss will spend time retransmitting and in congestion control, substantially lowering effective throughput compared to the raw bandwidth. Measuring packet-loss % with ping and correlating with throughput (iperf) helps identify problems.
- \[Bandwidth-Delay Product (BDP) = Bandwidth (bits/s) × RTT (s)\]\[Interpret as bits 'in flight' or buffer size to fill the pipe.\]
- \[Throughput = Transferred data (bits) / Transfer time (s)\]\[For file transfer: Transfer time ≈ File size (bits) / Effective throughput (bps).\]
- \[Shannon capacity: C = B × log2(1 + S/N) where B is bandwidth (Hz)\]\[S/N is linear signal-to-noise ratio\]\[C in bits/s.\]
- \[Nyquist (noiseless) max: C = 2B × log2(M) where M is number of discrete signal levels and B is bandwidth in Hz.\]
- \[TCP window throughput approximation: Throughput ≈ Window size (bits) / RTT (s) (when not limited by loss).\]
- \[SNR in decibels: SNR(dB) = 10 × log10(S/N).\]
Key Concepts
- Data Communication
- Exchange of digital or analog data between two or more devices through a transmission medium using agreed protocols.
- Transmission Media
- Physical path or channel that carries signals; can be guided (twisted pair, coaxial, fiber) or unguided (radio, microwave).
- Bandwidth
- Range of frequencies a channel can carry or its maximum data-carrying capacity; often expressed in Hz or bits per second.
- Throughput
- Actual rate of successful data transfer over a communication channel, typically less than theoretical bandwidth due to overhead and errors.
- Latency
- Time delay between sending a packet and its reception; includes propagation, transmission, processing, and queuing delays.
- Bit Rate
- Number of bits transmitted per second over a communication channel, measured in bps (bits per second).
- Baud Rate
- Number of signal changes or symbols transmitted per second; if each symbol encodes multiple bits, baud differs from bit rate.
- Signal (Analog/Digital)
- Physical representation of data: analog signals vary continuously, digital signals use discrete levels (0 and 1).
- Modulation
- Process of altering a carrier wave's property (amplitude, frequency, or phase) to encode information for transmission.
- Multiplexing
- Combining multiple signals for transmission over a single medium to use capacity efficiently; types include FDM, TDM, WDM.
- Switching
- Technique for directing data between nodes: circuit switching (dedicated path), packet switching (packets routed independently), message switching (store-and-forward).
- Protocol
- Set of rules that define how data is formatted, transmitted, and interpreted between communicating devices.
- Network Topology
- Physical or logical layout of nodes and links in a network; common topologies include bus, star, ring, and mesh.
- Duplex Modes
- Modes defining direction of communication: simplex (one-way), half-duplex (both ways but not simultaneously), full-duplex (simultaneous both ways).
- Error Detection
- Techniques to detect errors in transmitted data, such as parity bits, checksums, and cyclic redundancy check (CRC).
- Flow Control
- Mechanisms to regulate data transmission rate between sender and receiver to prevent buffer overflow (e.g., stop-and-wait, sliding window).
- Congestion Control
- Methods to prevent or control excessive traffic in a network that can degrade performance (e.g., TCP congestion avoidance algorithms).
- Packet
- Small formatted unit of data used in packet-switched networks, typically containing a header (addressing/control) and payload (data).
- Router
- Network device that forwards packets between different networks using routing tables and network-layer (IP) addresses.
- Modem
- Device that converts digital signals to analog for transmission over analog media (modulation) and back to digital (demodulation).
Practice Questions
-
Name the five basic components of a data communication system. / आँकड़ा संचार प्रणाली के पाँच मूल घटकों के नाम लिखिए।
Show answer
Sender, Receiver, Message, Medium/Channel, and Protocol. / प्रेषक, प्राप्तकर्ता, संदेश, माध्यम/चैनल, और प्रोटोकॉल।
-
Differentiate between simplex, half-duplex and full-duplex transmission with one example each. / सिम्प्लेक्स, हाफ-डुप्लेक्स और फुल-डुप्लेक्स संचरण में अंतर एक-एक उदाहरण सहित बताइए।
Show answer
Simplex is one-way only (keyboard to CPU); half-duplex is two-way but not simultaneous (walkie-talkie); full-duplex is two-way simultaneous (telephone call). / सिम्प्लेक्स केवल एकतरफ़ा है (कीबोर्ड से CPU); हाफ-डुप्लेक्स दोतरफ़ा पर एक साथ नहीं (वॉकी-टॉकी); फुल-डुप्लेक्स एक साथ दोतरफ़ा है (टेलीफोन कॉल)।
-
Using Nyquist's theorem, find the maximum bit rate of a noiseless channel of bandwidth 3000 Hz using 4 signal levels. / नाइक्विस्ट प्रमेय से 4 संकेत स्तरों वाले 3000 Hz बैंडविड्थ के शोर रहित चैनल की अधिकतम बिट दर ज्ञात कीजिए।
Show answer
Max bit rate = 2 x B x log2(M) = 2 x 3000 x log2(4) = 2 x 3000 x 2 = 12000 bps. / अधिकतम बिट दर = 2 x B x log2(M) = 2 x 3000 x 2 = 12000 bps।
-
State Shannon's capacity formula and compute capacity for B = 3 MHz and SNR = 30 dB. / शैनन क्षमता सूत्र लिखिए तथा B = 3 MHz और SNR = 30 dB के लिए क्षमता ज्ञात कीजिए।
Show answer
C = B x log2(1 + S/N); SNR 30 dB means S/N = 1000, so C = 3x10^6 x log2(1001) ≈ 3x10^6 x 9.97 ≈ 29.9 Mbps. / C = B x log2(1 + S/N); 30 dB का अर्थ S/N = 1000, अतः C ≈ 3x10^6 x 9.97 ≈ 29.9 Mbps।
-
Why is optical fibre preferred over twisted pair for long-distance backbone links? / लंबी दूरी के बैकबोन लिंक के लिए ट्विस्टेड पेयर की तुलना में ऑप्टिकल फाइबर को क्यों प्राथमिकता दी जाती है?
Show answer
Optical fibre offers extremely high bandwidth, very low attenuation, and immunity to electromagnetic interference, enabling long-distance transmission. / ऑप्टिकल फाइबर अत्यधिक उच्च बैंडविड्थ, बहुत कम क्षीणन और विद्युतचुंबकीय व्यवधान से प्रतिरक्षा देता है, जिससे लंबी दूरी का संचरण संभव होता है।
-
Distinguish between bandwidth, data rate and throughput. / बैंडविड्थ, डेटा दर और थ्रूपुट में अंतर कीजिए।
Show answer
Bandwidth is the channel's frequency range (Hz); data rate is the theoretical maximum bits/sec; throughput is the actual useful bits/sec delivered, always ≤ data rate due to overhead and losses. / बैंडविड्थ चैनल की आवृत्ति परास (Hz) है; डेटा दर सैद्धांतिक अधिकतम bits/sec है; थ्रूपुट वास्तविक उपयोगी bits/sec है, जो ओवरहेड के कारण सदैव ≤ डेटा दर रहती है।
-
Explain the difference between FDM and TDM multiplexing. / FDM और TDM मल्टीप्लेक्सिंग में अंतर समझाइए।
Show answer
In FDM each signal occupies a different frequency band separated by guard bands; in TDM each signal is allocated recurring time slots on the shared channel. / FDM में प्रत्येक संकेत गार्ड बैंड द्वारा अलग की गई भिन्न आवृत्ति बैंड लेता है; TDM में प्रत्येक संकेत साझा चैनल पर बारी-बारी समय खंड लेता है।
-
Compare circuit switching and packet switching. / सर्किट स्विचिंग और पैकेट स्विचिंग की तुलना कीजिए।
Show answer
Circuit switching reserves a dedicated path for the whole session giving constant delay but wasting idle capacity; packet switching breaks data into packets routed independently, giving efficient use but variable delay (jitter). / सर्किट स्विचिंग पूरे सत्र हेतु समर्पित पथ आरक्षित करती है (स्थिर विलंब पर निष्क्रिय क्षमता बर्बाद); पैकेट स्विचिंग आँकड़े को स्वतंत्र पैकेटों में बाँटती है (कुशल पर परिवर्तनशील विलंब)।
Related Laws & Principles
Explore allFoundational laws & principles connected to this chapter — tap to open in the Laws Explorer.