EECS 122 Introduction to Computer Networks Network Service

  • Slides: 44
Download presentation
EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department

EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley, CA 94720 -1776 Katz, Stoica F 04 1

Overview • • Taxonomy of Communication Networks Services and Applications Katz, Stoica F 04

Overview • • Taxonomy of Communication Networks Services and Applications Katz, Stoica F 04 2

Taxonomy of Communication Networks § Communication networks can be classified based on the way

Taxonomy of Communication Networks § Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Communication Network Circuit-Switched Communication Network Broadcast Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network Katz, Stoica F 04 3

Broadcast vs. Switched Communication Networks § Broadcast Communication Networks - Information transmitted by any

Broadcast vs. Switched Communication Networks § Broadcast Communication Networks - Information transmitted by any node is received by every other node in the network • Examples: usually in LANs (Ethernet, Wi. Fi) - Problem: coordinate the access of all nodes to the shared communication medium (Multiple Access Problem) § Switched Communication Networks - Information transmitted to a sub-set of designated nodes • Examples: WANs (Telephony Network, Internet) - Problem: how to forward information to intended node(s)? • Done by special nodes (e. g. , routers, switches) executing routing protocols Katz, Stoica F 04 4

Taxonomy of Communication Networks § Communication networks can be classified based on the way

Taxonomy of Communication Networks § Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Communication Network Circuit-Switched Communication Network Broadcast Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network Katz, Stoica F 04 5

Circuit Switching § Three phases 1. circuit establishment 2. data transfer 3. circuit termination

Circuit Switching § Three phases 1. circuit establishment 2. data transfer 3. circuit termination § § If circuit not available: “Busy signal” Examples - Telephone networks ISDN (Integrated Services Digital Networks) Katz, Stoica F 04 6

Telegraph Network § Alexander Graham Bell - 1876: Demonstrates the telephone at US Centenary

Telegraph Network § Alexander Graham Bell - 1876: Demonstrates the telephone at US Centenary Exhibition in Philadelphia Katz, Stoica F 04 7

Telephone Network § Almon Brown Strowger (1839 - 1902) - 1889: Invents the “girl-less,

Telephone Network § Almon Brown Strowger (1839 - 1902) - 1889: Invents the “girl-less, cuss-less” telephone system, aka the mechanical switching system Katz, Stoica F 04 8

Timing in Circuit Switching Host 1 Node 2 Host 2 processing delay at Node

Timing in Circuit Switching Host 1 Node 2 Host 2 processing delay at Node 1 propagation delay between Host 1 and Node 1 Circuit Establishment Data Transmission propagation delay between Host 2 and Node 1 DATA Circuit Termination Katz, Stoica F 04 9

Circuit Switching § Node (switch) in a circuit switching network incoming links Node outgoing

Circuit Switching § Node (switch) in a circuit switching network incoming links Node outgoing links Katz, Stoica F 04 10

Circuit Switching: Multiplexing/Demultiplexing Frames Slots = 0 1 2 3 4 5 § §

Circuit Switching: Multiplexing/Demultiplexing Frames Slots = 0 1 2 3 4 5 § § 0 1 2 3 4 5 Time divided in frames and frames into slots Relative slot position inside a frame determines to which conversation data belongs - E. g. , slot 0 belongs to red conversation § § Requires synchronization between sender and receiver— surprisingly difficult! In case of non-permanent conversations - Needs to dynamically bind a slot to a conservation - How to do this? § If a conversation does not use its circuit the capacity is lost! Katz, Stoica F 04 11

Taxonomy of Communication Networks § Communication networks can be classified based on the way

Taxonomy of Communication Networks § Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Communication Network Circuit-Switched Communication Network Broadcast Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network Katz, Stoica F 04 12

Packet Switching § § Data sent as formatted bit-sequences (Packets) Packets have following structure:

Packet Switching § § Data sent as formatted bit-sequences (Packets) Packets have following structure: Header Data Trailer • Header and Trailer carry control information (e. g. , destination address, check sum) § § § Each packet traverses the network from node to node along some path (Routing) At each node the entire packet is received, stored briefly, and then forwarded to the next node (Store-and-Forward Networks) Typically no capacity is allocated for packets Katz, Stoica F 04 13

Packet Switching § Node in a packet switching network incoming links Node outgoing links

Packet Switching § Node in a packet switching network incoming links Node outgoing links Memory Katz, Stoica F 04 14

Packet Switching: Multiplexing/Demultiplexing § Data from any conversation can be transmitted at any given

Packet Switching: Multiplexing/Demultiplexing § Data from any conversation can be transmitted at any given time - Single conversation can use the entire link capacity if it is alone § How to tell them apart? - Use meta-data (header) to describe data Katz, Stoica F 04 15

Taxonomy of Communication Networks § Communication networks can be classified based on the way

Taxonomy of Communication Networks § Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Communication Network Circuit-Switched Communication Network Broadcast Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network Katz, Stoica F 04 16

Datagram Packet Switching § Each packet is independently switched - Each packet header contains

Datagram Packet Switching § Each packet is independently switched - Each packet header contains destination address § § No resources are pre-allocated (reserved) in advance Example: IP networks Katz, Stoica F 04 17

Timing of Datagram Packet Switching Host 1 transmission time of Packet 1 at Host

Timing of Datagram Packet Switching Host 1 transmission time of Packet 1 at Host 1 Node 1 Packet 1 propagation delay between Host 1 and Node 2 Packet 3 Host 2 Node 2 Packet 1 processing delay of Packet 1 at Node 2 Packet 3 Packet 1 Packet 2 Packet 3 Katz, Stoica F 04 18

Datagram Packet Switching Host C Host D Host A Node 1 Node 2 Node

Datagram Packet Switching Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Node 6 Node 7 Host E Node 4 Katz, Stoica F 04 19

Taxonomy of Communication Networks § Communication networks can be classified based on the way

Taxonomy of Communication Networks § Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Communication Network Circuit-Switched Communication Network Broadcast Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network Katz, Stoica F 04 20

Virtual-Circuit Packet Switching § Hybrid of circuit switching and packet switching - Data is

Virtual-Circuit Packet Switching § Hybrid of circuit switching and packet switching - Data is transmitted as packets - All packets from one packet stream are sent along a pre -established path (=virtual circuit) § § § Guarantees in-sequence delivery of packets However, packets from different virtual circuits may be interleaved Example: ATM networks Katz, Stoica F 04 21

Virtual-Circuit Packet Switching § Communication with virtual circuits takes place in three phases 1.

Virtual-Circuit Packet Switching § Communication with virtual circuits takes place in three phases 1. VC establishment 2. data transfer 3. VC disconnect § Note: packet headers don’t need to contain the full destination address of the packet Katz, Stoica F 04 22

Timing of Virtual-Circuit Packet Switching Host 1 Node 1 Host 2 Node 2 propagation

Timing of Virtual-Circuit Packet Switching Host 1 Node 1 Host 2 Node 2 propagation delay between Host 1 and Node 1 VC establishment Packet 1 Packet 2 Data transfer Packet 3 Packet 1 Packet 2 Packet 3 VC termination Katz, Stoica F 04 23

Datagram Packet Switching Host C Host D Host A Node 1 Node 2 Node

Datagram Packet Switching Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Node 6 Node 7 Host E Node 4 Katz, Stoica F 04 24

Packet-Switching vs. Circuit-Switching § Most important advantage of packet-switching over circuit switching: Exploitation of

Packet-Switching vs. Circuit-Switching § Most important advantage of packet-switching over circuit switching: Exploitation of statistical multiplexing: - Efficient bandwidth usage; ratio between peek and average rate is 3: 1 for audio, and 15: 1 for data traffic § However, packet-switching must handle congestion: - More complex routers - Harder to provide good network services (e. g. , delay and bandwidth guarantees) § In practice they are combined: - IP over SONET, IP over Frame Relay Katz, Stoica F 04 25

Overview • Ø Taxonomy of Communication Networks Services and Applications Katz, Stoica F 04

Overview • Ø Taxonomy of Communication Networks Services and Applications Katz, Stoica F 04 26

The Internet Protocol (IP) § Problem: - Many different network technologies - e. g.

The Internet Protocol (IP) § Problem: - Many different network technologies - e. g. , Ethernet, Token Ring, ATM, Frame Relay, etc. - How can you hook them together? • n x n translations? § IP was invented to glue them together - n translations - Minimal requirements (datagram) § The Internet is founded on IP - “IP over everything” Katz, Stoica F 04 27

Addressing § Every Internet host has an IP address - e. g. , 67.

Addressing § Every Internet host has an IP address - e. g. , 67. 114. 133. 15 § Packets include destination address - Network is responsible for routing packet to address § Host-view: Network Source Destination Katz, Stoica F 04 28

IP-centric View Host C Host D Host A Router 1 Router 2 Router 3

IP-centric View Host C Host D Host A Router 1 Router 2 Router 3 Router 5 Host B Router 6 Router 7 Host E Router 4 Katz, Stoica F 04 29

Physical View § A big mess! § Every “link” could be a whole network

Physical View § A big mess! § Every “link” could be a whole network of ATM, frame relay, ethernet, DSL, etc. § Beauty of IP: you can ignore these different network technologies § In many networks, IP is used only at the edge Katz, Stoica F 04 30

Back to IP Host C Host D Host A Router 1 Router 2 Router

Back to IP Host C Host D Host A Router 1 Router 2 Router 3 Router 5 Host B Router 6 Router 7 Host E Router 4 Katz, Stoica F 04 31

Routing § Routers have “routing tables” - Tables mapping each destination with an outgoing

Routing § Routers have “routing tables” - Tables mapping each destination with an outgoing link - Requires that routing table is highly compressible! - Implications for address assignment, mobility, etc. § Routing decisions made packet-by-packet - Routers keep no connection state § Question: Why have the network do routing? - Why not the hosts? - Compare delivery-by-hand to Fed. Ex Katz, Stoica F 04 32

Internet Service • “Best-Effort” service - No guarantees about packet delivery - Hosts must

Internet Service • “Best-Effort” service - No guarantees about packet delivery - Hosts must cope with loss and delay § Why this service model? - Why not guarantee no loss and low delay? Katz, Stoica F 04 33

Domain Name Service (DNS) § Humans/applications use machine names - e. g. , www.

Domain Name Service (DNS) § Humans/applications use machine names - e. g. , www. cs. berkeley. edu § Network (IP) uses IP addresses - e. g. , 67. 114. 112. 23 § DNS translates between the two - An overlay service in its own right - Global distribution of name-to-IP address mappings—a kind of content distribution system as well - Unsung hero of the Internet Katz, Stoica F 04 34

File Transfer (FTP, SCP, etc. ) Get file from soup. cs. berkeley. edu Get

File Transfer (FTP, SCP, etc. ) Get file from soup. cs. berkeley. edu Get file Your PC file Get address for soup. cs. berkeley. edu 67. 132. 22. 5 DNS Katz, Stoica F 04 35

Email message exchange is similar to previous example, except § Exchange is between mail

Email message exchange is similar to previous example, except § Exchange is between mail servers § DNS gives name of mail server for domain Katz, Stoica F 04 37

Web Get www. icir. org/file. html Your PC Proxy Get file. html Get address

Web Get www. icir. org/file. html Your PC Proxy Get file. html Get address for www. icir. org 67. 132. 22. 5 DNS Katz, Stoica F 04 38

Caching § Caches can be visible or transparent § Visible: - Client is configured

Caching § Caches can be visible or transparent § Visible: - Client is configured to ask cache § Transparent: - Cache intercepts packet on its way to web server - Example of a “application-aware middlebox” - Violates purity of architecture, but are prevalent. . . Katz, Stoica F 04 39

Content Distribution Network (CDN) How to get closest copy of replicated content? § CDNs

Content Distribution Network (CDN) How to get closest copy of replicated content? § CDNs have mirror servers distributed globally § CDN customers allow CDN to run their DNS § “Smart” DNS server returns results based on requester’s IP address Katz, Stoica F 04 40

Gnutella (P 2 P) Overlay Network Dashed lines are “virtual links” Katz, Stoica F

Gnutella (P 2 P) Overlay Network Dashed lines are “virtual links” Katz, Stoica F 04 41

Gnutella (cont’d) § User asks for file (by metadata) § Each host sends request

Gnutella (cont’d) § User asks for file (by metadata) § Each host sends request to its “neighbors” in overlay network § Responses sent back to original requesting node § Many variations on P 2 P file sharing. . . Katz, Stoica F 04 42

Overlay Networks § Create a set of “virtual links” between hosts § Communication between

Overlay Networks § Create a set of “virtual links” between hosts § Communication between neighbors on overlay is done by IP § But the overlay can use different routing, or application-specific processing, at overlays nodes § IP is often overlay on circuit-switched network - App-specific networks increasingly overlaid on IP Katz, Stoica F 04 43

Architecture § The assignment of tasks and knowledge § Who does what, and where

Architecture § The assignment of tasks and knowledge § Who does what, and where is the state kept? § How they do it: algorithms and implementation Katz, Stoica F 04 44

Internet Architecture § Routers do routing, and almost nothing else - No application-specific functions

Internet Architecture § Routers do routing, and almost nothing else - No application-specific functions § Hosts do all application-specific processing § Allowed wide variety of applications to flourish on Internet Katz, Stoica F 04 45