520 likes | 616 Views
Networks and distributed systems. Lec 1: Evolution of the Internet. Jinyang Li Jinyang@cs.nyu.edu. Know your staff. Instructor: prof. Jinyang Li jinyang@cs.nyu.edu Office Hour: Wed 5-6pm (715 Broadway Rm 705) Class webpage http://www.news.cs.nyu.edu/classes/fa07
E N D
Networks and distributed systems Lec 1:Evolution of the Internet Jinyang Li Jinyang@cs.nyu.edu Networks and distributed systems
Know your staff • Instructor: prof. Jinyang Li • jinyang@cs.nyu.edu • Office Hour: Wed 5-6pm (715 Broadway Rm 705) • Class webpage http://www.news.cs.nyu.edu/classes/fa07 • Register for class mailing list Networks and distributed systems
The course will teach you … • to appreciate design principles of the Internet • How it works and why it works • to address new networking challenges • How to do independent research Networks and distributed systems
Who should take this class? • Core grad-level class • Satisfy M.S. requirement of a “project” class • Satisfy Ph.D. breadth requirement • Pre-requisite: • Basic knowledge on networks • Programming experience • Useful books: • Computer networks (Peterson & Davie) • TCP/IP illustrated (Stevens) Networks and distributed systems
Class material • Lectures/readings • Read assigned research papers before class • Participate in class discussion • Assignments • Solve concrete problems, get your hands dirty! • Projects • Can you identify and tackle a challenge with guidance? Networks and distributed systems
Grading • Participation 20% • two in-class mini-quiz on “readings du jour” • Two take home assignments 20% • Project 60% • Teams of 2-3 people • Starting new week • Bi-weekly meetings with me Networks and distributed systems
Questions? • Sign up sheet Networks and distributed systems
A brief history of communication • Telephone networks • Dial to set up a path • Paths carry analog voice signals from one phone to another • Networking means building paths Networks and distributed systems
Building paths connecting wires Switchboard Operators 1960 Networks and distributed systems
The quest for a survivable network • Sputnik --> ARPA --> survivable networks • Telephone network is not survivable • Destroy of a switching center is highly disruptive • Not possible to build reliable paths under attacks Networks and distributed systems
pkt len Src Addr Dst addr header payload Packet switching • Baran & Davies (60s) • Packets are digital, self-contained, of limited size • Decentralized store and forward • Networking means delivering packets to endpoints Networks and distributed systems
H2 H1 H2 H1 An example of packet switching H2 H1:P4 H2:P1 H3:P2 1 2 4 3 H1 H3 2 1 3 H1:P1 H2:P2 H3:P3 Networks and distributed systems
ARPANET Networks and distributed systems
Internet: Connecting many networks • Many packet switching networks • ARPANET, Packet radio, SATnet • Goal: make networks work together! • Solution: TCP/IP Kahn &Cerf Networks and distributed systems
Alternative #1: single technology, single network • Render existing networks/apps useless • Does not accommodate new technology • Hard for decentralized control • (early phone network is like this) Networks and distributed systems
Alternative #2: Translation Gateway H1: ABCD H2: 计算机 • Translation is hard • different features/headers, N^2 combinations! • How to translate addresses? Translation gateway Networks and distributed systems
H1,H2’s IP addr H2, GW’s low-level addr H1, GW’s low-level addr 3. Internet wins H2: 128.122.108.71 H1: 18.26.4.9 • IP over everything • A uniform header / addressing format IP router Networks and distributed systems
Internet design challenges • How to address networks and hosts? • Address size? Resolve IP addr to subnet addr? • How to compute route and forward packets? • How to reliably deliver packets? • Error recovery • Flow control • How to cope with different max packet size? Networks and distributed systems
Addressing scheme • Early 80s: • 32-bit globally unique IP address • 8 bit net number, 24 bit host number • Embed subnet address to low 24 bit • Now: 32-bit • Variable length net number (CIDR) • Address resolution protocol (ARP) to obtain • subnet addr (MAC addr) from IP Networks and distributed systems
Routing • Early 80s: • 256-entry routing table, indexed by top 8 bits of addr • Static default g/w • Now: • Intra-domain routing: OSPF, RIP • Inter-domain routing: BGP • approx. 250,000 BPG entries now Networks and distributed systems
Reliable delivery • Early 80s • IP is best-effort only • TCP ran at end hosts for error/flow control • Now: • IP is best effort only • TCP is separated from IP • TCP performs both error and congestion control Networks and distributed systems
Packet size policy • Early 80s: • Senders only know local net’s MTU • G/Ws fragment large packets into smaller MTUS • End hosts reassembles fragments • Now: same. :-) Networks and distributed systems
“Internet” demo 1977 ARPANET PRnet SateNET Networks and distributed systems
Internet map 1987 Networks and distributed systems
Why TCP/IP wins? • Universal • IP-over-everything • Best effort only • End-to-end design • Robust • Soft-state only inside network • Fate sharing • Be liberal in what you accept; be conservative in what you send Networks and distributed systems
Internet’s growing stage • 1978 TCP/IP split • 1984 Domain name system • 1986 Incorporating congestion control in TCP • 1990 ARPANET disappears, first ISP is born • Nodes double every year…. Networks and distributed systems
The revolution, good and bad • Email 1971 • Apple II 1977, IBM PC 1981 • Web 1990 • VoIP, File sharing, Video streaming, Web 2.0 • Worms 1988, viruses • DoS attacks • Spam Networks and distributed systems
Internet design goals • Interconnect different networks • Packet switching • Uniform addressing and IP header • Robust • Route packets instead of building path • Network is state-less, forwards packets based on addr • Flexible • IP is best effort only • Separate TCP from IP Networks and distributed systems
The more problematic goals 4. Decentralization • Routing across multiple admin domains is still error-prone 5. Cheap and easy to attach new nodes • Cumbersome to attach new devices, move existing ones around 6. Accountability Networks and distributed systems
Internet weaknesses • Assumes trusted participants • Assumes non-greedy sources • Security • Hard to incrementally deploy new protocols Networks and distributed systems
New challenges Networks and distributed systems
New types of networks: wireless • 2007 MIT Cartel Networks and distributed systems
New networks: wireless mesh Networks and distributed systems
New networks: sensor Networks and distributed systems
New services • What’s the next killer app? Networks and distributed systems
Battling existing woes Networks and distributed systems
Battling existing woes Networks and distributed systems
Course Syllabus • Core networking concepts • Naming and addressing • Routing • Managing shared resources • Wireless • Network services • Security Networks and distributed systems
Part I: Core networking concepts Reliable transport Networks and distributed systems
Coping with best-effort • Why don’t applications use IP directly? • IP is a host-to-host protocol • Many applications want reliable, in-order delivery Networks and distributed systems
sshd browser ssh apache write read TCP software architecture User-space User-space kernel kernel Networks and distributed systems
Coping with best-effort • Challenges for a reliable transport protocol • Loss • Variable delays • Packet reordering • Duplicate packets Networks and distributed systems
Src port Dst port Seq # Ack # flags window cksum Data: 1:1460 1461:1700 1701:1999 2000:2500 2501:2800 1701 Ack: 1701 1461 1701 TCP overview • Provides in-order, reliable, duplex byte-streams • Uses cumulative ACKs Networks and distributed systems
Reliability via retransmission • How does TCP know when to re-transmit? • Timer driven • No ACKs for a while… • Data driven • Many duplicate ACKs Networks and distributed systems
Timer-driven retransmission • What is the ideal time to retransmit? • What if we literally use RTT as timeout? Networks and distributed systems
Timer-driven retransmission • Calculate running average of RTT • EWMA: srtt = * r + (1 - ) * srtt • Set timeout (RTO) • Used to use RTO = 2 * srtt • Now: RTO = srtt + 4 * rttdev rttdev = * |r-srtt| + (1- ) * rttdev Networks and distributed systems
An example RTT distribution Avg: 99.2ms Std: 1.4ms Networks and distributed systems
TCP timers • What if a retransmission times out? • Exponential back off • TCP timeouts are extremely conservative • Granularity of 500ms or 200ms Networks and distributed systems
Data: 1:1460 1461:1700 1701:1999 2000:2500 2501:2800 1701 Ack: 1701 1461 1701 Fast retransmit • If a segment is lost, duplicate ACKs result • TCP retransmit upon seeing 3 duplicate ACKs Networks and distributed systems
Fast retransmit • What would trick fast retransmit into spurious retransmission? • When would fast retransmit fail to avoid timeout? • Loss of a re-sent packet • Multiple losses in a window Networks and distributed systems