Comp 343/443 Fall 2008, 25EP-602, 4:15-6:45 Week 2 bandwidth v delay IP/UDP/TCP overview continued 2.1-2.4 sliding windows READ: 1.5, 2.1-2.5, 2.6 (next week) 1.5: bandwidth v delay (esp propagation delay) delay: propagation + bandwidth (transmit) + queue basic diagrams one packet through a switch (done) two smaller packets through a switch three smaller packets through a switch (prop delay >> bandwidth delay) case implications for protocols: bandwidth-limited: easy to design for; extra RTTs don't cost much delay-limited, eg to moon (0.3 sec RTT), jupiter (1 hour RTT) cross-continental us roundtrip delay: ~100ms. At 1.0 Mbit, this is 10K or so. At 1.0 Gbit, this is 10,000K. 100 RTTs v 101 RTTs: not significant 1 RTT v 2 RTTs: very significant Latency = propagation + transmit (bandwidth) + queue Propagation = Distance / speed_of_light Transmit = Size / Bandwidth Usually, to good approximation most of the delay is propagation, and so latency and bandwidth are effectively independent. Note that when propagation delay is small, though, the two are interrelated. Delay x Bandwidth (usually RTT delay), and pipe size 1 ms x 10 mbps = 1200 bytes ~ 1 packet 100 ms x 1.5mbps = 20 K 100 ms x 600 mbps = 8 MB! ================================================= IP: Administratively assigned addresses Net/host portion IP delivers to destination NETWORK; That network must correspond to a physical LAN that can complete the delivery CLASSIC IP: classes A, B, C (deprecated) IP header v Ethernet header (ignore fields of IP header for now) What an IP ROUTER does Extraction of Dest_net Routing tables Routing table size No b'cast (well, sort of) best-effort delivery Example of delivery through a router Class A, B, C rules: how to separate A_net and A_host Larger routing table? IP routing algorithm: decide if you connect to dest network No: forward to next router Yes: use LAN to deliver Significance of administrative assignment compare to Ethernet switch, with per-host forwarding table Goal of smaller routing tables Two benefits to IP: 1. allows interconnection ("internetworking") of incompatible LANs 2. routing strategy is SCALABLE: works well with very large Internet UDP User Datagram Protocol very simple extension to IP; basically just adds PORT NUMBERS for application-level multiplexing Socket = Everything sent to a socket is delivered to the same place demo of stalkc, stalks (later) demo with two clients TCP Adds: stream-oriented connection: no application packetization reliability port-number mulitplexing like UDP Also: uses sliding-windows to keep max traffic en route at any one time Adapts sliding-windows to manage congestion You connect TO a socket = Everything sent ON THAT CONNECTION goes to same place. doesn't received directly; only "connected_sockets" receive TCP (with windows, retransmission) connection-oriented stream-oriented reliability: timeout & retransmission sliding windows congestion? ================================================== Chapter 2 Direct links: Read 2.1: basic ideas "as a network node, a workstation runs at memory speeds, not CPU speeds" encoding and framing: encoding: recognizing byte boundaries framing: recognizing packet boundaries These are related, though not the same. 2.2: NRZ. Problem with NRZ. Manchester and 4B/5B NRZ: 0=lo, 1=hi NRZI: 0=notransition, 1=transition Manchester: add clock pulse between each 0/1 4b/5b: each 5-bit code has max 1 leading 0, 2 trailing 0's. Send with NRZI, so runs of 1's are ok. 0000 11110 0001 01001 0010 10100 0011 10101 .. 1100 11010 1101 11011 1110 11100 1111 11101 IDLE 11111 DEAD 00000 HALT 00100 2.3: basics of framing (on a dedicated serial link): Ethernet (interpacket gaps) char stuffing: SYN SOH header STX data ETX escape char is DLE; stuffed as prefix to ETX,DLE in data 4b/5b and special bit patterns hdlc (typical bit-oriented) bisync (typical byte-oriented framing) End of packet is flagged with ETX Any ETX in body is "escaped" with an extra DLE char Any DLE in body is also escaped with an extra DLE Like C/Java quoted strings: " and \ in body are each escaped with \ sonet (clock-based) starts at STS-1, 9x90, 1st 3 bytes of each *row* is frame header scrambling: sent as frame XOR std_random_pattern sts-3 = 3 sts-1 frames, 9x270 frames can float frame re-synchronization need for accuracy in sending voice bytes at 8000/sec STS-1 STM-0 51.84 Mbps = 810 bytes/frame * 8 bits/byte * 8000 frames/sec STS-3 STM-1 OC-3 STS-12 STM-4 622.08Mbps STS-48 STM-12 =======================================================