27
Spring 2002 CS 332 1 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Embed Size (px)

DESCRIPTION

Spring 2002CS 3323 Building Blocks Nodes: PC, special-purpose hardware… –hosts –Switches (host connected to at least two links that runs software that forwards data received on one link out on another). Links: coax cable, optical fiber… –point-to-point –multiple access …

Citation preview

Page 1: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 1

Introduction

OutlineStatistical MultiplexingNetwork ArchitecturePerformance Metrics (just a little)

Page 2: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 2

Our Journey Through the Text

• Chapter 1• Chapters 4,5,6 (with Chapters 2,3 sprinkled in as

needed)• Why?

Page 3: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 3

Building Blocks

• Nodes: PC, special-purpose hardware…– hosts– Switches (host connected to at least two links that runs

software that forwards data received on one link out on another).

• Links: coax cable, optical fiber…– point-to-point

– multiple access …

Page 4: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 4

Switched Networks

– two or more nodes connected by a link, or

– two or more networks connected by two or more nodes

• A network can be defined recursively as...

Nodes on inside of cloud called switches, nodes on outside called hosts

Cloud can Denote anyType of network:P2P, multi-access,switched

internetwork

Node between networkscalled router or gateway

Page 5: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 5

Routing• Just because we have physical connectivity between all

hosts, doesn’t mean we have provided host-to-host connectivity– Need to be able to specify hosts with which we wish to

communicate– I.e. each host needs an address (note that the address is really only

a name – it need not relate in any way to the physical location of the host)

– Routers and switches between hosts need to use address to decide how to forward messages

• Routing: process of determining systematically how to forward messages toward the destination node based on the destination node’s address

Page 6: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 6

Not Just One Destination…

• Unicast – single source, single destination• Broadcast – single source, all destinations (well,

sort of)• Multicast – single source, whole group of

destinations• Anycast?!

– Why would you want this?

Page 7: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 7

A Key Idea

• We can define a network recursively as a network of networks.– At bottom layer, it is implemented by some physical

medium– At higher layers it is a “logical” network

• Key issue: how do we assign addresses at each layer in a manner which allows us to efficiently route messages?

Page 8: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 8

Strategies

• Circuit switching: carry bit streams– original telephone network– Connection is established before any data sent

• Packet switching: store-and-forward messages– Internet (Why?)– Send discrete blocks of data from node to node (called

a packet or message)

Page 9: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 9

Virtual Circuit Switching• Explicit connection setup (and tear-down) phase• Subsequence packets follow same circuit• Sometimes called connection-oriented model

0

132

01 3

2

013

25 11

4

7Switch 3

Host B

Switch 2

Host A

Switch 1

• Analogy: phone call

• Each switch maintains a VC table Advantages?

Disadvantages?

Page 10: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 10

Datagram Switching• No connection setup phase• Each packet forwarded independently • Sometimes called connectionless model

0

132

01 3

2

013

2

Switch 3Host B

Switch 2

Host A

Switch 1

Host C

Host D

Host EHost F

Host G

Host H

• Analogy: postal system

• Each switch maintains a forwarding (routing) table

Page 11: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 11

Multiplexing

• Time-Division Multiplexing (TDM)• Frequency-Division Multiplexing (FDM)

L1

L2

L3

R1

R2

R3Switch 1 Switch 2

Note that in eithertechnique, bandwidthcan be wasted!

Page 12: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 12

Statistical Multiplexing• On-demand time-division (rather than in specific time slot)• Schedule link on a per-packet basis• Packets from different sources interleaved on link• Buffer packets that are contending for the link• Buffer (queue) overflow is called congestion

Fairly allocatinglink capacity anddealing with congestionare key issues here!

Page 13: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 13

IPC Abstractions

• Request/Reply– distributed file systems– digital libraries (web)

• Stream-Based– video: sequence of frames– video applications

• on-demand video• video conferencing

Page 14: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 14

Layering• Use abstractions to hide complexity• Abstraction naturally lead to layering• Alternative abstractions at each layer

Request/replychannel

Message streamchannel

Application programs

Hardware

Host-to-host connectivity

Page 15: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 15

Protocols

• Building blocks of a network architecture• Each protocol object has two different interfaces

– service interface: operations on this protocol– peer-to-peer interface: messages exchanged with peer

• Term “protocol” is overloaded– specification of peer-to-peer interface– module that implements this interface

Page 16: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 16

Host 1

Protocol

Host 2

Protocol

High-levelobject

High-levelobject

Serviceinterface

Peer-to-peerinterface

Interfaces

Page 17: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 17

Protocol Machinery• Protocol Graph

– most peer-to-peer communication is indirect– peer-to-peer is direct only at hardware level

Fileapplication

Digitallibrary

applicationVideo

application

RRP MSP

HHP

Host 1

Fileapplication

Digitallibrary

applicationVideo

application

RRP MSP

HHP

Host 2

Page 18: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 18

Machinery (cont)• Multiplexing and Demultiplexing (demux key)• Encapsulation (header/body)

RRP DataHHP

Applicationprogram

Applicationprogram

Host 1 Host 2

Data

RRP

RRP Data

HHP

Data

RRP

RRP Data

HHP

Page 19: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 19

Internet Architecture• Defined by Internet Engineering Task Force (IETF)• Hourglass Design• Application vs Application Protocol (FTP, HTTP)

FTP HTTP NV TFTP

TCP UDP

IP

NET1 NET2 NETn

Page 20: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 20

ISO Architecture

Application

Presentation

Session

Transport

End host

One or more nodeswithin the network

Network

Data link

Physical

Network

Data link

Physical

Network

Data link

Physical

Application

Presentation

Session

Transport

End host

Network

Data link

Physical

Note transportlayer is “end-to-end”

Page 21: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 21

Performance Metrics• Bandwidth (throughput)

– data transmitted per time unit– link versus end-to-end– notation

• KB = 210 bytes• Mbps = 106 bits per second

• Latency (delay)– time to send message from point A to point B– one-way versus round-trip time (RTT)– components

Latency = Propagation + Transmit + QueuePropagation = Distance / cTransmit = Size / Bandwidth

Page 22: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 22

Bandwidth versus Latency

• Relative importance• Infinite bandwidth

Page 23: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 23

Protocol Implementation Issues• Which process model?

– Process-per-protocol model• Each protocol implemented by separate process (thread)• Sometimes logically “cleaner” – one protocol, one process• Context switch required at each level of protocol graph

– Process-per-message model• Each message handled by a single process with each

protocol a separate procedure that invokes the subsequent protocol

• Order of magnitude more efficient (procedure call much more efficient than context switch)

Page 24: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 24

Protocol Implementation Issues

• Service Interface relationship with process model– If high-level protocol invokes send() on lower level

protocol, it has message in hand so no big deal– If high-level protocol invokes receive() on lower

level protocol, it must wait for receipt of message, which basically forces a context switch.

– No big deal if app directly calls network subsystem, but big deal if it occurs at each layer of protocol stack

– Cure: low level protocol does an upcall (a procedure call up the stack) to deliver message to higher level

Page 25: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 25

Protocol Implementation Issues• Message Buffers

– In socket API, application process provides buffers for both outbound and incoming messages. This forces top most protocol to copy messages from/to network buffers.

– Copying data from one buffer to another is one of the most expensive operations a protocol implementation can perform.

• Memory is not getting fast as quickly as processors are– Solution: Rather than copying from buffer to buffer at each

layer of protocol stack, network subsystem defines a message abstraction shared by all protocols in the protocol graph.

• Can be viewed as string manipulations with pointersNote: you can’t move data any faster than the slowest copy operation!

Page 26: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 26

Implementation

• Are you using streams or request/reply, and what are the ramifications?

• What operating system are you coding on/for and where is the sockets library?

• What languages can you use, in theory?– Why would you wish to use specific languages?

• What will you have to do in your first assignment?

Page 27: Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)

Spring 2002 CS 332 27

Implementation• Port Numbers

– Solaris: reserved (513-1023), ephemeral(32768-65535)– BSD:reserved(1-1023), ephemeral(1024-5000), nonprivileged

servers(5001-65535)– IANA: well known (1-1023), registered(1024-49151), dynamic

(49152-65535)• Endian issues• Compiler flags

– Solaris –lsocket –lnsl– Linux no flags required

• Specifying command line arguments• Null characters in strings?