CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1
Lecture No. 2
Multiplexing
• Physical links/switches must be shared among users
– (synchronous) TimeDivision Multiplexing (TDM)
– FrequencyDivision Multiplexing (FDM)
L1
R1
Multiple flows
on a single link
L2
L3
R2
Switch 1
Switch 2
R3
Do you see any problem with TDM / FDM ?
3
Statistical Multiplexing
•
•
•
•
Ondemand timedivision, possibly synchronous (ATM)
Schedule link on a perpacket basis
Buffer packets in switches that are contending for the link
Packets from different sources interleaved on link
…
Do you see any problem ?
4
Statistical Multiplexing
• An application needs to breakup its message in packets,
and reassemble at the receiver
• Fair allocation of link capacity: FIFO, roundrobin or
QoS
• If congestion occurs at a switch buffer may overflow,
packets may be lost
…
5
Enough … ?
• A network is delivering packets among a
collection of computers
• How application processes communicate in
a meaningful way ?
• Hide network complexity by implementing
the common services once
6
InterProcess Communication
• Turn hosttohost connectivity into processtoprocess
communication, making the communication meaningful.
• Fill gap between what applications expect and what the
underlying technology provides.
Host
Host
Application
Host
Abstraction for
applicationlevel
communication
Channel
Application
Host
Host
7
IPC Abstractions
• Semantics and interface depend on applications
• Message stream
• Request/Reply
– distributed file systems
• file servers (FTP)
– digital libraries / HTTP
• information retrieval
– video ondemand
– video conferencing
• reliable ?
• prioritized ?
• delay/bandwidth guarantees ?
•
•
•
•
•
•
delay sensitive
twoway frame flow
1/4 NTSC = 352x240 pixels
(352 x 240 x 24)/8=247.5KB
30 fps = 7500KBps = 60Mbps
10fps + compression < 10Mbps
8
Abstract Channel Functionality
• What functionality does a channel provide ?
– Smallest set of abstract channel types adequate
for largest number of applications
• Where the functionality is implemented ?
– Network as a simple bitpipe with all highlevel
communication semantics at the hosts
– More intelligent switches allowing hosts to be
“dumb” devices (telephone network)
9
What Goes Wrong in the Network?
Reliability at stake
• Bitlevel errors (electrical interference)
• Packetlevel errors (congestion)
– distinction between lost and late packet
• Link and node failures
– distinction between broken and flaky link
– distinction between failed and slow node
10
What Goes Undesirable in the Network?
Required performance at stake
•
•
•
•
Messages are delayed
Messages are delivered outoforder
Third party’s eavesdrop
The challenge is to fill the gap between
application expectations and hardware
capabilities
11
Performance Metrics
• … and to do so while delivering
“good” performance
• Bandwidth (throughput)
– data transmitted per unit time, e.g. 10 Mbps
– link bandwidth versus endtoend bandwidth
– notation
• KB = 210 bytes
• Kbps = 103 bits per second
12
Performance Metrics
Bandwidth related to “bit width”
1Mbps, 1µs/bit
(a)
1 second
2Mbps, 0.5µs/bit
(b)
1 second
13
Performance Metrics
• Latency / delay
– time to send message from point A to point B
– oneway versus roundtrip time (RTT)
– components
Latency = Propagation + Transmit + Queue
Propagation = Distance / c
Transmit = Size / Bandwidth
• Note:
• No queuing delay in direct (pointtopoint) link
• Bandwidth irrelevant if size = 1 bit
• Processtoprocess latency includes software processing overhead
(dominates over shorter distances)
14
Bandwidth versus Latency
• Relative importance, depends on application
• 1byte character:
– Choice of 1ms vs 100ms dominates 1Mbps vs
100Mbps
• 25MB file:
– Choice of 1Mbps vs 100Mbps dominates 1ms vs
100ms
• Large data (file transfer) is bandwidth critical
• Small data (HTTP) is latency critical
15
Bandwidth versus Latency
10,000
5000
2000
Perceived latency (ms)
1000
500
1-MB object, 1.5-Mbps link
1-MB object, 10-Mbps link
2-KB object, 1.5-Mbps link
2-KB object, 10-Mbps link
1-byte object, 1.5-Mbps link
1-byte object, 10-Mbps link
200
100
50
20
10
5
2
1
10
RTT (ms)
100
16
Delay x Bandwidth Product
• Amount of data “in flight” or “in the pipe”
• Example: 100ms RTT x 45Mbps BW = 560KB
• This much data must be buffered before the sender
responds to slowdown the request
Delay
Bandwidth
17
Infinite Bandwidth
• Latency (RTT) dominates instead of throughput
– Throughput = TransferSize / TransferTime
– TransferTime = RTT + 1/Bandwidth x TransferSize
• 1 MB file over a 1 Mbps network takes around 8 sec
– With RTT of 100ms, it corresponds to 80 RTTs
– Effective throughput is 1MB/8.1s = 0.987Mbps
• 1 MB file over a 1 Gbps network takes 100ms + 8ms
– Effective throughput is 1MB/108ms = 74.1 Mbps
• 1MB file to 1Gbps link apears like a 1KB packet
to 1Mbps link
18
Bandwidth Requirements
• Request/reply type applications may agree for as
much bandwidth as is available
• Message stream type applications often require a
certain bandwidth: not more not less
• Average required bandwidth does not always help
to design a network
– Upper bound on a burst (peakrate transfer)
• Queuing delay introduces variation in latency
(jitter)
19
Wrapup
• Established a comprehensive set of requirements
for network design
• Networks evolve to accommodate changes in
underlying technologies and user demands
• However, hardware and user expectations are
moving targets …
20
Network Architecture
• The challenge is to fill the gap between hardware
capabilities and application expectations, and to
do so while delivering “good” performance
• Designers cope with this complex task by
developing a network architecture as a guideline
– Layering, protocols, standards
21
Layering
• Use abstractions to hide complexity
• Abstractions naturally lead to layering
• Each layer provides some functionality
Application programs
Process-to-process channels
Host-to-host connectivity
Hardware
22
Layering
• Alternative abstractions at each layer
• Manageable network components
• Modify layers independently
Application programs
Request/reply
channel
Message stream
channel
Host-to-host connectivity
Hardware
23
Protocols
• Building blocks of a network architecture
• Each protocol object has two different interfaces
– service interface: operations on this protocol
– peertopeer interface: messages exchanged with peer
• Term “protocol” is overloaded
– specification of peertopeer interface
– module that implements this interface
– peer modules are interoperable if both accurately
follow the specifications
24
Protocol Interfaces
Host 1
High-level
object
Protocol
Host 2
Service
interface
Peer-to-peer
interface
High-level
object
Protocol
25