CN Notes
Diagrams are essential for understanding computer networking concepts. They help you visualize data flow, protocol interactions, and network architectures...
Diagrams are essential for understanding computer networking concepts. They help you visualize data flow, protocol interactions, and network architectures in ways that text alone cannot convey. For exam preparation, being able to draw and explain these diagrams from memory demonstrates deep understanding of the underlying concepts.
This page describes the most important networking diagrams you should be able to draw and explain. Study each description carefully, then practice drawing them on paper without reference.
OSI Model Data Flow Diagram
The OSI model shows data flowing down through seven layers on the sender side and up through seven layers on the receiver side. At each layer on the sender, a header (and sometimes trailer) is added to the data — this is encapsulation. At each layer on the receiver, the corresponding header is read and removed — this is decapsulation.
The physical layer at the bottom connects both sides through the transmission medium (cable, wireless, fiber).
Sender side (top to bottom): Application → Presentation → Session → Transport → Network → Data Link → Physical
Receiver side (bottom to top): Physical → Data Link → Network → Transport → Session → Presentation → Application
Data unit names at each layer:
- Application/Presentation/Session: Data
- Transport: Segment (TCP) or Datagram (UDP)
- Network: Packet
- Data Link: Frame
- Physical: Bits
Key point to emphasize: Each layer on the sender communicates logically with the same layer on the receiver, even though data physically travels down all layers, across the medium, and up all layers.
TCP Three-Way Handshake Diagram
This diagram shows how TCP establishes a connection between a client and server. Draw two vertical timelines (Client on left, Server on right) with three arrows between them:
Step 1 — SYN: Client sends a SYN segment to server with an initial sequence number (ISN), say x. The client enters SYN_SENT state.
Step 2 — SYN-ACK: Server responds with SYN-ACK, acknowledging x+1 and providing its own sequence number y. Server enters SYN_RECEIVED state.
Step 3 — ACK: Client sends ACK acknowledging y+1. Both sides enter ESTABLISHED state.
| [SYN_SENT] | [LISTEN → SYN_RCVD] |
|---|---|
| [ESTABLISHED] | [ESTABLISHED] |
Why three steps? Both sides need to agree on initial sequence numbers. The three-way handshake allows both to propose and acknowledge each other's sequence numbers. Two steps would only confirm one direction.
TCP Connection Termination (Four-Way Handshake)
TCP uses a four-step process to close a connection gracefully:
| [FIN_WAIT_1] | [CLOSE_WAIT] |
|---|---|
| [TIME_WAIT] | [CLOSED] |
The TIME_WAIT state (typically 60 seconds) ensures any delayed packets from the old connection expire before the same port is reused.
Ethernet Frame Structure
An Ethernet frame contains the following fields from left to right:
| Field | Size | Purpose |
|---|---|---|
| Preamble | 7 bytes | Synchronization (alternating 1s and 0s) |
| SFD (Start Frame Delimiter) | 1 byte | Marks start of frame (10101011) |
| Destination MAC | 6 bytes | Recipient hardware address |
| Source MAC | 6 bytes | Sender hardware address |
| Type/Length | 2 bytes | Protocol identifier (0x0800=IPv4, 0x86DD=IPv6) |
| Data (Payload) | 46-1500 bytes | Actual data being carried |
| FCS (Frame Check Sequence) | 4 bytes | CRC-32 for error detection |
Total frame size: 64 to 1518 bytes (excluding preamble and SFD)
Important: If data is less than 46 bytes, padding is added to meet the minimum frame size. The MTU (Maximum Transmission Unit) of standard Ethernet is 1500 bytes — this is the maximum payload size.
IPv4 Header Structure
The IPv4 header contains these fields organized in 32-bit rows:
Row 1: Version (4 bits) | Header Length (4 bits) | ToS/DSCP (8 bits) | Total Length (16 bits)
Row 2: Identification (16 bits) | Flags (3 bits) | Fragment Offset (13 bits)
Row 3: TTL (8 bits) | Protocol (8 bits) | Header Checksum (16 bits)
Row 4: Source IP Address (32 bits)
Row 5: Destination IP Address (32 bits)
Row 6 (optional): Options + Padding
Minimum header size: 20 bytes (5 rows × 4 bytes). Maximum: 60 bytes (with options).
Subnetting Diagram
A subnetting diagram shows a large network block divided into smaller subnets:
| /24 | /26 (borrow 2 bits = 4 subnets) |
| Subnet 1 | 192.168.1.0/26 (hosts: .1 to .62, broadcast: .63) |
| Subnet 2 | 192.168.1.64/26 (hosts: .65 to .126, broadcast: .127) |
| Subnet 3 | 192.168.1.128/26 (hosts: .129 to .190, broadcast: .191) |
| Subnet 4 | 192.168.1.192/26 (hosts: .193 to .254, broadcast: .255) |
| Each subnet | 2^6 - 2 = 62 usable hosts |
Network Topology Diagrams
Bus topology: All devices connected to a single horizontal cable (the bus) with terminators at each end. Data travels in both directions along the bus. Simple but a single cable break affects all devices.
Star topology: A central device (switch/hub) with individual cables radiating outward to each device. Most common in modern LANs. Single cable failure affects only one device.
Ring topology: Devices arranged in a circle, each connected to exactly two neighbors. Data travels in one direction around the ring. Token passing controls access. A single device failure can break the ring.
Mesh topology: Every device connected to every other device. Maximum redundancy but very expensive (n(n-1)/2 connections needed). Used for critical backbone networks.
Tree topology: Hierarchical structure with a root node, branch nodes (switches), and leaf nodes (end devices). Combines star topologies in a hierarchy. Used in large campus networks.
DHCP Process (DORA)
The DHCP process follows four steps (Discover, Offer, Request, Acknowledge):
| --- DHCP Discover (broadcast) -------> | "Who can give me an IP?" |
|---|---|
| <-- DHCP Offer (unicast/broadcast) --- | "I can offer 192.168.1.50" |
| --- DHCP Request (broadcast) --------> | "I accept 192.168.1.50" |
| <-- DHCP Acknowledge (unicast) ------- | "Confirmed. It's yours for 24h" |
Why broadcast? The client does not have an IP address yet, so it cannot use unicast. All four steps use UDP (port 67 for server, port 68 for client).
OSI vs TCP/IP Model Comparison
Draw two columns side by side:
| OSI Model (7 layers) | TCP/IP Model (4 layers) | Mapping |
|---|---|---|
| Application | Application | OSI 7,6,5 → TCP/IP Application |
| Presentation | ↑ | Combined into one layer |
| Session | ↑ | Combined into one layer |
| Transport | Transport | Direct mapping (TCP, UDP) |
| Network | Internet | Direct mapping (IP, ICMP) |
| Data Link | Network Access | OSI 2,1 → TCP/IP Network Access |
| Physical | ↑ | Combined into one layer |
Key difference: OSI is a theoretical reference model (7 layers). TCP/IP is the practical implementation (4 layers) actually used on the internet. The OSI model provides finer granularity for teaching purposes, while TCP/IP reflects how protocols are actually implemented.
Tips for Drawing These Diagrams in Exams
- Label everything — field sizes, port numbers, sequence numbers, addresses
- Use arrows to show direction — especially in handshake diagrams
- Include state transitions — show what state each side enters after each message
- Keep proportions reasonable — field sizes in headers should reflect actual bit widths
- Practice from memory — draw each diagram 3-5 times until it flows naturally
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Important Diagrams - Computer Networks.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Computer Networks topic.
Search Terms
computer-network-master, computer networks, computer, network, master, notes, important, diagrams
Related Computer Networks Topics