1.0 FUNDAMENTAL CONCEPTS & NETWORK MODELS
1.1 Definition & Components of a Computer Network
-
Computer Network: Interconnected autonomous computing devices (nodes) that share resources and communicate using standardized protocols.
-
Components:
-
Nodes: Hosts (end systems), routers, switches, hubs.
-
Links: Guided (copper/fiber cables) and unguided (wireless) media.
-
Protocols: Rules for communication (e.g., TCP, IP, HTTP).
-
Standards: IEEE, IETF, ISO ensure interoperability.
-
1.2 Network Types & Topologies
-
Network Types by Scale:
| Type | Coverage | Example | |------|----------|---------| | PAN | <10 m | Bluetooth, Zigbee | | LAN | Room/Building | Ethernet, Wi-Fi | | MAN | City | Cable TV network | | WAN | Country/Global | Internet | | Internetwork | Multiple WANs | The Internet |
-
Physical Topologies: Bus, Star, Ring, Mesh, Tree, Hybrid.
-
Logical Topologies: How data flows (e.g., Ethernet logical bus, Token Ring logical ring).
1.3 ISO-OSI Reference Model (7-Layer)
-
Layers & Functions:
| Layer | Function | Protocols/Devices | |-------|----------|------------------| | 7. Application | Network services to apps | HTTP, FTP, SMTP | | 6. Presentation | Translation, encryption, compression | SSL/TLS | | 5. Session | Dialog control, synchronization | RPC, NetBIOS | | 4. Transport | End-to-end delivery, reliability | TCP (reliable), UDP (unreliable) | | 3. Network | Routing, logical addressing | IP, ICMP, routers | | 2. Data Link | Framing, MAC, error control | Ethernet, PPP, switches | | 1. Physical | Bits over medium | RJ45, fiber, repeaters |
-
Peer-to-Peer Communication: Same layer on different nodes exchange PDUs (Protocol Data Units).
-
Critique/Limitations:
-
Too complex, theoretical.
-
Session and presentation layers often merged with application in practice.
-
TCP/IP model gained real-world adoption.
-
1.4 TCP/IP Protocol Suite (4/5-Layer Model)
-
Layers:
-
Network Access (Link): Physical + Data Link (Ethernet, Wi-Fi).
-
Internet: IP, ICMP, ARP (routing, addressing).
-
Transport: TCP, UDP (end-to-end).
-
Application: HTTP, DNS, SMTP (user-facing).
-
-
Comparison with OSI:
| Aspect | OSI | TCP/IP | |--------|-----|--------| | Layers | 7 | 4 or 5 | | Protocols | Theoretical | Practical (de facto) | | Session/Presentation | Separate | Merged into Application | | Network Layer | Connection-oriented (X.25) | Connectionless (IP) | | Transport Layer | Both CO & CL | Both (TCP & UDP) | | Adoption | Reference model | Internet standard |
1.5 Connection-Oriented vs. Connectionless Services
-
Connection-Oriented:
-
Setup phase (handshake), guaranteed delivery, sequencing, flow control.
-
Example: TCP (three-way handshake, ACKs, retransmissions).
-
-
Connectionless:
-
No setup, best-effort delivery, no guarantees.
-
Example: UDP, IP.
-
-
Key Differences:
| Feature | Connection-Oriented | Connectionless | |---------|---------------------|----------------| | Reliability | High (ACKs, retransmission) | Low (no ACKs) | | Overhead | High (headers, control) | Low | | Ordering | Guaranteed | Not guaranteed | | Use Case | File transfer, web (HTTP/TCP) | DNS, VoIP, streaming |
1.6 Service Primitives
-
Request: Service user → service provider (e.g., "send data").
-
Indication: Service provider → service user (e.g., "data arrived").
-
Response: Service user → service provider (e.g., "data accepted").
-
Confirm: Service provider → service user (e.g., "send complete").
-
Used for communication between adjacent OSI layers.
[!TIP] Exam Focus: OSI vs TCP/IP mapping is a ** perennial 7-mark question**. Remember TCP/IP's Application layer encompasses OSI's Application, Presentation, and Session.
2.0 PHYSICAL LAYER & TRANSMISSION MEDIA
2.1 Guided Transmission Media
| Media | Bandwidth | Attenuation | Cost | Application |
|---|---|---|---|---|
| Twisted Pair (UTP/STP) | Up to 100 MHz | High | Low | LAN (Ethernet), telephone |
| Coaxial Cable | 500 MHz | Medium | Medium | Cable TV, older Ethernet |
| Fiber Optic (Single-mode) | >10 GHz | Very low | High | Long-haul, backbone |
| Fiber Optic (Multi-mode) | ~1 GHz | Low | Medium | LAN, short distances |
2.2 Unguided Transmission Media
-
Radio: Omnidirectional, penetrates walls (Wi-Fi, Bluetooth).
-
Microwave: Directional, line-of-sight, satellite links.
-
Infrared: Short range, line-of-sight (remote controls).
-
Satellite: Global coverage, high propagation delay (~270 ms).
2.3 Line Coding (Digital-to-Digital Conversion)
-
Types:
-
Unipolar: All positive (e.g., NRZ-L). Has DC component.
-
Polar: Positive/negative (NRZ-L, NRZ-I). DC balance issues.
-
Bipolar: AMI (alternate mark inversion). No DC, but synchronization issues with long zeros.
-
Manchester: Mid-bit transition for clock, used in Ethernet (10BASE-T). Bandwidth doubles.
-
Differential Manchester: Transition at start for clock, inversion for data.
-
-
Problems:
-
Synchronization: Need clock recovery (solved by Manchester, bipolar with stuffing).
-
DC component: Affects AC-coupled lines (solved by bipolar, Manchester).
-
Baseline wander: Long sequences of 0s/1s shift baseline (solved by bipolar with stuffing).
-
2.4 Multiplexing Techniques
-
FDM: Different frequency bands (radio, cable TV).
-
TDM:
-
Synchronous TDM: Fixed time slots per channel, inefficient if channel idle.
-
Statistical TDM: Dynamic slot allocation, needs addressing.
-
TDM Frame Size Calculation:
\[ \text{Frame size (bits)} = \sum_{i=1}^{n} \text{slots per channel}_i \]
\[ \text{Data rate} = \text{Frame size} \times \text{Frame rate} \]
Example: 3 channels at 100 kbps each, 1 bit per slot → frame size = 3 bits, frame rate = 100,000 frames/s → data rate = 300 kbps.
-
2.5 Transmission Parameters & Limits
-
Nyquist Formula (Noiseless Channel):
\[ R_{\text{max}} = 2B \log_2 M \]
\(B\) = bandwidth (Hz), \(M\) = signal levels.
Example: \(B = 3 \text{ kHz}, M = 4\) → \(R_{\text{max}} = 2 \times 3000 \times \log_2 4 = 12,000 \text{ bps}\). Increasing \(M\) increases rate but requires higher SNR.
-
Shannon's Theorem (Noisy Channel):
\[ C = B \log_2 (1 + \text{SNR}) \]
\(C\) = channel capacity (bps), SNR in linear scale (not dB).
Example: \(B = 4 \text{ kHz}, \text{SNR} = 1000\) → \(C = 4000 \log_2(1001) \approx 39,868 \text{ bps}\).
-
Relationship: Both bandwidth and SNR increase capacity; Nyquist is upper bound for noiseless, Shannon for noisy.
[!TIP] Common Pitfall: In Shannon's formula, SNR must be linear (e.g., 30 dB = 1000 linear). Nyquist assumes no noise.
3.0 DATA LINK LAYER
3.1 Functions
- Framing, physical addressing (MAC), error control, flow control, link management.
3.2 Framing & Bit/Byte Stuffing
-
Character-Oriented (Byte Stuffing):
-
Flag:
0x7E(01111110), Escape:0x7D(01111101). -
Stuff escape before flag or escape in data.
-
Example: Data
0x7E 0x7D→0x7D 0x7E 0x7D 0x7D.
-
-
Bit-Oriented (Bit Stuffing):
-
Flag:
01111110. -
Insert
0after five consecutive1s in data. -
Example: Data
01111110→011111010(stuff after five 1s).
-
-
Bit Stuffing Calculation: Given bit stream, scan left to right, insert
0after every five consecutive1s.
3.3 Error Detection & Correction
-
Error Detection:
-
Parity Check: Single-bit (1D) or 2D matrix. Detects odd number of errors.
-
Checksum (Internet Checksum):
-
Sum 16-bit words using ones complement arithmetic.
-
Take ones complement of sum.
-
Example: Words
0x1234,0x5678→ sum0x68AC→ checksum0x9753.
-
-
CRC (Cyclic Redundancy Check):
-
Represent data \(D(x)\) and generator \(G(x)\) as binary.
-
Append \(r\) zeros (\(r = \deg G(x)\)) to \(D(x)\).
-
Divide \(D(x) \cdot x^r\) by \(G(x)\) using XOR (mod 2).
-
Remainder \(R(x)\) is CRC; codeword = \(D(x) \cdot x^r + R(x)\).
Example: \(D(x) = x^9 + x^8 + x^6 + x^5 + x^3 + x^2 + x^1 + 1\) (
1101011011), \(G(x) = x^4 + x + 1\) (10011).Steps:
11010110110000 ÷ 10011 → Remainder: 1100 (4 bits) → Codeword: 11010110111100 -
-
-
Error Correction:
-
Hamming Code: Add parity bits at positions \(2^i\). Minimum Hamming distance 3 → single-bit correction.
-
Example: For 4 data bits, need 3 parity bits (positions 1,2,4). Compute parity for overlapping groups.
-
[!TIP] CRC Calculation: Always use polynomial division (XOR). Generator must have \(x+1\) factor (ends with 1). Remainder length = degree of \(G(x)\).
3.4 Data Link Protocols
-
Stop-and-Wait:
-
Sender transmits one frame, waits for ACK.
-
Efficiency \(\eta = \frac{1}{1 + 2a}\), where \(a = \frac{\text{propagation time}}{\text{transmission time}}\).
-
Inefficient for long propagation delays.
-
-
Sliding Window:
-
Go-Back-N (GBN):
-
Sender window \(N\), receiver window 1.
-
Cumulative ACKs. Timeout → retransmit all unACKed frames.
-
Utilization \(U \approx \min(1, \frac{N}{1+2a})\).
-
-
Selective Repeat (SR):
-
Both windows \(N \leq 2^{m-1}\) (where \(m\) = sequence number bits).
-
Individual ACK/NACK. Retransmit only lost frames.
-
Higher efficiency, complex receiver buffering.
-
-
Piggybacking: ACK carried in data frames to save bandwidth.
-
-
Link Utilization:
-
GBN: \(U = \frac{N}{1+2a}\) (if \(N \leq 2a+1\)).
-
SR: \(U = \frac{N}{1+2a}\) (with \(N \leq 2^{m-1}\)).
-
3.5 Specific Protocols
-
HDLC (High-Level Data Link Control):
-
Frame: Flag
01111110, Address, Control, Info, FCS, Flag. -
Modes: NRM (primary-secondary), ABM (asymmetric balanced), ARM (asymmetric response).
-
-
PPP (Point-to-Point Protocol):
-
Phases: Link establishment (LCP), authentication (optional), network layer (NCP).
-
Frame: Flag, Address (
0xFF), Control (0x03), Protocol (e.g.,0x0021for IP), Data, FCS, Flag. -
Replaces SLIP (no error detection, no multiplexing).
-
-
SLIP (Serial Line IP):
-
Simple, frame delimiter
END(0xC0), escapeESC(0xDB). -
Limitations: No error detection, no protocol type field, only IP.
-
[!TIP] GBN vs SR: GBN simpler but wastes bandwidth on single error; SR efficient but requires larger buffers and sequence numbers.
4.0 MEDIUM ACCESS CONTROL (MAC) SUBLAYER
4.1 Channel Allocation Problem
-
Static: FDM, TDM, WDM, CDMA. Fixed allocation, inefficient for bursty traffic.
-
Dynamic: Needed for bursty traffic (e.g., Ethernet, Wi-Fi).
4.2 Multiple Access Protocols
-
ALOHA:
-
Pure ALOHA: Transmit anytime. Vulnerable period \(2T\).
\[ \text{Throughput } S = G e^{-2G}, \quad \text{Max } 18.4\% \text{ at } G=0.5 \]
-
Slotted ALOHA: Transmit only at slot boundaries. Vulnerable period \(T\).
\[ S = G e^{-G}, \quad \text{Max } 36.8\% \text{ at } G=1 \]
-
-
CSMA (Carrier Sense Multiple Access):
-
1-persistent: Sense idle → transmit immediately. High collision risk.
-
Non-persistent: Sense idle → transmit; if busy, random wait. Lower collision, higher delay.
-
p-persistent: Slotted CSMA; if idle, transmit with prob \(p\).
-
-
CSMA/CD (Collision Detection):
-
Used in Ethernet. Jam signal on collision, binary exponential backoff.
-
Minimum Frame Size: \(2 \times \text{propagation delay} \times \text{bandwidth}\).
\[ \text{Min frame size} = 2 \times \frac{\text{distance}}{\text{signal speed}} \times \text{bandwidth} \]
-
Efficiency \(\eta = \frac{1}{1 + 2a}\) for long cables.
-
-
CSMA/CA (Collision Avoidance):
- Used in Wi-Fi (802.11). RTS/CTS, DIFS, SIFS, NAV (virtual carrier sense).
4.3 IEEE 802 Standards for LANs
| Standard | Topology | Access Method | Frame Format | Performance |
|---|---|---|---|---|
| 802.3 (Ethernet) | Bus/Star | CSMA/CD | Dest MAC, Src MAC, Type, Data, FCS | High under light load, degrades with collisions |
| 802.4 (Token Bus) | Bus (logical ring) | Token passing | Token, data, token release | Deterministic, complex |
| 802.5 (Token Ring) | Ring | Token passing | SD, FC, DA, SA, Data, FCS, ED | Predictable, monitor station handles failures |
| 802.11 (Wi-Fi) | Star (AP) | CSMA/CA | Address fields (4), Seq, FCS | Hidden terminal problem, RTS/CTS mitigates |
4.4 Broadband & Baseband
-
Baseband: Digital signal, entire bandwidth for one channel (Ethernet).
-
Broadband: Analog signal, multiple channels via FDM (cable TV).
4.5 Virtual LANs (VLANs)
-
Concept: Logical segmentation of physical LAN.
-
Advantages: Security, broadcast control, flexibility.
-
Implementation:
-
Port-based: Assign switch ports to VLANs.
-
MAC-based: Assign based on MAC address.
-
Tagging (IEEE 802.1Q): 4-byte tag inserted in Ethernet frame with VLAN ID.
-
5.0 NETWORK LAYER
5.1 Functions & Design Issues
- Forwarding (per-packet), routing (path selection), congestion control, QoS, internetworking.
5.2 IP Addressing (IPv4)
-
Classful Addressing:
| Class | Range | Default Mask | Hosts | |-------|-------|--------------|-------| | A | 0.0.0.0 – 127.255.255.255 | 255.0.0.0 | 16M | | B | 128.0.0.0 – 191.255.255.255 | 255.255.0.0 | 64K | | C | 192.0.0.0 – 223.255.255.255 | 255.255.255.0 | 254 | | D | 224.0.0.0 – 239.255.255.255 | – | Multicast | | E | 240.0.0.0 – 255.255.255.255 | – | Experimental |
-
Limitations: Address wastage (class C for small networks), routing table explosion (many small networks).
-
CIDR & Classless Addressing:
-
Notation:
a.b.c.d/n(e.g.,192.168.1.0/24). -
Address blocks: Size \(2^{32-n}\).
-
All-zeros/all-ones subnets historically reserved; now usable.
-
-
Subnetting:
-
Steps:
-
Determine bits to borrow: \(2^{\text{borrow}} \geq \text{subnets needed}\).
-
New subnet mask: default mask + borrowed bits.
-
Block size = \(2^{32-n}\).
-
Subnet addresses: increment by block size.
-
For each subnet:
-
Network address: base address.
-
First host: network + 1.
-
Last host: network + block size – 2.
-
Broadcast: network + block size – 1.
-
-
Example:
192.168.10.0/24into 4 subnets:- Borrow 2 bits → mask
/26(255.255.255.192).
- Block size = 64.
- Subnets:
192.168.10.0/26(hosts 1–62, bcst 63),192.168.10.64/26(hosts 65–126, bcst 127), etc.
-
-
VLSM (Variable Length Subnet Mask):
- Allocate subnets of different sizes. Start with largest requirement, then next.
Example: ISP has
190.100.0.0/16. Allocate:- 64 customers × 256 addresses →
/24subnets (64 of them).
- 128 customers × 128 addresses →
/25subnets (128 of them).
- 128 customers × 64 addresses →
/26subnets (128 of them).
Calculate remaining addresses.
5.3 Address Resolution Protocols
-
ARP (Address Resolution Protocol):
-
Resolves IP → MAC. Broadcast request, unicast reply.
-
Cache entries with TTL.
-
-
RARP (Reverse ARP):
- Diskless workstations get IP from MAC via server.
-
Proxy ARP: Router answers ARP for another host (makes remote network appear local).
-
Gratuitous ARP: Host announces its IP/MAC (detect duplicates, update caches).
5.4 ICMP (Internet Control Message Protocol)
-
Role: Network layer error reporting and diagnostics.
-
Error Messages:
- Destination Unreachable, Time Exceeded (TTL=0), Parameter Problem.
-
Query Messages:
- Echo Request/Reply (
ping), Timestamp, Address Mask Request.
- Echo Request/Reply (
-
Used by
traceroute(TTL exceeded messages).
5.5 Routing Algorithms
-
Optimality Principle: Optimal path from source to dest is also optimal for all intermediate nodes.
-
Shortest Path Routing (Dijkstra):
-
Steps:
-
Initialize: Source node cost 0, others ∞; tree = {source}.
-
Find node not in tree with smallest cost.
-
Add node to tree, update costs of neighbors via this node.
-
Repeat until all nodes in tree.
-
-
Example: Graph with nodes J, A, I, H, K and delays. Compute shortest paths from J.
-
Limitations: Single metric (e.g., delay), requires complete topology knowledge.
-
-
Distance Vector Routing (Bellman-Ford):
-
Each router sends its distance vector to neighbors periodically.
-
Update: \(D_x(y) = \min_{v \in \text{neighbors}} [c(x,v) + D_v(y)]\).
-
Count-to-Infinity: Bad news propagates slowly. Solved by Split Horizon (don't send route back to source) and Poisoned Reverse (send ∞ metric back).
-
Convergence: Slow, limited scalability (RIP uses DVR).
-
-
Link State Routing (LSR):
-
Each router discovers neighbors (Hello packets), floods LSPs (link state packets).
-
Build complete topology, run Dijkstra locally.
-
Convergence: Fast, more overhead (OSPF uses LSR).
-
-
Comparison:
| Feature | DVR | LSR | |---------|-----|-----| | Convergence | Slow (count-to-infinity) | Fast | | Overhead | Periodic full updates | Flooding LSPs on change | | Scalability | Limited (RIP max 15 hops) | Better (OSPF areas) | | Knowledge | Only neighbor distances | Complete topology |
5.6 Congestion Control in Network Layer
-
Causes: Too many sources, slow processors, low bandwidth.
-
Load Shedding: Discard packets based on policy (random, priority, source).
-
Choke Packets: Source reduces traffic upon receiving choke packet from congested router.
-
QoS Techniques:
-
Leaky Bucket: Constant output rate, smooths bursts.
-
Token Bucket: Tokens accumulate (rate \(r\), capacity \(b\)); burst up to \(b\) tokens allowed. More flexible.
\[ \text{Max burst duration} = \frac{b}{r} \]
-
Resource Reservation:
-
IntServ: Per-flow reservation (RSVP).
-
DiffServ: Per-class (PHB: Expedited Forwarding, Assured Forwarding).
-
-
5.7 IPv6 (Next Generation IP)
-
Motivation: Address exhaustion (128-bit), header simplification, built-in security (IPsec), autoconfiguration.
-
Header Format (Fixed 40 bytes):
-
Version (4), Traffic Class (8), Flow Label (20), Payload Length (16), Next Header (8), Hop Limit (8), Source/Dest Address (128).
-
No checksum, no options (extension headers instead).
-
-
Address Representation: 8 groups of 4 hex digits (e.g.,
2001:0db8:85a3::8a2e:0370:7334). -
Autoconfiguration: Stateless (SLAAC via router advertisements) or stateful (DHCPv6).
-
Transition Strategies:
-
Dual Stack: Run IPv4 & IPv6.
-
Tunneling: Encapsulate IPv6 in IPv4.
-
Translation: NAT-PT (deprecated).
-
[!TIP] Subnetting: Always draw the subnet mask in binary to visualize borrowed bits. For VLSM, allocate largest subnets first to avoid fragmentation.
6.0 TRANSPORT LAYER
6.1 Services & Functions
- Process-to-process delivery (ports), segmentation/reassembly, connection control, flow control, error control, congestion control.
6.2 Transport Layer Protocols: TCP vs UDP
-
UDP (User Datagram Protocol):
-
Header: Source Port (16), Dest Port (16), Length (16), Checksum (16).
-
Characteristics: Connectionless, unreliable, no flow/congestion control, low overhead.
-
Use Cases: DNS, VoIP, streaming, DHCP.
-
-
TCP (Transmission Control Protocol):
-
Header fields:
-
Source/Dest Port (16 each)
-
Sequence Number (32)
-
Acknowledgment Number (32)
-
Flags (6 bits): URG, ACK, PSH, RST, SYN, FIN
-
Window Size (16)
-
Checksum (16)
-
Urgent Pointer (16)
-
Options (variable)
-
-
Characteristics: Connection-oriented, reliable, full-duplex, flow/congestion control.
-
6.3 TCP Connection Management
-
Connection Establishment (Three-Way Handshake):
-
Client → Server: SYN (seq=x, SYN=1).
-
Server → Client: SYN-ACK (seq=y, ack=x+1, SYN=1, ACK=1).
-
Client → Server: ACK (seq=x+1, ack=y+1, ACK=1).
-
-
Connection Termination (Four-Way Handshake):
-
A → B: FIN (seq=u, FIN=1).
-
B → A: ACK (ack=u+1, ACK=1).
-
B → A: FIN (seq=v, FIN=1).
-
A → B: ACK (ack=v+1, ACK=1).
-
-
Why Graceful Termination? Ensure all data delivered; handle delayed packets.
-
TIME_WAIT: 2MSL wait (Maximum Segment Lifetime × 2) to handle delayed packets and prevent old duplicates.
-
Half-Close: One direction closed (FIN sent, but other can still send).
-
Simultaneous Close: Both sides send FIN simultaneously.
-
6.4 Flow Control in Transport Layer
-
Sliding Window: Receiver advertises window size (in header). Sender cannot send more than window size unacknowledged bytes.
-
Buffering at sender (retransmission buffer) and receiver (out-of-order buffer).
6.5 Congestion Control in Transport Layer
-
Need: Prevent network collapse, fair resource sharing.
-
TCP Mechanisms:
-
Slow Start: Initial cwnd=1 MSS, double each RTT until threshold \(ssthresh\).
-
Congestion Avoidance: After \(ssthresh\), increase cwnd by 1 MSS per RTT (additive increase).
-
Fast Retransmit: After 3 duplicate ACKs, retransmit lost segment without waiting for timeout.
-
Fast Recovery: After fast retransmit, set \(ssthresh = cwnd/2\), cwnd = \(ssthresh + 3\), then on each dup ACK cwnd++, on new ACK set cwnd = \(ssthresh\).
-
AIMD: Additive Increase, Multiplicative Decrease on loss.
-
-
Load Shedding: Discard packets when buffer full (e.g., tail drop).
[!TIP] TCP States: Remember the state diagram: CLOSED → LISTEN → SYN_SENT → SYN_RECEIVED → ESTABLISHED → FIN_WAIT_1 → FIN_WAIT_2 → TIME_WAIT → CLOSED. TIME_WAIT prevents old duplicates.
7.0 APPLICATION LAYER & APPLICATION PROTOCOLS
7.1 Domain Name System (DNS)
-
Role: Hierarchical, distributed database mapping domain names → IP addresses.
-
Components:
-
Resolvers: Client-side library/daemon.
-
Name Servers: Root, TLD (e.g.,
.com), Authoritative. -
Zones: Administrative domains (e.g.,
example.com).
-
-
Resolution Process:
-
Recursive Query: Resolver asks server, server does full lookup (or referral).
-
Iterative Query: Server returns closest known answer (referral to another server).
-
Caching: Responses cached with TTL (Time-to-Live).
-
-
Resource Records (RR):
- A (IPv4 address), AAAA (IPv6), NS (name server), CNAME (canonical name), MX (mail exchange), PTR (reverse lookup).
7.2 World Wide Web & HTTP
-
HTTP (Hypertext Transfer Protocol):
-
HTTP/1.0: Non-persistent (new connection per request).
-
HTTP/1.1: Persistent connections (keep-alive), pipelining.
-
Request Methods: GET, POST, HEAD, PUT, DELETE.
-
Status Codes:
-
1xx: Informational (100 Continue)
-
2xx: Success (200 OK)
-
3xx: Redirection (301 Moved Permanently)
-
4xx: Client Error (404 Not Found)
-
5xx: Server Error (500 Internal Server Error)
-
-
Statelessness: No memory of previous requests; Cookies for state.
-
-
HTTPS: HTTP over SSL/TLS (port 443).
7.3 Electronic Mail
-
Architecture:
-
MUA (Mail User Agent): Outlook, Thunderbird.
-
MTA (Mail Transfer Agent): Sendmail, Postfix (SMTP).
-
MDA (Mail Delivery Agent): Procmail (local delivery).
-
-
SMTP (Simple Mail Transfer Protocol):
-
Push protocol, port 25, text-based (7-bit ASCII).
-
Commands:
HELO,MAIL FROM:,RCPT TO:,DATA,QUIT. -
Uses CRLF line endings.
-
-
POP3 / IMAP:
-
POP3 (port 110): Download-and-delete, simple.
-
IMAP (port 143): Keep mail on server, folders, concurrent access.
-
-
MIME (Multipurpose Internet Mail Extensions):
-
Extends SMTP for non-ASCII via encoding (base64, quoted-printable).
-
Headers:
Content-Type,Content-Transfer-Encoding.
-
7.4 File Transfer
-
FTP (File Transfer Protocol):
-
Two connections:
-
Control (port 21, persistent): Commands/responses.
-
Data (port 20 active, or passive mode): Actual file transfer.
-
-
Active Mode: Server connects to client data port.
-
Passive Mode: Client connects to server data port (firewall-friendly).
-
Commands:
USER,PASS,LIST,RETR,STOR,QUIT.
-
7.5 Network Management
-
SNMP (Simple Network Management Protocol):
-
Architecture: Manager (NMS), Agent (on device), MIB (database of objects).
-
Operations:
GET,SET,GET-NEXT,TRAP(asynchronous alert). -
MIB: Hierarchical tree of managed objects (OIDs).
-
7.6 Other Application Layer Concepts
-
Peer-to-Peer (P2P) vs Client-Server:
-
P2P: Decentralized, peers share resources (BitTorrent).
-
Client-Server: Centralized server (web, email).
-
-
Socket: Endpoint = IP address + port number (e.g.,
192.168.1.1:80).
8.0 NETWORK DEVICES & INTERCONNECTION
8.1 Devices by OSI Layer
| Device | Layer | Function | Address Used | Intelligence |
|---|---|---|---|---|
| Repeater/Hub | Physical | Regenerates signal, broadcasts | – | None |
| Bridge/Switch | Data Link | Frame filtering, MAC learning | MAC | Low (forwarding/filtering) |
| Router | Network | Packet forwarding, routing | IP | High (routing table) |
| Gateway | Application/Transport | Protocol conversion | – | Very high |
-
Switch vs Bridge: Switch is multi-port bridge, hardware-based, higher port density.
-
Router vs Gateway: Router connects networks (IP), gateway connects dissimilar networks (protocol conversion).
8.2 Virtual LANs (VLANs)
-
Concept: Logical segmentation of physical LAN.
-
Advantages: Security (isolate groups), broadcast control, flexibility (move users without rewiring).
-
Implementation:
-
Port-based: Assign switch ports to VLANs.
-
MAC-based: Assign based on MAC address.
-
Tagging (IEEE 802.1Q): 4-byte tag inserted in Ethernet frame; VLAN ID in tag.
-
9.0 SPECIAL TOPICS & SHORT NOTE POTENTIAL
9.1 Cryptography (Basics)
-
Symmetric: Same key for encryption/decryption (AES, DES). Fast, key distribution problem.
-
Asymmetric: Public/private key pair (RSA). Slow, solves key distribution.
-
Digital Signatures: Hash(message) + encrypt with private key → authenticity/integrity.
9.2 Network Topologies
-
Star: Central hub/switch. Advantages: Easy management, single failure point. Disadvantages: Hub failure brings down network.
-
Mesh: Full connectivity. Advantages: High reliability, multiple paths. Disadvantages: Expensive, complex.
9.3 Broadcast & Multicast Routing
-
Broadcast: Send to all nodes (e.g., ARP). Flooding, reverse path forwarding.
-
Multicast: Send to group (e.g., video streaming). Tree construction (source-based or group-shared).
9.4 Frame Relay & ATM
-
Frame Relay: Packet switching, virtual circuits (PVC/SVC), no error correction (rely on higher layers).
-
ATM (Asynchronous Transfer Mode): Cell switching (53-byte cells: 5 header + 48 payload), QoS, virtual circuits.
9.5 FDDI (Fiber Distributed Data Interface)
- Dual ring, token passing, 100 Mbps, fault tolerance (ring wrap on failure).
9.6 MLMA (Multiple Access with Collision Avoidance)
- Concept: Sense channel, avoid collisions (e.g., CSMA/CA in Wi-Fi).
9.7 Persistent vs Non-Persistent CSMA
-
1-Persistent: Sense idle → transmit immediately. High collision risk under heavy load.
-
Non-Persistent: Sense idle → transmit; if busy, random backoff. Lower collision, higher average delay.
9.8 Remote Bridging
-
Connect distant LANs via bridge over WAN (e.g., leased line).
-
Challenges:
-
Latency: Propagation delay affects collision detection (CSMA/CD fails if delay > frame transmission time).
-
Loop Prevention: Spanning Tree Protocol (STP) needed.
-
Cost: Leased lines expensive.
-
[!TIP] Special Topics: These are often 4-mark short notes. Focus on one key advantage/disadvantage or working principle. For remote bridging, emphasize latency issue for CSMA/CD.