introduction
play

Introduction 1989: a bug in the Internets core routing algorithm - PowerPoint PPT Presentation

Preliminaries Syllabus and lecture slides on web site Welcome to COS 461 assume youll keep up with the reading Computer Networks Send me an e-mail name, year, preferred email address jpeg image of yourself Larry


  1. Preliminaries • Syllabus and lecture slides on web site Welcome to COS 461 – assume you’ll keep up with the reading Computer Networks • Send me an e-mail – name, year, preferred email address – jpeg image of yourself Larry Peterson • Subscribe to cos461@lists.cs.princeton.edu • Computer lab: Friend 010 (Fishbowl) – you’ll have root access Spring 2005 CS 461 1 Spring 2005 CS 461 2 Brief History Lesson Introduction • 1989: a bug in the Internet’s core routing algorithm inconvenienced a few thousand researchers Outline • 2003: SQL slammer grounded commercial airline Statistical Multiplexing flights, brought down thousands of ATMs, and in Inter-Process Communication the end, caused an estimated $1B of damage Network Architecture Performance Metrics Implementation Issues Spring 2005 CS 461 3 Spring 2005 CS 461 4

  2. Building Blocks Switched Networks • A network can be defined recursively as... • Nodes: PC, special-purpose hardware… – two or more nodes – two or more networks – hosts connected by a link, or connected by a node – switches • Links: coax cable, optical fiber… – point-to-point – multiple access … Spring 2005 CS 461 5 Spring 2005 CS 461 6 Strategies Addressing and Routing • Circuit switching: carry bit streams • Address: byte-string that identifies a node – original telephone network – usually unique • Routing: process of forwarding messages to the • Packet switching: store-and-forward messages destination node based on its address – Internet • Types of addresses – unicast: node-specific – broadcast: all nodes on the network – multicast: some subset of nodes on the network Spring 2005 CS 461 7 Spring 2005 CS 461 8

  3. Multiplexing Statistical Multiplexing • On-demand time-division • Time-Division Multiplexing (TDM) • Schedule link on a per- packet basis • Frequency-Division Multiplexing (FDM) • Packets from different sources interleaved on link • Buffer packets that are contending for the link • Buffer (queue) overflow is called congestion L1 R1 R2 L2 _ _ _ Switch 1 Switch 2 R3 L3 Spring 2005 CS 461 9 Spring 2005 CS 461 10 Inter-Process Communication IPC Abstractions • Turn host-to-host connectivity into process-to-process • Stream-Based • Request/Reply communication. – video: sequence of frames – distributed file systems • Fill gap between what applications expect and what the • 1/4 NTSC = 352 x 240 pixels – digital libraries (web) underlying technology provides. • (352 x 240 x 24)/8=247.5KB Host • 30 fps = 7500KBps = 60Mbps Host Application – video applications • on-demand video Channel • video conferencing Host Application Host Host Spring 2005 CS 461 11 Spring 2005 CS 461 12

  4. Layering What Goes Wrong in the Network? • Use abstractions to hide complexity • Bit-level errors (electrical interference) • Abstraction naturally lead to layering • Packet-level errors (congestion) • Alternative abstractions at each layer • Link and node failures Application programs Request/reply Message stream • Packets are delayed channel channel • Packets are deliver out-of-order Host-to-host connectivity • Third parties eavesdrop Hardware Spring 2005 CS 461 13 Spring 2005 CS 461 14 Interfaces Protocols Host 1 Host 2 • Building blocks of a network architecture • Each protocol object has two different interfaces Service – service interface : operations on this protocol High-level High-level interface object object – peer-to-peer interface : messages exchanged with peer • Term “protocol” is overloaded – specification of peer-to-peer interface Protocol Protocol Peer-to-peer – module that implements this interface interface Spring 2005 CS 461 15 Spring 2005 CS 461 16

  5. Machinery (cont) Protocol Machinery • Multiplexing and Demultiplexing (demux key) • Protocol Graph • Encapsulation (header/body) – most peer-to-peer communication is indirect – peer-to-peer is direct only at hardware level Host Host Host 1 Host 2 Application Application Application Application program program program program Digital Digital Video File Video File library library Data Data application application application application application application RRP RRP RRP Data RRP Data HHP HHP HHP RRP Data Spring 2005 CS 461 17 Spring 2005 CS 461 18 Internet Architecture ISO Architecture • Defined by Internet Engineering Task Force (IETF) End host End host • Hourglass Design Application Application • Application vs Application Protocol (FTP, HTTP) Presentation Presentation Session Session FTP HTTP NV TFTP Transport Transport Network Network Network Network UDP TCP Data link Data link Data link Data link Physical Physical Physical Physical IP One or more nodes within the network _ _ _ NET 1 NET 2 NET n Spring 2005 CS 461 19 Spring 2005 CS 461 20

  6. Performance Metrics Bandwidth versus Latency • Bandwidth (throughput) • Relative importance – data transmitted per time unit – 1-byte: 1ms vs 100ms dominates 1Mbps vs 100Mbps – link versus end-to-end – notation – 25MB: 1Mbps vs 100Mbps dominates 1ms vs 100ms • KB = 2 10 bytes • Mbps = 10 6 bits per second • Infinite bandwidth • Latency (delay) – RTT dominates – time to send message from point A to point B – one-way versus round-trip time (RTT) • Throughput = TransferSize / TransferTime – components • TransferTime = RTT + 1/Bandwidth x TransferSize Latency = Propagation + Transmit + Queue – 1-MB file to 1-Gbps link as 1-KB packet to 1-Mbps link Propagation = Distance / c Transmit = Size / Bandwidth Spring 2005 CS 461 21 Spring 2005 CS 461 22 Delay x Bandwidth Product Socket API • Creating a socket • Amount of data “in flight” or “in the pipe” int socket(int domain, int type, int protocol) • Usually relative to RTT • domain = PF_INET, PF_UNIX • type = SOCK_STREAM, SOCK_DGRAM, • Example: 100ms x 45Mbps = 560KB SOCK_RAW Delay • Passive Open (on server) int bind(int socket, struct sockaddr *addr, int addr_len) Bandwidth int listen(int socket, int backlog) int accept(int socket, struct sockaddr *addr, int addr_len) Spring 2005 CS 461 23 Spring 2005 CS 461 24

  7. Sockets (cont) Protocol-to-Protocol Interface • Active Open (on client) • Configure multiple layers – static versus extensible int connect(int socket, struct sockaddr *addr, int addr_len) • Process Model – avoid context switches • Sending/Receiving Messages int send(int socket, char *msg, int mlen, int flags) • Buffer Model int recv(int socket, char *buf, int blen, int flags) – avoid data copies Spring 2005 CS 461 25 Spring 2005 CS 461 26

Recommend


More recommend