How To Read The Book * Skim it first * Separate concepts from details * Use other sources (eg Wikipedia, RFCs, tutorials, other stds docs) * RFCs use specific language * Develop specific questions * Skim it again * Answer them All about Ethernet * One of the earlier LAN protocols * "LAN" vs "MAN" vs "WAN" * Ideas taken from earlier radio networks e.g. ALOHA * Evolution of Ethernet * Ethernet classic w. vampire taps 10Mbps * Ethernet 10BASE-2 still a bus 10Mbps * Ethernet 10BASE-T PTP hub architecture 10Mbps * Ethernet switch/bridge architecture 100Mbps * Ethernet 1Gbps * Ethernet NG 40Gps * Laboratory of basic networking ideas Ethernet Requirements * Connect computers "locally" * Zero configuration * High bandwidth / low latency * Cheap HW * Anything fast in HW * High-ish reliability Terminology and Basic Concepts * IEEE 802.3x * Protocol Data Unit ("PDU") - "Frame" * Maximum Transmission Unit ("MTU") * IEEE 802.11 (WiFi), 802.16 (WiMAX) * Giant Table of IEEE Standards (p. 82) "Manchester Encoding" * Encode with bit transitions rather than bits * Ensures minimum as well as maximum frequency * Ensures clock recovery * Burns half your bits * HW matters "CSMA/CD" * Carrier Sense Multiple Access / Collision Detect * Problem: time delay on wires * Two stations find the wire clear at once * Both transmit * Neither is received * Solution: be able to sense * Whether a packet is being transmitted * Whether your transmission is colliding * Both colliding transmitters "back off" * Random exponential backoff * Requires: Transmitters close together relative to their block size. * cf Collision Avoidance ("CSMA/CA") Ethernet frame * Diagram p. 85 o Inter-Packet Gap (12B) o Preamble (7B) o Start Frame Delimiter (1B) --- x Destination MAC address (6B) x Source MAC (6B) x Length (if < 1536) or Type thingy (2B) * Optional envelope (<= 482B) e.g. Q Tag (4B) --- * Payload - encapsulated PDU (<= 1500B, <= 1982B) --- * Pad (frame must be >= 64B) x CRC (FCS) (4B) * Carrier extension (maybe) * Sum of xs is 18B, sum of os is 20B About "MAC addresses" * http://en.wikipedia.org/wiki/MAC_address * IEEE allocation * Six bytes, usually colon-separated hex, e.g. 00:22:19:1f:de:a9 * First three bytes are vendor-specific Organizationally Unique Identifier ("OUI") * Vendors get three-byte blocks * Can get 12-bit blocks if desired * Some vendor codes correspond to * Broadcast/Multicast (byte 1 bit 0) * Locally-configured (byte 1 bit 1) * Ideally, bound to HW; can almost always override as desired Ethernet Environments * Data Center * Home / Office * Institutional (eg PSU) Wackiness * "Jumbo Frames" (9KB) and "GigE" * "VLAN" * "Bonding" / "Link Aggregation" * "Autonegotiation" * "Full Duplex" * Crossover * Wake-on-LAN, power-saving * MAC "PAUSE" * Ethernet over Power * Power over Ethernet Hubs, Bridges, Switches * "Hub": acts like a piece of wire (typically no digital functionality) * "Switch": Sends packet to all connected wires except receive wire (digital) * "Learning": Switch routes packet only to wire of destination MAC * Unlearn by (~5m) timeout, MAC from new wire * "Bridge": Learning switch, but usually w/ additional functions for dealing with non-tree topologies, tunneling, etc. Spanning Tree Protocol * "STP", "RSTP" p. 102 * Discover virtual spanning tree * Prevents routing loops * Bridges communicate with "BPDUs" * Bridges "elect" root bridge * Root bridge finds least-cost path to each other bridge * Root asks other bridges to turn off transmit on extra bridge interfaces * BPDU diagram p. 106 802.11 requirements * Work on actual "ether" (2.4GHz / 5GHz) * Act enough like Ethernet to save most of the SW stack * Cheap HW * Address security / privacy issues * High throughput / low latency 802.11 solutions * Revised LLC CSMA/CA protocol * exchanges RTS, CTS, ACK for flow control and CA * Uses 802.3-ish MAC * Adds "BSSID", "ESSID" * Cheap radios * Direct-Sequence Spread Spectrum ("DSSS") is cheap cheap * Orthogonal Frequency Division Multiplexing ("OFDM") is not too bad on modern "Software-Defined Radios" (SDRs) * 1Mbps / 11Mbps / 40-70Mbps (in 20MHz band!) * Provides standards for link-level encryption * So-called "Wired Equivalent Privacy" ("WEP") * Up to 80-bit RC4 * Symmetric-key setup * Full of holes and troubles * WiFi Protected Access ("WPA"), WPA2 * Secure block ciphers * Lots of different authentication schemes * Not perfect, but pretty good Point-to-Point Protocol * "PPP" is intended for tunneling * Original target is serial lines: no framing or other link layer there * Serial lines were running Serial Line over IP ("SLIP") directly: meant IP-only * Adds framing, PDU types, etc * Basically HDLC/SDLC, borrows SLIP framing * Wacky LCP establishment * CCP for compression * Header compression (VJ et al) * "Let's overengineer! If we thereby make things worse, we will add engineering until the situation improves!" Tunneling * Problem: Sometimes you want an "interLAN" * Link layer is missing functionality you need * Physical network goes where you want to go, but LL doesn't * Etc * Idea: Transmit link-level frame as PDU in a frame * Sender packs it up as if transmitted normally * Receiver unpacks it and sends it on as if transmitted normally * This works about as well as you might expect. Outstanding questions * Link-layer reliability? * Retransmission * ECC, FEC * Flow control * Amount of layering? Layer independence?