summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-09-27 16:20:12 -0600
committermo khan <mo@mokhan.ca>2025-09-27 16:20:12 -0600
commitb86586b4bc79bb3da27a031622ee0f613c2159fc (patch)
tree6221528dcd033a92bc0691ef699519870b5f6011
parentec669fe67961aba8cab451f9fa8f1a4badcc2a61 (diff)
add cheatsheet
-rw-r--r--generated/NOTES_CHEATSHEET.md125
1 files changed, 125 insertions, 0 deletions
diff --git a/generated/NOTES_CHEATSHEET.md b/generated/NOTES_CHEATSHEET.md
new file mode 100644
index 0000000..c9e7230
--- /dev/null
+++ b/generated/NOTES_CHEATSHEET.md
@@ -0,0 +1,125 @@
+Computer Networks Final Exam Cheatsheet
+
+Use this as a fast recall guide. Focus on bolded terms, key formulas, and contrasts.
+
+1) Internet Basics
+- Protocol = message formats + order + actions
+- Edge vs Core: apps at edge; switches/routers in core
+- Packet switching: statistical multiplexing, store-and-forward
+- Circuit switching: reserved resources (FDM/TDM)
+- Delay types: d_proc + d_queue + d_trans(L/R) + d_prop(d/s)
+- Traffic intensity ρ = (L·a)/R → keep ρ < 1
+- Bottleneck link determines end-to-end throughput
+
+2) Layers and Encapsulation
+- Layers: App, Transport, Network, Link, Physical
+- Units: msg, segment, datagram, frame, bits
+- Encapsulation: each layer adds header; strip on receive
+
+3) Application Layer
+- Arch: Client–Server (always-on server) vs P2P (self-scaling)
+- HTTP: stateless; persistent vs non-persistent; cookies add state
+- DNS: hierarchical (root→TLD→authoritative); records A, NS, CNAME, MX
+- Email: SMTP push, IMAP access; typically over TCP
+- Web cache: proxy reduces RTT/bw; conditional GET uses If-Modified-Since/ETag
+- Streaming/DASH: client adapts bitrate; manifests; CDNs
+
+4) Transport
+- UDP: simple, no conn, best-effort; checksum
+- Reliable transfer building blocks: checksum, seq#, ACK/NAK, timer, retransmit
+- Pipelining: GBN (cum ACK, retransmit from loss), SR (selective ACK/buffer)
+- TCP: byte-stream, seq/ACK numbers (cumulative), flow control (rwnd)
+- RTT/Timeout: EstRTT=0.875·EstRTT+0.125·Sample; DevRTT EWMA; TO=EstRTT+4·Dev
+- Fast retransmit: on 3 dup ACKs
+- Congestion control: AIMD; slow start (exp), avoidance (lin), fast recovery
+- Throughput approx: (0.75·W)/RTT; sending rate ≈ cwnd/RTT
+- Variants: CUBIC (default Linux), BBR (model-based), Vegas (delay-based)
+- QUIC: UDP-based, integrated TLS, streams, faster startup, no HOL
+
+5) Network Layer (Data Plane)
+- Forwarding vs routing: local vs global
+- Longest prefix match; FIB lookup fast (TCAM)
+- IPv4 header key fields: TTL, Protocol, Src/Dst, checksum
+- Subnet/CIDR: a.b.c.d/x; route aggregation
+- DHCP: discover→offer→request→ack
+- NAT: private net uses one public IP; pros/cons (breaks E2E)
+- IPv6: 128-bit, fixed 40B header; no fragmentation; extension headers
+- Tunneling: IPv6-in-IPv4 during transition
+- Queues: HOL blocking at inputs; buffer sizing ≈ BDP/√N; bufferbloat
+- Schedulers: FIFO, priority, RR, WFQ
+
+6) Network Layer (Control Plane)
+- Link-state (Dijkstra): global view; flood LSAs; OSPF
+- Distance-vector (Bellman-Ford): neighbor exchange; count-to-infinity; poisoned reverse
+- BGP: interdomain, policy-first; attributes: LOCAL_PREF, AS_PATH, MED; hot-potato
+- SDN: centralized controller, match-action (OpenFlow), stats, events
+- NETCONF/YANG: model-driven config; SNMP for monitoring
+
+7) Link Layer and LANs
+- Services: framing, link access, error detection/correction
+- Error detection: parity (weak), checksum (software), CRC (strong)
+- Multiple access:
+ - TDM/FDM/CDMA (partitioning)
+ - Slotted/Pure ALOHA (random)
+ - CSMA/CD (wired); CSMA/CA (Wi‑Fi)
+- Ethernet: frame = preamble | dst | src | type | data (≥46) | CRC
+- Switches: self-learning MAC table; no loops → STP or use routing
+- VLANs: port-based segmentation; 802.1Q tag on trunks
+- MPLS: labels for fast fwd/TE/VPNs
+- Data centers: multi-tier/Clos, ECMP, SDN control, load balancers
+
+8) Wireless and Mobile
+- Wireless impairments: path loss, interference, multipath
+- SNR↑ → BER↓; higher rate → needs higher SNR
+- Hidden terminals; RTS/CTS mitigates
+- 802.11 MAC: CSMA/CA with DIFS/backoff/SIFS/ACK; rate adaptation; power save
+- Cellular LTE/5G: eNodeB/gNodeB; core (MME/HSS, SGW/PGW); tunnels; OFDM; handover
+- Mobility: home vs visited nets; indirect (triangle) vs direct routing; Mobile IP
+
+9) Security
+- Goals: Confidentiality, Integrity, Authentication, Availability
+- Symmetric crypto: AES; block vs stream; CBC with IV
+- Public key: RSA basics; use for key exchange + signatures
+- Hash/MAC: cryptographic hash; HMAC for integrity/auth
+- Digital signatures: sign hash with priv key; verify with pub key
+- TLS: handshake (certs, key exchange), key derivation, record MAC+encrypt
+- IPsec: SAs, ESP/AH, tunnel vs transport
+- Operational: firewalls (packet/stateful/app), IDS (sig/anomaly), defense-in-depth
+
+Key Formulas and Quick Facts
+- d_trans = L/R; d_prop = d/s; d_nodal = d_proc + d_queue + d_trans + d_prop
+- Traffic intensity ρ = (L·a)/R → if ρ ≥ 1 queues blow up
+- Throughput path = min link rate; BDP = R·RTT (bits in flight) → needed window/buffer
+- TCP timers: EstRTT, DevRTT, TO = EstRTT + 4·DevRTT
+- TCP cwnd sawtooth: avg ≈ 0.75·Wmax
+
+Typical Exam Comparisons
+- Packet vs circuit switching
+- TCP vs UDP; GBN vs SR; CSMA/CD vs CSMA/CA
+- OSPF (LS) vs RIP (DV); BGP purpose vs OSPF
+- NAT pros/cons; IPv4 vs IPv6 headers
+- Web cache pros; conditional GET
+- Firewall types; IDS methods; TLS vs IPsec
+
+Pitfalls and Gotchas
+- Confuse propagation vs transmission delay
+- RTT vs one-way; BDP units (bits!)
+- HTTP persistent reduces RTTs; cookies add state to stateless HTTP
+- Longest prefix match chooses most specific route
+- CRC detect/correct: detect bursts ≤ r bits; not correction by itself
+- Wi‑Fi cannot do collision detection (half-duplex radios, hidden nodes)
+
+Numbers to Remember
+- Ethernet min frame 64B; MTU 1500B
+- Wi‑Fi interframe: SIFS < DIFS; slot times vary by PHY
+- Common ports: HTTP 80/443, SMTP 25/587, DNS 53, IMAP 143/993
+- IPv4 TTL decrement each hop; typical speed in fiber ≈ 2e8 m/s
+
+Last‑Minute Checklist
+- Can you compute d_trans, d_prop, BDP, TCP window/throughput?
+- Can you explain cookies, DNS hierarchy, and conditional GET?
+- Can you run Dijkstra step-by-step and do longest prefix match?
+- Do you know TCP handshake/flags, congestion control phases?
+- Can you compare OSPF vs BGP and explain policy in BGP?
+- Do you remember CSMA/CA timing and RTS/CTS sequence?
+- Can you outline TLS handshake and IPsec tunnel structure?