CSCI351 Data communication and Networks Lecture 3 Internet

  • Slides: 49
Download presentation
CSCI-351 Data communication and Networks Lecture 3: Internet Architecture (Big picture of how Internet

CSCI-351 Data communication and Networks Lecture 3: Internet Architecture (Big picture of how Internet works) The slide is built with the help of Prof. Alan Mislove, Christo Wilson, and David Choffnes's class

Recap 2

Recap 2

Okay, what are we going to study? 3 Application Transport Network Data Link Physical

Okay, what are we going to study? 3 Application Transport Network Data Link Physical

Okay, what are we going to study? 4 Application John: Hi there ? Transport

Okay, what are we going to study? 4 Application John: Hi there ? Transport Network Data Link Physical Packet Datagra m

CSCI-351 Data communication and Networks Lecture 3: Internet Architecture (Big picture of how Internet

CSCI-351 Data communication and Networks Lecture 3: Internet Architecture (Big picture of how Internet works) The slide is built with the help of Prof. Alan Mislove, Christo Wilson, and David Choffnes's class

Organizing Network Functionality 6 � Networks are built from many components � Networking technologies

Organizing Network Functionality 6 � Networks are built from many components � Networking technologies ■ Ethernet, Wifi, Bluetooth, Fiber Optic, Cable Modem, DSL � Network styles ■ ■ Circuit switch, packet switch Wired, Wireless, Optical, Satellite � Applications ■ � Email, Web (HTTP), FTP, Bit. Torrent, Vo. IP How do we make all this stuff work together? !

Problem Scenario 7 Web Email Bittorrent Vo. IP • This is a nightmare scenario

Problem Scenario 7 Web Email Bittorrent Vo. IP • This is a nightmare scenario • Huge amounts of work to add new apps or media • Limits growth and adoption Ethernet 802. 11 Bluetooth Cellular

More Problems 8 Bittorrent Application endpoints may not be on the same media Ethernet

More Problems 8 Bittorrent Application endpoints may not be on the same media Ethernet 802. 11

Solution: 9 Web Email Bittorrent Magical Network Abstraction Layer Ethernet 802. 11 Bluetooth

Solution: 9 Web Email Bittorrent Magical Network Abstraction Layer Ethernet 802. 11 Bluetooth

Solution: Use Indirection 10 Web Email Bittorrent Vo. IP API • O(1) work to

Solution: Use Indirection 10 Web Email Bittorrent Vo. IP API • O(1) work to add new apps, media Magical Network Abstraction Layer API • API Few limits on new technology Ethernet 802. 11 Bluetooth Cellular

Layered Network Stack 11 Applications Layer 2 Modularity � Does not specify an implementation

Layered Network Stack 11 Applications Layer 2 Modularity � Does not specify an implementation � Instead, tells us how to organize � functionality Encapsulation � Interfaces define cross-layer interaction … Layer N � � Layers only rely on those below them � Flexibility � Reuse of code across the network Layer 1 Physical Media � Module implementations may change � Unfortunately, there are tradeoffs � Interfaces hide information � As we will see, may hurt performance…

Key Questions 12 � � How do we divide functionality into layers? � Routing

Key Questions 12 � � How do we divide functionality into layers? � Routing � Security � Congestion control � Fairness � Error checking � And many more… How do we distribute functionality across devices? � Example: who is responsible for sanity check? Switch Router Switch

Outline 13 ❑ Layering ❑ ❑ The OSI Model Communicating ❑ The End-to-End Argument

Outline 13 ❑ Layering ❑ ❑ The OSI Model Communicating ❑ The End-to-End Argument

The ISO OSI Model 14 OSI: Open Systems Interconnect Model Host 1 Host 2

The ISO OSI Model 14 OSI: Open Systems Interconnect Model Host 1 Host 2 Router Application Presentatio n Session Transport Network Data Link Physical

The ISO OSI Model 15 OSI: Open Systems Interconnect Model Host 1 Host 2

The ISO OSI Model 15 OSI: Open Systems Interconnect Model Host 1 Host 2 Router Application Presentatio n Session Transport Network Data Link Physical Layers communicate All devices implement Layers communicate peer-to-peer the first three layers peer-to-peer Presentatio n Session Network Data Link Physical Transport Network Data Link Physical

Layer Features 16 Application Presentatio n Session Transport Network Data Link Physical � Service

Layer Features 16 Application Presentatio n Session Transport Network Data Link Physical � Service � What does this layer do? � Interface � How do you access this layer? � Protocol � How is this layer implemented?

Physical Layer 17 � � Move information between two Application Presentatio n Session Transport

Physical Layer 17 � � Move information between two Application Presentatio n Session Transport Network Data Link Physical Service systems connected by a physical link � Interface � Specifies how to send one bit � Protocol � Encoding scheme for one bit � Voltage levels � Timing of signals � Examples: coaxial cable, fiber optics, radio frequency transmitters

Data Link Layer 18 � � Data framing: boundaries between Application packets � Media

Data Link Layer 18 � � Data framing: boundaries between Application packets � Media access control (MAC) � Per-hop reliability and flow-control Presentatio n Session Transport Network Data Link Physical Service � Interface � Send one packet between two hosts connected to the same media � Protocol � Physical addressing (e. g. address) � Examples: Ethernet, Wifi MAC

Network Layer 19 � � Deliver packets across the network Application � Handle fragmentation/reassembly

Network Layer 19 � � Deliver packets across the network Application � Handle fragmentation/reassembly Presentatio n Session Transport Network Data Link Physical Service � Packet scheduling � Buffer management � Interface � Send one packet to a specific destination � Protocol � Define globally unique addresses � Maintain routing tables � Example: Internet Protocol (IP), IPv 6

Transport Layer 20 � Application Presentatio n Session Transport Network Data Link Physical Service

Transport Layer 20 � Application Presentatio n Session Transport Network Data Link Physical Service � Multiplexing/demultiplexing � Congestion control � Reliable, in-order delivery � Interface � Send message to a destination � Protocol � Port numbers � Reliability/error correction � Flow-control information � Examples: UDP, TCP

Session Layer 21 Application Presentatio n Session Transport Network Data Link Physical � Service

Session Layer 21 Application Presentatio n Session Transport Network Data Link Physical � Service � Access management � Synchronization � Interface � It depends… � Protocol � Token management � Insert checkpoints � Examples: none

Presentation Layer 22 Application � � Convert data between different representations � E. g.

Presentation Layer 22 Application � � Convert data between different representations � E. g. big endian to little endian � E. g. Ascii to Unicode Presentatio n Session Transport Network Data Link Physical Service � Interface � It depends… � Protocol � Define data formats � Apply transformation rules � Examples: none

Application Layer 23 Application Presentatio n Session Transport Network Data Link Physical � Service

Application Layer 23 Application Presentatio n Session Transport Network Data Link Physical � Service � Whatever you want : ) � Interface � Whatever you want : D � Protocol � Whatever you want ; ) � Examples: turn on your smartphone and look at the list of apps

Encapsulation 24 How does data move through the layers? Data Application Presentatio n Session

Encapsulation 24 How does data move through the layers? Data Application Presentatio n Session Transport Network Data Link Physical Data

Real Life Analogy 25

Real Life Analogy 25

Real Life Analogy 26 Doesn’t know how the Postal networks Label contains Un-packing routing

Real Life Analogy 26 Doesn’t know how the Postal networks Label contains Un-packing routing info Doesn’t know contents of letter Postal Service

Network Stack in Practice 27 Host 1 Router Host 2 Application Presentatio n Video

Network Stack in Practice 27 Host 1 Router Host 2 Application Presentatio n Video Client Session FTP Client Presentatio n Video Server Session FTP UDP Transport TCP Network IP Data Link Ethernet 802. 11 n Physical Server UDP Transport TCP Network IP Data Link Ethernet 802. 11 n Physical

Encapsulation, Revisited 28 TCP Header HTTP Header Web Page Web Server HTTP Header Web

Encapsulation, Revisited 28 TCP Header HTTP Header Web Page Web Server HTTP Header Web Page TCP Segment IP Header TCP Header HTTP Header Web Page IP IP Datagram Ethernet Header IP Header TCP Header HTTP Header Ethernet Frame Web Page Ethernet Trailer Ethernet

The Hourglass 29 HTTP, FTP, RTP, IMAP, Jabber, … • One Internet layer means

The Hourglass 29 HTTP, FTP, RTP, IMAP, Jabber, … • One Internet layer means all networks TCP, UDP, ICMP interoperate Think about the • All applications function on all networks difficulty of IPv 4 deploying IPv 6… • Room for development above and below IP Ethernet, 802. 11 x, DOCSIS, … • But, changing IP is insanely hard Fiber, Coax, Twisted Pair, Radio, …

An Example of the New Architectures Named Data Networking (NDN) 30

An Example of the New Architectures Named Data Networking (NDN) 30

Orthogonal Planes 31 Control plane: How Internet paths are established Application Presentatio n Session

Orthogonal Planes 31 Control plane: How Internet paths are established Application Presentatio n Session Transport IP Data Link Physical Well cover this later… BGP RIP OSPF Control Plane

Orthogonal Planes 32 Data plane: How data is forwarded over Internet paths Host 1

Orthogonal Planes 32 Data plane: How data is forwarded over Internet paths Host 1 Application Transport Network Data Link Switch(es ) Network Data Link Host 2 Application Transport Network Data Link

Reality Check 33 The layered abstraction is very nice � Does it hold in

Reality Check 33 The layered abstraction is very nice � Does it hold in reality? � No. (Any examples? ) � Firewalls Analyze application layer headers � Transparent Proxies NATs Simulate application � Break end-to-end endpoints within the network reachability network

Outline 34 ❑ Layering ❑ ❑ The OSI Model Communicating ❑ The End-to-End Argument

Outline 34 ❑ Layering ❑ ❑ The OSI Model Communicating ❑ The End-to-End Argument

From Layers to Eating Cake 35 � IP gives us best-effort datagram forwarding �

From Layers to Eating Cake 35 � IP gives us best-effort datagram forwarding � So simple anyone can do it � Large part of why the Internet has succeeded � …but it sure isn’t giving us much � Layers give us a way to compose functionality � Example: HTTP over TCP for Web browsers with reliable connections � …but they do not tell us where (in the network) to implement the functionality

Where to Place Functionality 36 � How do we distribute functionality across devices? �

Where to Place Functionality 36 � How do we distribute functionality across devices? � Example: who is responsible for security? ? ? Switch � ? Router ? ? Switch “The End-to-End Arguments in System Design” � Saltzer, Reed, and Clark � The Sacred Text of the Internet � Endlessly debated by researchers and engineers

Basic Observation 37 � Some applications have end-to-end requirements � Security, reliability, etc. �

Basic Observation 37 � Some applications have end-to-end requirements � Security, reliability, etc. � Implementing this stuff inside the network is hard � Every step along the way must be fail-proof � Different applications have different needs � End hosts… � Can’t depend on the network � Can satisfy these requirements without network level support

Example: Reliable File Transfer 38 Integrity Check App has to do a check anyway!

Example: Reliable File Transfer 38 Integrity Check App has to do a check anyway! Solution 1: Make the network reliable � Solution 2: App level, end-to-end check, retry on failure �

Example: Reliable File Transfer Please Retry 39 • In-network implementation… ➢ Doesn’t reduce host

Example: Reliable File Transfer Please Retry 39 • In-network implementation… ➢ Doesn’t reduce host complexity ➢ Does increase network complexity ➢ Increased overhead for apps that don’t need functionality Full functionality can • But, in-network performance may be be built at App level better Solution 1: Make the network reliable � Solution 2: App level, end-to-end check, retry on failure �

Conservative Interpretation 40 “Don’t implement a function at the lower levels of the system

Conservative Interpretation 40 “Don’t implement a function at the lower levels of the system unless it can be completely implemented at this level” (Peterson and Davie) Basically, unless you can completely remove the burden from end hosts, don’t bother

Radical Interpretation 41 � Don’t implement anything in the network that can be implemented

Radical Interpretation 41 � Don’t implement anything in the network that can be implemented correctly by the hosts � Make network layer absolutely minimal � Ignore performance issues

Moderate Interpretation 42 � � Think twice before implementing functionality in the network If

Moderate Interpretation 42 � � Think twice before implementing functionality in the network If hosts can implement functionality correctly, implement it a lower layer only as a performance enhancement But do so only if it does not impose burden on applications that do not require that functionality… � …and if it doesn’t cost too much $ to implement �

Reality Check, Again 43 � Layering and E 2 E principals regularly violated Firewalls

Reality Check, Again 43 � Layering and E 2 E principals regularly violated Firewalls � Transparent Proxies Conflicting interests � Architectural purity � Commercial necessity NATs

Real world example (DNS Hijacking) 44 non-exist-url. com Browser DNS Server Advertisement or 404

Real world example (DNS Hijacking) 44 non-exist-url. com Browser DNS Server Advertisement or 404 Not Found! other contents NXDOMAIN

Real world example (DNS Hijacking) 45 Country ISP DNS Servers Exit Nodes Telefonica de

Real world example (DNS Hijacking) 45 Country ISP DNS Servers Exit Nodes Telefonica de Argentina Dodo Australia 14 276 21 1, 404 Oi Fixo 21 2, 558 CTBC 4 290 Deutsche Telekom 8 1, 385 Airtel Broadband 9 735 BSNL 2 71 Ntl. Int. Backbone 8 245 Malyasia TMNet 8 1, 676 Spain Ono 2 71 BT Internet 6 479 Talk 46 3, 738 AT&T 37 561 4 108 63 1, 789 6 219 9 98 98 2, 102 1 39 Argentina Australia Brazil Germany India U. K. Cable One U. S. Cox Communications Mediacom Cable Suddenlink Verizon Wide. Open West Tunneling for Transparency: A Large-Scale Analysis of End-to-End Violations in the Internet Taejoong Chung, David Choffnes, and Alan Mislove In Proceedings of ACM Internet Measurement Conference (IMC`16), Santa Monica, California, USA, Novem

46

46

Takeaways 47 � Layering for network functions � Helps manage diversity in computer networks

Takeaways 47 � Layering for network functions � Helps manage diversity in computer networks � Not optimal for everything, but simple and flexible Narrow waist ensures interoperability, enables innovation � E 2 E argument (attempts) to keep IP layer simple � Think carefully when adding functionality into the network �

Questions? 48

Questions? 48

Next Class. . 49 � C-Socket Programming

Next Class. . 49 � C-Socket Programming