Networks and distributed systems1 Jinyang Li [email protected] Lec 1: Evolution of the Internet.
-
date post
15-Jan-2016 -
Category
Documents
-
view
218 -
download
0
Transcript of Networks and distributed systems1 Jinyang Li [email protected] Lec 1: Evolution of the Internet.
![Page 1: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/1.jpg)
Networks and distributed systems 1
Networks and distributed systems
Jinyang Li
Lec 1:Evolution of the Internet
![Page 2: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/2.jpg)
Networks and distributed systems 2
Know your staff
• Instructor: prof. Jinyang Li – [email protected]– Office Hour: Wed 5-6pm (715 Broadway Rm 705)
• Class webpagehttp://www.news.cs.nyu.edu/classes/fa07
• Register for class mailing list
![Page 3: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/3.jpg)
Networks and distributed systems 3
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
![Page 4: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/4.jpg)
Networks and distributed systems 4
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)
![Page 5: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/5.jpg)
Networks and distributed systems 5
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?
![Page 6: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/6.jpg)
Networks and distributed systems 6
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
![Page 7: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/7.jpg)
Networks and distributed systems 7
Questions?
• Sign up sheet
![Page 8: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/8.jpg)
Networks and distributed systems 8
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
![Page 9: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/9.jpg)
Networks and distributed systems 9
Building paths connecting wires
Switchboard Operators 1960
![Page 10: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/10.jpg)
Networks and distributed systems 10
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
![Page 11: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/11.jpg)
Networks and distributed systems 11
Packet switching
• Baran & Davies (60s)
• Packets are digital, self-contained, of limited size• Decentralized store and forward
– Networking means delivering packets to endpoints
SrcAddr
Dstaddr
pktlen
header payload
![Page 12: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/12.jpg)
Networks and distributed systems 12
An example of packet switchingH2
H1
H2 H1
H1:P4H2:P1H3:P2
1
234
H3
H1:P1H2:P2H3:P3
12
3
H2 H1
![Page 13: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/13.jpg)
Networks and distributed systems 13
ARPANET
![Page 14: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/14.jpg)
Networks and distributed systems 14
Internet: Connecting many networks
• Many packet switching networks– ARPANET, Packet radio, SATnet
• Goal: make networks work together!
• Solution: TCP/IP
Kahn &Cerf
![Page 15: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/15.jpg)
Networks and distributed systems 15
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)
![Page 16: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/16.jpg)
Networks and distributed systems 16
Alternative #2: Translation Gateway
• Translation is hard– different features/headers, N^2 combinations!– How to translate addresses?
Translationgateway
H1: ABCD
H2: 计算机
![Page 17: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/17.jpg)
Networks and distributed systems 17
3. Internet wins
• IP over everything – A uniform header / addressing format
IP router
H1: 18.26.4.9
H2: 128.122.108.71
H1,H2’s IP addrH2, GW’s low-level addrH1, GW’s
low-level addr
![Page 18: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/18.jpg)
Networks and distributed systems 18
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?
![Page 19: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/19.jpg)
Networks and distributed systems 19
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
![Page 20: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/20.jpg)
Networks and distributed systems 20
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
![Page 21: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/21.jpg)
Networks and distributed systems 21
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
![Page 22: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/22.jpg)
Networks and distributed systems 22
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. :-)
![Page 23: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/23.jpg)
Networks and distributed systems 23
“Internet” demo 1977
ARPANET
PRnet
SateNET
![Page 24: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/24.jpg)
Networks and distributed systems 24
Internet map 1987
![Page 25: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/25.jpg)
Networks and distributed systems 25
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
![Page 26: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/26.jpg)
Networks and distributed systems 26
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….
![Page 27: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/27.jpg)
Networks and distributed systems 27
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
![Page 28: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/28.jpg)
Networks and distributed systems 28
Internet design goals
1. Interconnect different networks– Packet switching– Uniform addressing and IP header
2. Robust– Route packets instead of building path– Network is state-less, forwards packets based on addr
3. Flexible– IP is best effort only– Separate TCP from IP
![Page 29: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/29.jpg)
Networks and distributed systems 29
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
![Page 30: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/30.jpg)
Networks and distributed systems 30
Internet weaknesses
• Assumes trusted participants• Assumes non-greedy sources• Security• Hard to incrementally deploy new protocols
![Page 31: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/31.jpg)
Networks and distributed systems 31
New challenges
![Page 32: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/32.jpg)
Networks and distributed systems 32
New types of networks: wireless
2007 MIT Cartel
![Page 33: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/33.jpg)
Networks and distributed systems 33
New networks: wireless mesh
![Page 34: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/34.jpg)
Networks and distributed systems 34
New networks: sensor
![Page 35: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/35.jpg)
Networks and distributed systems 35
New services
• What’s the next killer app?
![Page 36: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/36.jpg)
Networks and distributed systems 36
Battling existing woes
![Page 37: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/37.jpg)
Networks and distributed systems 37
Battling existing woes
![Page 38: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/38.jpg)
Networks and distributed systems 38
Course Syllabus
1. Core networking concepts– Naming and addressing– Routing– Managing shared resources
2. Wireless
3. Network services
4. Security
![Page 39: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/39.jpg)
Networks and distributed systems 39
Part I: Core networking concepts
Reliable transport
![Page 40: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/40.jpg)
Networks and distributed systems 40
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
![Page 41: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/41.jpg)
Networks and distributed systems 41
TCP software architecture
browser ssh
kernel
User-space
apache sshd
kernel
User-space
write read
![Page 42: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/42.jpg)
Networks and distributed systems 42
Coping with best-effort
• Challenges for a reliable transport protocol– Loss– Variable delays– Packet reordering– Duplicate packets
![Page 43: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/43.jpg)
Networks and distributed systems 43
TCP overview• Provides in-order, reliable, duplex byte-streams
• Uses cumulative ACKs
Src port
Dst port Seq # Ack #
flags
window
cksum
1461 1701 1701 1701Ack:
1:1460 1461:1700 2000:2500 2501:2800Data: 1701:1999
![Page 44: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/44.jpg)
Networks and distributed systems 44
Reliability via retransmission
• How does TCP know when to re-transmit?
• Timer driven– No ACKs for a while…
• Data driven– Many duplicate ACKs
![Page 45: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/45.jpg)
Networks and distributed systems 45
Timer-driven retransmission
• What is the ideal time to retransmit?
• What if we literally use RTT as timeout?
![Page 46: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/46.jpg)
Networks and distributed systems 46
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
![Page 47: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/47.jpg)
Networks and distributed systems 47
An example RTT distribution
Avg: 99.2msStd: 1.4ms
![Page 48: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/48.jpg)
Networks and distributed systems 48
TCP timers
• What if a retransmission times out?– Exponential back off
• TCP timeouts are extremely conservative– Granularity of 500ms or 200ms
![Page 49: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/49.jpg)
Networks and distributed systems 49
Fast retransmit
• If a segment is lost, duplicate ACKs result
• TCP retransmit upon seeing 3 duplicate ACKs
1:1460 1461:1700 2000:2500 2501:2800Data: 1701:1999
1461 1701 1701 1701Ack:
![Page 50: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/50.jpg)
Networks and distributed systems 50
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
![Page 51: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/51.jpg)
Networks and distributed systems 51
Fast Recovery
• How should sender change its congestion window due to loss?– Unchanged?– Set to 1?– Half ?
![Page 52: Networks and distributed systems1 Jinyang Li Jinyang@cs.nyu.edu Lec 1: Evolution of the Internet.](https://reader035.fdocument.pub/reader035/viewer/2022062409/56649d795503460f94a5bd4f/html5/thumbnails/52.jpg)
Networks and distributed systems 52
Is TCP good for all applications?
• TCP imposes high delay for retransmitted packets
• TCP enforces in-order delivery