EE4204 Computer Networks Final Examination Cheat-sheet (AY2018/2019 Semester 1) Niu Yunpeng @ NUS CEG
4) Framing approaches:
EE4204 Final Examination Cheat-sheet a. sentinel-based: delineate with byte 7E, bit staffing in HDLC– insert 0 after
1. Introduction & Basis five consecutive 1s, byte staffing in PPP – use 7D as escape character;
1) ISO-OSI seven layers architecture: physical layer, data link layer, IP layer, b. counter-based: count field in header, back-to-back frames could be affected;
transport layer, session layer, presentation layer, application layer. c. clock-based: 810 bytes per 125 μs = 51.84 Mbps (STS-n = n * 51.94 Mbps).
2) IETF five layers: (hourglass design) physical layer, data link layer – frame, 5) Cyclic Redundancy Check (CRC): represent the message and divisor as
IP layer – datagram, transport layer – segment, application layer – message. polynomial, perform modulo-2 arithmetic (binary addition with no carry).
3) Layering: ensure encapsulation and fragmentation, protocols provide service
interface and peer-to-peer interface (cross layer design, possible?).
3) Two kinds of packet switches: router (IP layer), switch (data link layer).
4) Network components: core network (ISP), access network (telephone-based,
cable-based, fiber-based, wired, wireless), network edges (hosts + servers).
a. Digital subscriber line (DSL): existing telephone, < 2.5/2.4 Mbps up/down;
b. Hybrid fiber coax (HFC): frequency multiplexing, < 2/30 Mbps up/down;
c. Fiber to the home (FTTH), passive optical network (PON);
d. Wi-Fi 802.11b/g < 11.54 Mbps (local), 3G/4G LTE 1 – 10 Mbps (wide).
5) Link performance: bandwidth (Hz), data rate (bps), channel capacity (noise).
6) In local area networks: broadcast link, point-to-point link, token ring.
7) Multiplexing methods: time division multiplexing (fixed – FTDM, statistical 6) Flow control ensures that the sender does not overwhelm the receiver (stop
– STDM), frequency division multiplexing. and wait, sliding window with ACK n or RR n).
8) Switching methods: circuit switching (fixed TDM), packet switching (store 7) Automatic repeat request (ARQ): introduce NACK, REJ, SREJ.
and forward, statistical TDM). a. Stop and wait: TIMEOUT mechanism, alternate between ACK0 and ACK1;
9) Address translation: domain name to IP address – DNS (over UDP), IP b. Go back N: ACK n or RR n, REJ i will trigger sender to go back to i;
address to MAC address – ARP (under the same LAN). c. Selective reject: ACK n or RR n, SREJ i will trigger sender to re-transmit i.
10) Delays: transmission delay (Tt), propagation delay (Tp), queuing delay (Tq), 8) Performance: let represent the number of frames held in the link.
processing delay, packetization delay, etc. a. Stop and wait: link utilization ;
11) Transmission speed: one-way unacknowledged transfer – , b. Sliding window (error-free): assume window size is W, if
one-way acknowledged transfer – . or if ;
12) Delay (D) and bandwidth (B) product = amount of data “in the pipe”. c. Selective reject: if else ;
13) Effective throughput: .
d. Go back N: if else .
2. Data Link Layer
1) When a packet is transferred around in the network, the source/destination 9) Ethernet: max 2500m by 5 segments (separated by 4 repeaters).
MAC address changes between each two hops, while IP address remains the a. Collision detection: carrier sense multiple access (CSMA), use exponential
same (always the initial source or eventual destination address). back-off algorithm (randomly wait [0, 2n-1] slots at nth collision, give up after);
2) Link layer ensures channel reliability; transport layer ensures end-to-end b. Minimum frame size: 64 bytes (512 bits for 10 Mbps link = 51.2 μs RTT);
reliability. c. LAN connection: bus (single collision domain), hub (copy frames to all
3) Shannon’s capacity theorem: . other ports) and switch (store and forward, port to port);
Page 1 Good Luck!
EE4204 Computer Networks Final Examination Cheat-sheet (AY2018/2019 Semester 1) Niu Yunpeng @ NUS CEG
d. LAN extension: bridge (source routing, transparent, spanning tree); c. Could result in “count to infinity” problem if links breaks;
e. Forward table & backward learning: dynamic record down source port; d. Poisoned reverse: Z tells Y if Z routes to X via Y;
f. Distributed spanning tree bridge: to avoid loop (assign each bridge a unique e. BGP-4 solves the “count to infinity” problem ultimately by using AS_PATH
ID, use the bridge with smallest ID as root, initially claim itself as root, stop attribute (to list the full path and thus it does not include the current AS).
forwarding when a neighbor is nearer to the actual root). 11) We need to aggregate routers into autonomous systems (AS), thus require
10) Wireless network: Bluetooth, Wi-Fi and 3G/4G LTE. intra-AS routing protocol and inter-AS routing protocol.
a. Spread spectrum technique: frequency hopping (transmit over a sequence of a. Inter-AS and intra-AS routing reflects the hierarchical network structure;
frequencies, from a pseudo-random generator with pre-agreed seed); b. Inter-AS protocol propagates reachability information to all internal routers.
b. Direct sequence technique: n-bit chipping code (XOR with n random bits); 12) Interior Gateway Protocol (IGP) in the Internet, intra-AS protocols:
c. 802.11 does not have collision detection (due to hidden & exposed node a. Routing information protocol (RIP): based on distance vector with poison
problem), but has collision avoidance (request to send, clear to send); reverse (infinite distance = 16 hops);
d. Scanning (active – Probe, Probe Response, Association Request, Association b. Open shortest path first (OSPF): based on link state, flooding via IP;
Response, passive – Beacon, Association Request, and Association Response). c. Interior gateway routing protocol (IGRP): Cisco proprietary.
3. IP (network) Layer 13) Border Gateway Protocol (BGP) in the Internet, inter-AS protocol: based
1) Two key functionalities: forwarding (longest prefix matching), routing. on distance vector, exchange routing information over BGP sessions (via TCP).
2) Datagram network – “smart” end systems, virtual circuit (VC) network – 14) Broadcast routing: use in-network duplicate along a spanning tree.
“dumb” end systems, complexity inside network. 15) Multicast routing: use Steiner Tree as the minimum cost tree to connect all
3) Router: run routing algorithm, forward datagrams from in-port to out-port. routers with attached group members.
a. Switching fabrics: memory, bus, crossbar (interconnection network); 4. Transport Layer
b. Input port: decapsulation, decentralized switching, queuing (HOL blocking); 1) Most services use TCP, but some (like DHCP, DNS and traceroute) use UDP
c. Output port: buffering (queuing), scheduling discipline; due to no setup required.
d. Queuing (delay) and loss leads to input/output buffer overflow. 2) TCP reliable delivery: checksum, sequence number, re-transmission.
4) By class-less interdomain routing (CIDR), each isolated network is a subnet. a. Three-way handshake: SYN, SYN ACK, ACK;
5) Dynamic Host Configuration Protocol (DHCP) dynamically allocates IP b. Tearing down connection: (FIN, FIN ACK) * 2, RST;
addresses (DHCP discover, DHCP offer, DHCP request, DHCP ack). c. Stop and wait: keep timeout length as a function of (estimated) RTT;
6) Network Address Translation (NAT): replace all internal IP addresses with d. Sliding window: receiver advertises the window size to sender;
one single IP address differentiated by ports. Although NAT solves the address e. Fast re-transmission: re-transmit data after receiving 3 duplicate ACKs;
shortage problem, the optimal solution should be IPv6 instead. f. Congestion control: actual window size is min of congestion window and
7) NAT traversal problem: static configuration, Universal Plug and Play flow window, slow start & additive increase & multiplicative decrease;
(UPnP), relaying (used in Skype). g. Facing 3 duplicate ACKs, Reno cuts CW by half, Tahoe treats as timeout;
8) Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers. h. Congestion avoidance: implicit – random early dropping (RED), explicit –
9) Link state routing algorithm: Dijkstra’s algorithm, global algorithm. intermediate router sets the DEC bit in packet header.
a. May not be able to produce correct answer for negative weights; 3) TCP throughput: controls the amount of traffic by adjusting window size.
b. Cannot work when there is negative cycle (since answer is -∞). a. Instantaneous send rate: ;
10) Distance vector routing algorithm: Bellman-Ford algorithm, decentralized. b. Instantaneous receive rate: send rate;
a. Bellman-Ford equation: ; c. Average send rate under AIMD: .
b. Each node waits for any change, recompute the estimates and broadcasts; 4) Rethinking end-to-end (e2e): (approximated) flow recognition is the key.
Page 2 Good Luck!