Tags: #◇Computer Science #◇CSNETWK #◇Networking #◇TCP-IP #◇Reviewer #◇Finals
CSNETWK Comprehensive Finals Reviewer
◇Overview
This reviewer consolidates Computer Networks (CSNETWK). Topics cover the OSI 7-layer and TCP/IP 5-layer models, socket programming (TCP streams vs UDP datagrams), Application Layer (HTTP/1.1 vs HTTP/2, DNS hierarchy, SMTP), Transport Layer (TCP 3-way handshake and 4-way teardown, sliding window flow control, congestion control with AIMD, Slow Start, Fast Retransmit), Network Layer (IPv4 addressing, subnetting/CIDR, NAT, routing protocols), Link Layer (Ethernet frames, ARP, MAC addresses, CSMA/CD), and Physical Layer fundamentals.
◇1. TCP vs UDP Protocol Comparison Matrix
| Feature | Transmission Control Protocol (TCP) | User Datagram Protocol (UDP) |
|---|---|---|
| Connection State | Connection-oriented (3-way handshake) | Connectionless (no handshake) |
| Reliability | Guaranteed in-order delivery; ACKs & retransmissions | Best-effort; packets can be lost, duplicated, out of order |
| Flow Control | Receive Window (rwnd) prevents buffer overrun | None |
| Congestion Control | Congestion Window (cwnd), AIMD, Slow Start | None |
| Header Overhead | 20–60 bytes | 8 bytes fixed |
| Common Protocols | HTTP/HTTPS, SSH, FTP, SMTP | DNS (queries), DHCP, VoIP (RTP), Video Streaming |
◇2. TCP Lifecycle Sequence Diagram
◇3. Subnetting & CIDR Calculation Matrix
- IPv4 Address: 32 bits divided into 4 octets.
- CIDR Notation : bits for Network ID, bits for Host ID.
- Formulas:
- Total Addresses in block:
- Usable Host Addresses: (subtract Network Address all 0s, and Broadcast Address all 1s).
| CIDR Prefix | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 (Point-to-Point links) |
◇4. High-Yield Exam Checklist
- Does UDP provide flow or congestion control? NO, application must handle reliability if needed.
- In CIDR, why do we subtract 2 from total addresses? 1 for Network ID and 1 for Broadcast Address.
- What protocol resolves an IP address to a physical MAC address? ARP (Address Resolution Protocol).
- During TCP Slow Start, how does
cwndgrow? Exponentially (doubles every RTT: MSS per ACK). - What is the purpose of the client
TIME_WAITstate? Ensures final ACK was received by server and flushes old duplicate packets from network ().
◇References & Navigation
- Previous Topic: ◇CCPROG2
- Next Topic: ◇NSCOM01, ◇NSCOM02
- Prerequisites: ◇Computer Networks, OSI, TCP/IP, Sockets, Subnetting
- Cross-Curricular Connections: ◇NSSECU1
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
In the TCP 3-way handshake, if the client sends a SYN packet with sequence number 500, what sequence and acknowledgment numbers will the server return in its SYN-ACK response?
How many usable host IP addresses are available in the subnet 192.168.10.0/27?
Which protocol is responsible for automatically assigning dynamic IP addresses, default gateways, and DNS servers to network hosts upon bootup?
What mechanism triggers TCP Fast Retransmit without waiting for the retransmission timer to expire?
Which layer of the OSI model is responsible for end-to-end process-to-process communication, port multiplexing, and reliable byte streams?