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

1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

1Katz, Stoica F04

EECS 122: Introduction to Computer Networks

Network Service and Applications

Computer Science Division

Department of Electrical Engineering and Computer Sciences

University of California, Berkeley

Berkeley, CA 94720-1776

Page 2: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

2Katz, Stoica F04

Overview

• Taxonomy of Communication Networks• Services and Applications

Page 3: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

3Katz, Stoica F04

Communication networks can be classified based on the way in which the nodes exchange information:

Taxonomy of Communication Networks

Communication Network

SwitchedCommunication

Network

BroadcastCommunication

Network

Circuit-Switched

Communication Network

Packet-Switched

Communication Network

Datagram Network

Virtual Circuit Network

Page 4: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

4Katz, Stoica F04

Broadcast Communication Networks- Information transmitted by any node is received by every

other node in the network• Examples: usually in LANs (Ethernet, WiFi)

- 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

Broadcast vs. Switched Communication Networks

Page 5: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

5Katz, Stoica F04

Communication networks can be classified based on the way in which the nodes exchange information:

Taxonomy of Communication Networks

Communication Network

SwitchedCommunication

Network

BroadcastCommunication

Network

Circuit-Switched

Communication Network

Packet-Switched

Communication Network

Datagram Network

Virtual Circuit Network

Page 6: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

6Katz, Stoica F04

Circuit Switching

Three phases1. circuit establishment

2. data transfer

3. circuit termination

If circuit not available: “Busy signal” Examples

- Telephone networks

- ISDN (Integrated Services Digital Networks)

Page 7: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

7Katz, Stoica F04

Telegraph Network

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

Exhibition in Philadelphia

Page 8: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

8Katz, Stoica F04

Telephone Network

Almon Brown Strowger (1839 - 1902)- 1889: Invents the “girl-less, cuss-less” telephone

system, aka the mechanical switching system

Page 9: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

9Katz, Stoica F04

Timing in Circuit Switching

DATA

Circuit Establishment

Data Transmission

Circuit Termination

Host 1 Host 2Node 1 Node 2

propagation delay between Host 1 and Node 1

propagation delay between Host 2 and Node 1

processing delay at Node 1

Page 10: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

10Katz, Stoica F04

Circuit Switching

Node (switch) in a circuit switching network

incoming links outgoing linksNode

Page 11: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

11Katz, Stoica F04

Circuit Switching: Multiplexing/Demultiplexing

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!

Frames

0 1 2 3 4 5 0 1 2 3 4 5Slots =

Page 12: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

12Katz, Stoica F04

Communication networks can be classified based on the way in which the nodes exchange information:

Taxonomy of Communication Networks

Communication Network

SwitchedCommunication

Network

BroadcastCommunication

Network

Circuit-Switched

Communication Network

Packet-Switched

Communication Network

Datagram Network

Virtual Circuit Network

Page 13: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

13Katz, Stoica F04

Packet Switching

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

• 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

Header Data Trailer

Page 14: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

14Katz, Stoica F04

Packet Switching

Node in a packet switching network

incoming links outgoing linksNode

Memory

Page 15: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

15Katz, Stoica F04

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

Page 16: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

16Katz, Stoica F04

Communication networks can be classified based on the way in which the nodes exchange information:

Taxonomy of Communication Networks

Communication Network

SwitchedCommunication

Network

BroadcastCommunication

Network

Circuit-Switched

Communication Network

Packet-Switched

Communication Network

Datagram Network

Virtual Circuit Network

Page 17: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

17Katz, Stoica F04

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

Page 18: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

18Katz, Stoica F04

Packet 1

Packet 2

Packet 3

Packet 1

Packet 2

Packet 3

Timing of Datagram Packet Switching

Packet 1

Packet 2

Packet 3

processing

delay of Packet 1 at Node 2

Host 1 Host 2Node

1Node

2

propagationdelay betweenHost 1 and Node 2

transmission time of Packet 1at Host 1

Page 19: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

19Katz, Stoica F04

Datagram Packet Switching

Host A

Host BHost E

Host D

Host C

Node 1 Node 2

Node 3

Node 4

Node 5

Node 6 Node 7

Page 20: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

20Katz, Stoica F04

Communication networks can be classified based on the way in which the nodes exchange information:

Taxonomy of Communication Networks

Communication Network

SwitchedCommunication

Network

BroadcastCommunication

Network

Circuit-Switched

Communication Network

Packet-Switched

Communication Network

Datagram Network

Virtual Circuit Network

Page 21: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

21Katz, Stoica F04

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

Page 22: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

22Katz, Stoica F04

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

Page 23: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

23Katz, Stoica F04

Packet 1

Packet 2

Packet 3

Packet 1

Packet 2

Packet 3

Timing of Virtual-Circuit Packet Switching

Packet 1

Packet 2

Packet 3

Host 1 Host 2Node

1Node

2

propagation delay between Host 1 and Node 1VC

establishment

VCtermination

Datatransfer

Page 24: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

24Katz, Stoica F04

Datagram Packet Switching

Host A

Host BHost E

Host D

Host C

Node 1 Node 2

Node 3

Node 4

Node 5

Node 6 Node 7

Page 25: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

25Katz, Stoica F04

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

Page 26: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

26Katz, Stoica F04

Overview

• Taxonomy of Communication Networks Services and Applications

Page 27: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

27Katz, Stoica F04

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”

Page 28: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

28Katz, Stoica F04

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:

Source Destination

Network

Page 29: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

29Katz, Stoica F04

IP-centric View

Host A

Host BHost E

Host D

Host C

Router 1 Router 2

Router 3

Router 4

Router 5

Router 6 Router 7

Page 30: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

30Katz, Stoica F04

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

Page 31: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

31Katz, Stoica F04

Back to IP

Host A

Host BHost E

Host D

Host C

Router 1 Router 2

Router 3

Router 4

Router 5

Router 6 Router 7

Page 32: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

32Katz, Stoica F04

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 FedEx

Page 33: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

33Katz, Stoica F04

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?

Page 34: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

34Katz, Stoica F04

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

Page 35: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

35Katz, Stoica F04

File Transfer (FTP, SCP, etc.)

Get file from soup.cs.berkeley.edu

DNS

soup.cs.berkeley.eduGet address for soup.cs.berkeley.edu 67.132.22.5

Get file

file

Your PC

Page 36: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

37Katz, Stoica F04

Email

Email message exchange is similar to previous example, except

Exchange is between mail servers DNS gives name of mail server for domain

Page 37: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

38Katz, Stoica F04

Web

Get www.icir.org/file.html

DNS

www.icir.orgGet address for

www.icir.org 67.132.22.5

Get file.html

file.html

Your PC Proxy

Page 38: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

39Katz, Stoica F04

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...

Page 39: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

40Katz, Stoica F04

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

Page 40: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

41Katz, Stoica F04

Gnutella (P2P)

Overlay Network

Dashed lines are “virtual links”

Page 41: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

42Katz, Stoica F04

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 P2P file sharing.....

Page 42: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

43Katz, Stoica F04

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

Page 43: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

44Katz, Stoica F04

Architecture

The assignment of tasks and knowledge

Who does what, and where is the state kept?

How they do it: algorithms and implementation

Page 44: 1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering

45Katz, Stoica F04

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