CS 118 Midterm Cheat Sheet
ucla | CS 118 | 2024-18-23
Table of Contents
Physical Layer
Layer Violation - layers may only access/view their own headers/layer content easy way to identify: if a header of a lower layer is changed, it should not impact current layer service - if it does there is a violation ECN - Explicit Congestion Notification - added to IP & TCP to inform source abt congestion and to decrease sent packet rate Bandwidth/Frequency (B) = Nyquist-Shannon Sampling Thm - Anti-aliasing iff
Alternate Mark Inversion (AMI) Encoding - encodes bits to alternating voltage levels: 0:0V, 1:
11100111
-> +-+00+-+
con: issues with long seq of 0s 4-5 Encoding - encodes 4 bit seq to 5 bit seq w/ transisition e.g., 1111
-> 00001
, mitigates long preamble con: introduces new overhead for every 4 bit pattern Broadband Encoding - Frequency Shift Keying (FSK), Amplitude Shift Keying (ASK), Phase Shift Keying (PSK) not limited to energy levels like baseband encoding above Signal Demux - Time/Freq/Phase Division Mux (T/F/PDM) e.g., tv channels - signals muxed by frequency of signal Twisted Pair Cable - low bandwidth, cheap -> Cat 5 twisted pair higher quality Coax Cable - high bandwidth, og ether, too clunky replaced by Cat5 Fiber Optic Cable - huge bandwidth, unidirectional, but chromatic and modal (bounce) dispersion, expensive, multichannel via multicolor but expensive with prism to demux color channels Wireless 802.11b - broadband, requires spectrum allocation, possibly satellite, radio large passes through objects
Data Link Layer
Flags - wrap datagrams to fragment into frames, signify start and end HDLC - bit stuffing for false flags, no escapes PPP (Ethernet) - byte stuffing, with escapes Stuffing Overhead - #stuffed bits / #og bits Stuffing Efficiency - Probability of stuff = #flags / #bit combs/patterns CRC32 Mod2 Div - shift left by len(gen)-1
then long divide generator, xor only for leading 1s, if leading 0 -> move right until leading 1
Band Invariance - sender and receiver will alway be within
Throughput (bits/s) - jobs/s (usually round trip) Latency (s) - worst case time to complete 1 job 1-way propagation delay (s) - time for transmitted bit to cross link Transmission Rate (bps) - bit rate over link bits/s Pipe Size aka Bandwidth Delay Product (bits) = Transmission Rate
Restart Signal - requires ids to mitigate multi restart usually uses max frame time timer then restart - issue is must wait for timer so longer time to reboot
LAN
Ethernet - multi-access many-to-many, demux via MAC addr Strict Multiplexing (B/N) - allocate static bandwidth via TDM/FDM Stat. Mux.(B/x s.t. x < N) - allocate bandwidth based on traffic allows clients to use others’ bandwidth when low traffic CSMA/CD - Collision detection via carrier sense - stations must listen and detect collisions occurring at their station and propagate info to all stations Ethernet uses min frame size of 64 bytes = Pipe size = Trans. Rate (10 Mbps)
Wireless 802.11b
Multichannel - 12 allocated channels, 3 orthogonal channels at a time Stations can be on orthogonal channels so CD wont be detected if on diff channel RTS/CTS (MACA) - before node A transmits, send couple bytes called Request-to-Send on all channels, node B hears and calls Clear-to-Send broadcast -> node C hears and defers
Bridges/Switches
MAC Addr - 6 bytes (48 bits) Unique to device, unique to terminal (rec/send) first 3 bytes for vendor, last 3 host MSB leading 1 -> multicast IPv4 - 4 bytes (32 bits) allocated per network via DHCP Accessible IPs mapped via DNS leading 1 (or 1110
) signifies multicast Switches - 1-to-many, point to point, buffer frames if link is busy Entries in DB by looking at Src addr (up) Flood down if dest not known No loops -> tree topology Timer for buffering, timer expires -> flood all buffered frames Switch Transparency - bridges must be transparent to nodes, must appear as simple ether/cable Promiscuous Receive - Switches buffer from all stations regardless of src Flood - Forward to all stations on line, picked up by correct MAC Filtering - filter packets by ether header for forward or buffer Bridge Spanning Tree Algo - bridge ids, drop longer links to same LANs