Topics

Layering and protocol stacks

The OSI and TCP/IP models, what a service, an interface and a protocol are, how each layer wraps the data from above in its own header (encapsulation), the name of the unit at each layer (message, segment, datagram, frame, bit), and which device works up to which layer (hub, switch or bridge, router, host).

1 sheetCN-02

Switching and performance metrics

Circuit, datagram and virtual-circuit switching compared on setup, path, order, sharing and header cost; message versus packet switching and the pipelining gain; transmission, propagation, queueing and processing delay, end-to-end delay over k links, throughput as the bottleneck rate, bandwidth-delay product, utilization, traffic intensity and the unit conventions (decimal rates, byte sizes).

2 sheetsCN-03CN-04

Error detection: parity, checksum and CRC

Single and two-dimensional parity, the Internet checksum with end-around carry, Hamming distance for detection and correction, Hamming check-bit count, and CRC: mod-2 long division worked bit by bit, the receiver check, and exactly which error patterns a generator is guaranteed to catch.

2 sheetsCN-05CN-06

Medium access control and Ethernet

Pure and slotted ALOHA throughput and their peaks, CSMA persistence, CSMA/CD collision timing, minimum frame size and binary exponential backoff, CSMA/CA in one line; the Ethernet frame and its size limits, MAC addresses, and how hubs, bridges and learning switches split collision and broadcast domains.

2 sheetsCN-09CN-10

Distance-vector and link-state routing

Distance-vector routing with the Bellman-Ford equation, synchronous table rounds, count-to-infinity, split horizon and poison reverse; link-state routing with flooding of link-state advertisements and a Dijkstra trace; when each is used and how they compare.

2 sheetsCN-11CN-12

IPv4: addressing, CIDR, fragmentation and NAT

The IPv4 header field by field, TTL and the header checksum; fragmentation with 8-byte offsets, MF and DF, multi-link refragmentation and reassembly; CIDR prefixes, masks, usable hosts, subnetting and VLSM, special and private blocks, aggregation, longest-prefix match; NAT and NAPT translation tables and their side effects.

4 sheetsCN-13CN-14CN-15

UDP and TCP: flow control and congestion control

Stop-and-wait, Go-Back-N and Selective Repeat efficiency, windows and sequence-number bits; UDP and TCP headers, the three-way handshake and teardown, byte sequence numbers and ACKs; TCP flow control with the receive window, sequence wrap, RTO estimation, throughput formulas; congestion control with slow start, avoidance, fast retransmit and fast recovery traced round by round.

5 sheetsCN-07CN-08CN-17

Socket API

The Berkeley socket call order for TCP and UDP clients and servers, what each call does on the wire, which calls block and until when, the new socket returned by accept, byte-stream versus datagram reads, and the common mistakes in reading call sequences.

1 sheetCN-20

DNS and HTTP

DNS name hierarchy, iterative and recursive resolution with message counts, resource record types, caching with TTLs and transport (UDP and TCP on port 53); HTTP methods and status codes, persistent and non-persistent connections, RTT counting with and without pipelining, cookies and web caching with conditional GET.

2 sheetsCN-21CN-22

All Computer Networks sheets

CN-02Cheat sheet1 pageIn a paid pack

Layering and Encapsulation

The principles of layering for GATE CS: the OSI seven-layer reference model next to the five-layer TCP/IP model, the difference between a service, an interface and a protocol, encapsulation and the protocol data unit at each layer (message, segment, datagram, frame, bit), the address each layer uses, which jobs belong to which layer, and which device (hub, bridge or switch, router, host) works up to which layer. Includes a header-overhead example checked by script and the past question on matching layers to jobs.

CN-03Cheat sheet1 pageIn a paid pack

Circuit, Datagram and Virtual Circuit

Circuit switching, datagram packet switching and virtual-circuit packet switching compared on setup, path, ordering, resource sharing, per-packet header and router state. Timing formulas for a circuit (setup plus transfer at the circuit rate, including TDM slots), for message switching and for pipelined packet switching over k store-and-forward links, the header trade-off that gives an optimal packet size, and the setup cost that decides between a virtual circuit and datagrams. Every number checked by script, with a solved 2024 past question.

CN-04Cheat sheet1 pageIn a paid pack

Delay, Throughput and BDP

The performance metrics in the GATE CS syllabus: transmission, propagation, queueing and processing delay and their sum per hop; end-to-end delay for a stream of packets over equal and unequal links, with the exact pipelining formula checked by simulation; throughput as the bottleneck rate; bandwidth-delay product; utilization; traffic intensity and what it says about queues; and the unit conventions (decimal rates, bytes to bits, KB as 1000 or 1024 bytes). Includes a solved 2026 past question on a three-link path.

CN-05Cheat sheet1 pageIn a paid pack

Parity, Checksum and Hamming Distance

Single parity and what it misses, two-dimensional parity and the error patterns it detects, corrects and misses (checked exhaustively by script), the Internet checksum with one's-complement addition and end-around carry, computed on a real IPv4 header, Hamming distance and the bounds for detecting and correcting errors, the check-bit count of a Hamming code and a Hamming(7,4) encode and syndrome example.

CN-06Cheat sheet1 pageIn a paid pack

CRC Division and Detection

Cyclic redundancy check for GATE CS: generator polynomials as bit strings, appending r zeros, mod-2 long division shown line by line, the receiver check and a detected one-bit error, a solved 2026 past question, and the guaranteed detection properties (single-bit, double-bit, odd-weight and burst errors) with the conditions on the generator, each confirmed by exhaustive enumeration in a script.

CN-09Cheat sheet1 pageIn a paid pack

ALOHA, CSMA and CSMA/CD

Random-access medium access control for GATE CS: pure and slotted ALOHA throughput S = G e^(-2G) and S = G e^(-G) with their peaks and the loads at which they occur, the finite-station form, CSMA persistence variants, CSMA/CD collision timing and the minimum frame size L = 2 Tp R with a solved 2024 question, binary exponential backoff with exact collision probabilities, CSMA/CD efficiency approximations, and CSMA/CA in one line. Every number checked by script.

CN-10Cheat sheet1 pageIn a paid pack

Ethernet and Switches

Ethernet (IEEE 802.3) for GATE CS: the frame format with every field size, the 64 to 1518 byte limits and what they count, padding, the type/length rule, wire-level overhead and maximum frame rate, 48-bit MAC addresses with the group and local bits, hubs versus bridges and switches, the learning-switch algorithm traced frame by frame, and counting collision and broadcast domains. Every number checked by script.

CN-11Cheat sheet1 pageIn a paid pack

Distance-Vector Routing

Distance-vector routing for GATE CS: the Bellman-Ford equation, what each router knows and sends, one table update from neighbour vectors, synchronous rounds on a six-router network until convergence, why good news travels fast and bad news slowly, the count-to-infinity table after a link failure, and how split horizon and poison reverse help (and where they fail). RIP's choices are tagged as implementation details. All tables come from a script.

CN-12Cheat sheet1 pageIn a paid pack

Link-State Routing

Link-state routing for GATE CS: what a link-state advertisement holds, reliable flooding with sequence numbers and its message count, Dijkstra's algorithm traced step by step on a six-router network with a tie, reading paths and next hops into a forwarding table, complexity, and a side-by-side comparison with distance-vector routing, plus a solved 2025 matching question. Every trace comes from a script.

CN-13Cheat sheet1 pageIn a paid pack

IPv4 Header

The IPv4 header (RFC 791) for GATE CS: the layout of the 20-byte fixed part and up to 40 bytes of options, each field's width and unit (IHL in 4-byte words, total length in bytes, fragment offset in 8-byte units), the flags, TTL and its decrement, protocol numbers, the header-only checksum and why every router recomputes it, the size limits that follow from field widths, and a solved 2024 past question on which fields every router changes.

CN-14Cheat sheet1 pageIn a paid pack

IPv4 Fragmentation

IPv4 fragmentation for GATE CS: the data each fragment can carry (MTU minus header, rounded down to a multiple of 8), offsets in 8-byte units, the MF and DF flags, refragmentation on a later link with a smaller MTU, reassembly only at the destination, reading a fragment back into byte positions, and the transport header counted as IP payload. Includes three worked tables and two solved past questions (2024, 2025), every value from a script.

CN-15Cheat sheet1 pageIn a paid pack

CIDR and Subnetting

CIDR notation (RFC 4632) for GATE CS: prefix length, mask and block size, network and broadcast addresses by AND and OR with the mask, usable hosts with the /31 and /32 exceptions, splitting a block into equal subnets and variable-length subnets (VLSM), the same-subnet test, the classful view still used in older questions, and the special and private address blocks. Includes a solved 2026 past question; every value checked with Python's ipaddress module.

CN-16Cheat sheet1 pageIn a paid pack

Aggregation, Longest Match and NAT

Supernetting and route aggregation (RFC 4632): when contiguous blocks merge into one prefix and when misalignment stops it, valid CIDR blocks for an allocation, longest-prefix match in a forwarding table with a default route, and network address translation (RFC 3022): basic NAT and NAPT, the translation table, the header fields and checksums that change in each direction, and NAT's side effects. Solved past questions from 2024, 2025 and 2026; every value checked with Python's ipaddress module.

CN-07Cheat sheet1 pageIn a paid pack

Stop-and-Wait and Window Efficiency

Flow control with acknowledgements: stop-and-wait with timeouts and a one-bit sequence number, the ratio a of propagation to transmission time, efficiency of stop-and-wait and of a sliding window of W frames with the timeline that explains it, throughput, the window that fills the pipe (also when RTT is given directly), and the corrections for a non-zero ACK and for frame loss. Worked chains and two solved past questions (2025, 2026), all checked by script.

CN-08Cheat sheet1 pageIn a paid pack

Go-Back-N and Selective Repeat

Sliding-window protocols for GATE CS: Go-Back-N and Selective Repeat compared on sender and receiver windows, acknowledgements, timers, buffering and what is resent after a loss; the sequence-number bounds and why a larger window breaks them (shown with 2-bit numbers); bits needed for a given window; and retransmission counts after a lost frame, from an event simulation in a script.

CN-17Cheat sheet1 pageIn a paid pack

UDP and TCP Segments

UDP (RFC 768) and TCP (RFC 9293) for GATE CS: header fields and sizes, what each service does and does not give, the three-way handshake and four-segment teardown with every sequence and acknowledgement number on a timeline, the connection states including TIME-WAIT, byte numbering with SYN and FIN each taking one number, cutting a stream into MSS-sized segments, and two solved past questions on the handshake (2024, 2025). Every number checked by script.

CN-18Cheat sheet1 pageIn a paid pack

TCP Flow Control and RTO

TCP flow control for GATE CS: the receive window and the sender's limit min(cwnd, rwnd), zero windows and the persist timer, window-limited throughput W/RTT and window scaling, how long the 32-bit sequence space lasts and the bits a fast link needs (two solved past questions, 2022 and 2026), retransmission-timeout estimation by RFC 6298 and by the older exponential average with Karn's rule and backoff, and the throughput models with their assumptions. Every value checked by script.

CN-19Cheat sheet1 pageIn a paid pack

TCP Congestion Control

TCP congestion control for GATE CS: the round-by-round convention used in exam questions (slow start doubling capped at ssthresh, additive increase, ssthresh set to half of cwnd on loss), the exact per-ACK rules of RFC 5681 beside it, timeout versus three duplicate ACKs, Tahoe versus Reno, fast retransmit and fast recovery with window inflation, the initial window, the receive-window cap, and three solved past questions (2024, 2026). Includes a cwnd chart; every trace comes from a script.

CN-20Cheat sheet1 pageIn a paid pack

Socket API

The Berkeley socket API for GATE CS: the call sequence of a TCP server (socket, bind, listen, accept, recv and send, close), a TCP client (socket, connect) and UDP endpoints (sendto, recvfrom), which call triggers which segments of the handshake and teardown, which calls block and until when, the new socket returned by accept, byte-stream versus datagram reads, port and address rules, concurrent servers, and the usual wrong orderings.

CN-21Cheat sheet1 pageIn a paid pack

DNS

The Domain Name System (RFC 1034, RFC 1035) for GATE CS: the name hierarchy and zones, root, TLD and authoritative servers, the stub and local (recursive) resolver, iterative versus recursive resolution with a diagram and exact message counts for empty and partly filled caches, resource record types, TTL caching, transport over UDP and TCP on port 53, message format and size limits, and the lookup's place in loading a web page.

CN-22Cheat sheet1 pageIn a paid pack

HTTP

HTTP (RFC 9110 semantics, RFC 9112 for HTTP/1.1) for GATE CS: request and response structure, methods with their safe and idempotent properties, status-code classes and the common codes, non-persistent, parallel, persistent and pipelined connections with exact RTT counts and times checked by script, the order of packets in a page load, cookies for state, and web caching with conditional GET and proxy hit ratios. Includes three solved past questions (2020, 2024, 2026).

CN-23Cheat sheet1 pageIn a paid pack

Traps Sheet

Common mistakes across the Computer Networks pack in one table: units and delays, switching, error detection, sliding windows, medium access and Ethernet, routing, IPv4 header and fragmentation, CIDR and NAT, TCP numbering, flow and congestion control, sockets, DNS and HTTP. Each row gives the wrong belief, the correct rule and a reminder, with a link to the sheet that explains it.

CN-24Cheat sheet1 pageIn a paid pack

Question Patterns

The recurring Computer Networks question patterns for GATE CS, one row each: the cue in the question, the first step and method, the check that can change the answer, and the solved past questions in this pack that follow the pattern (years, sets and question numbers already verified). Covers delays, switching, CRC, sliding windows, MAC, subnetting, CIDR blocks, longest-prefix match, NAT, fragmentation, routing, TCP numbering and congestion traces, sockets, DNS and HTTP.

CN-25Cheat sheet1 pageIn a paid pack

Master Last-Day Sheet

A one-page summary of the Computer Networks pack for the last day before GATE CS: delay and throughput formulas, switching, error detection, sliding-window efficiency and sequence bits, ALOHA and CSMA/CD, Ethernet limits, routing equations, IPv4 header units and fragmentation, CIDR arithmetic and longest-prefix match, NAT, TCP numbering, windows, RTO and congestion rules, socket order, DNS and HTTP counts, and a checklist of the checks that most often change an answer.

Connected subjects

Digital LogicAlgorithmsOperating Systems