taj mahal, agra, india t. s. eugene ng eugeneng at cs.rice ... · t. s. eugene ng eugeneng at...

39
T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

Upload: others

Post on 13-Sep-2019

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1

Taj Mahal, Agra, India

Page 2: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 2

Temple of Heaven, Beijing, China

Page 3: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 3

Opera House, Sydney, Australia

Page 4: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

Parthenon, Athens, Greece

Page 5: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 5

Burj al Arab Hotel, Dubai, UAE

Page 6: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

Fallingwater, Mill Run, USA

Page 7: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

Notre Dame Cathedral, Paris, France

Page 8: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Stata Hall, MIT, Cambridge, USA

Page 9: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9

COMP/ELEC 429/556 Introduction to Computer Networks

Internet architecture

Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang

Page 10: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 10

Architecture: Organizing Network Functionality •  Goals: Functional, flexible, elegant/beautiful

•  Many kinds of networking functionality –  e.g., encoding, framing, routing, addressing, reliability, etc.

•  Many different network styles and technologies –  circuit-switched vs packet-switched, etc. –  wireless vs wired, electrical vs optical, etc.

•  Many different applications –  dropbox, web, voice, video, etc.

•  A network has many nodes (routers, switches, hosts)

•  Network architecture –  On which node(s) should each functionality be placed? –  How should functionalities on a node be organized?

Page 11: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 11

Central question: On which node(s) should functionalities

be placed?

Page 12: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 12

Example: Addressing Which node(s) should be able to interpret network addresses in packets?

Page 13: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 13

Example: Routing Which node(s) should make routing decisions?

Page 14: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 14

Example: Routing Which node(s) should make routing decisions?

Page 15: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 15

Example: Reliable File Transfer

•  Idea 1: put reliability function in the network; i.e. make network reliable

•  Idea 2: put reliability function in the hosts; i.e. implement correctness check at application and retry if failed

OS

App

OS

App

Host A Host B

Page 16: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 16

Example (cont’d)

•  Idea 1 not complete –  Bugs can exist in OS code! – Data on disk can be corrupted during write –  The receiver has to do the check anyway!

•  Idea 2 is complete –  Full functionality can be entirely implemented at application

with no need for guaranteed reliability from other components

Page 17: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 17

Placing Functionality

•  The most influential paper about placing functionality is “End-to-End Arguments in System Design” by Saltzer, Reed, and Clark

Page 18: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 18

Basic Observations

•  There are many levels in a distributed system: application, OS, network, etc.

•  Some applications have end-to-end performance requirements –  reliability, security, etc.

•  Implementing these in levels below the applications is very hard –  every step along the way must be fail-proof –  if not fail-proof, application’s implementation complexity is not

reduced –  increases lower levels’ complexity –  imposes delay and overhead on all applications, even if they don’t

have such requirements •  The applications:

–  can satisfy the requirement –  can’t depend on the lower levels

Page 19: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 19

Conservative Interpretation of the End-to-End Argument

•  Don’t implement a function in a low level unless it can be completely implemented in that level –  Unless you can relieve the burden from applications, then

don’t bother

Page 20: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 20

Radical Interpretation

•  Don’t implement anything in a low level that can be implemented correctly by the applications

•  Make the low level absolutely minimal –  ignore performance issues

Page 21: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 21

Moderate Interpretation

•  Think twice before implementing functionality in the network

•  If hosts can implement functionality correctly, implement it at a lower level only as a performance enhancement

•  But do so only if it does not impose burden on applications that do not require that functionality

Page 22: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

How to Organize Functionalities on Each Node?

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 22

Page 23: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 23

Software Modularity

Break system into modules:

•  Well-defined interfaces gives flexibility –  can change implementation of modules –  can extend functionality of system by adding new modules

•  Interfaces hide information –  allows for flexibility –  but can hurt performance

Page 24: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 24

Network Modularity

Like software modularity, but with a twist:

•  Implementation distributed (e.g. across routers and hosts)

•  Must decide both: –  how to break system into modules – where modules are implemented

Page 25: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 25

Layering

•  Layering is a particular form of modularization

•  The system is broken into a vertical hierarchy of logically distinct entities (layers)

•  The service provided by one layer is based solely on the service provided by layer below

•  Rigid structure: easy reuse, performance may suffer

Page 26: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 26

A Naïve Architecture

•  new application has to interface to all existing media –  adding new application requires O(m) work, m = number of media

•  new media requires all existing applications be modified –  adding new media requires O(a) work, a = number of applications

•  total work in system O(ma) → eventually too much work to add apps/media

SMTP SSH FTP

Packet radio

Coaxial cable

Fiber optic

Application

Transmission Media

HTTP

Page 27: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 27

Solution: Indirection

•  Solution: introduce an intermediate layer that provides a single abstraction for various network technologies –  O(1) work to add app/media

SMTP SSH NFS

802.11 LAN

Coaxial cable

Fiber optic

Application

Transmission Media

HTTP

Intermediate layer

vs

Page 28: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 28

Take home point: The Internet Hourglass

Page 29: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 29

Implications of Hourglass

A single Internet layer module:

•  Allows all networks to interoperate –  all networks technologies that support IP can exchange

packets

•  Allows all applications to function on all networks –  all applications that can run on IP can use any network

•  Simultaneous developments above and below IP

Page 30: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 30

Internet Protocol Architecture

•  The TCP/IP protocol suite is the basis for the networks that we call the Internet.

•  The TCP/IP suite has four layers: Application, Transport, Network, and (Data) Link Layer.

Physical Layer

Dropbox, Skype, Web

Page 31: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 31

Terminology

•  Service – says what a layer does –  Ethernet: unreliable subnet unicast/multicast/broadcast

datagram service –  IP: unreliable end-to-end unicast datagram service –  TCP: reliable end-to-end bi-directional byte stream service

•  Service Interface – says how to access the service –  E.g. UNIX socket interface

•  Protocol – says how the service is implemented –  a set of rules and formats that govern the communication

between two peers

Page 32: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 32

Physical Layer (1)

•  Service: move information between two systems connected by a physical link

•  Interface: specifies how to send a bit

•  Protocol: coding scheme used to represent a bit, voltage levels, duration of a bit

•  Examples: coaxial cable, optical fiber links

Page 33: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 33

Datalink Layer (2)

•  Service: –  framing (attach frame separators) –  send data frames between peers –  others:

•  arbitrate the access to common physical media •  per-hop reliable transmission •  per-hop flow control

•  Interface: send a data unit (packet) to a machine connected to the same physical media

•  Protocol: layer addresses, implement Medium Access Control (MAC) (e.g., IEEE802.3, IEEE802.11, CSMA/CD)…

Page 34: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 34

Network Layer (3)

•  Service: –  deliver a packet to specified network destination –  perform segmentation/reassemble –  others will be discussed

•  Interface: send a packet to a specified destination •  Protocol: define global unique addresses; construct

routing tables (e.g IPv4, IPv6)

Page 35: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 35

Transport Layer (4)

•  Service: – Multiplexing/demultiplexing –  optional: error-free and flow-controlled delivery

•  Interface: send message to specific destination

•  Protocol: implements reliability and flow control

•  Examples: TCP and UDP

Page 36: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 36

Application Layer (7)

•  Service: any service provided to the end user

•  Interface: depends on the application

•  Protocol: depends on the application

•  Examples: Dropbox, Skype, Web

Page 37: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 37

Internet Protocol Architecture

Web browser

TCP

IP

Ethernet Driver

Ethernet Driver

ATM Driver

IP

Web server

TCP

IP

ATM Driver

HTTP protocol

TCP protocol

IP protocol IP protocol

Ethernet protocol

ATM protocol

Page 38: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 38

Encapsulation •  As data is moving down the protocol stack, each protocol

is adding layer-specific control information.

Page 39: Taj Mahal, Agra, India T. S. Eugene Ng eugeneng at cs.rice ... · T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1 Taj Mahal, Agra, India

T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 39

Reality

•  Layering and E2E Principle regularly violated: –  Firewall – Network address translation –  Transparent web cache

•  Battle between architectural purity and commercial pressures