UNIT 4: COMPUTER NETWORKS – COMPREHENSIVE SHORT NOTES
(Aligned with RGPV Past Papers: 2019–2025)
I. NETWORK FUNDAMENTALS AND ARCHITECTURES
A. Network Types and Scopes
| Type | Scope | Example | Key Feature |
|---|---|---|---|
| PAN | Personal (≤10 m) | Bluetooth, Zigbee | Connects personal devices |
| LAN | Single site (≤ km) | Ethernet, Wi-Fi | High speed, shared medium |
| MAN | City-wide (5–50 km) | Cable TV network | Owned by ISP/municipality |
| WAN | Country/Global | Internet, MPLS | Uses public/private lines |
| Internetwork | Multiple networks | The Internet | Routers interconnect networks |
B. Network Topologies
| Topology | Structure | Advantages | Disadvantages |
|---|---|---|---|
| Bus | Single backbone cable | Simple, cheap | Single point of failure, collisions |
| Star | Central hub/switch | Easy management, fault isolation | Hub failure breaks network |
| Ring | Closed loop (token passing) | Predictable performance | Token loss breaks ring |
| Mesh | Fully/partially connected | High reliability, redundancy | Expensive, complex |
| Tree | Hierarchical star | Scalable, easy to expand | Root node failure catastrophic |
| Hybrid | Combination (e.g., star-bus) | Flexible, robust | Complex design/management |
[!TIP]
Exam Focus: Compare Star vs. Mesh (reliability vs. cost). Ring topology questions often involve Token Ring/FDDI.
C. Switching Techniques
-
Circuit Switching
-
Dedicated path established before data transfer (e.g., PSTN).
-
Pros: Guaranteed bandwidth, low delay.
-
Cons: Inefficient for bursty traffic, setup delay.
-
-
Packet Switching
-
Datagram (Connectionless): Each packet routed independently (e.g., IP).
-
Virtual Circuit (Connection-Oriented): Path established first (e.g., Frame Relay, ATM).
-
-
Message Switching
- Store-and-forward of entire messages (obsolete).
-
Store-and-Forward vs. Cut-through
-
Store-and-Forward: Entire frame received, checked, then forwarded (error detection).
-
Cut-through: Forwarding starts after header received (lower latency, no error check).
-
[!TIP]
Past Question: "Explain circuit, packet, message switching" (Jun 2025). Contrast connection-oriented vs. connectionless (May 2024).
D. Reference Models
1. ISO-OSI Model (7 Layers)
| Layer | Function | Protocol/Device | PDU |
|---|---|---|---|
| 7. Application | User interface, services | HTTP, SMTP, DNS | Data |
| 6. Presentation | Translation, encryption, compression | SSL/TLS, JPEG | Data |
| 5. Session | Dialog control, synchronization | NetBIOS, RPC | Data |
| 4. Transport | End-to-end reliability, flow control | TCP, UDP | Segment |
| 3. Network | Routing, logical addressing | IP, ICMP, OSPF | Packet |
| 2. Data Link | Framing, MAC addressing, error control | Ethernet, PPP, HDLC | Frame |
| 1. Physical | Bit transmission, media | RS-232, Ethernet (PHY) | Bit |
Critique of OSI:
- Too complex, layered architecture not perfectly matched to real protocols.
- Some layers (e.g., Session, Presentation) merged in TCP/IP.
- Never fully implemented; TCP/IP became de facto standard.
2. TCP/IP Model (4 Layers)
| Layer | Function | Core Protocols |
|---|---|---|
| Application | Application services | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end communication | TCP (reliable), UDP (unreliable) |
| Internet | Logical addressing, routing | IP, ICMP, ARP |
| Network Interface | Physical transmission, framing | Ethernet, Wi-Fi (IEEE 802.11) |
Advantages over OSI: Simpler, protocol-independent, real-world implementation (Internet).
Disadvantages: Less rigorous layering, no clear separation of services.
3. OSI vs. TCP/IP Comparison
| Aspect | OSI | TCP/IP |
|---|---|---|
| Layers | 7 layers | 4 layers |
| Approach | Theoretical, general | Practical, protocol-specific |
| Session/Presentation | Separate layers | Merged into Application |
| Routing | Network layer (3) | Internet layer |
| Implementation | Never fully adopted | Used in Internet |
| Protocol Examples | No standard protocols | TCP, UDP, IP, HTTP |
[!TIP]
Exam Question: "Compare OSI and TCP/IP based on layer functionalities and real-world implementation" (Jun 2025). Key: OSI is model, TCP/IP is protocol suite.
II. PHYSICAL LAYER
A. Transmission Media
| Guided | Bandwidth | Attenuation | Cost | Application |
|---|---|---|---|---|
| UTP | Up to 1 Gbps | High | Low | LAN (Ethernet) |
| STP | Up to 10 Gbps | Medium | Medium | Industrial, noisy env. |
| Coaxial | Up to 10 Gbps | Low | Medium | Cable TV, legacy LAN |
| Fiber (SM/MM) | 10 Gbps–100 Tbps | Very low | High | Backbone, long-haul |
| Unguided | Frequency | Use Case | ||
| -------------- | --------------- | -------------- | ||
| Radio | kHz–GHz | Wi-Fi, cellular | ||
| Microwave | GHz | Point-to-point links | ||
| Infrared | THz | Short-range (IrDA) | ||
| Satellite | GHz | Global broadcast |
B. Multiplexing Techniques
-
FDM
-
Different signals on different frequency bands (e.g., radio, cable TV).
-
Bandwidth = sum of individual channel bandwidths + guard bands.
-
-
TDM
-
Synchronous TDM: Fixed time slots; if a station has no data, slot goes idle.
-
Statistical TDM: Dynamic slot allocation based on demand (higher efficiency).
-
Frame Size (bits) = (Number of sources) × (Bits per source)
-
Data Rate = Frame size / Frame time
-
-
WDM
- Optical version of FDM; multiple light wavelengths on single fiber.
C. Line Coding
| Code | Encoding Rule | Example (10110) |
|---|---|---|
| NRZ | High=1, Low=0 | ` |
| RZ | Return to zero mid-bit | ` |
| Manchester | Transition mid-bit: 0=↑, 1=↓ | ` |
| Diff. Manchester | Transition at start: 0=transition, 1=no transition | ` |
[!TIP]
Past Question: "Code binary stream in Manchester/Differential Manchester" (Nov 2022). Remember: Manchester has transition at middle; Differential Manchester at start.
D. Channel Capacity
- Nyquist Formula (Noiseless):
$$ \text{Max bit rate} = 2B \log_2(L) $$
-
\(B\) = bandwidth (Hz), \(L\) = signal levels.
-
Example: \(B=3\) kHz, \(L=4\) → \(2 \times 3000 \times \log_2(4) = 12,000\) bps.
- Shannon's Theorem (Noisy):
$$ C = B \log_2(1 + \text{SNR}) $$
-
\(C\) = channel capacity (bps), SNR = \(P_{\text{signal}}/P_{\text{noise}}\) (linear, not dB).
-
Example: \(B=4\) kHz, SNR=1000 → \(C = 4000 \log_2(1001) \approx 40,000\) bps.
[!TIP]
Calculation Trap: SNR must be in linear scale (e.g., 30 dB → 1000). Use \(\boxed{C = B \log_2(1+\text{SNR})}\) for noisy channels.
III. DATA LINK LAYER
A. Functions & Services
-
Framing: Encapsulate packets into frames (header/trailer).
-
Physical Addressing: MAC (48-bit) – unicast, multicast, broadcast.
-
Error Control: Detection (CRC) and correction (Hamming).
-
Flow Control: Prevent fast sender overwhelming slow receiver.
-
Access Control: MAC sublayer for shared media (e.g., CSMA/CD).
B. Error Detection & Correction
-
Parity: Single bit; detects odd number of errors; cannot correct.
-
CRC (Cyclic Redundancy Check):
-
Steps:
-
Append \(r\) zeros to data (\(D(x) \times x^r\)).
-
Divide by generator \(G(x)\) (degree \(r\)).
-
Remainder \(R(x)\) is checksum (size \(r\)).
-
Transmit \(D(x) \times x^r + R(x)\).
-
-
Verification: Divide received codeword by \(G(x)\); remainder 0 → no error.
-
Example: \(D(x)=x^5+x^4+x^2+1\), \(G(x)=x^3+x+1\) → Compute codeword.
-
-
Hamming Code: Error correction; \(m\) data bits, \(r\) parity bits where \(2^r \ge m+r+1\).
-
Checksum: Internet checksum (ones complement sum); used in IP/TCP/UDP.
[!TIP]
Past Question: "CRC computation" (Jun 2025). Always show polynomial division steps.
C. Framing & Transparency
-
Bit Stuffing: Insert '0' after five consecutive '1's in HDLC.
-
Byte Stuffing: Insert escape byte (e.g., 0x7D) before flag byte (0x7E) in PPP.
D. Flow & Error Control Protocols
-
Stop-and-Wait
-
Sender sends one frame, waits for ACK before next.
-
Efficiency = \(\frac{1}{1+2a}\), where \(a = \frac{\text{propagation delay}}{\text{transmission time}}\).
-
Utilization ≥ 50% → \(1 \ge 2a\) → \(a \le 0.5\).
-
-
Sliding Window
-
Go-Back-N (GBN):
-
Sender window \(N\), receiver window \(1\).
-
Timeout → retransmit all unACKed frames.
-
Utilization ≈ \(\frac{N}{1+2a}\) (for large \(N\)).
-
-
Selective Repeat (SR):
-
Both windows \(N\) (typically \(N \le 2^{k-1}\), \(k\) = seq bits).
-
Individual retransmission of lost frames.
-
More efficient than GBN but complex.
-
-
Piggybacking: ACK carried on data frames (bidirectional).
-
E. Multiple Access Protocols (MAC Sublayer)
1. Random Access (Contention-Based)
| Protocol | Operation | Throughput | Vulnerable Period |
|---|---|---|---|
| Pure ALOHA | Transmit anytime; collision → random backoff | \(S = G e^{-2G}\) | \(2 \times \text{frame time}\) |
| Slotted ALOHA | Transmit only at slot start | \(S = G e^{-G}\) | \(1 \times \text{frame time}\) |
| 1-persistent CSMA | Sense channel; if idle, transmit; if busy, wait | Better than ALOHA | Propagation time |
| Non-persistent CSMA | Sense; if busy, wait random time | Lower collision, higher delay | — |
| p-persistent CSMA | Slotted version; transmit with prob. \(p\) if idle | — | — |
| CSMA/CD | Collision detection + jam signal (Ethernet) | High efficiency | \(2 \times \text{propagation delay}\) |
CSMA/CD Minimum Frame Size:
\[ > \text{Min size} \ge 2 \times \text{propagation delay} \times \text{bandwidth} > \]
Ensures collision detected before transmission ends.
2. Controlled Access
-
Reservation: Reserve slots in advance.
-
Polling: Master polls slaves.
-
Token Passing: Token circulates; holder transmits (Token Ring, FDDI).
3. Comparison: ALOHA vs. CSMA
-
Pure ALOHA: Max throughput 18.4% at \(G=0.5\).
-
Slotted ALOHA: Max 36.8% at \(G=1\).
-
CSMA/CD: Efficiency \(\approx \frac{1}{1+2a}\) (for large \(a\), near 100%).
[!TIP]
Past Question: "Compare Pure ALOHA, Slotted ALOHA, CSMA, CSMA/CD" (Jun 2025). Throughput formulas must be memorized.
F. LAN Standards (IEEE 802)
| Standard | Access Method | Topology | Key Features |
|---|---|---|---|
| 802.3 (Ethernet) | CSMA/CD | Physical star, logical bus | Frame: Preamble, MAC src/dst, Type, FCS. Speeds: 10/100/1000 Mbps. |
| 802.4 (Token Bus) | Token passing | Physical bus, logical ring | Token passed in logical order; industrial use. |
| 802.5 (Token Ring) | Token passing | Ring | 4/16 Mbps; active monitor, beaconing; frame with token bit. |
| 802.11 (WLAN) | CSMA/CA (RTS/CTS) | Infrastructure/ad-hoc | 2.4/5 GHz; WEP/WPA2 security; MAC header with 4 addr fields. |
| FDDI | Token passing | Dual ring (counter-rotating) | 100 Mbps; high reliability; ring maintenance. |
Ethernet Frame Format:
\[ > \text{[Preamble (7B) | SFD (1B) | Dest MAC (6B) | Src MAC (6B) | Type (2B) | Data (46–1500B) | FCS (4B)]} > \]
G. Bridging & Switching
-
Bridges (Data Link Layer)
-
Transparent Bridge: Learns MAC addresses from source field; forwards/filters based on MAC table.
-
Spanning Tree Protocol (STP): Prevents loops by blocking redundant links.
-
-
Switches (Multiport Bridges)
-
Build MAC table by examining source MAC of incoming frames.
-
Modes:
-
Store-and-Forward: Error-checked, higher latency.
-
Cut-through: Forward header immediately, lower latency.
-
-
-
Comparison: Hubs, Switches, Bridges, Routers, Gateways
| Device | OSI Layer | Intelligence | Broadcast Handling | Filtering |
|---|---|---|---|---|
| Hub | 1 (Physical) | None | Floods all ports | None |
| Switch | 2 (Data Link) | MAC table | Floods if unknown MAC | Yes (per MAC) |
| Bridge | 2 | MAC table | Floods if unknown | Yes |
| Router | 3 (Network) | IP routing | Does not forward broadcast | Yes (per IP) |
| Gateway | 4–7 | Protocol conversion | Depends | Application-level |
H. Data Link Protocols
-
HDLC (High-Level Data Link Control)
-
Frame: Flag (0x7E) | Address | Control | Info | FCS | Flag.
-
Modes: NRM (primary-secondary), ARM, ABM (balanced).
-
-
PPP (Point-to-Point Protocol)
-
Phases: Link establishment (LCP), authentication (PAP/CHAP), network layer (NCP).
-
Frame: Flag | Address (0xFF) | Control (0x03) | Protocol | Data | FCS | Flag.
-
vs. SLIP: PPP has error detection, authentication, multiplexing; SLIP does not.
-
-
Frame Relay (Brief)
-
Architecture: DTE (user) – DCE (switch).
-
DLCI: Virtual circuit identifier (locally significant).
-
Congestion: FECN, BECN, DE bits.
-
IV. NETWORK LAYER
A. Functions & Design Issues
-
Routing: Path selection (DVR, LSR).
-
Forwarding: Move packet from input to output link.
-
Congestion Control: Prevent oversubscription (leaky/token bucket).
-
QoS: Guarantees (IntServ, DiffServ).
-
Internetworking: Interconnect heterogeneous networks (routers).
-
Addressing: Logical (IP) vs. physical (MAC).
-
Fragmentation/Reassembly: MTU adaptation (IPv4).
B. IP Addressing
1. IPv4 Format
-
32 bits, dotted-decimal (e.g., 192.168.1.1).
-
Network ID + Host ID.
2. Classful Addressing
| Class | First Bits | Network ID | Host ID | Range | Default Mask |
|---|---|---|---|---|---|
| A | 0 | 8 bits | 24 bits | 1.0.0.0–126.255.255.255 | 255.0.0.0 |
| B | 10 | 16 bits | 16 bits | 128.0.0.0–191.255.255.255 | 255.255.0.0 |
| C | 110 | 24 bits | 8 bits | 192.0.0.0–223.255.255.255 | 255.255.255.0 |
| D | 1110 | — | — | 224.0.0.0–239.255.255.255 | — (multicast) |
| E | 1111 | — | — | 240.0.0.0–255.255.255.255 | — (experimental) |
3. Limitations of Classful
-
Address waste: Class B network may have thousands of hosts but only hundreds needed.
-
Routing table explosion: Every network needs entry; no aggregation.
4. CIDR (Classless Inter-Domain Routing)
-
Notation:
prefix/d(e.g., 192.168.1.0/24). -
Benefits: Efficient allocation, route aggregation (supernetting).
5. Subnetting
-
Subnet Mask: 32-bit number; 1s for network+subnet, 0s for host.
-
Subnet ID: Bits borrowed from host part.
-
Steps to Design Subnets:
-
Determine required subnets/hosts.
-
Borrow bits: \(2^n \ge \text{subnets}\) (for \(n\) bits).
-
New mask = default mask + \(n\) bits.
-
Subnet increment = \(2^{\text{host bits}}\).
-
IP range: First usable to last usable (exclude network/broadcast).
-
Example: Divide 192.168.10.0/24 into 4 subnets:
- Borrow 2 bits → /26 mask (255.255.255.192).
- Increment = 64.
- Subnets:
- 192.168.10.0/26 → 192.168.10.1–62, broadcast 63.
- 192.168.10.64/26 → 65–126, broadcast 127.
- 192.168.10.128/26 → 129–190, broadcast 191.
- 192.168.10.192/26 → 193–254, broadcast 255.
6. IPv6 (Brief)
-
128 bits, hexadecimal (e.g., 2001:0db8:85a3::8a2e:0370:7334).
-
Header: Fixed 40 bytes; no checksum, options via extension headers.
-
Autoconfiguration: SLAAC (Stateless Address Autoconfiguration).
-
vs. IPv4: Vast address space, simplified header, built-in security (IPsec), no broadcast.
C. Routing Algorithms
1. Distance Vector Routing (DVR)
-
Bellman-Ford Equation:
\[ D_x(y) = \min_v \{ c(x,v) + D_v(y) \} \]
-
\(D_x(y)\): Cost from \(x\) to \(y\).
-
\(c(x,v)\): Cost to neighbor \(v\).
-
-
Steps:
-
Each node knows cost to direct neighbors.
-
Exchange full routing table periodically.
-
Update using Bellman-Ford.
-
-
Problems:
-
Count-to-infinity: Slow convergence for link failure.
-
Solutions: Split horizon, poison reverse, hold-down timers.
-
-
RIP: DVR implementation; hop count metric (max 15 hops); periodic updates (30s).
2. Link State Routing (LSR)
-
Dijkstra's Algorithm (Shortest Path First):
-
Each node floods LSAs (Link State Advertisements).
-
Build complete topology map (link state database).
-
Run Dijkstra to compute shortest paths.
-
-
Steps (Dijkstra):
-
Mark source node as permanent, others temporary.
-
Update costs to neighbors via permanent nodes.
-
Select temporary node with smallest cost, make permanent.
-
Repeat until all nodes permanent.
-
-
OSPF: LSR implementation; areas, authentication, fast convergence.
3. DVR vs. LSR Comparison
| Aspect | DVR | LSR |
|---|---|---|
| Information exchanged | Entire routing table | LSAs (link state) |
| Convergence | Slow (count-to-infinity) | Fast |
| Overhead | Periodic full updates | Flood on change, large initial DB |
| Scalability | Poor (RIP limited to 15 hops) | Good (OSPF with areas) |
| Metric | Typically hop count | Bandwidth, delay, cost |
D. ICMP (Internet Control Message Protocol)
-
Role: Error reporting, diagnostics (Network layer).
-
Common Messages:
-
Echo Request/Reply:
ping. -
Destination Unreachable: Port/host/network unreachable.
-
Time Exceeded: TTL expired (
traceroute). -
Redirect: Better next-hop.
-
Source Quench: Deprecated (congestion).
-
E. Address Resolution Protocols
-
ARP (Address Resolution Protocol)
-
Need: Map IP → MAC (for delivery on LAN).
-
Operation:
-
Broadcast ARP request: "Who has IP X? Tell Y."
-
Unicast ARP reply: "IP X is at MAC Z."
-
-
ARP Cache: Stores recent mappings (TTL ~ 20 min).
-
-
RARP (Reverse ARP)
-
Need: Diskless workstation gets IP from MAC (obsolete, replaced by BOOTP/DHCP).
-
Operation: Broadcast RARP request with MAC; RARP server replies with IP.
-
-
BOOTP/DHCP: Dynamic IP assignment; DHCP offers lease, configuration parameters.
F. Fragmentation & Reassembly
-
Need: MTU varies (Ethernet 1500B, PPP 532B, etc.).
-
IPv4 Fields:
-
Identification: Same for all fragments of a packet.
-
Flags: DF (Don't Fragment), MF (More Fragments).
-
Fragment Offset: Position in original packet (in 8-byte units).
-
-
Reassembly: Only at destination; intermediate routers do not reassemble.
G. Congestion Control in Network Layer
-
Causes: Buffer overflow, slow processors, low bandwidth.
-
Principles:
-
Load Shedding: Drop packets when overloaded (last resort).
-
Traffic Shaping: Regulate flow (leaky bucket, token bucket).
-
Resource Reservation: IntServ (RSVP).
-
-
Techniques:
-
Leaky Bucket: Fixed rate output; smoothes bursty traffic.
-
Token Bucket: Tokens accumulate (rate \(r\), burst size \(b\)); allows bursts.
\[ \text{Max burst} = b \times \text{packet size}, \quad \text{Avg rate} = r \]
-
Comparison:
| Leaky Bucket | Token Bucket | |------------------|------------------| | Output fixed rate | Output variable (up to burst) | | No burst allowed | Allows controlled bursts | | Smoothing only | Smoothing + burst control |
-
-
QoS Approaches:
-
IntServ: Per-flow resource reservation (RSVP); not scalable.
-
DiffServ: Per-class marking (DSCP in IP header); scalable.
-
V. TRANSPORT LAYER
A. Transport Services
-
Connection-Oriented: TCP (reliable, ordered, flow/congestion control).
-
Connectionless: UDP (unreliable, no control).
-
Multiplexing/Demultiplexing: Port numbers (16-bit).
-
Service Primitives:
LISTEN,CONNECT,SEND,RECEIVE,DISCONNECT.
B. UDP (User Datagram Protocol)
-
Header:
\[ \text{[Src Port (2B) | Dest Port (2B) | Length (2B) | Checksum (2B)]} \]
-
Features:
-
Connectionless, unreliable (no ACK, retransmission).
-
No flow/congestion control.
-
Low overhead, low latency.
-
-
Applications: DNS, VoIP, streaming, DHCP.
C. TCP (Transmission Control Protocol)
1. Header Format
| Field | Size | Purpose |
|---|---|---|
| Source Port | 16 bits | Sender app |
| Dest Port | 16 bits | Receiver app |
| Seq Number | 32 bits | Byte number of first byte |
| Ack Number | 32 bits | Next expected byte (ACK = seq + 1) |
| Data Offset | 4 bits | Header length (in 32-bit words) |
| Reserved | 6 bits | — |
| Flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window Size | 16 bits | Receiver's buffer (rwnd) |
| Checksum | 16 bits | Error detection (covers pseudo-header) |
| Urgent Pointer | 16 bits | Offset to urgent data (if URG set) |
| Options | Variable | MSS, window scale, timestamps |
2. Connection Management
-
Three-Way Handshake (Establishment):
-
Client → SYN (seq=x)
-
Server → SYN-ACK (seq=y, ack=x+1)
-
Client → ACK (ack=y+1)
-
-
Four-Way Handshake (Termination):
-
Client → FIN (seq=u)
-
Server → ACK (ack=u+1)
-
Server → FIN (seq=v)
-
Client → ACK (ack=v+1)
-
-
Why Graceful Termination? Ensure all data delivered, resources released; prevent data loss.
3. Flow Control
-
Sliding window; receiver advertises
rwndin header. -
Sender must have
LastByteSent - LastByteAcked ≤ min(cwnd, rwnd).
4. Congestion Control
-
Slow Start:
cwndstarts at 1 MSS; doubles each RTT until thresholdssthresh. -
Congestion Avoidance:
cwndincreases by 1 MSS per RTT (additive increase). -
Fast Retransmit: 3 duplicate ACKs → retransmit missing segment.
-
Fast Recovery: After fast retransmit, set
ssthresh = cwnd/2,cwnd = ssthresh + 3, then additive increase. -
AIMD: Additive Increase, Multiplicative Decrease (on loss).
5. Retransmission Strategies
-
Go-Back-N: TCP uses cumulative ACKs; loss → retransmit from lost segment onward.
-
Selective Repeat: TCP with SACK (Selective ACK) option allows individual retransmission.
D. TCP vs. UDP Comparison
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented | Connectionless |
| Reliability | Guaranteed (ACK, retransmission) | Not guaranteed |
| Ordering | In-order delivery | No ordering |
| Flow Control | Yes (sliding window) | No |
| Congestion Control | Yes (AIMD) | No |
| Overhead | High (20+ byte header) | Low (8 byte header) |
| Latency | Higher | Lower |
| Applications | Web (HTTP), email (SMTP), file transfer (FTP) | DNS, VoIP, streaming, DHCP |
VI. APPLICATION LAYER
A. DNS (Domain Name System)
-
Need: Hierarchical naming for scalability (flat namespace impossible).
-
Components:
-
Resolvers: Stub (in host), recursive (in DNS server).
-
Name Servers: Root, TLD (.com, .org), Authoritative.
-
-
Resolution Process:
-
Resolver queries root server for TLD server.
-
Queries TLD for authoritative server.
-
Queries authoritative for IP.
-
Caching at each level (TTL-based).
-
-
Resource Records (RR):
-
A: IPv4 address.
-
AAAA: IPv6 address.
-
CNAME: Canonical name (alias).
-
MX: Mail exchange.
-
NS: Name server.
-
PTR: Pointer (reverse DNS).
-
B. Electronic Mail
-
Architecture:
-
UA (User Agent): Mail client (Outlook, Thunderbird).
-
MTA (Message Transfer Agent): Server-to-server transfer (SMTP).
-
MDA (Message Delivery Agent): Local delivery (e.g.,
procmail).
-
-
SMTP (Simple Mail Transfer Protocol)
-
Operation: Port 25; text-based commands.
-
Commands:
HELO,MAIL FROM,RCPT TO,DATA,QUIT. -
ESMTP Extensions:
STARTTLS(encryption),SIZE(max message size). -
Limitations: 7-bit ASCII only; binary data via MIME.
-
-
Retrieval Protocols:
-
POP3: Download-and-delete; simple, no folder support.
-
IMAP: Manipulate mail on server; supports folders, partial fetch.
-
-
MIME (Multipurpose Internet Mail Extensions):
-
Encodes non-ASCII (Base64, quoted-printable).
-
Multipart messages (text + attachments).
-
C. HTTP (Hypertext Transfer Protocol)
-
Operation: Request-response (client → server).
-
Methods:
GET,POST,PUT,DELETE,HEAD. -
Headers: Request (Host, User-Agent), Response (Server, Content-Type).
-
Status Codes:
-
1xx: Informational.
-
2xx: Success (200 OK).
-
3xx: Redirection (301, 302).
-
4xx: Client error (404 Not Found).
-
5xx: Server error (500 Internal).
-
-
Persistent vs. Non-Persistent:
-
Non-persistent (HTTP/1.0): One TCP connection per object.
-
Persistent (HTTP/1.1): Multiple requests/responses per connection (pipelining).
-
-
HTTPS: HTTP over SSL/TLS (port 443); encryption, server authentication.
D. FTP (File Transfer Protocol)
-
Architecture: Client-server; separate control (port 21) and data (port 20) connections.
-
Modes:
-
Active: Server opens data connection to client (client sends
PORT). -
Passive: Client opens data connection (server sends
PASV).
-
-
Commands:
USER,PASS,LIST,RETR,STOR,QUIT.
E. SNMP (Simple Network Management Protocol)
-
Components:
-
Manager: Central console (e.g.,
snmpwalk). -
Agent: Software on managed device (router, switch).
-
MIB (Management Information Base): Database of managed objects (OID tree).
-
-
Operations:
GET,GETNEXT,SET,TRAP(asynchronous alert). -
Versions:
-
SNMPv1: Community strings (no encryption).
-
SNMPv2c: Enhanced operations, still no encryption.
-
SNMPv3: User authentication, encryption (USM, VACM).
-
F. WWW (World Wide Web)
-
URL:
scheme://host:port/path?query#fragment. -
HTML: Markup language for web pages.
-
Web Server: Serves static/dynamic content (Apache, Nginx).
-
Browser: Renders HTML, executes JavaScript.
G. Cryptography (Basic)
-
Symmetric Encryption: Same key (e.g., AES, DES). Fast, key distribution problem.
-
Asymmetric Encryption: Public/private key (e.g., RSA). Slow, solves key distribution.
-
Digital Signature: Hash + sender's private key; verifies integrity, authentication, non-repudiation.
-
PKI (Public Key Infrastructure): CA issues certificates binding public key to identity.
-
Applications:
-
SSL/TLS: Handshake (asymmetric), session keys (symmetric).
-
IPsec: AH (authentication), ESP (encryption).
-
VII. ADDITIONAL TOPICS
A. Virtual LANs (VLANs)
-
Need: Segmentation without physical separation; security, broadcast control, flexibility.
-
Implementation Methods:
-
Port-based: Switch ports assigned to VLANs.
-
MAC-based: Based on source MAC address.
-
Protocol-based: Based on network layer protocol (e.g., IP, IPX).
-
-
Tagging: IEEE 802.1Q
-
Inserts 4-byte VLAN tag into Ethernet frame (TPID=0x8100).
-
VID (VLAN ID): 12 bits (1–4094; 0 and 4095 reserved).
-
B. Broadband Access Technologies
| Technology | Medium | Speed | Key Feature |
|---|---|---|---|
| ADSL | Copper phone line | Upstream 1 Mbps, Downstream 8 Mbps | FDM; distance-sensitive |
| VDSL | Copper | Up to 50 Mbps | Shorter loop, higher freq |
| Cable Modem | Coaxial (HFC) | Up to 1 Gbps (shared) | DOCSIS; shared medium |
| FTTH | Fiber | 100 Mbps–10 Gbps | Dedicated fiber, symmetric |
C. Network Security Basics
-
Firewalls:
-
Packet Filtering: ACLs on router.
-
Stateful: Track connection state.
-
Application-Level (Proxy): Inspect application data.
-
-
VPNs:
-
IPsec: Tunnel/transport mode; AH/ESP.
-
SSL/TLS: Remote access VPNs (e.g., OpenVPN).
-
-
IDS (Intrusion Detection System):
-
NIDS: Network-based (sniff traffic).
-
HIDS: Host-based (log files).
-
Detection: Signature-based, anomaly-based.
-
D. Wireless Networks (802.11 Details)
-
Modes:
-
Infrastructure: AP (access point) connects stations.
-
Ad-hoc (IBSS): Station-to-station.
-
-
MAC: CSMA/CA + RTS/CTS
-
DIFS: Distributed Inter-Frame Space; sense channel.
-
RTS/CTS: Optional; reduces hidden terminal problem.
-
-
Security:
-
WEP: RC4, static key, weak (IV reuse).
-
WPA/WPA2: TKIP (WPA), AES-CCMP (WPA2); 802.1X authentication.
-
E. Frame Relay (Brief)
-
Architecture: DTE (user) – DCE (switch).
-
DLCI: Data Link Connection Identifier (locally significant).
-
Congestion Control:
-
FECN (Forward Explicit Congestion Notification): Set by switch in direction of congestion.
-
BECN (Backward ECN): Set opposite direction.
-
DE (Discard Eligible): Mark low-priority frames for discard.
-
VIII. CALCULATION-BASED PROBLEMS (EXAM FOCUS)
A. Nyquist & Shannon Capacity
-
Nyquist (Noiseless): \( \text{Max bit rate} = 2B \log_2(L) \)
- Given: \(B=3\) kHz, \(L=4\) → \(2 \times 3000 \times 2 = 12,000\) bps.
-
Shannon (Noisy): \( C = B \log_2(1+\text{SNR}) \)
- Given: \(B=4\) kHz, SNR=30 dB → SNR=1000 → \(C=4000 \log_2(1001) \approx 40,000\) bps.
B. Subnetting
Example: Design 4 subnets for 192.168.10.0/24, each with 16 hosts.
-
Hosts needed: 16 → need 4 bits for hosts (\(2^4=16\), but 2 reserved → 14 usable).
-
Subnets: Borrow 2 bits from host part → /26 mask (255.255.255.192).
-
Increment = \(2^{(8-2)} = 64\).
-
Subnets:
-
192.168.10.0/26 → IPs: 1–62, broadcast 63.
-
192.168.10.64/26 → 65–126, broadcast 127.
-
192.168.10.128/26 → 129–190, broadcast 191.
-
192.168.10.192/26 → 193–254, broadcast 255.
-
C. ALOHA Throughput
-
Pure ALOHA: \( S = G e^{-2G} \), Max \(S=0.184\) at \(G=0.5\).
-
Slotted ALOHA: \( S = G e^{-G} \), Max \(S=0.368\) at \(G=1\).
-
Given idle probability \(P_{\text{idle}}=0.1\):
-
\(P_{\text{idle}} = e^{-G}\) → \(G = -\ln(0.1) \approx 2.302\).
-
Throughput \(S = G e^{-G} = 2.302 \times 0.1 = 0.2302\).
-
D. CSMA/CD Minimum Packet Size
\[ \text{Min size} \ge 2 \times \text{propagation delay} \times \text{bandwidth} \]
-
Given: Length=2 km, speed=\(2 \times 10^8\) m/s, bandwidth=\(10^7\) bps.
-
Propagation delay = \(\frac{2000}{2 \times 10^8} = 10^{-4}\) sec.
-
Min size = \(2 \times 10^{-4} \times 10^7 = 2000\) bits = 250 bytes.
E. TDM Frame Size & Data Rate
-
Given: Channel 1: 190 kbps, Channel 2: 180 kbps.
-
Frame size = sum of bits per channel = 190,000 + 180,000 = 370,000 bits.
-
Frame time = 1 sec (assuming 1 sec per frame for simplicity).
-
Data rate = 370 kbps.
F. CRC Computation
Example: \(D(x)=x^5+x^4+x^2+1\), \(G(x)=x^3+x+1\).
-
\(D(x) = 110101\) (bits for \(x^5\) to \(x^0\)).
-
Append 3 zeros → 110101000.
-
Divide by \(G(x)=1011\) (binary 1011).
-
Remainder \(R(x)\) → codeword = \(D(x) \times x^3 + R(x)\).
G. TCP Header Analysis (Hex Dump)
Dump: 05320017 00000001 00000000 500207FF 00000000
-
Source Port: First 4 hex digits =
0532= 1330 decimal. -
Dest Port: Next 4 =
0017= 23 (Telnet). -
Seq Number: Next 8 =
00000001= 1. -
Ack Number: Next 8 =
00000000= 0 (no ACK). -
Header Length: First 4 bits of next word (
50hex =0101 0000) →0101= 5 words = 20 bytes (no options). -
Flags: Next 6 bits (
000111? Actually50hex =0101 0000, so flags bits are next 6 bits after data offset:000111? Let's parse properly:-
50hex =0101 0000→ Data offset = 5 (high 4 bits). -
Next 6 bits (low 2 bits of first byte + next byte) =
00 0000? Actually standard:-
Byte 12:
50→ high 4 bits = 5 (header length). -
Low 4 bits + byte 13 = flags/reserved.
-
Here
50=0101 0000→ low 4 bits =0000(reserved), then next byte07=0000 0111. -
So flags =
00000111? That's not standard. Let's re-evaluate:TCP header fields in order:
-
Bytes 0–1: Source Port
-
Bytes 2–3: Dest Port
-
Bytes 4–7: Seq Number
-
Bytes 8–11: Ack Number
-
Byte 12: Data offset (4 bits) + Reserved (3 bits) + NS flag (1 bit)
-
Byte 13: Flags (8 bits: CWR, ECE, URG, ACK, PSH, RST, SYN, FIN)
-
Byte 14–15: Window
-
...
Given dump:
05 32 00 17 00 00 00 01 00 00 00 00 50 02 07 FF 00 00 00 00-
Source Port:
05 32= 0x0532 = 1330. -
Dest Port:
00 17= 23. -
Seq:
00 00 00 01= 1. -
Ack:
00 00 00 00= 0. -
Byte 12:
50= 0x50 =0101 0000→ Data offset = 5 (20 bytes), Reserved = 000, NS=0. -
Byte 13:
02= 0x02 =0000 0010→ Only SYN flag set (bit 2). -
Window:
07 FF= 0x07FF = 2047.
So:
-
Source Port: 1330
-
Dest Port: 23
-
Seq: 1
-
Ack: 0
-
Header Length: 20 bytes
-
Flags: SYN (connection request)
-
Window Size: 2047
-
-
-
IX. SHORT NOTE TOPICS (FREQUENT 3–4 MARKS)
1. ARP, RARP, ICMP
| Protocol | Purpose | Operation | Layer |
|---|---|---|---|
| ARP | IP → MAC resolution | Broadcast request, unicast reply | Network/Data Link |
| RARP | MAC → IP (diskless) | Broadcast request, unicast reply | Network/Data Link |
| ICMP | Network diagnostics/errors | Echo (ping), unreachable, TTL exceeded | Network |
2. PPP, SLIP, HDLC
| Protocol | Type | Features | Use Case |
|---|---|---|---|
| PPP | Data Link | LCP/NCP phases, authentication (PAP/CHAP), error detection | Dial-up, DSL |
| SLIP | Data Link | No error detection, no multiplexing, no dynamic IP | Legacy serial |
| HDLC | Data Link | Bit stuffing, NRM/ARM/ABM modes, flag-based framing | Cisco proprietary, legacy |
3. FDM and TDM
-
FDM: Frequency bands; guard bands; radio/cable TV.
-
TDM: Time slots; synchronous (fixed slots) vs. statistical (dynamic).
4. Virtual LAN (VLAN)
-
Need: Logical segmentation over single physical LAN.
-
Tagging: 802.1Q (4-byte VLAN tag).
-
Benefits: Security, broadcast control, flexibility.
5. UDP
-
Connectionless, unreliable, no flow/congestion control.
-
Header: 8 bytes (ports, length, checksum).
-
Applications: DNS, VoIP, streaming.
6. Cryptography
-
Symmetric: Same key (AES, DES).
-
Asymmetric: Public/private (RSA).
-
Digital Signature: Hash + private key.
-
PKI: CA issues certificates.
7. HTTP
- Request-response; methods (GET/POST); status codes; persistent connections; HTTPS.
8. SNMP
- Manager-agent-MIB; operations (GET/SET/TRAP); versions (v1/v2c/v3).
9. FDDI
- Dual ring (counter-rotating); token passing; 100 Mbps; high reliability; ring maintenance (active monitor).
10. Token Ring
- Ring topology; token passing; 4/16 Mbps; frame format with token bit; beaconing for ring recovery.
11. SMTP
- Text-based; port 25; commands (HELO, MAIL FROM, RCPT TO, DATA); ESMTP extensions (STARTTLS).
12. DNS
- Hierarchical; resolvers, root/TLD/authoritative servers; iterative/recursive queries; RR types.
13. Congestion Control
-
Causes: Buffer overflow, slow processors.
-
Techniques: Load shedding, traffic shaping (leaky/token bucket), QoS (IntServ/DiffServ).
14. Leaky Bucket vs. Token Bucket
| Leaky Bucket | Token Bucket |
|---|---|
| Fixed output rate | Variable output (up to burst) |
| No burst allowed | Allows controlled bursts |
| Smoothing only | Smoothing + burst control |
15. Pure vs. Slotted ALOHA
| Pure ALOHA | Slotted ALOHA |
|---|---|
| Transmit anytime | Transmit at slot start |
| Vulnerable period = 2τ | Vulnerable period = τ |
| Max throughput 18.4% | Max throughput 36.8% |
16. Persistent vs. Non-Persistent CSMA
-
1-persistent: Sense; if idle transmit; if busy, sense continuously.
-
Non-persistent: Sense; if busy, wait random time.
-
p-persistent: Slotted; transmit with prob. \(p\) if idle.
17. IEEE 802.3 vs. 802.4 vs. 802.5
| 802.3 (Ethernet) | 802.4 (Token Bus) | 802.5 (Token Ring) |
|---|---|---|
| CSMA/CD | Token passing (logical ring) | Token passing (physical ring) |
| Physical star, logical bus | Physical bus, logical ring | Ring |
| 10/100/1000 Mbps | 5/10 Mbps | 4/16 Mbps |
18. Hubs, Switches, Bridges, Routers, Gateways
| Device | Layer | Function |
|---|---|---|
| Hub | 1 | Repeats signal to all ports |
| Switch | 2 | Forwards based on MAC; MAC table |
| Bridge | 2 | Connects two LAN segments; learns MAC |
| Router | 3 | Routes based on IP; connects networks |
| Gateway | 4–7 | Protocol conversion (e.g., SMTP ↔ HTTP) |
19. Remote Bridging Challenges
-
Latency: Long distances increase propagation delay.
-
Scalability: Large number of MAC entries; spanning tree issues.
-
Loop Avoidance: STP may block links, reducing redundancy.
-
Bandwidth: Limited WAN links vs. high LAN speeds.
20. TCP Connection Establishment & Release
-
Establishment: 3-way handshake (SYN, SYN-ACK, ACK).
-
Release: 4-way handshake (FIN, ACK, FIN, ACK); both sides close independently.
-
Graceful Termination: Ensures all data delivered, resources freed; prevents data loss.
21. Link State vs. Distance Vector Routing
| DVR | LSR |
|---|---|
| Bellman-Ford | Dijkstra |
| Periodic full updates | Flooding on change |
| Slow convergence (count-to-infinity) | Fast convergence |
| RIP example | OSPF example |
| Poor scalability | Good scalability |
22. Classful vs. Classless Addressing (CIDR)
| Classful | CIDR |
|---|---|
| Fixed classes (A/B/C) | Variable-length prefixes (e.g., /24) |
| Address waste | Efficient allocation |
| No route aggregation | Route aggregation (supernetting) |
| Routing table explosion | Smaller routing tables |
23. IPv4 vs. IPv6
| IPv4 | IPv6 |
|---|---|
| 32-bit address | 128-bit address |
| Header: 20–60 bytes | Header: fixed 40 bytes |
| Checksum, options | No checksum, extension headers |
| Broadcast | No broadcast (multicast only) |
| Manual/DHCP config | Autoconfiguration (SLAAC) |
| NAT common | No NAT needed |
24. Broadcast vs. Multicast Routing
-
Broadcast: Send to all nodes in network; routers block (unless configured).
-
Multicast: Send to group; uses IGMP (hosts) + multicast routing (PIM, DVMRP).
25. MLMA (Multi-Level Multi-Access)
-
Combines multiple access methods at different levels (e.g., FDM + TDM).
-
Used in broadband networks (e.g., cable modem: FDM for channels, TDM/TDMA within channel).
26. Service Primitives in Transport Layer
-
Listen: Wait for connection request (server).
-
Connect: Initiate connection (client).
-
Send/Receive: Data transfer.
-
Disconnect: Terminate connection.
27. Network Topologies (Star vs. Mesh)
-
Star: Central hub; easy to manage, single point of failure.
-
Mesh: Fully/partially connected; high reliability, redundant paths, expensive.
28. QoS Techniques
-
IntServ: Per-flow reservation (RSVP); not scalable.
-
DiffServ: Per-class marking (DSCP); scalable.
-
Traffic Shaping: Leaky/token bucket.
-
Priority Queuing: Class-based scheduling.
29. Email Architecture
-
UA → MTA (SMTP) → MTA → MDA → UA (POP3/IMAP).
-
SMTP: Push protocol (port 25).
-
POP3/IMAP: Pull protocols (ports 110/143).
30. WWW
-
URL:
http://host:port/path?query#fragment. -
HTML: Markup language.
-
HTTP: Request-response; persistent connections.
-
Web Server/Browser: Client-server model.
X. DIAGRAM-BASED TOPICS (MENTAL PREPARATION)
-
ISO-OSI Model: Draw 7 layers with examples (HTTP→App, TCP→Transport, IP→Network, Ethernet→Data Link, RS-232→Physical).
-
TCP/IP Model: 4 layers (Application, Transport, Internet, Network Interface).
-
Ethernet Frame: Preamble (7B) + SFD (1B) + Dest MAC (6B) + Src MAC (6B) + Type (2B) + Data (46–1500B) + FCS (4B).
-
Token Ring Frame: Start delimiter, access control, frame control, Dest/Src MAC, data, FCS, end delimiter, status.
-
TCP Header: Source/Dest port, seq/ack, flags (6 bits), window, checksum, urgent pointer, options.
-
UDP Header: Src port, dest port, length, checksum.
-
IPv4 Header: Version/IHL, DSCP/ECN, Total length, Identification, Flags/Fragment offset, TTL, Protocol, Header checksum, Src/Dest IP, Options.
-
DNS Hierarchy: Root → TLD (.com) → Authoritative → Host.
-
Email Architecture: UA → MTA (SMTP) → MTA → MDA → UA (POP3/IMAP).
-
FTP Connections: Control (port 21) + Data (port 20 active; passive: client opens).
-
Topologies: Draw bus, star, ring, mesh.
-
Sliding Window (GBN/SR): Sender window \(N\), receiver window 1 (GBN) or \(N\) (SR); cumulative ACKs vs. selective ACKs.
-
Dijkstra's Algorithm: Step-by-step on graph; mark permanent nodes, update costs.
-
Bellman-Ford: Iterative updates; count-to-infinity example.
-
Subnetting Example: Show network address, borrowed bits, subnets, ranges.
Final Exam Strategy:
-
7-mark questions: Explain with diagrams, compare, give examples.
-
4-mark questions: Short notes; define, list key points, applications.
-
Calculation problems: Show formula, substitute values, box final answer.
-
Past Paper Focus: OSI/TCP/IP models, subnetting, routing algorithms (DVR/LSR), TCP connection, DNS, ARP/ICMP, LAN standards (802.3/4/5), CRC, ALOHA/CSMA, Nyquist/Shannon.
\boxed{\text{Revise diagrams and formulas daily. Practice past paper problems under time constraints.}}