11.2 Data Communications, OSI Model & Protocols
Key Takeaways
The ISO 7-Layer OSI Reference Model organizes network functions from Layer 1 Physical up to Layer 7 Application.
Transmission Control Protocol (TCP) provides connection-oriented, reliable byte-stream transport with flow control, whereas UDP provides connectionless, low-overhead datagram transport.
Cyclic Redundancy Check (CRC) utilizes polynomial binary division modulo-2 to detect burst transmission errors.
IPv4 Classless Inter-Domain Routing (CIDR) notation defines network prefix length, where a /24 subnet mask (255.255.255.0) yields 254 usable host IP addresses.
Data link ARQ protocols (Stop-and-Wait, Go-Back-N, Selective Repeat) manage frame retransmission to ensure error-free link delivery.
11.2 Data Communications, OSI Model & Protocols
Quick Answer: Modern data networks structure communication tasks into functional layers. Key concepts heavily tested on the PRC ECE board exam include the 7 layers of the OSI model, TCP vs. UDP protocol characteristics, Cyclic Redundancy Check (CRC) polynomial division modulo-2, Automatic Repeat Request (ARQ) flow control, and IPv4 CIDR subnetting math ( usable host addresses per subnet).
Introduction to Data Communications & Network Architectures
Data communications refers to the exchange of digitized information between two or more nodes via a transmission medium governed by agreed-upon communication rules designated as protocols. To reduce system complexity, modern networking protocols are organized as a vertical stack of functional layers, where each layer provides specific services to the layer immediately above it while hiding internal implementation details.
The OSI 7-Layer Reference Model
Promulgated by the International Organization for Standardization (ISO) in 1984 under standard ISO/IEC 7498-1, the Open Systems Interconnection (OSI) model defines a 7-layer framework for network intercommunication.
┌─────────────────────────────────────────────────────────────┐
│ Layer 7: Application (HTTP, FTP, SMTP, DNS, SSH) │
├─────────────────────────────────────────────────────────────┤
│ Layer 6: Presentation (Data Formatting, Encryption, JPEG) │
├─────────────────────────────────────────────────────────────┤
│ Layer 5: Session (Dialog Control, RPC, NetBIOS) │
├─────────────────────────────────────────────────────────────┤
│ Layer 4: Transport (TCP, UDP, Segment/Datagram Flow) │
├─────────────────────────────────────────────────────────────┤
│ Layer 3: Network (IPv4, IPv6, ICMP, OSPF - Routing) │
├─────────────────────────────────────────────────────────────┤
│ Layer 2: Data Link (Ethernet, MAC/LLC, Switches, CRC) │
├─────────────────────────────────────────────────────────────┤
│ Layer 1: Physical (RS-232, RJ-45, Cables, Bit Encoding) │
└─────────────────────────────────────────────────────────────┘
Functional Overview of the 7 Layers
- Layer 1 - Physical Layer: Transmits raw, unstructured bitstreams over physical mediums (copper wires, fiber optics, radio frequencies). Defines electrical voltage levels, bit timings, connector pinouts (e.g., RS-232, RJ-45), and physical data rates.
- Layer 2 - Data Link Layer: Handles physical node-to-node framing, Media Access Control (MAC) addressing, error detection via CRC, and link-level flow control. Divided into two sublayers: Logical Link Control (LLC) (IEEE 802.2) and Media Access Control (MAC) (IEEE 802.3 Ethernet).
- Layer 3 - Network Layer: Manages logical network addressing (IPv4/IPv6 addresses), packet routing across interconnected networks (routers), and packet fragmentation.
- Layer 4 - Transport Layer: Manages end-to-end process-to-process communication, connection establishment, error recovery, segment sequencing, and port addressing. Key protocols: TCP and UDP.
- Layer 5 - Session Layer: Establishes, maintains, synchronizes, and terminates session dialogs between endpoints (e.g., Remote Procedure Calls - RPC, NetBIOS).
- Layer 6 - Presentation Layer: Translates data formats between application syntax and standard wire network syntax. Handles data compression, character encoding (ASCII, Unicode), and encryption/decryption (SSL/TLS).
- Layer 7 - Application Layer: Provides direct network services to software applications (browsers, email clients). Examples: HTTP/HTTPS, FTP, SMTP, DNS, SNMP.
OSI Model vs. TCP/IP Architecture Comparison
While OSI serves as the formal theoretical reference model, the practical internet architecture is built upon the 4-layer (or 5-layer) TCP/IP Protocol Suite.
| OSI Model Layer | TCP/IP Architecture Layer | Core Protocols & Services |
|---|---|---|
| 7. Application; 6. Presentation; 5. Session | Application Layer | HTTP, HTTPS, FTP, SMTP, DNS, SSH, DHCP, SNMP |
| 4. Transport | Transport Layer | TCP, UDP, SCTP |
| 3. Network | Internet Layer | IPv4, IPv6, ICMP, ARP, OSPF, BGP |
| 2. Data Link; 1. Physical | Network Access Layer (or Link/Physical) | Ethernet (802.3), Wi-Fi (802.11), Frame Relay, PPP |
Transport Layer Protocols: TCP vs. UDP
The Transport Layer provides process-to-process data delivery using 16-bit Port Numbers (allowing distinct logical ports).
TCP 3-Way Handshake UDP Connectionless
Client Server Client Server
│ │ │ │
│──── SYN (Seq=x) ───────>│ │──── Datagram ──────────>│
│<─── SYN-ACK (Ack=x+1) ──│ │ (No Handshake/Ack) │
│──── ACK (Ack=y+1) ─────>│ │ │
Transmission Control Protocol (TCP)
- Connection-Oriented: Establishes a reliable connection using a 3-Way Handshake (
SYNSYN-ACKACK). - Reliability: Guarantees ordered data delivery using sequence numbers, positive acknowledgments (
ACK), and automatic retransmission of lost segments. - Flow Control & Congestion Control: Implements a dynamic Sliding Window Protocol to prevent receiver buffer overflow and congestion window mechanisms (Slow Start, Congestion Avoidance).
- Header Size: 20 bytes minimum (up to 60 bytes with options).
User Datagram Protocol (UDP)
- Connectionless: Transmits independent datagrams without establishing prior connections or performing handshakes.
- Unreliable & Low Overhead: Provides no sequence numbering, no acknowledgments, and no retransmission. Unordered datagrams may be lost or duplicated.
- Header Size: Minimal 8-byte fixed header (Source Port, Destination Port, Length, Checksum).
- Use Cases: Real-time applications prioritizing speed over reliability: VoIP, video streaming, DNS queries, online gaming.
Error Detection & Control: CRC Polynomial Division
Cyclic Redundancy Check (CRC) is a powerful error-detecting mechanism operating at Layer 2. A block of data bits is treated as coefficients of a binary polynomial and divided modulo-2 by a agreed-upon generator polynomial .
Mathematical Principles
- Given an -bit message polynomial and an -bit generator polynomial of degree .
- Append zero bits to the message stream ().
- Divide by using binary modulo-2 division (exclusive-OR / XOR operations without carry/borrow).
- The remainder of length bits is appended to the message as the CRC checksum field.
- The receiver divides the received frame by . A remainder of zero indicates no errors occurred during transmission.
Step-by-Step CRC Calculation Example
Problem: Compute the 3-bit CRC remainder for a binary message using generator polynomial (binary divisor
1011).Solution:
- Determine Generator Degree (): Divisor =
1011( bits).- Append Zeros to Message: Augmented Dividend =
110101000.- Perform Modulo-2 Division (XOR Subtraction):
111001 <-- Quotient (Discarded) ─────────────── 1011 ┘ 110101000 1011 ──── 1100 1011 ──── 1111 1011 ──── 1000 0000 ──── 1000 0000 ──── 1000 1011 ──── 011 <-- 3-Bit CRC Remainder R(X)
- Final Transmitted Frame: Transmitted bits = Message + CRC =
110101011.
Automatic Repeat Request (ARQ) Mechanisms
When a receiver detects a corrupted frame via CRC failure, ARQ protocols manage retransmission:
- Stop-and-Wait ARQ: Transmitter sends 1 frame and pauses, waiting for an
ACKbefore sending the next frame. Simple but inefficient over long propagation delay paths. - Go-Back-N ARQ: Transmitter sends multiple frames up to a window size . If frame is lost or corrupted, receiver rejects all subsequent frames (), forcing the transmitter to retransmit frame and all subsequent frames in the window.
- Selective Repeat ARQ: Transmitter retransmits only the specific missing or corrupted frame. Receiver maintains a buffer to store out-of-order frames. Most bandwidth-efficient method.
IPv4 Addressing & CIDR Subnetting Guide
An IPv4 address is a 32-bit binary number represented in dotted-decimal notation (four 8-bit octets separated by dots, e.g., 192.168.1.1).
Classless Inter-Domain Routing (CIDR)
CIDR notation appends a slash followed by the prefix length indicating how many leading bits constitute the Network ID (e.g., 192.168.1.0/24).
(Two addresses are reserved: the Network Address with all host bits set to 0, and the Directed Broadcast Address with all host bits set to 1).
Subnetting Reference Table
| CIDR Prefix | Subnet Mask | Total IPs | Usable Host IPs | Common Application |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN Network |
| /26 | 255.255.255.192 | 64 | 62 | Departmental Subnet |
| /27 | 255.255.255.224 | 32 | 30 | Small Subnet |
| /28 | 255.255.255.240 | 16 | 14 | Small Server Farm |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-Point WAN Link |
Step-by-Step Subnetting Calculation Example
Problem: Given the IP address
192.168.10.130/27, determine (a) the Subnet Mask, (b) the Network ID, (c) the Broadcast Address, and (d) the range of usable host IP addresses.Solution:
- Subnet Mask: /27 prefix means 27 ones followed by 5 zeros
11111111.11111111.11111111.11100000=255.255.255.224.- Block Size (Magic Number): (or ). Subnet multiples: 0, 32, 64, 96, 128, 160...
- Locate Subnet for Host IP .130: The host IP .130 lies between 128 and 159.
- Network ID:
192.168.10.128- Broadcast Address:
192.168.10.159(one less than next subnet 160)- Usable Host Range:
192.168.10.129to192.168.10.158(30 usable hosts).
Which layer of the OSI 7-Layer Reference Model is responsible for end-to-end process-to-process communication, port addressing, flow control, and error recovery via TCP or UDP?
Layer 2 - Data Link Layer
Layer 3 - Network Layer
Layer 4 - Transport Layer
Layer 5 - Session Layer
A network engineer needs to configure a point-to-point serial WAN link between two routers. Which CIDR subnet mask provides exactly 2 usable host IP addresses without wasting address space?
/28 (255.255.255.240)
/29 (255.255.255.248)
/30 (255.255.255.252)
/31 (255.255.255.254)
During a CRC error detection check, what result at the receiver indicates that the transmitted frame was received cleanly without any single-bit or burst transmission errors?
The division remainder is equal to the generator polynomial G(X)
The division remainder is equal to binary zero
The quotient is equal to binary all ones
The division remainder equals the original data length
Sections you finish are checked off in the contents.