direct connection between successive pairs of computers
protocol specifies meaning of bits between original sender
and original receiver
store-and-forward vs circuit-switching
switches implement the network, hosts are at the ends,
routers interconnect networks
Multiplexing
during telephone silences, circuit is not being used
could we use it for something else?
if we could, we would get more performance for the same price
statistical multiplexing:
divide data into units (cells, packets, messages)
send a unit from one source, then from another, then from another
framing problem: receiver must distinguish one unit of data from
the next unit of data
congestion: multiplexer might receive data faster than it can forward it
Network Purpose
identification (addressing)
logical channels between applications
"bit pipe"
what guarantees are offered, at what cost?
reliable delivery (might slow down transmission, require retransmission)
error-free delivery (might slow down transmission and reception)
likely notification of packet loss (hard to be certain, adds complexity)
client-server vs. streams
unicast, multicast, broadcast
connectionless or connection-oriented
Performance: Basics
how long will it take me to complete this operation?
2 components:
per-bit cost (bandwidth B)
per-round-trip cost (latency l)
t(bits) is the perceived latency of the operation:
t(bits) = K * l + K' * (bits / B)
the computation/transmission determines K and K', the
network determines l and B
Performance: Bandwidth
bandwidth: Hz (analog) or b/s (digital)
throughput: actual measured performance
example: a 10Mb/s (bandwidth) ethernet may only have a throughput
of 6Mb/s if the ethernet protocol keeps us from sending all the time
necessarily, throughput <= bandwidth:
hardware slower than link speed
software slower than link speed
per-packet overheads
use ttcp or netperf to measure throughput when you
have access to both ends
use ftp or the web or bing otherwise
Performance: Latency
latency (delay): time from send to receive
round-trip-time (delay): time from send to response -- easily measured
if l[ab] is the latency from a to b, then
rtt[ab] = l[ab] + l[ba] =~ 2 * l[ab]
latency = propagation + queue + transmit
Propagation Delay = ( distance / lightspeed) ,
generally fixed for a given route through the network
Queuing Delay = sum_s qs (s ranges over the systems
that the packet crosses, qs is the queuing delay at system s),
highly dependent on network congestion, zero if nobody else is
using the network
Transmission Delay = bits / bandwidth
Measuring Latency
ping returns round-trip time
test setup: have a different system, of known latency,
connect sender and receiver
special case: send packet through network back to sender
Bandwidth-Delay product
in reliable transmission, receiver acks data received,
sender can only send a window's worth of data before stopping
how big should a window be?
if I can send at 1Kb/s and the delay is 1ms, a very small window
is enough
if I can send at 1Gb/s and the delay is 1s, a very large window
is needed (at least 1Gb), or I will need to stop and wait for acks
the window must be at least as large as the Bandwidth-Delay product,
or we will stop "unnecessarily"
"delay" is round-trip delay, including time spent in the software
at the receiver machine
Questions/Break
given:
a connection from A, through S, to B -- all links are
bidirectional
the link from A to S carries 10Mb/s
the link from S to B carries 10Kb/s
the queuing delay within S from A to B is 100 ms, from B to A is 3ms
what is the bandwidth-delay product for sending from A to B?
what is the maximum throughput I can achieve from A to B?
what is the minimum time to send 10Mb of data from A to B?
Layering Principles
Each layer offers an abstraction of the layers below it.
Logically, all communication is between peers, protocols
at the same layer on different systems.
Each layer communicates with and only depends on the layer below
it and on its peers.
OSI Architecture
Application: user-level program (Web, e-mail, ftp, telnet)
Presentation: formatting, encryption, data encoding (ASN.1, XDR)
Session: establishing the endpoints, identification (TCP, UDP)