π₯ Most Important Topics to Pass (High-Yield Master Checklist)
Prioritized by examination frequency. Click any topic to jump directly to its complete worked solution.
Subnetting & CIDR Calculation
IPv4 Fragmentation across MTU 1500
CRC Modulo-2 Division & Syndrome
CSMA/CD Flowchart & Min Frame Derivation
Shannon Capacity & Nyquist Bit Rate
Line Coding Waveforms (NRZ-L, NRZ-I, Manchester)
TCP 3-Way Handshake & SYN Flooding
Electronic Mail Architecture (SMTP, POP3, IMAP)
Dijkstra's Link-State Algorithm
Carrier Modulation (ASK, FSK, PSK & QAM)
TCP/IP 5-Layer Suite & Message Journey
TCP Congestion Control (Tahoe vs Reno)
ALOHA Throughput (Pure vs Slotted)
PCM 3 Steps & 64 kbps Voice Derivation
SNMP Architecture (8 PDUs, Ports 161/162)
BER TLV Byte Encodings (INTEGER & String)
Ethernet Cabling (10Base5/2/T/F Comparison)
802.11 Wi-Fi CSMA/CA (RTS, CTS, NAV)
Guided Media & Total Internal Reflection (TIR)
DNS Hierarchy & Resolution (Recursive vs Iterative)
Mobile IP 3 Phases & Triangle Routing
Decibel Power Loss Calculation
π All Essential Formulas (Formula Cheat Sheet)
| Module | Concept | Standard Formula | Variable Definitions & Important Units |
|---|---|---|---|
| M1 | Data Efficiency | \(\text{Efficiency} = \left(\frac{D_{\text{app}}}{D_{\text{frame}}}\right) \times 100\%\) | \(D_{\text{app}}\) = App data bytes, \(D_{\text{frame}} = D_{\text{app}} + \text{Headers} + \text{Trailer}\). |
| M2 | Usable Hosts in Subnet | \(N = 2^{32 - p} - 2\) | \(p\) = CIDR prefix length (e.g. \(26 \to 32-26=6 \implies 2^6-2=62\)). |
| M2 | Fragment Offset | \(\text{Offset} = \frac{\text{Cumulative Data Bytes}}{8}\) | Must be integer. Maximum data per fragment = link MTU - 20 (divisible by 8). |
| M3 | Pure ALOHA Throughput | \(S = G \times e^{-2G}\) | \(G = N \times T_{fr}\). Maximum throughput is \(18.4\%\) at \(G = 0.5\). |
| M3 | Slotted ALOHA Throughput | \(S = G \times e^{-G}\) | Maximum throughput is \(36.8\%\) at \(G = 1.0\). |
| M3 | CSMA/CD Min Frame Size | \(L_{\min} = 2 \times R \times T_p\) | \(R\) in bps, \(T_p\) in seconds. (e.g. \(2 \times 10^7 \times 25.6\ \mu\text{s} = 512\text{ b} = 64\text{ B}\)). |
| M4 | Decibel Power Loss | \(\text{dB} = 10 \times \log_{10}\left(\frac{P_2}{P_1}\right)\) | \(P_2\) is output power, \(P_1\) is input power. Half power \(= 10 \log_{10}(0.5) = -3.01\text{ dB}\). |
| M4 | Shannon Capacity (Noisy) | \(C = B \times \log_2(1 + \text{SNR})\) | \(B\) = Bandwidth in Hz, \(\text{SNR}\) is linear power ratio (\(\text{NOT in dB}\)). |
| M4 | Nyquist Bit Rate (Noiseless) | \(\text{Bit Rate} = 2 \times B \times \log_2(L)\) | \(B\) = Bandwidth in Hz, \(L\) = Number of discrete signal levels. |
| M4 | Voice Channel Bit Rate | \(\text{Bit Rate} = 2 \times f_{\max} \times n\) | \(f_{\max} = 4000\text{ Hz}\), \(f_s = 8000\text{ samples/s}\), \(n = 8\text{ bits} \implies \mathbf{64\text{ kbps}}\). |
Overview of Internet & Application Layer
π― Module 1 Survival Strategy (Guaranteed 12+ Marks)
- Guaranteed Part A Topics: Client-Server vs P2P, FTP 2 connections (Port 20 vs 21), Recursive vs Iterative DNS, Cookies 4 components, Persistent vs Non-Persistent HTTP, SMTP vs POP3 vs IMAP.
- Guaranteed Part B Essay Topics: Only 3 major questions rotate:
- TCP/IP 5-Layer Architecture (functions, protocols, PDU at each layer).
- Electronic Mail Architecture (UA, MTA, MAA, SMTP, POP3, IMAP + neat diagram).
- Domain Name System (Hierarchy of servers, resolution process, message format).
- High-Frequency Numerical: Frame overhead and payload data percentage calculation.
Calculate:
- The total size of the transmitted Ethernet frame.
- The percentage of the frame that is actual application payload data.
- The total protocol overhead percentage.
Step 1: Identify given parameters:
- Application Data (\(D\)) = \(1000 \text{ bytes}\)
- TCP Header (\(H_{\text{TCP}}\)) = \(20 \text{ bytes}\)
- IP Header (\(H_{\text{IP}}\)) = \(20 \text{ bytes}\)
- Ethernet Header + Trailer (\(H_{\text{Eth}} + T_{\text{Eth}}\)) = \(14 \text{ bytes (header)} + 4 \text{ bytes (FCS trailer)} = 18 \text{ bytes}\)
Step 2: Calculate total size of the Ethernet frame:
\[\text{Total Frame Size} = D + H_{\text{TCP}} + H_{\text{IP}} + (H_{\text{Eth}} + T_{\text{Eth}})\] \[\text{Total Frame Size} = 1000 + 20 + 20 + 18 = \mathbf{1058 \text{ bytes}}\]Step 3: Calculate percentage of actual application data:
\[\text{Data Percentage (Efficiency)} = \left(\frac{\text{Application Data}}{\text{Total Frame Size}}\right) \times 100\%\] \[\text{Efficiency} = \left(\frac{1000}{1058}\right) \times 100\% = \mathbf{94.52\%}\]Step 4: Calculate total protocol overhead percentage:
\[\text{Total Overhead} = 20 + 20 + 18 = 58 \text{ bytes}\] \[\text{Overhead Percentage} = \left(\frac{58}{1058}\right) \times 100\% = \mathbf{5.48\%}\]Part A: High-Yield Short Answer Questions (3 Marks Each)
| Feature | Client-Server Paradigm | Peer-to-Peer (P2P) Paradigm |
|---|---|---|
| Architecture | Centralized. Clients request services from an always-on central server. | Decentralized. Equal peers communicate directly without a permanent central server. |
| Scalability | Poor scalability. Server becomes a bottleneck and single point of failure under heavy load. | Highly self-scaling. Each peer brings upload capacity as well as download demand. |
| Addressing | Server has a well-known, fixed (static) IP address. | Peers have arbitrary, dynamic IP addresses and join/leave arbitrarily (churn). |
| Real Example | HTTP Web Browsing (Apache/Nginx server, Chrome client) or FTP. | BitTorrent file sharing or Gnutella. |
FTP uses two separate, parallel TCP connections (out-of-band control architecture):
- Control Connection (Port 21):
- Used exclusively for transmitting commands (e.g.
USER,PASS,RETR,STOR) and 3-digit status replies. - Operates using 7-bit ASCII text strings.
- Remains open and connected throughout the entire user FTP session.
- Used exclusively for transmitting commands (e.g.
- Data Connection (Port 20 in Active Mode / Ephemeral Port in Passive Mode):
- Used exclusively for transferring the actual file contents or directory listings.
- Created dynamically on-demand when a file transfer command is issued.
- Closed immediately upon completion of that specific file transfer.
Advantage: Cleaner protocol design; commands can be sent (e.g. ABOR) even while a massive file is downloading.
- Encapsulation: The process at the sender where a higher-layer Protocol Data Unit (PDU) is wrapped inside a lower-layer PDU by appending control headers (and trailers).
- Decapsulation: The reverse process at the receiver where lower-layer headers/trailers are stripped off and the payload is delivered up to the next higher layer.
Journey Down the TCP/IP Layers (Encapsulation):
- Application Layer: Produces the raw application Message.
- Transport Layer: Prepends TCP/UDP header (source/dest ports) \(\to\) creates a Segment (or User Datagram).
- Network Layer: Prepends IP header (source/dest IP addresses, TTL) \(\to\) creates an IP Datagram (Packet).
- Data Link Layer: Prepends Ethernet header (MAC addresses) + appends FCS trailer (CRC-32) \(\to\) creates a Frame.
- Physical Layer: Converts frame bits into electromagnetic/optical signals for transmission on the physical transmission medium.
| Feature | Non-Persistent HTTP (HTTP/1.0) | Persistent HTTP (HTTP/1.1 Default) |
|---|---|---|
| Connection Lifetime | Closes TCP connection immediately after serving a single Web object. | Keeps TCP connection open across multiple consecutive requests/responses. |
| Time Overhead | Requires \(2 \times \text{RTT}\) per object (1 RTT for TCP 3-way handshake + 1 RTT for HTTP request/response). | Only \(1 \times \text{RTT}\) per subsequent object; with pipelining, multiple objects arrive in 1 RTT. |
| Server Overhead | High CPU & buffer load due to constant opening and closing of TCP sockets. | Low server load; reuses existing TCP connection buffers and congestion state. |
- Recursive Resolution:
- The querying host places the entire burden of name resolution on the queried DNS server.
- The contacted DNS server must contact other servers on behalf of the client and return the final resolved IP address (or an error).
- Typical use: Between the client host and the Local DNS Server (LDNS).
- Iterative Resolution:
- The queried DNS server does NOT query further servers. Instead, it immediately replies with a referral (the IP address of the next authoritative or TLD DNS server to contact).
- The client (usually the LDNS) repeats the query step-by-step down the DNS hierarchy.
- Typical use: Between the Local DNS Server and the Root, TLD, and Authoritative servers to reduce load on critical root infrastructure.
| Parameter | SMTP | POP3 | IMAP4 |
|---|---|---|---|
| Protocol Role | Push protocol (sending mail). | Pull protocol (retrieving mail). | Pull / Sync protocol (remote access). |
| Usage Points | Sender UA \(\to\) Sender MTA \(\to\) Receiver MTA. | Receiver Mailbox \(\to\) Receiver UA. | Receiver Mailbox \(\leftrightarrow\) Receiver UA. |
| Default Port | Port 25 (relay) / Port 587 (submission). | Port 110 (cleartext) / 995 (SSL). | Port 143 (cleartext) / 993 (SSL). |
| Storage Model | Transfers RFC 822/5322 ASCII messages. | Downloads mail locally; messages typically deleted from server. | Keeps all messages and folders synchronized on server; multi-device friendly. |
Definition: A cookie is a small piece of data sent by a web server to a client browser to create a stateful session over the inherently stateless HTTP protocol.
The 4 Essential Components:
Set-Cookie:Response Header: The web server generates a unique identification number and includes it in its HTTP response header (e.g.Set-Cookie: id=7896).- Browser Cookie Database: The client browser stores this cookie string in a local file associated with the server's domain.
Cookie:Request Header: When the user visits the same site again, the browser automatically extracts the saved cookie and prepends it to the HTTP request:Cookie: id=7896.- Backend Server Database: The server indexes user-specific state (shopping cart items, authentication login session, search history) using that cookie ID as the primary key.
- Architecture Comparison:
- OSI Model (7 Layers): Application, Presentation, Session, Transport, Network, Data Link, Physical.
- TCP/IP Suite (5 Layers): Application (combines Application, Presentation, and Session), Transport, Network, Data Link, Physical.
- Three Specific Reasons Why OSI Failed:
- Bad Timing: TCP/IP was already widely deployed, thoroughly debugged, and functioning on ARPANET when OSI standards were finalized.
- Bad Technology: OSI had unnecessary complexity, overlapping functions across layers (e.g. error control in layers 2, 3, and 4), and poor presentation/session layer definitions.
- Bad Implementation: Early OSI implementations were bloated, notoriously slow, and expensive, whereas TCP/IP code was distributed free in BSD Unix.
Working: BitTorrent breaks a large file into equal-sized chunks (typically 256 KB). Peers download chunks from and upload chunks to multiple other peers simultaneously.
Core Definitions:
- Tracker: A centralized infrastructure node that maintains the list of all peers actively participating in the distribution of a torrent. It does NOT store or transfer the file itself.
- Swarm: The entire collective group of peers and seeds connected together exchanging chunks of that specific torrent.
- Seed: A node that already possesses a complete (100%) copy of the file and stays online solely to upload chunks to others.
- Peer (Leecher): A participating node that possesses only a partial fraction of the file and is actively uploading chunks while downloading missing ones.
- Web Caching (Proxy Server): A proxy cache sits between clients and the origin server. It stores copies of recently requested web objects to drastically reduce client response time (latency) and eliminate redundant bandwidth on access links.
- Conditional GET: Mechanism to verify if a cached copy is still fresh without re-downloading the entire object:
- Client/Proxy sends a GET request with header:
If-Modified-Since: <cached-date>. - If the object has NOT changed on the server, the server replies with status code
304 Not Modifiedand an empty message body, saving massive bandwidth. - If the object HAS changed, the server replies with
200 OKand transmits the updated object.
- Client/Proxy sends a GET request with header:
Part B: High-Yield Essay Questions (9 Marks Each)
1. Introduction: The TCP/IP protocol suite is a hierarchical 5-layer model based on protocols developed for the ARPANET. Peer layers at communicating hosts communicate logically using protocols.
| Layer | Data Unit (PDU) | Primary Functions & Protocols |
|---|---|---|
| 5. Application Layer | Message | Provides user services and application-specific communication. Protocols: HTTP, FTP, SMTP, DNS, DHCP. |
| 4. Transport Layer | Segment (TCP) / Datagram (UDP) |
Process-to-process delivery using port numbers; connection management, flow control (sliding window), error control, congestion control. Protocols: TCP, UDP. |
| 3. Network Layer | Datagram (Packet) | Host-to-host delivery across disparate networks; logical IP addressing, routing (path selection), packet forwarding, and fragmentation. Protocols: IPv4, IPv6, ICMP, ARP, OSPF, BGP. |
| 2. Data Link Layer | Frame | Node-to-node (hop-to-hop) delivery over a single physical link; physical MAC addressing, framing, error detection (CRC), flow control, channel access (CSMA/CD). Protocols: Ethernet (IEEE 802.3), WiFi (802.11), PPP. |
| 1. Physical Layer | Bits | Transmission of raw binary bitstream over physical media; signal representation (line coding), modulation, bit synchronization, connectors, and transmission media (UTP, Fiber). |
2. Message Journey & Encapsulation/Decapsulation:
Key Highlights to Write:
- At Host A, headers are prepended down the stack (Encapsulation).
- Intermediate routers process packets only up to Layer 3 (Network Layer) to inspect IP destination and rewrite Layer 2 MAC addresses.
- At Host B, headers are validated and stripped up the stack (Decapsulation).
1. Architectural Overview & Neat Diagram:
2. Core Mail Components:
- User Agent (UA): Software program used by the human user to compose, read, reply to, and organize emails (e.g. Outlook, Thunderbird, Apple Mail).
- Message Transfer Agent (MTA): Server-side software that accepts outgoing mail from UAs, stores it in a spool queue, and routes it across the Internet to the destination mail server (e.g. Postfix, Sendmail). Always uses SMTP.
- Message Access Agent (MAA): Server-side software that authenticates the recipient and pulls stored messages from the recipient's mailbox to their local UA. Uses POP3 or IMAP4.
3. Step-by-Step Delivery Process:
- Composition & Submission: Alice writes an email using her UA. Her UA pushes the message to her local MTA server using SMTP (Port 587).
- Spooling & Queuing: Sender MTA verifies recipient domain (queries DNS for
MXrecord) and places mail into its spool queue. - MTA-to-MTA Relay: Sender MTA initiates a TCP connection to Receiver MTA over Port 25 and transfers the message using SMTP commands (
HELO,MAIL FROM:,RCPT TO:,DATA,QUIT). - Mailbox Storage: Receiver MTA stores the message into Bob's unique mailbox directory on disk.
- Message Retrieval: Bob turns on his computer and launches his UA. His UA uses a pull protocol (POP3 on Port 110 or IMAP4 on Port 143) to authenticate and retrieve messages from his mailbox.
1. Domain Name Space:
- Organized as an inverted tree with the root node at the top (denoted by a null label
"."). - Each node has a label (up to 63 characters). Complete domain name cannot exceed 255 characters.
- FQDN (Fully Qualified Domain Name): Ends with a trailing dot (e.g.
cs.ktu.edu.in.), specifying the full path to the root. - PQDN (Partially Qualified Domain Name): Starts from a node without reaching the root (e.g.
cs).
2. Hierarchy of Name Servers:
- Root Name Servers: 13 logical root server IP addresses (labeled A through M) distributed worldwide via Anycast. Return the IP addresses of TLD servers.
- Top-Level Domain (TLD) Servers: Responsible for top-level domains:
- Generic TLDs (gTLDs):
.com,.edu,.org,.net. - Country-Code TLDs (ccTLDs):
.in,.us,.uk.
- Generic TLDs (gTLDs):
- Authoritative Name Servers: Every organization with publicly accessible hosts must provide authoritative DNS servers that hold the actual mapping records for that organization (e.g.
ktu.edu.in). - Local DNS Server (Default Name Server): Does not strictly belong to the hierarchy; maintained by an ISP or university. Serves as the first contact point and proxy cache for user queries.
3. Step-by-Step Resolution Process:
1. DHT Principle: In structured P2P, data items (files) and nodes (peers) are assigned uniform integer identifiers from the same namespace using a cryptographic hash function (SHA-1):
- \(\text{Key Identifier} = \text{hash}(\text{file\\_name})\)
- \(\text{Node Identifier} = \text{hash}(\text{IP\\_address})\)
2. Chord Ring Identifier Space:
- Identifiers are arranged modulo \(2^m\) in an identifier circle (Chord Ring) numbered from \(0\) to \(2^m - 1\).
- Key Assignment Rule: A key \(k\) is assigned to the first node whose identifier is equal to or follows \(k\) in clockwise ring order. This node is called the successor of key \(k\): \(\text{node} = \text{successor}(k)\).
3. Routing with Finger Tables:
- Basic circular routing requires traversing nodes one-by-one clockwise: takes \(O(N)\) time (too slow).
- Chord accelerates lookup using a routing table called the Finger Table at each node:
- For an \(m\)-bit identifier space, each node maintains up to \(m\) entries.
- The \(i\)-th entry in the finger table of node \(n\) points to: \[\text{finger}[i] = \text{successor}((n + 2^{i-1}) \\bmod 2^m) \\quad \text{for } 1 \le i \le m\]
- Routing Complexity: By utilizing finger tables, Chord halves the remaining distance to the target key in every hop, achieving a lookup query complexity of \(O(\log N)\) hops (where \(N\) is the number of nodes).
Transport Layer & Network Layer
π― Module 2 Survival Strategy (Guaranteed 12+ Marks)
- Guaranteed Numericals: Subnetting (CIDR /26 calculation) and IP Fragmentation (MTU 1500 breakdown) are frequently repeated in KTU exams! Solving them correctly guarantees 100% full marks with zero deductions.
- Guaranteed Part A Topics: TCP vs UDP application choice, Stop-and-Wait lost ACK handling, Go-Back-N window constraint \(W < 2^m\), DHCP DORA exchange, NAT translation table, IPv4 vs IPv6 differences, ICMP Ping/Traceroute.
- Guaranteed Part B Essay Topics:
- Dijkstra's Shortest Path Algorithm (Step-by-step table on network graph).
- TCP 3-Way Handshake + SYN Flooding attack.
- TCP Congestion Control (Tahoe vs Reno: Slow Start, Congestion Avoidance, Fast Recovery).
- IPv4 Datagram Header Format & Fragmentation mechanics.
Calculate:
- The Subnet Mask in dotted-decimal notation.
- The Subnet Network Address and the Direct Broadcast Address.
- The Range of Usable Host IP Addresses.
- The Total Number of Usable Hosts in this subnet.
Step 1: Subnet Mask from Prefix /26:
A prefix length of /26 means 26 consecutive 1s followed by 6 zeros:
- First 3 octets: \(255.255.255\)
- 4th octet: \(128 + 64 = 192\)
- Subnet Mask = 255.255.255.192
Step 2: Subnet Network Address:
Convert the 4th octet of the host IP (200) to binary:
Perform bitwise AND with mask's 4th octet (192 = 11000000_2):
Subnet Network Address = 172.16.45.192
Step 3: Direct Broadcast Address:
Set all remaining 6 host bits to 1s in the 4th octet:
\[11000000_2 \text{ OR } 00111111_2 = 11111111_2 = 192 + 63 = 255\]Broadcast Address = 172.16.45.255
Step 4: Usable Host Address Range:
- First Usable Host = Network Address + 1 = 172.16.45.193
- Last Usable Host = Broadcast Address - 1 = 172.16.45.254
- Usable Range = 172.16.45.193 to 172.16.45.254
Step 5: Number of Usable Hosts:
With \(h = 32 - 26 = 6\) host bits:
\[\text{Number of Usable Hosts} = 2^h - 2 = 2^6 - 2 = 64 - 2 = \mathbf{62 \text{ hosts}}\](2 addresses reserved for Network ID and Directed Broadcast).
Determine:
- The number of fragments generated.
- For each fragment: Total Length, Header Length, Data (Payload) Size, Fragment Offset, and More Fragments (MF) flag.
Step 1: Determine Payload and Link Constraints:
- Original Total Length = \(4000 \text{ bytes}\)
- IP Header Size (\(H\)) = \(20 \text{ bytes}\)
- Total Application Payload (\(D\)) = \(4000 - 20 = 3980 \text{ bytes}\)
- Link MTU = \(1500 \text{ bytes}\)
- Maximum allowable fragment payload = \(\text{MTU} - H = 1500 - 20 = 1480 \text{ bytes}\)
- Divisibility Check: Fragment offset is measured in units of 8 bytes. Since \(1480 / 8 = 185\) (exactly divisible), maximum payload per fragment is 1480 bytes.
Step 2: Calculate Fragment Breakdown:
- Fragment 1:
- Payload = \(1480 \text{ bytes}\) (bytes 0 to 1479).
- Total Length = \(1480 + 20 = \mathbf{1500 \text{ bytes}}\).
- Offset = \(0 / 8 = \mathbf{0}\).
- MF Flag = \(\mathbf{1}\) (more fragments follow).
- Fragment 2:
- Payload = \(1480 \text{ bytes}\) (bytes 1480 to 2959).
- Total Length = \(1480 + 20 = \mathbf{1500 \text{ bytes}}\).
- Offset = \(1480 / 8 = \mathbf{185}\).
- MF Flag = \(\mathbf{1}\) (more fragments follow).
- Fragment 3:
- Remaining payload = \(3980 - (1480 + 1480) = 3980 - 2960 = 1020 \text{ bytes}\) (bytes 2960 to 3979).
- Total Length = \(1020 + 20 = \mathbf{1040 \text{ bytes}}\).
- Offset = \(2960 / 8 = \mathbf{370}\).
- MF Flag = \(\mathbf{0}\) (last fragment!).
Summary Table for Examiner:
| Fragment # | Header Length | Data (Payload) Size | Total Length | Fragment Offset | MF Flag |
|---|---|---|---|---|---|
| Fragment 1 | 20 bytes | 1480 bytes | 1500 bytes | 0 | 1 |
| Fragment 2 | 20 bytes | 1480 bytes | 1500 bytes | 185 | 1 |
| Fragment 3 | 20 bytes | 1020 bytes | 1040 bytes | 370 | 0 |
Check: Total payload accounted for = \(1480 + 1480 + 1020 = 3980 \text{ bytes}\). Exact match!
Part A: High-Yield Short Answer Questions (3 Marks Each)
Working: The sender transmits one frame and waits for an acknowledgment (ACK) from the receiver before sending the next frame. Only 1 frame is in transit at any moment (\(W_s = 1\)).
- Handling Lost Packet: The sender starts a retransmission timer when transmitting a frame. If the frame is lost in transit, the sender timer expires (timeout), and the sender automatically retransmits the same frame.
- Handling Lost ACK: If the frame arrives safely but the ACK is lost, the sender's timer expires and it retransmits the frame. To prevent the receiver from accepting a duplicate frame, frames and ACKs alternate using 1-bit sequence numbers (0 and 1). The receiver detects the duplicate sequence number, discards the duplicate packet, and re-sends the ACK.
| Feature | TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) |
|---|---|---|
| Connection Model | Connection-oriented (requires 3-way handshake). | Connectionless (no connection setup). |
| Reliability | 100% reliable (checksum, ACKs, retransmissions). | Unreliable best-effort (no ACKs, no retransmissions). |
| Header Size | 20 to 60 bytes (large overhead). | 8 bytes fixed (minimal overhead). |
| Flow/Congestion | Has flow control & congestion control. | No flow control, no congestion control. |
Application Selection & Justification:
- File Transfer (FTP/HTTP): TCP. Files cannot tolerate even a single bit of corruption or missing byte; exact reliability and in-order delivery are strictly required.
- Live Video Conferencing (Zoom/Meet): UDP. Highly latency-sensitive; dropped video frames cause momentary glitch, whereas retransmission delays would freeze live interaction.
- DNS Query: UDP. Queries and responses are short (fit in single 512-byte datagram); UDP avoids the multi-RTT overhead of TCP 3-way handshakes.
Working: The sender can transmit up to \(W_s\) consecutive frames without waiting for an ACK. The receiver accepts frames only in strict sequential order and sends cumulative ACKs. If a frame is lost, the receiver discards all subsequent out-of-order frames; upon timeout, the sender goes back and retransmits all unacknowledged frames.
Why \(W_s < 2^m\) is mandatory:
- For an \(m\)-bit sequence space, sequence numbers range from \(0\) to \(2^m - 1\).
- If window size were allowed to be \(W_s = 2^m\), suppose the sender transmits frames \(0, 1, \dots, 2^m - 1\).
- The receiver receives all frames and sends ACKs, but all ACKs are lost in transit.
- The sender times out and retransmits frame \(0\).
- The receiver (now expecting frame \(0\) of the next cycle) cannot tell whether the arriving frame \(0\) is a duplicate retransmission or a brand-new frame!
- To prevent this ambiguity, window size must satisfy: \[W_s \le 2^m - 1\]
- Distance Vector (RIP): Each router shares its entire routing table only with its immediate neighbors periodically based on Bellman-Ford equation ("tells its neighbors about the world").
- Link State (OSPF): Each router floods the state of its immediate local links to all routers in the network using Link State Advertisements (LSAs), then runs Dijkstra's algorithm ("tells the world about its neighbors").
Count-to-Infinity Problem: In distance vector routing, when a link breaks, two adjacent routers can continuously update each other with incrementally increasing fictitious metrics (\(2, 3, 4, \dots\)) until reaching infinity (\(16\) in RIP), causing prolonged routing loops.
Remedies:
- Split Horizon: A router never advertises a route back out the same interface through which it learned that route.
- Poison Reverse: A router advertises the route back to the source, but with a metric of infinity (\(16\)), explicitly marking it unreachable.
DHCP dynamically assigns an IP address, subnet mask, default gateway, and DNS servers to a newly joined host using the 4-step DORA exchange over UDP (Server port 67, Client port 68):
- DHCPDISCOVER: Client broadcasts to locate any active DHCP server on the local subnet.
- DHCPOFFER: DHCP server reserves an unassigned IP from its pool and broadcasts an offer.
- DHCPREQUEST: Client broadcasts accepting that specific server's offer and declining others.
- DHCPACK: Server acknowledges and confirms the lease configuration parameters.
Definition: Network Address Translation (NAT) allows an entire private local network (using RFC 1918 private IPs: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to share a single globally routable public IP address when communicating across the Internet.
NAT Translation Table (NAPT / PAT):
- When an internal host (
192.168.1.10:5001) sends a packet to a web server (203.0.113.5:80), the NAT router intercepts the packet. - The NAT router replaces the private source IP and port with its own public IP and an available port (e.g.
200.1.2.3:8001). - The router logs the mapping in its NAT Translation Table:
Private Source IP:Port Public NAT IP:Port External Destination IP:Port 192.168.1.10 : 5001 200.1.2.3 : 8001 203.0.113.5 : 80 - When the response arrives at
200.1.2.3:8001, the NAT router looks up port8001, rewrites destination to192.168.1.10:5001, and forwards it into the private LAN.
| Feature | IPv4 Header | IPv6 Header |
|---|---|---|
| Header Length | Variable (20 to 60 bytes, needs HLEN field). | Fixed 40 bytes (no HLEN field). |
| Address Length | 32 bits (\(4.3 \times 10^9\) addresses). | 128 bits (\(3.4 \times 10^{38}\) addresses). |
| Header Checksum | Present; recomputed at every router hop. | Completely eliminated for high-speed forwarding. |
| Fragmentation | Allowed at sender and intermediate routers. | Performed strictly by sender host only. |
| Options Handling | Embedded in base header (slows processing). | Separated into daisy-chained Extension Headers. |
ICMP (Internet Control Message Protocol): A companion protocol to IPv4 that reports errors and diagnostics back to the source IP.
- 5 Core Error Messages:
- Destination Unreachable: Packet cannot be delivered (host, network, or port down).
- Time Exceeded: TTL decremented to 0 in transit (Type 11).
- Source Quench: Router buffer congested (requests sender to slow down).
- Parameter Problem: Ambiguity or corruption in an IP header field.
- Redirection: Router informs host to send future packets via a shorter router path.
- Working of Ping: Sends an ICMP Echo Request (Type 8); the destination replies with an ICMP Echo Reply (Type 0), measuring round-trip time.
- Working of Traceroute: Sends packets with increasing TTL values:
- \(\text{TTL}=1 \to\) Router 1 drops packet, sends back Time Exceeded (Type 11) \(\to\) reveals Hop 1 IP.
- \(\text{TTL}=2 \to\) Router 2 drops packet, sends back Time Exceeded \(\to\) reveals Hop 2 IP.
- Repeats until packet reaches destination (which replies with Port Unreachable or Echo Reply).
Part B: High-Yield Essay Questions (9 Marks Each)
1. Three-Way Handshake Diagram & Steps:
- Step 1 (SYN): Client sends a segment with flag
SYN=1, advertising its Initial Sequence Number (ISN) \(x\). No payload data is carried. - Step 2 (SYN + ACK): Server acknowledges client's ISN by setting
Ack = x + 1, and sends its own ISN \(y\) with flagsSYN=1, ACK=1. - Step 3 (ACK): Client confirms server's ISN with
Ack = y + 1and flagACK=1. Connection is now fully established.
2. Why a SYN Segment Consumes One Sequence Number:
- In TCP, sequence numbers count actual payload bytes transmitted.
- A pure control segment with no data normally consumes 0 sequence numbers.
- However, a SYN segment must be explicitly acknowledged by the receiver to guarantee both sides agree on initial sequence numbers.
- If SYN consumed 0 sequence numbers, the ACK would have to acknowledge sequence number \(x\), making it impossible to differentiate between acknowledging the SYN or acknowledging 0 bytes of data. Therefore, TCP assigns an artificial 1-byte "phantom" cost to SYN (and FIN) segments!
3. SYN Flooding Attack & SYN Cookies:
- Attack Mechanism: An attacker sends thousands of spoofed SYN packets to a server but never completes Step 3 (ACK). The server allocates memory buffers for each half-open connection in its backlog queue, rapidly exhausting server RAM and crashing legitimate services.
- Mitigation (SYN Cookies): The server does NOT allocate memory buffers upon receiving a SYN. Instead, it encodes the connection parameters into a cryptographically generated sequence number \(y\) (cookie) sent in Step 2. Only when the client returns a valid ACK in Step 3 does the server decode the cookie and allocate resources.
1. Algorithm Principle: Dijkstra's algorithm computes the least-cost path from a single source node to all other nodes in a network. It maintains two sets: \(N'\) (set of nodes whose least cost path is definitively known) and tentative distance \(D(v)\) for all nodes not yet in \(N'\).
2. Standard Exam Network Graph Topology:
Edge Weights: A-B = 2, A-D = 5, B-D = 1, B-C = 3, C-D = 2, C-E = 4, D-E = 3.
3. Step-by-Step Execution Table:
| Step | Permanent Set \(N'\) | \(D(B), p(B)\) | \(D(C), p(C)\) | \(D(D), p(D)\) | \(D(E), p(E)\) |
|---|---|---|---|---|---|
| 0 (Init) | {A} | 2, A | \(\infty\) | 5, A | \(\infty\) |
| 1 | {A, B} | Permanent | 2+3 = 5, B | min(5, 2+1) = 3, B | \(\infty\) |
| 2 | {A, B, D} | Permanent | min(5, 3+2) = 5, B | Permanent | 3+3 = 6, D |
| 3 | {A, B, D, C} | Permanent | Permanent | Permanent | min(6, 5+4) = 6, D |
| 4 | {A, B, D, C, E} | Permanent | Permanent | Permanent | Permanent |
4. Resulting Routing Table for Node A:
| Destination | Least Cost | Shortest Path | Next Hop Router |
|---|---|---|---|
| B | 2 | A \(\to\) B | B |
| C | 5 | A \(\to\) B \(\to\) C | B |
| D | 3 | A \(\to\) B \(\to\) D | B |
| E | 6 | A \(\to\) B \(\to\) D \(\to\) E | B |
1. Four Phases of TCP Congestion Control:
- Slow Start: Starts with Congestion Window \(\text{cwnd} = 1 \text{ MSS}\). For every ACK received, \(\text{cwnd}\) increases by 1 MSS. Effect: \(\text{cwnd}\) doubles every RTT (exponential growth) until it reaches the slow-start threshold (\(\text{ssthresh}\)).
- Congestion Avoidance: Once \(\text{cwnd} \ge \text{ssthresh}\), aggressive exponential growth stops. \(\text{cwnd}\) increases by only 1 MSS per RTT (linear additive increase) to probe for spare capacity safely.
- Fast Retransmit: If sender receives 3 duplicate ACKs for the same segment, it does not wait for the retransmission timer to expire; it immediately retransmits the missing segment.
- Fast Recovery: Skip slow start after 3 duplicate ACKs; set \(\text{ssthresh} = \text{cwnd} / 2\), set \(\text{cwnd} = \text{ssthresh} + 3\text{ MSS}\), and continue in Congestion Avoidance.
2. Comparison: TCP Tahoe vs TCP Reno:
| Scenario | TCP Tahoe (1988) | TCP Reno (1990) |
|---|---|---|
| On Timeout | Set \(\text{ssthresh} = \text{cwnd}/2\), reset \(\text{cwnd} = 1\), enter Slow Start. | Set \(\text{ssthresh} = \text{cwnd}/2\), reset \(\text{cwnd} = 1\), enter Slow Start. |
| On 3 Duplicate ACKs | Treats as catastrophic loss: drops \(\text{cwnd} = 1\), enters Slow Start. | Performs Fast Recovery: sets \(\text{cwnd} = \text{ssthresh}\), avoids Slow Start! |
| Throughput Performance | Low average throughput due to repeated resets to 1. | Significantly higher throughput (sawtooth oscillation in Congestion Avoidance). |
Data Link Layer & Mobile IP
π― Module 3 Survival Strategy (Guaranteed 12+ Marks)
- Guaranteed Numericals:
- CRC Modulo-2 Division: 100% repeated in Part B! Must master XOR division, remainder appending, and receiver error detection.
- Pure ALOHA Throughput: \(S = G e^{-2G}\) calculation.
- CSMA/CD Minimum Frame Size: \(L_{\min} = 2 \times R \times T_p\) derivation and calculation.
- Guaranteed Part A Topics: Byte stuffing vs Bit stuffing, ARP packet format & working, Hub vs Switch vs Router comparison table, CSMA persistence comparison, Ethernet 64-byte rule, Hidden/Exposed station problems, Bluetooth Piconet/Scatternet.
- Guaranteed Part B Essay Topics:
- CSMA/CD Flowchart + Minimum Frame Size Derivation.
- IEEE 802.11 Architecture (BSS/ESS) + CSMA/CA Timeline (RTS/CTS/NAV/ACK).
- Standard Ethernet Cabling Comparison (10Base5, 10Base2, 10Base-T, 10Base-F).
- Mobile IP Three Phases (Discovery, Registration, Data Transfer) + Triangle Routing.
- Find the generator divisor binary sequence, the CRC check bits (remainder), and the transmitted codeword.
- Show the verification check at the receiver when the codeword is received without any transmission error.
- Show the check at the receiver when a single-bit error occurs during transmission (e.g. the first bit is inverted).
Step 1: Identify Generator Divisor and Augmented Data:
- Data word \(D = 110101\) (\(m = 6\) bits).
- Generator Polynomial: \(G(x) = 1 \cdot x^3 + 0 \cdot x^2 + 1 \cdot x^1 + 1 \cdot x^0 \implies \mathbf{1011_2}\) (divisor length = 4 bits, degree \(k = 3\)).
- Append \(k = 3\) zeros to the data word: Augmented Data = \(110101000\).
Step 2: Modulo-2 Binary Division at Sender (XOR Division):
- CRC Remainder Bits: \(\mathbf{011}\)
- Transmitted Codeword: Augmented Data \(\oplus\) Remainder = \(110101000 \oplus 011 = \mathbf{110101011}\).
Step 3: Verification at Receiver (Case A: No Error):
Receiver receives \(110101011\) and divides by generator \(1011\):
Conclusion: Since Remainder = \(\mathbf{000}\), the receiver accepts the data unit as error-free!
Step 4: Verification at Receiver (Case B: Single-Bit Error):
Suppose the most significant bit is corrupted (\(1 \to 0\)): Received = \(\mathbf{010101011}\).
When divided by \(1011\), the resulting remainder is \(100 \ne 000\) (non-zero syndrome). The receiver detects the error and discards the corrupted frame.
Find:
- The frame transmission time (\(T_{fr}\)).
- The channel throughput if the system produces an aggregate traffic load of 500 frames per second.
- Compare this result with Slotted ALOHA under the same traffic load.
Step 1: Frame Transmission Time (\(T_{fr}\)):
\[T_{fr} = \frac{\text{Frame Size}}{\text{Channel Bandwidth}} = \frac{200 \text{ bits}}{200 \times 10^3 \text{ bps}} = \frac{200}{200000} = \mathbf{0.001 \text{ s} = 1 \text{ ms}}\]Step 2: Traffic Load (\(G\)):
\(G\) is the average number of frame transmission attempts generated during one frame transmission time (\(T_{fr}\)):
\[G = N \times T_{fr} = 500 \text{ frames/sec} \times 0.001 \text{ sec} = \mathbf{0.5 \text{ frames/slot}}\]Step 3: Pure ALOHA Throughput (\(S\)):
\[S = G \times e^{-2G}\] \[S = 0.5 \times e^{-2(0.5)} = 0.5 \times e^{-1} = 0.5 \times 0.36788 = \mathbf{0.18394 \approx 18.39\%}\]Throughput in bits per second:
\[\text{Throughput} = S \times \text{Bandwidth} = 0.18394 \times 200 \text{ kbps} = \mathbf{36.79 \text{ kbps}}\]Step 4: Comparison with Slotted ALOHA:
\[S_{\text{slotted}} = G \times e^{-G} = 0.5 \times e^{-0.5} = 0.5 \times 0.60653 = \mathbf{0.3033 \approx 30.33\%}\]Throughput in bits per second:
\[\text{Throughput}_{\text{slotted}} = 0.3033 \times 200 \text{ kbps} = \mathbf{60.65 \text{ kbps}}\]Conclusion: Slotted ALOHA provides almost double the throughput of Pure ALOHA by eliminating partial frame overlaps and restricting transmissions to discrete clock boundaries.
1. Derivation:
- In CSMA/CD, a transmitting station must listen to the medium while transmitting to detect collisions.
- In the worst-case scenario, station A transmits at \(t=0\). Just before the signal reaches station B at \(t = T_p\) (one-way propagation delay), station B senses the idle line and transmits. A collision occurs at B.
- The collision runt signal must travel all the way back to station A, arriving at \(t = 2 \times T_p\) (Round-Trip Time / Slot Time).
- For station A to detect this collision, station A must still be actively transmitting its frame when the collision signal arrives: \[T_{fr} \ge 2 \times T_p\]
- Since transmission time \(T_{fr} = L_{\min} / R\) (where \(L_{\min}\) is frame size in bits and \(R\) is data rate in bps): \[\frac{L_{\min}}{R} \ge 2 \times T_p \implies \mathbf{L_{\min} = 2 \times R \times T_p}\]
2. Numerical Calculation:
- Data Rate (\(R\)) = \(10 \text{ Mbps} = 10 \times 10^6 \text{ bps} = 10^7 \text{ bps}\)
- One-way Propagation Time (\(T_p\)) = \(25.6\ \mu\text{s} = 25.6 \times 10^{-6} \text{ s}\)
Converting to bytes:
\[L_{\min} = \frac{512 \text{ bits}}{8 \text{ bits/byte}} = \mathbf{64 \text{ bytes}}\]Conclusion: This is the exact derivation explaining why the IEEE 802.3 Standard Ethernet minimum frame size is fixed at 64 bytes!
Part A: High-Yield Short Answer Questions (3 Marks Each)
Definition: Framing is a data link layer function that encapsulates a packet from the network layer into a discrete data frame by adding delimiter flags, header, and trailer.
- Byte Stuffing (Character-Oriented Framing): Uses a 1-byte sentinel flag (e.g.
FLAG = 0x7E). If the payload contains the flag pattern or escape byte, the sender inserts an escape byte (ESC = 0x1B) before it. The receiver stripsESCand recovers original data:Data: FLAG\(\to\)Transmitted: ESC FLAG. - Bit Stuffing (Bit-Oriented Framing / HDLC): Uses the delimiter flag
01111110(six consecutive 1s). Whenever the sender encounters five consecutive 1s (11111) in the data stream, it automatically stuffs a0after them:Data: 01111110\(\to\)Transmitted: 011111010.
The receiver automatically detects five 1s followed by a 0 and strips the stuffed 0.
Role: Address Resolution Protocol (ARP) dynamically resolves a known 32-bit logical IP address to a physical 48-bit MAC address on the local broadcast link.
- Step 1 (ARP Request): Host A broadcasts an ARP request packet containing target IP to the broadcast MAC
FF:FF:FF:FF:FF:FF: "Who has IP 192.168.1.5? Tell 192.168.1.2". - Step 2 (ARP Reply): Host B recognizes its own IP, caches Host A's MAC, and sends a unicast ARP reply directly back to Host A: "192.168.1.5 is at 00:1A:2B:3C:4D:5E".
ARP Packet Fields: Hardware Type (2B), Protocol Type (2B), Hardware Size (1B=6), Protocol Size (1B=4), Opcode (2B: 1=Req, 2=Reply), Sender MAC (6B), Sender IP (4B), Target MAC (6B), Target IP (4B).
| Feature | Hub (Repeater) | Switch (Bridge) | Router |
|---|---|---|---|
| Operating Layer | Layer 1 (Physical Layer). | Layer 2 (Data Link Layer). | Layer 3 (Network Layer). |
| Collision Domains | Single shared collision domain across all ports. | Separate collision domain per port (micro-segmentation). | Separate collision domain per interface. |
| Broadcast Domains | Single broadcast domain. | Single broadcast domain (unless VLANs used). | Breaks/separates broadcast domains. |
| Forwarding Logic | Blind electrical repeating / flooding to all ports. | Selective forwarding based on MAC address learning table. | Forwarding based on IP routing table (longest prefix match). |
- Collision Probability Ranking: \[\text{1-persistent (Highest)} > p\text{-persistent} > \text{non-persistent (Lowest)}\] Justification: In 1-persistent, if two stations become ready during an active transmission, both transmit with probability 1 the instant the line becomes idle \(\to\) 100% collision guaranteed. Non-persistent backs off a random time upon sensing a busy line, drastically reducing simultaneous transmissions.
- Channel Idle Time (Latency) Ranking: \[\text{non-persistent (Highest Idle Time)} > p\text{-persistent} > \text{1-persistent (Lowest Idle Time)}\] Justification: In non-persistent, a station sleeps for a random duration even if the channel became free 1 microsecond after sensing it busy, wasting channel capacity. 1-persistent transmits immediately when idle, minimizing wasted channel idle time.
Justification: Standard IP routing forwards packets based on the network prefix of the destination IP. If a mobile device changes networks, it would either have to change its IP address (which immediately terminates all active TCP connections) or inject host-specific routes globally (which would destroy global router scalability). Mobile IP solves this by allowing a device to roam across foreign networks while retaining its permanent static IP.
Core Entities:
- Home Address: The permanent, static IP address assigned to the Mobile Node (MN) belonging to its home network.
- Care-of Address (COA): A temporary IP address assigned to the MN when visiting a foreign network (identifies the mobile node's current physical point of attachment).
- Home Agent (HA): A router on the home network that intercepts incoming packets addressed to the MN's Home Address while it is away, encapsulates them inside an IP tunnel, and forwards them to the COA.
- Foreign Agent (FA): A router on the visited foreign network that provides the COA, decapsulates tunneled packets from the HA, and delivers original datagrams to the MN.
- Hidden Station Problem: Station A and Station C are out of each other's radio transmission range, but both can communicate with intermediate Station B. Station A senses medium idle and transmits to B. Simultaneously, Station C senses medium idle and transmits to B. The signals collide at B!
Solution: Station A sends an RTS (Request to Send) to B. B broadcasts a CTS (Clear to Send). Station C hears B's CTS and sets its Network Allocation Vector (NAV) to defer transmission, preventing collision. - Exposed Station Problem: Station B is transmitting data to Station A. Station C wants to transmit to Station D. Station C senses the medium, hears Station B's transmission, and needlessly defers transmissionβeven though C's transmission to D would NOT interfere with A's reception of B's signal!
Solution: RTS/CTS handshake allows C to hear B's RTS but NOT hear A's CTS, correctly confirming that transmitting to D will cause no interference.
Part B: High-Yield Essay Questions (9 Marks Each)
1. CSMA/CD Operational Flowchart:
2. Core Algorithm Details:
- Carrier Sense: Station monitors the channel voltage level. If voltage is present, the channel is busy.
- Collision Detection: While transmitting, station monitors the bus voltage. If voltage exceeds the threshold of a single station's transmission (due to overlapping waveforms), a collision has occurred.
- Jamming Signal: The detecting station immediately broadcasts a 32-bit Jamming sequence of alternating 1s and 0s to guarantee all other transmitting stations observe the collision and abort cleanly.
- Binary Exponential Backoff Algorithm:
- The station increments collision attempt counter \(k = k + 1\).
- If \(k > 15\), it aborts transmission due to excessive network congestion.
- Otherwise, it randomly picks an integer \(R\) from the uniform set: \[0 \le R \le 2^{\min(k, 10)} - 1\]
- The station waits for a backoff duration of \(R \times \text{Slot Time}\) (where Slot Time = \(51.2\ \mu\text{s}\) for 10 Mbps Ethernet) before retrying.
1. IEEE 802.3 Ethernet Frame Format:
- Preamble (7 Bytes): 56 bits of alternating
10101010...for hardware clock synchronization. - SFD (Start of Frame Delimiter, 1 Byte): Bit pattern
10101011(ends in two 1s) signalling start of valid frame fields. - Destination MAC Address (6 Bytes / 48 bits): Physical address of recipient network card.
- Source MAC Address (6 Bytes / 48 bits): Physical address of transmitting network card.
- Type / Length Field (2 Bytes): If value \(\ge 1536\) (0x0600), defines higher layer protocol (EtherType e.g. 0x0800 for IPv4, 0x0806 for ARP). If \(\le 1500\), specifies payload byte length.
- Data & Padding (46 to 1500 Bytes): Application/network payload. If payload \(< 46\) bytes, padding bytes are appended to ensure minimum frame size is 64 bytes.
- FCS (Frame Check Sequence, 4 Bytes): Standard CRC-32 checksum computed over Dest MAC, Src MAC, Length, and Data fields.
2. Cabling Standards Comparison Table:
| Standard | Common Name | Cable Medium | Topology | Max Segment Length | Connector Type |
|---|---|---|---|---|---|
| 10Base5 | Thick Ethernet (Thicknet) | Thick Coaxial Cable (RG-8, 50 \(\Omega\)) | Bus Topology | 500 meters | Vampire Tap / AUI (transceiver) |
| 10Base2 | Thin Ethernet (Cheapernet) | Thin Coaxial Cable (RG-58, 50 \(\Omega\)) | Bus Topology | 185 meters | BNC T-connector, 50 \(\Omega\) terminators |
| 10Base-T | Twisted Pair Ethernet | Category 3/5 UTP (2 pairs) | Star Topology (via Hub/Switch) | 100 meters | RJ-45 Connector |
| 10Base-F | Fiber Ethernet | Fiber Optic Cable (850 nm multimode) | Point-to-Point / Star | 2000 meters (2 km) | ST / SC Connectors |
Physical Layer & Network Management
π― Module 4 Survival Strategy (Guaranteed 12+ Marks)
- Guaranteed Numericals:
- Shannon & Nyquist Capacity: \(C = B \log_2(1 + \text{SNR})\) and \(\text{Bit Rate} = 2B \log_2(L)\).
- Decibel Power Loss: \(\text{Loss (dB)} = 10 \log_{10}(P_2 / P_1)\) (Half power = \(-3.01 \text{ dB}\)).
- PCM 64 kbps Voice: \(f_s = 2 \times f_{\max} = 8000 \text{ samples/s} \times 8 \text{ bits} = 64 \text{ kbps}\).
- BER TLV Byte Encodings:
INTEGER 14andOCTET STRING "HI".
- Guaranteed Waveform Drawings: Line coding (NRZ-L, NRZ-I, Manchester) and Carrier modulation (ASK, FSK, PSK) for given bit sequences!
- Guaranteed Part A Topics: ISO FCAPS 5 management areas, SNMP/SMI/MIB triad roles, FDM vs TDM, Synchronous vs Statistical TDM, FHSS vs DSSS.
- Guaranteed Part B Essay Topics:
- Carrier Modulation (ASK, FSK, PSK waveforms, formulas, QAM, Constellation diagrams).
- SNMP Protocol Architecture (8 PDUs, UDP 161/162, MIB OID indexing).
- Guided Media Comparison (Twisted Pair, Coax, Fiber with TIR & 3 propagation modes).
- PCM 3 Steps + Companding + Delta Modulation errors.
Using the Shannon and Nyquist formulas, find:
- The theoretical maximum channel capacity (bit rate).
- The number of signal levels (\(L\)) needed to achieve a transmission bit rate of 4 Mbps.
Step 1: Theoretical Maximum Capacity (Shannon Capacity):
Claude Shannon's theorem defines the upper bound for a noisy channel:
\[C = B \times \log_2(1 + \text{SNR})\]- Bandwidth (\(B\)) = \(1 \text{ MHz} = 10^6 \text{ Hz}\)
- Signal-to-Noise Ratio (\(\text{SNR}\)) = \(63\)
Since \(64 = 2^6\), \(\log_2(64) = 6\):
\[C = 10^6 \times 6 = \mathbf{6 \times 10^6 \text{ bps} = 6 \text{ Mbps}}\]Interpretation: The absolute physical capacity limit of this channel is 6 Mbps. (Any bit rate above 6 Mbps is physically impossible regardless of design).
Step 2: Signal Levels for 4 Mbps (Nyquist Formula):
Harry Nyquist's formula for a channel with \(L\) discrete signal levels:
\[\text{Bit Rate} = 2 \times B \times \log_2(L)\]We want to achieve a target rate of \(\text{Bit Rate} = 4 \text{ Mbps} = 4 \times 10^6 \text{ bps}\):
\[4 \times 10^6 = 2 \times (10^6) \times \log_2(L)\] \[4 = 2 \times \log_2(L)\] \[\log_2(L) = \frac{4}{2} = 2 \implies L = 2^2 = \mathbf{4 \text{ discrete signal levels}}\]Conclusion: By employing 4 signal levels (where each signal level represents \(\log_2(4) = 2\) bits per baud), we can transmit at 4 Mbps without exceeding the 6 Mbps Shannon capacity limit.
1. Definition: Attenuation is the loss of signal energy and amplitude as a signal propagates through a physical transmission medium due to the internal electrical or optical resistance of the cable.
2. Decibel Calculation:
The decibel (dB) formula for power ratio is:
\[\text{dB} = 10 \times \log_{10}\left(\frac{P_2}{P_1}\right)\]Given: Output power \(P_2 = 0.5 \times P_1\) (or \(P_2 / P_1 = 0.5\)):
\[\text{dB} = 10 \times \log_{10}(0.5)\]Since \(\log_{10}(0.5) = -0.30103\):
\[\text{dB} = 10 \times (-0.30103) = \mathbf{-3.01 \text{ dB}}\]Exam Note: A negative sign denotes a power loss (attenuation) of 3.01 dB (commonly referred to as a 3 dB loss). If asked for power gain, it is \(-3.01 \text{ dB}\); power loss is \(+3.01 \text{ dB}\).
- The ASN.1
INTEGER 14(using 4-byte two's complement representation). - The ASN.1
OCTET STRING "HI".
1. BER TLV Architecture:
- Tag (T, 1 byte): Class (bits 8-7:
00Universal), Format (bit 6:0Primitive,1Constructed), Tag number (bits 5-1: e.g.00010for INTEGER=2,00100for OCTET STRING=4). - Length (L): Defines the number of bytes in the Value field.
- Value (V): The actual data encoded in binary or ASCII.
2. Encoding INTEGER 14:
- Tag: Universal (
00) + Primitive (0) + Tag 2 (00010) =00000010_2= \(\mathbf{02_{16}}\). - Length: 4 bytes of integer data = \(\mathbf{04_{16}}\) (or 1 byte: \(01_{16}\)).
- Value: Integer 14 in hex = \(0 \times 16 + 14 = \mathbf{0E_{16}}\). Padded to 4 bytes = \(\mathbf{00\ 00\ 00\ 0E_{16}}\).
- Final Encoded BER Bytes:
02 04 00 00 00 0E(Or compact 1-byte length:
02 01 0E).
3. Encoding OCTET STRING "HI":
- Tag: Universal (
00) + Primitive (0) + Tag 4 (00100) =00000100_2= \(\mathbf{04_{16}}\). - Length: String "HI" has 2 characters = \(\mathbf{02_{16}}\).
- Value: ASCII hex codes:
'H' = 72_{10} = 48_{16},'I' = 73_{10} = 49_{16}= \(\mathbf{48\ 49_{16}}\). - Final Encoded BER Bytes:
04 02 48 49
Part A: High-Yield Short Answer Questions (3 Marks Each)
1 0 1 1 0 0 1.
Encoding Rules:
- NRZ-L (Non-Return to Zero-Level): Bit
1= Negative Voltage (\(-V\)) or Positive depending on convention (KTU notes use:1 = High (+V),0 = Low (-V)). - NRZ-I (Non-Return to Zero-Invert on 1): Invert signal level at the start of bit
1; keep signal level unchanged for bit0. - Manchester: Transition in the middle of every bit interval:
1 = High-to-Low(\(\downarrow\)),0 = Low-to-High(\(\uparrow\)).
Waveform Diagram for 1 0 1 1 0 0 1:
Network management requires three distinct standards that work cooperatively:
- SMI (Structure of Management Information): The grammar and syntax rules. It defines how management data types are constructed, how objects are named in the global OID tree, and how data types are encoded using ASN.1.
- MIB (Management Information Base): The database schema. It is a hierarchical collection of named objects and variables resident on the managed device representing its real-time operating state (e.g.
tcpCurrEstab,ifInErrors). - SNMP (Simple Network Management Protocol): The communication protocol. It specifies the actual packet formats (PDUs) and rules for exchanging values between the managing station (manager) and managed device (agent) over UDP ports 161 and 162.
1. Three Steps of PCM:
- Sampling (PAM): The continuous analog signal is sampled periodically at discrete time intervals at a rate \(f_s \ge 2 f_{\max}\) (Nyquist rate), producing a Pulse Amplitude Modulated (PAM) signal.
- Quantization: The continuous sampled PAM amplitudes are mapped into one of \(L\) predetermined discrete voltage levels, introducing a small quantization error.
- Encoding: Each quantized level is converted into an \(n\)-bit binary codeword, where \(L = 2^n\).
2. Derivation of 64 kbps Standard Voice Rate:
- Highest voice frequency component (\(f_{\max}\)) = \(4 \text{ kHz} = 4000 \text{ Hz}\).
- By Nyquist Sampling Theorem, minimum sampling frequency: \[f_s = 2 \times f_{\max} = 2 \times 4000 = \mathbf{8000 \text{ samples/second}}\]
- Quantization resolution (\(n\)) = \(8 \text{ bits/sample}\) (\(L = 2^8 = 256\) discrete levels).
- Resulting Bit Rate: \[\text{Bit Rate} = f_s \times n = 8000 \text{ samples/s} \times 8 \text{ bits/sample} = \mathbf{64{,}000 \text{ bps} = 64 \text{ kbps}}\]
Conclusion: This 64 kbps stream is the universal foundational building block of the digital telephone network (DS0 channel).
- FHSS (Frequency Hopping Spread Spectrum):
- The transmission band is divided into multiple small frequency sub-channels.
- The transmitter broadcasts on one frequency for a short burst (dwell time), then rapidly "hops" to another carrier frequency governed by a shared Pseudorandom Noise (PN) code.
- Advantage: If an eavesdropper jams one frequency, only a tiny fraction of data is lost.
- Example: Bluetooth (hops 1600 times per second across 79 channels).
- DSSS (Direct Sequence Spread Spectrum):
- Each original data bit is multiplied (XORed) with a high-rate \(k\)-bit chipping code sequence (e.g. 11-bit Barker code
10110111000). - This spreads the signal energy across a wide bandwidth, appearing as low-power white noise to unintended listeners.
- Example: IEEE 802.11b Wi-Fi and CDMA cellular systems.
- Each original data bit is multiplied (XORed) with a high-rate \(k\)-bit chipping code sequence (e.g. 11-bit Barker code
1. FDM vs TDM:
- FDM (Frequency-Division Multiplexing): Analog technique where the total frequency bandwidth is subdivided into distinct logical channels separated by guard bands. Signals transmit simultaneously in parallel.
- TDM (Time-Division Multiplexing): Digital technique where the entire bandwidth is allocated to one source at a time for a periodic, short time slot.
2. Synchronous TDM vs Statistical TDM:
| Feature | Synchronous TDM | Statistical (Asynchronous) TDM |
|---|---|---|
| Slot Allocation | Fixed time slot pre-assigned to each line in every frame. | Time slots allocated dynamically on-demand only to active input lines. |
| Bandwidth Efficiency | Low; if an input line has no data, its time slot remains empty and wasted. | High (100% efficient); no empty slots transmitted. |
| Addressing | No address header needed (slot position implicitly identifies sender). | Each slot must carry an explicit address header. |
- Fault Management (F): Automatically detects, isolates, logs, and corrects abnormal network component failures (generates SNMP traps when an interface goes down).
- Configuration Management (C): Tracks hardware and software device inventory, manages router configuration files, firmware versions, and updates system settings.
- Accounting Management (A): Measures and logs individual/departmental resource utilization (bandwidth consumed, hours connected) for billing and quota enforcement.
- Performance Management (P): Continuously monitors throughput, round-trip latency, link utilization, and packet drop rates to eliminate bottlenecks and enforce SLAs.
- Security Management (S): Controls network access points, manages cryptographic keys, maintains firewalls, and records intrusion detection logs.
Part B: High-Yield Essay Questions (9 Marks Each)
1 0 1 1 0 is to be transmitted over a bandpass channel. Draw the ASK, FSK, and PSK waveforms aligned with the data, stating the parameter modified in each. Write the bandwidth formula for each technique. Explain QAM and the constellation diagram.
1. Waveforms for Digital Bit Stream 1 0 1 1 0:
2. Parameter & Bandwidth Formulas:
- ASK (Amplitude Shift Keying): Carrier amplitude varies between \(A\) (bit 1) and \(0\) (bit 0); frequency and phase remain constant. \[B = (1 + d) \times S\] (where \(S\) is baud rate, \(d\) is filter factor between 0 and 1).
- FSK (Frequency Shift Keying): Carrier frequency shifts between \(f_1\) (bit 1) and \(f_0\) (bit 0); amplitude and phase remain constant. \[B = 2\Delta f + (1 + d) \times S\] (where \(2\Delta f = |f_1 - f_0|\) is frequency separation).
- PSK (Phase Shift Keying): Carrier phase shifts by \(180^\circ\) between bit 1 and bit 0; amplitude and frequency remain constant. \[B = (1 + d) \times S\]
3. QAM (Quadrature Amplitude Modulation) & Constellation Diagram:
- QAM: An advanced modulation scheme combining ASK and PSK. It mixes two carrier waves of the same frequency shifted by \(90^\circ\) in phase (In-phase \(I\) and Quadrature \(Q\)), allowing multiple bits per signal element.
- Constellation Diagram: A 2D Cartesian coordinate plot where the horizontal axis represents the In-phase carrier (\(I\)) and the vertical axis represents the Quadrature carrier (\(Q\)).
- Each dot on the constellation diagram represents a unique discrete signal state (symbol).
- Distance from the origin represents peak amplitude; angle with horizontal axis represents phase.
- In 4-QAM (or QPSK), there are 4 points (\(\log_2 4 = 2 \text{ bits/baud}\)). In 16-QAM, there are 16 points (\(\log_2 16 = 4 \text{ bits/baud}\)), quadrupling throughput!
1. SNMP Architecture:
- Managing Station (Manager): Centralized console application run by network administrators that actively queries agents and collects alarms.
- Managed Station (Agent): Lightweight background daemon running on network devices (routers, switches) that responds to queries and fires event notifications.
2. The 8 SNMP PDU Types:
| PDU Name | Sender \(\to\) Receiver | Function Description |
|---|---|---|
| GetRequest | Manager \(\to\) Agent | Retrieves the specific value of one or more MIB variables. |
| GetNextRequest | Manager \(\to\) Agent | Retrieves the lexicographically next variable in the MIB tree (table traversal). |
| GetBulkRequest | Manager \(\to\) Agent | Retrieves large blocks of tabular data in a single exchange (SNMPv2). |
| SetRequest | Manager \(\to\) Agent | Modifies or configures the value of a writable MIB variable. |
| Response | Agent \(\to\) Manager | Replies to Get/Set requests containing variable bindings or error status. |
| Trap | Agent \(\to\) Manager | Unsolicited asynchronous alarm reporting a critical local event (link down). |
| InformRequest | Manager \(\to\) Manager | Transfers MIB information between peer managers with acknowledgment. |
| SNMPv2-Trap | Agent \(\to\) Manager | Enhanced format asynchronous alarm notification in SNMPv2. |
3. UDP Port Numbers:
- UDP Port 161: Used by the Agent to listen for incoming
GetRequest,GetNextRequest, andSetRequestmessages from managers. - UDP Port 162: Used by the Manager's Trap Sink to listen for incoming asynchronous
TrapandInformRequestalarms from agents.
4. SMI Object Identification & Indexing:
- Every object in the MIB is identified by a dot-separated sequence of integers called an Object Identifier (OID). The standard MIB-II root is: \[\text{iso.org.dod.internet.mgmt.mib-2} \implies \mathbf{1.3.6.1.2.1}\]
- Scalar Objects: Represent a single discrete value (e.g.
udpInDatagramsat1.3.6.1.2.1.7.1). To reference this specific instance, a trailing.0must be appended: \[\mathbf{udpInDatagrams.0 = 1.3.6.1.2.1.7.1.0}\] - Tabular Objects: Represent tables of multiple rows (e.g.
udpTableat1.3.6.1.2.1.7.5). Individual entries are indexed by their composite table keys (such as local IP address + local port): \[\mathbf{udpEntry.udpLocalAddress.127.0.0.1.53}\]
1. Twisted-Pair Cable:
- Consists of two insulated copper wires twisted spirally together. Twisting balances exposure to external noise, cancelling electromagnetic interference (EMI) and crosstalk.
- UTP (Unshielded Twisted Pair): Cheap, lightweight, used in Ethernet LANs (Cat 5e/6, up to 1 Gbps, 100m).
- STP (Shielded Twisted Pair): Adds a metal foil shield around wire pairs, providing superior noise immunity in industrial environments.
2. Coaxial Cable:
- Features a central copper conductor, surrounded by a dielectric insulating layer, a metallic braided shield, and an outer plastic jacket.
- Shielding prevents signal leakage and noise pickup, allowing higher bandwidth over longer distances than twisted-pair (used in cable TV and early Ethernet).
3. Fiber-Optic Cable & Optical Physics:
- Transmits information as optical light pulses through an ultra-pure glass or plastic core surrounded by cladding with a slightly lower refractive index (\(n_1 > n_2\)).
- Total Internal Reflection (TIR): When light strikes the core-cladding boundary at an angle of incidence greater than the critical angle (\(\theta_i > \theta_c\)), 100% of light is reflected back into the core with zero loss.
- Three Fiber Propagation Modes:
- Multimode Step-Index: Large core (50β100 \(\mu\text{m}\)); light rays take different paths, arriving at different times (\(\to\) severe modal dispersion; limited to short distances).
- Multimode Graded-Index: Parabolic refractive index profile that decreases gradually towards cladding; light rays refract in smooth sinusoidal curves, reducing modal dispersion.
- Single-Mode: Ultra-thin core (8β10 \(\mu\text{m}\)); only a single light ray propagates straight through with zero modal dispersion; driven by lasers for long-haul telecommunications (dozens of kilometers).
4. Comparison Table:
| Parameter | Twisted-Pair (UTP/STP) | Coaxial Cable | Fiber-Optic Cable |
|---|---|---|---|
| Bandwidth Capacity | Moderate (10 Mbps β 10 Gbps) | High (10 Mbps β 1 Gbps) | Ultra-High (100+ Gbps) |
| Attenuation | High (requires repeaters every 100m) | Moderate (requires repeaters every 1β2 km) | Extremely Low (50+ km between repeaters) |
| EMI Immunity | Poor (vulnerable to external noise) | Good (metal braided shield) | Immune (optical signals unaffected by EMI) |
| Installation Cost | Lowest / Easiest | Moderate | Highest / Requires precision splicing |