Protocol: “format and ordering of
messages exchanged between two or more communicating entities…”
(Return
to this next week when discussing layered nework architecture)
What
is client?
(requests services)
What
is server?
(provides services)
What
are examples of common client/server applications?
(www,
email, telnet, newsgroups, ftp,…)
Analogy
to telephone service:
-
protocol
to establish / close connection
(handshake)
-
reliable
service (error-free and correctly sequenced delivery)
Going
beyond the telephone analogy:
-
service
may also provide flow control - keep faster one from overwhelming slower one
-
(all
operating systems provide this between components. How?)
-
service
may also provide congestion control – prevent global gridlock
-
(related
to but distinguished from flow control.
Flow is local, congestion is global.)
-
Analogy
to streets of Springfield?
Internet
connection-oriented service provided by TCP (Transmission Control
Protocol)
Analogy
to snail mail service:
-
message
broken into packets
-
each
packet sent separately, maybe by different routes
-
NO
reliable service
o
packet
may not be delivered
o
packet
may be delivered w/ errors
o
packets
may not arrive in sequence
Internet
connectionless service provided by UDP (User Datagram Protocol)
Connection-oriented
or Connectionless service is end-to-end transport service and focus is
on hosts.
Transport
service hides the underlying network infrastructure ("core" in
author's terminology).
Network
infrastructure consists of interconnected routers.
Data
must be switched through routers to make its way from sending host to
receiving host.
Three
basic approaches toward implementing switched communication:
1. Circuit
switching : reserved and dedicated connection between hosts.
2. Packet
switching : message partitioned
into packets, switched separately w/o reservations
3. Message
switching : packet switching where one packet contains whole message
Preliminary
concept: bandwidth
More
on Circuit Switching:
Not
feasible to dedicate entire bandwidth of medium to one circuit all the
time. Medium is typically shared using
either:
1. Frequency Division Multiplexing (FDM), or
2. Time Division Multiplexing (TDM)
(note:
fiber optics gives rise to a third method, Wavelength Division Multiplexing)
Put
simply:
An
FDM circuit gets part of the medium bandwidth all the time,
A
TDM circuit gets all the medium bandwidth part of the time.
Which
type is an analog telephone line?
In
FDM, total bandwidth is partitioned into equal width bands (channels).
Analog
phone line channels 0Hz - 4000Hz, 4000Hz - 8000Hz, etc.
Of
the channel, 3000Hz is usable with 500Hz "guard band" around it.
In
TDM, time is partitioned into fixed length frames and each frame divided into
fixed number of time slots.
Example:
T1
-
1.544Mbps,
-
8000 frames per second,
-
each frame is 193 bits
-
each time slot is 8 bits
-
one frame thus supports 24 channels plus 1 timing bit. 8*24+1=193
-
effective throughput is 1.536Mbps
(subtracting the 8000 timing bits per second).
-
each channel gets 8 bits * 8000 frames per second, or 64000 bps.
The
major disadvantage of circuit switching is:
since
channel is reserved, bandwidth is wasted while inactive.
More
on Packet Switching
Multiplexing
occurs here too, only without reserved slots.
Since
packets are sent randomly from various sources, this is called Statistical
Multiplexing
Buffering occurs in router:
Sources
of delay in packet switched network:
Example:
1000
byte packet arrives on 10Mbps transmission link. What is the store-and-forward delay? If the first bit arrives at time t
and the last bit arrives at time t+Dt, then Dt is the store-and-forward
delay. For this example, the amount of
time to transmit 1000 bytes on a 10Mbps link. In general, packet size
divided by transmission rate. 8000
/ 10,000,000 = .8 milliseconds or 800 microseconds.
Example:
Assuming
fiber optic medium, signal propagates at near the speed of light. Assume 3 x 108 meters/second, or
300,000 km/second. What is propagation
delay over 3 km link?
3
km / 300,000 km per second = 1 / 100,000 second = 10 microseconds.
Example:
Assuming
satellite in geosynchronous orbit (~36,000 km altitude), and unguided
transmission at speed of light (300,000 km per second), what is propagation
from earthlink to satellite?
36,000
/ 300,000 = 120 milliseconds.
More
on Message Switching
Simply
a special case of packet switching:
message transmitted as one packet
Which
type of delay is likely to dominate in lightly-loaded earthbound network?
Compare
packet with message switching with an example:
-
message length is 8000 bytes (64000 bits)
-
There are 2 routers (R1,R2) between the 2 hosts (H1, H2).
-
each link has 1 msec. Propagation delay
-
For packet switching, packets are 1000 bits
-
transmission rate 1 Mbps
-
assume no processing or queuing delays and infinite router buffers
Packet
switching:
Total
of 64 packets are required (ignoring overhead bits)
First
bit of packet 1 arrives at R1 after 1 msec.
Last
bit of packet 1 arrives at R1 1000/1000000 sec later; at time 2 msec.
First
bit of packet 1 leaves R1 at time 2 msec.
First
bit of packet 1 arrives at R2 1 msec. later; at time 3 msec.
Last
bit of packet 1 arrives at R2 1000/1000000 later; at time 4 msec.
First
bit of packet 1 leaves R2 at time 4 msec.
First
bit of packet 1 arrives at H2 1 msec later; at time 5 msec.
- There are no queuing delays; packets are
received one after the other.
- H2 gets continuous stream of bits beginning
at time 5 msec.
(since all links are same xmit rate, first bit of packet P arrives at router
just as first bit of packet P-1 is leaving; last bit of packet P arrives at
router just as last bit of packet P-1 is leaving; at next tick the first bit of
packet P leaves router – thus continuous stream)
-
Since there are 64000 bits arriving at 1000000 bits per second, the
final bit will arrive 64,000/1,000,000, or 64 milliseconds, later.
- Total time is thus 5 + 64 = 69
milliseconds.
Message
switching
First
bit of message arrives at R1 after 1 msec.
Last
bit of message arrives at R1 64000/1000000 later; at time 65 msec.
First
bit of message leavesR1 at time 65 msec.
First
bit of message arrives at R2 1 ms. later; at time 66 msec.
Last
bit of message arrives at R2 64000/1000000 later; at time 66+64 = 130 msec.
First
bit of message leaves R2 at time 130 msec.
First
bit of message arrives at H2 1 msec. later; at time 131 msec.
Last
bit of message arrives at H2 64000/1000000 later; at time 131+64 = 195 ms.
Can
estimate circuit switching by eliminating store-and-forward delay:
Assume
message gets 8 bits/frame, with 8000 frames/second.
How
long does it take for first bit to arrive at receiving host?
First
bit arrives at receiving host after 3 msec (H1 -> R1 ->R2 -> H2)
Requires
8000 frames (64000 bit message / 8 bits per frame)
Last
bit leaves sender 1 second after the first bit (8000 frames at 8000 frames per
second)
Therefore
last bit arrives at receiver 1.003 seconds after first bit leaves
sender.
World
of packet switched networks can be broken down into:
Datagram:
Virtual
Circuit:
Layered
Network Architectures
See
notes from previous semesters, specifically http://www.cs.smsu.edu/~pete/csc465/notes/spring00/osi_model.html
-
OSI 7-layer model reference model
-
Definition of protocol and interface in this context.
-
Layer N-1 provides service to layer N.
-
N-PDU (Layer N Protocol Data Unit)
-
Role of headers
-
Typical layer functions
Internet
5-layer protocol stack:
Application
(5-PDU is message)
Transport
(4-PDU is segment)
Network
(3-PDU is datagram)
Link (2-PDU is frame)
Physical
(1-PDU) - job is to transmit
bits.
[notes | CSC 465 | Peter
Sanderson | Computer Science
| SMSU ]