06/04/17
Welcome! Opera ng Systems and Networks • Brief introduc on of lecturer and TAs – Adrian Perrig, Professor in Department of Computer Science, Director of Network Security Group – Teaching assistants: Tae-Ho Lee, Chris Pappas, Laurent Chuat Networks Part 1: Introduc on – Network security group research area: design and implementa on of secure future Internet architecture (SCION project h p://www.scion- architecture.net) Adrian Perrig Network Security Group ETH Zürich
2
Course Structure Lecture Style
• Lectures • Student interac on is encouraged! • Homework – Please ask ques ons if something is unclear • Exercise sessions – Please point out any errors that you spot – • Quizzes Please focus on lecture instead of Facebook, Twi er, etc. • Please turn off your phone and other devices during class
3 4
Minds open…
… Laptops closed and cell phones / ipads off
6
1 06/04/17
Textbook and Slide Credit Problems with Being Online During Class • Textbook: TANENBAUM, ANDREW S.; WETHERALL, DAVID J., COMPUTER NETWORKS, 5th Edi on, 2011. • It takes the mind a few minutes to reach a state of deep • Slides adapted from slide deck by David Wetherall concentra on • Lecture video at: h p://media.pearsoncmg.com/ph/streaming/esm/ – Reaching deep concentra on needs to be trained, many people tanenbaum5e_videonotes/tanenbaum_videoNotes.html have lost this ability due to constant / frequent interrup ons • Knowing that one cannot be interrupted increases concentra on. Said another way: Expecta on of interrup on prevents deep concentra on – Try to be off-line when studying networking! • Open laptop / iPad / cell phone used for surfing can also disrupt / interrupt people si ng behind you
7
Highly Recommended as Reference Also recommended • Larry L. Peterson and Bruce S. • Kevin R. Fall and W. Davie: Richard Stevens: “Computer Networks: A Systems Approach” “TCP/IP Illustrated, • 5th Edi on Volume 1: The Protocols” • 2nd Edi on, 2011
9
Also recommended Study Recommenda ons Computer Networking: A Top-Down Approach: Kurose and Ross • Make list of acronyms, concepts 5th Edi on • Read corresponding sec ons in text book – Available in INFK library • Par cipate in exercise sessions, solve homework, Srinivasan Keshav: and DO THE PROJECTS! An Engineering Approach to Computer
11 Networking 12
2 06/04/17
Quizzes Final Grade • Extra credit!!! • 5 Quizzes in total • Exercises are op onal – during lecture (at the beginning or end) – but highly recommended to do them – 10 minutes max. – not announced at the previous lecture • Quizzes do not harm your grade – about the previously taught set of lecture slides – highly recommended to a end class • Each quiz 1 point: • Networking grade = exam grade + quiz grade – 0.2 points for par cipa on • Final grade = average( Networking grade, OS grade ) – 4 ques ons x 0.2 points
13 14
Focus of the course Focus of the course (2) • Three “networking” topics:
Distributed systems ??? Networking Communica ons
• We mainly study the Networking aspects
15 16
The Main Point Why learn about the Internet?
1. To learn how the Internet works 1. Curiosity – What really happens when you “browse the web”? – What are TCP/IP, DNS, HTTP, NAT, VPNs, 802.11 etc. 2. Understand how the system works we’re spending anyway? most of our me with – Interes ng sta s c: we’re spending more me online 2. To learn the fundamentals of computer networks than sleeping! 3. Impact on our world 4. Job prospects!
17 18
3 06/04/17
From this experimental network … To this! ARPANET ~1970 Internet ~2005 • An everyday ins tu on used at work, home, and on-the-go • Visualiza on contains (a) Dec. 1969. (b) July 1970. (c) March 1971. millions of links
A ribu on: By The Opte Project [CC-BY-2.5], via Wikimedia Commons
19 20
Internet – Societal Impact Internet – Economic impact
• An enabler of societal change • An engine of economic growth – Easy access to knowledge – Adver sing-sponsored search – Electronic commerce – Online stores – Personal rela onships – Online marketplaces – Discussion without censorship – Crowdsourcing
21 22
The Main Point (2) Why learn the Fundamentals? 1. To learn how the Internet works 1. Apply to all computer networks 2. To learn the fundamentals of computer 2. Intellectual interest networks
– What hard problems must they solve? 3. Change / reinven on – What design strategies have proven valuable? 4. Pass this course :-)
23 24
4 06/04/17
Fundamentals – Intellectual Interest Fundamentals – Intellectual Interest (2) • Example key problem: Reliability! Key problem Example solu ons – Any part of the Internet might fail Reliability despite Codes for error detec on/correc on (§3.2, 3.3) – Messages might be corrupted failures Rou ng around failures (§5.2) – How to create a reliable network out of unreliable Network growth Addressing (§5.6) and naming (§7.1) components? and evolu on Protocol layering (§1.3) Alloca on of resources Mul ple access (§4.2) • Reliability solu ons like bandwidth Conges on control (§5.3, 6.3) – Codes to detect/correct errors Security against Confiden ality of messages (§8.2, 8.6) – Rou ng around failures ... various threats Authen ca on of communica ng par es (§8.7)
25 26
Fundamentals – Reinven on Fundamentals – Reinven on (2) • The Internet is constantly being re-invented! • Currently around – Growth over me and technology trends drive 1.1 billion upheavals in Internet design and usage Internet hosts … • Today’s Internet is different from yesterday’s – And tomorrow’s will be different again – But the fundamentals remain the same
27 28
Fundamentals – Reinven on (3) Not a Course Goal • Examples of upheavals in the past 1-2 decades • To learn IT job skills Growth / Tech Driver Upheaval – Emergence of the web Content Distribu on Networks How to configure equipment Digital songs/videos Peer-to-peer file sharing • E.g., Cisco cer fica ons Falling cost/bit Voice-over-IP calling – But course material is relevant, and we use hands-on Many Internet hosts IPv6 tools Wireless advances Mobile devices
29 30
5 06/04/17
Example Uses of Networks Example Uses of Networks • Work: • Work: – Email, file sharing, prin ng, … – Email, file sharing, prin ng, … • Home: • Home: – Movies / songs, news, calls / video / messaging, e- – Movies / songs, news, calls / video / messaging, e- commerce, … commerce, … What do these uses tell us about • Mobile: • Mobile: why we build networks? – Calls / texts, games, videos, maps, informa on access … – Calls / texts, games, videos, maps, informa on access …
31 32
For User Communica on For Resource Sharing • • From the telephone onwards: Many users may access the same underlying resource – VoIP (voice-over-IP) – E.g., 3D printer, search index, machines in the cloud – Video conferencing → More cost effec ve than dedicated resources per user – Instant messaging – – Social networking Even network links are shared via sta s cal mul plexing →Enables remote communica on – Need low latency for interac vity
33 34
Sta s cal Mul plexing Sta s cal Mul plexing (2)
• Sharing of network bandwidth between users according • Example: Users in an ISP network 5 to the sta s cs of their demand . . . – Network has 100 Mbps (units of bandwidth) 100 ISP – (Mul plexing just means sharing) – Each user subscribes to 5 Mbps, for videos 5 – – Useful because users are mostly idle and their traffic is bursty But a user is ac ve only 50% of the me … 5
• How many users can the ISP support? • Key ques on: – With dedicated bandwidth for each user: – How much does it help? – Probability all bandwidth is used: (assuming independent users)
35 36
6 06/04/17
Sta s cal Mul plexing (3) For Content Delivery • With 30 independent users, s ll unlikely (2% chance) to • Same content is delivered to many users need more than 100 Mbps! – Binomial probabili es – Videos (large), songs, apps and upgrades, web pages, … → Can serve more users with the same size network – Sta s cal mul plexing gain is →More efficient than sending a copy all the way to 30/20 or 1.5X each user – But may get unlucky; users will have degraded service – Uses replicas in the network
37 38
Content Delivery (2) Content Delivery (3)
• Sending content from the source to 4 users takes 4 x 3 = • But sending content via replicas takes only 4 + 2 = 6 12 “network hops” in the example “network hops”
User User
...... Source Source Replica User User
39 40
For Computer Communica on To Connect Computers to the Physical World
• To let computers interact with other computers • For gathering sensor data, and for manipula ng the – E.g., e-commerce, backup, cloud compu ng world – E.g., webcams, loca on on mobile phones, door locks, … → Enables automated informa on processing across different par es • This is a rich, emerging usage (IoT: Internet of Things)
41 42
7 06/04/17
The Value of Connec vity The Value of Connec vity (2) • “Metcalfe’s Law” ~1980: Bob Metcalfe • Example: both sides have 12 nodes, but the le network – The value of a network of N nodes is has more connec vity propor onal to N2 – Large networks are rela vely more valuable than small ones vs +
66 connec ons 15 connec ons 15 connec ons : © 2009 IEEE 43 44
Parts of a Network Component Names
Component Func on Example applica on Applica on, or app, user Uses the network Skype, iTunes, Amazon Host, or end-system, edge Supports apps Laptop, mobile, desktop device, node, source, sink Router, or switch, node, Relays messages Access point, cable/DSL router hub, intermediate system between links modem host link Link, or channel Connects nodes Wires, wireless
45 46
Types of Links Wireless Links • Message is broadcast • Full-duplex – Received by all nodes in range – Bidirec onal – Not a good fit with our model • Half-duplex – Bidirec onal
• Simplex – unidirec onal
47 48
8 06/04/17
Wireless Links (2) A Small Network
• O en show logical links • Connect a couple of computers – Not all possible connec vity
• Next, a large network …
49 50
Example Networks
• Commonly known by type of technology or their purpose
• [see how many you can give]
Source: Internet2 52
Example Networks (2) Network names by scale • WiFi (802.11) Scale Type Example • Enterprise / Ethernet • ISP (Internet Service Provider) Vicinity PAN (Personal Area Network) Bluetooth (e.g., headset) • Cable / DSL Building LAN (Local Area Network) WiFi, Ethernet • Mobile phone / cellular (2G, 3G, 4G) City MAN (Metropolitan Area Network) Cable, DSL • Bluetooth Country WAN (Wide Area Network) Large ISP • Telephone Planet The Internet (network of all networks) The Internet! • VANET • Satellite ...
53 54
9 06/04/17
Internetworks Network Boundaries
• An internetwork, or internet, is what you get when you • What part is the “network”? join networks together – Just another network app • The Internet (capital “I”) is the internet we all use router host link
55 56
Network Boundaries (2) Key Interfaces • Between (1) apps and network, and (2) network • Cloud as a generic network components – More formal treatment later on app app
router host link
host
57 58
Key Interfaces (2) Key Interfaces (3) 1. Network-applica on interfaces define how apps use 2. Network-network interfaces define how nodes work the network together – Sockets are widely used in prac ce – Traceroute can peek inside the network
app app
host host
59 60
10 06/04/17
Network Service API Hides Details Traceroute Van Jacobson • Apps talk to other apps with no real idea of what is • Widely used command-line tool to inside the network let hosts peek inside the network – This is good! But you may be curious … – On all OSes (tracert on Windows) – Developed by Van Jacobson ~1987 app app – Uses a network-network interface (IP) in ways we will explain later ???
host host : Credit: Wikipedia (public domain)
61 62
Traceroute (2) Traceroute (3) • Probes successive hops to find network path
...... 1 hop 2 hops 3 hops N-1 hops N hops Local Local Remote Remote Host Host Host Host
63 64
Using Traceroute Using Traceroute (2) • ISP names and places are educated guesses
Home tde Telefonica Level3 pnw-gigapop UW 1 hop 3 hops 4 hops 6 hops 1 hop 3 hops
. . .
100 ms UW 180 ms >200 ms My computer NYC San Jose Sea le www.uw.edu (www1.cac.washington.edu)
65 66
11 06/04/17
Recently, some strange paths observed Networks Need Modularity (§1.3)
• h p://research.dyn.com/2013/11/mitm-internet-hijacking/ • The network does much for apps: – Make and break connec ons – Find a path through the network We need a form of – Transfers informa on reliably – Transfers arbitrary length informa on modularity, to help – Send as fast as the network allows manage complexity – Shares bandwidth among users – Secures informa on in transit and support reuse – Lets many new hosts be added – …
67 68
Protocols and Layers Protocols and Layers (2)
• Protocols and layering is the main structuring method • Protocols are horizontal, layers are ver cal
used to divide up network func onality Instance of Peer Protocol X – Each instance of a protocol talks virtually to its peer using the protocol X X X instance protocol Service provided – Each instance of a protocol uses only the services of the lower Lower layer by Protocol Y instance (of layer protocol Y) Y Y
Node 1 Node 2
69 70
Protocols and Layers (3) Protocols and Layers (4) • Set of protocols in use is called a protocol stack • Protocols you’ve probably heard of: – TCP, IP, 802.11, Ethernet, HTTP, SSL, DNS, … and many more • An example protocol stack – Used by a web browser on a host that is wirelessly connected to the Internet
71 72
12 06/04/17
Protocols and Layers (5) Encapsula on
• Protocols you’ve probably heard of: Browser • Encapsula on is the mechanism used to effect protocol – TCP, IP, 802.11, Ethernet, HTTP, SSL, DNS, layering … and many more HTTP – Lower layer wraps higher layer content, adding its own • An example protocol stack TCP informa on to make a new message for delivery – Like sending a le er in an envelope; postal service doesn’t – Used by a web browser on a host that is IP wirelessly connected to the Internet look inside 802.11
73 74
Encapsula on (2) Encapsula on (3)
• Message “on the wire” begins to look like an onion HTTP HTTP HTTP HTTP – Lower layers are outermost TCP HTTP TCP TCP TCP HTTP HTTP HTTP IP TCP HTTP IP IP IP TCP HTTP TCP HTTP TCP 802.11 IP TCP HTTP 802.11 802.11 802.11 IP TCP HTTP IP TCP HTTP IP (network)
802.11 IP TCP HTTP 802.11 802.11 IP TCP HTTP
75 76
Encapsula on (4) Demul plexing • Normally draw message like this: • Incoming message must be passed to the protocols that – Each layer adds its own header it uses
802.11 IP TCP HTTP SMTP HTTP DNS
First bits on the wire Last bits TCP UDP
• More involved in prac ce IP ARP – Trailers as well as headers, encrypt/compress contents – Segmenta on (divide long message) and reassembly Ethernet ??
77 78
13 06/04/17
Demul plexing (2) Advantage of Layering • Done with demul plexing keys in the headers • Informa on hiding and reuse
SMTP HTTP DNS Browser Server Browser Server
TCP port number TCP UDP HTTP HTTP HTTP HTTP
IP protocol field TCP TCP TCP TCP IP ARP or IP IP IP IP Ethertype value Ethernet Incoming Host message 802.11 802.11 Ethernet Ethernet Ethernet IP TCP HTTP
79 80
Advantage of Layering (2) Advantage of Layering () • Using informa on hiding to connect different systems • Using informa on hiding to connect different systems Browser Server Browser Server HTTP IP TCP HTTP HTTP HTTP HTTP TCP TCP TCP TCP IP IP IP IP IP IP 802.11 802.11 Ethernet Ethernet 802.11 Ethernet 802.11 IP TCP HTTP Ethernet IP TCP HTTP
81 82
Disadvantage of Layering A Li le Guidance Please … (§1.4, §1.6)
• Adds overhead • What func onality should we implement at which – But minor for long messages layer? • Hides informa on – This is a key design ques on – App might care whether it is running over wired or wireless! – Reference models provide frameworks to guide us
83 84
14 06/04/17
OSI “7 layer” Reference Model Internet Reference Model • A principled, interna onal standard, to connect systems • A four layer model based on experience; omits some – Influen al, but not used in prac ce. (Woops) OSI layers and uses IP as the network layer. – Provides func ons needed by users – Converts different data representa ons Applica on – Programs that use network service
– Manages task dialogs Transport – Provides end-to-end data delivery – Provides end-to-end delivery Internet – Send packets over mul ple networks – Sends packets over mul ple links – Sends frames of informa on Link – Send frames over a link – Sends bits as signals
85 86
Internet Reference Model (2) Internet Reference Model (3) • With examples of common protocols in each layer • IP is the “narrow waist” of the Internet – Supports many different links below and apps above 7 Applica on 7 Applica on SMTP HTTP RTP DNS 4 Transport 4 Transport TCP UDP 3 Internet 3 Internet IP
2/1 Link 2/1 Link Ethernet 3G Cable DSL 802.11
87 88
Standards Bodies Layer-based Names • Where all the protocols come from! – Focus is on interoperability • For units of data: Layer Unit of Data Body Area Examples ITU Telecom G.992, ADSL, H.264, MPEG4 Applica on Message IEEE Communica ons 802.3, Ethernet, 802.11, WiFi Transport Segment IETF Internet RFC 2616, HTTP/1.1 Network Packet RFC 1034/1035, DNS Link Frame W3C Web HTML5 standard Physical Bit CSS standard
89 90
15 06/04/17
Layer-based Names (2) Layer-based Names (3) • For devices in the network: • For devices in the network:
App App Repeater (or hub) Physical Physical Proxy or Transport Transport middlebox Network Network Link Link or gateway Switch (or bridge) Link Link
Network Network Router But they all Link Link look like this!
91 92
A Note About Layers Course Reference Model • We mostly follow the Internet • They are guidelines, not strict – A li le more about the Physical layer, and alterna ves – May have mul ple protocols working together in one layer – May be difficult to assign a specific protocol to a layer 7 Applica on – Programs that use network service • Some layer viola ons 4 Transport – Provides end-to-end data delivery – Applica on behaves differently depending on network loss 3 Network – Send packets over mul ple networks rate or available bandwidth 2 Link – Send frames over one or more links 1 Physical – Send bits using signals
93 94
Lecture Progression Important Concepts • Bo om-up through the layers: • Important concepts in this lecture – Sta s cal mul plexing, sta s cal mul plexing gain Applica on - HTTP, DNS, CDNs Transport - TCP, UDP – OSI 7 layer model, interfaces, protocols Network - IP, NAT, BGP – Encapsula on, demul plexing Link - Ethernet, 802.11 Physical - wires, fiber, wireless
95 96
16 06/04/17
Bonus Material: Rough Internet Timeline History of the Internet (§1.5.1) Es mated Hosts 9 10 3: Modern Internet & Web 106 2: NSFNET
103 1: ARPANET Year 1969 1982 1995 2013
97 98
The Beginning – ARPANET ARPANET – Influences • Leading up to the ARPANET (1960s): • ARPANET by U.S. DoD was the precursor to the Internet – Packet switching (Kleinrock, Davies), decentralized control (Baran) – Mo vated for resource sharing Paul Baran Donald Davies Len Kleinrock – Launched with 4 nodes in 1969, grew to hundreds of hosts – First “killer app” was email
Credit: Internet Hall of Fame Credit: Internet Hall of Fame Credit: Internet Hall of Fame
99 100
ARPANET – Influences (2) ARPANET Geographical Map (Dec. 1978)
Vint Cerf Bob Kahn • In the early ARPANET 56 kbps links – Internetworking became the basis for the Internet – Pioneered by Cerf & Kahn in 1974, later became TCP/IP “IMPs” were – They are popularly known as early routers the “fathers of the Internet” © 2009 IEEE © 2009 IEEE
Source: ARPANET Informa on Brochure, DCA 1979 101 102
17 06/04/17
Growing Up – NSFNET Early Internet Architecture • NSFNET ’85 supports educa onal networks • Hierarchical, with NSFNET as the backbone – Ini ally connected supercomputer sites, but soon became the backbone for all networks 56 kbps links in ‘85 1.5 Mbps links in ‘88 • Classic Internet protocols we use emerged NSFNET Backbone 45 Mbps links in ‘91 – TCP/IP (transport), DNS (naming), Berkeley sockets (API) in ’83, BGP (rou ng) in ’93 Regional Regional Regional Network Network • Much growth from PCs and Ethernet LANs Network – Campuses, businesses, then homes Customer Customer – 1 million hosts by 1993 … Customer Customer Customer Customer
103 104
Modern Internet – Birth of the Web Modern Internet Architecture • Complex business arrangements affect connec vity • A er ’95, connec vity is provided by Tim Berners-Lee – large ISPs who are compe tors S ll decentralized, other than registering iden fiers Content Provider – They connect at Internet eXchange IXP Point (IXP) facili es Transit ISP Content Provider – Later, large content providers connect IXP IXP Transit ISP Facility at which • Web bursts on the scene in ’93 networks connect – Growth leads to CDNs, ICANN in ‘98 Regional ISP Regional ISP Regional ISP
– Most bits are video (soon wireless) © 2009 IEEE – Content is driving the Internet Customer Customer Customer Customer Customer Customer
105 106
18