Slide1 2
Slide1 2
* Queuing delays
B
nodal
processing queueing
** Components like routers, wireless access points and hosts consume some
time processing packets.
*** for routers this includes checking packets for errors and determining where
they should go next.
** added to other delays (like queuing , transmission).
** typically fairly small: 1-10 micro seconds for routers, 10-50 micro seconds for
hosts.
End-To-End Delay
3 probes 3 probes
3 probes
Packet loss
* Bits corrupted on links
** very rare in fiber – typically, less than 1 bit in 10^12 have errors.
** Far more frequent in wireless – one in 10^3 to one in 10 ^5.
*** also highly variable: interference, distance from access point.
*** can reduce using varity of coding techniques.
** Electrical signals over wire – intermediate error rates.
** Errors detected by routers, which discard corrupted packets.
** can be kept close to zero if traffic flows are regulated to avoid overloads.
** but very common in internet (packet loss rates of 2-20% are not unusual).
Consider a LAN with a maximum distance of 2km. At what bandwidth would propagation
delay (at a speed of 1 x 108 m/s) equals to transmit delay for 100-byte packets? What
about 512-byte packets?.
Solution
= 800 b / x Mbps = 20 us
x = 40 Mbps= 5MBps
Presentation Layer:
● Translation, cryptography, and code conversion take place at this level.
● A common Language is determined.
● Data Compression occurs.
● Data Encryption occurs.
● Big endians, little endians: data can be encoded prior to transmission data can
be decoded upon receipt.
Session Layer:
● Managing dialog control: Traffic can go in both directions at the same time, or
in only one direction at a time.
● Token management: both sides do not attempt the same operation at the same
time.
● Synchronization:Insertion of checkpoints to determine portions of
transmissions.
Transport Layer:
● The transport layer deals with accepting data from its higher layer, splitting
it up into smaller units if necessary, and then passing these units to the
network layer.
● This layer also ensures that all of the units arrive correctly at the other end,
and that all of this is done efficiently and in such a way as to isolate the
upper layers.
● The network layer deals with controlling the operation of the subnet.
● Controlling congestion
● Accounting functions
● packet headers
● virtual circuits
Data Link Layer:
● The data link layer deals with taking a raw transmission facility and
transforming it into a line that appears free of undetected transmission
errors to the network layer.
● How to resolve competition for the line when full duplex transmission
is used.
Physical Layer:
● The physical layer deals with the transmission of raw bits over a
communication channel.
● Client-server
● peer-to-peer (P2P)
Client-server architecture
server:
● always-on host
● permanent IP address
clients:
client/server
● communicate with server
clients, Servers
process: program running within a
host
● within same host, two processes client process: process that initiates
communicate using inter-process communication
communication (defined by OS)
server process: process that waits
to be contacted
● processes in different hosts
communicate by exchanging
messages
● aside: applications with P2P
architectures have client
processes & server processes
Sockets
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
Addressing processes
timing security
● ● encryption, data integrity, …
Transport service requirements: common apps
application underlying
application layer protocol transport protocol
● object can be HTML file, JPEG image, Java applet, audio file,…
www.someschool.edu/someDept/pic.gif
HTTP/1.0: HTTP/1.1:
● GET ● GET, POST, HEAD
● POST ● PUT
○ uploads file in entity body
● HEAD to path specified in URL
○ asks server to leave field
requested object out of
response ● DELETE
○ deletes file specified in
the URL field
HTTP response message
status line
(protocol
status code HTTP/1.1 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
lines Accept-Ranges: bytes\r\n
Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html;
charset=ISO-8859-1\r\n
\r\n
data, e.g., data data data data data ...
requested
HTML file
HTTP response status codes
client server
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response 1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
… …
○ responsible for com, org, net, edu, aero, jobs, museums, and all
top-level country domains, e.g.: uk, fr, ca, jp
○ Network Solutions maintains servers for .com TLD
○ Educause for .edu TLD
● when host makes DNS query, query is sent to its local DNS
server
○ has local cache of recent name-to-address translation pairs
(but may be out of date!)
○ acts as proxy, forwards query into hierarchy
DNS name root DNS server
resolution example
2
● host at cis.poly.edu wants 3
TLD DNS server
IP address for 4
gaia.cs.umass.edu
5
gaia.cs.umass.edu
DNS name root DNS server
resolution example
2 3
recursive query: 7
6
❖ puts burden of name
TLD DNS
resolution on contacted server
name server
local DNS server
4
❖ heavy load at upper dns.poly.edu 5
levels of hierarchy? 1 8
gaia.cs.umass.edu
DNS: caching, updating records
type=A type=CNAME
▪ name is hostname ▪ name is alias name for some
▪ value is IP address “canonical” (the real) name
▪ www.ibm.com is really
type=NS
▪ name is domain (e.g., servereast.backup2.ibm.com
foo.com) ▪ value is canonical name
▪ value is hostname of
authoritative name type=MX
server for this domain ▪ value is name of mailserver
associated with name
DNS protocol, messages
pipelined: ● connection-oriented:
TCP congestion and flow ○ handshaking (exchange of
control set window size control msgs) inits sender,
receiver state before data
exchange
● flow controlled:
○ sender will not overwhelm
receiver
TCP segment structure
32 bits
URG: urgent data counting
(generally not used) source port # dest port #
by bytes
sequence number of data
ACK: ACK #
valid acknowledgement number (not segments!)
head not
PSH: push data now len used
UAP R S F receive window
(generally not used) # bytes
checksum Urg data pointer
rcvr willing
RST, SYN, FIN: to accept
options (variable length)
connection estab
(setup, teardown
commands)
application
Internet data
checksum (variable length)
(as in UDP)
TCP seq. numbers, ACKs
outgoing segment from sender
sequence numbers: source port # dest port #
application application
network network
LAST_A
FINbit=1, seq=y CK
TIMED_WAIT can no longer
send data
ACKbit=1;
timed wait ACKnum=y+1
for 2*max CLOSED
segment
lifetime
CLOSED