Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

Packet delay: four sources

transmission
A propagation

B
nodal
processing queueing

dnodal = dproc + dqueue + dtrans + dprop

dproc: nodal processing dqueue: queueing delay


 check bit errors  time waiting at output link for
 determine output link transmission
 typically < microsecs  depends on congestion level of
router
Introduction: 1-1
Packet delay: four sources
transmission
A propagation

B
nodal
processing queueing

dnodal = dproc + dqueue + dtrans + dprop


dtrans: transmission delay: dprop: propagation delay:
 L: packet length (bits)  d: length of physical link
 R: link transmission rate (bps)  s: propagation speed (~2x108 m/sec)
 dtrans = L/R  dprop = d/s
dtrans and dprop
very different Introduction: 1-2
HTTP request message
 two types of HTTP messages: request, response
 HTTP request message:
• ASCII (human-readable format)
carriage return character
line-feed character
request line (GET, POST,
GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X
10.15; rv:80.0) Gecko/20100101 Firefox/80.0 \r\n
header Accept: text/html,application/xhtml+xml\r\n
lines Accept-Language: en-us,en;q=0.5\r\n
Accept-Encoding: gzip,deflate\r\n
Connection: keep-alive\r\n
\r\n
carriage return, line feed
at start of line indicates
end of header lines * Check out the online interactive exercises for more
examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ Transport Layer: 3-3
HTTP request message: general format
method sp URL sp version cr lf request
line
header field name value cr lf
header
~
~ ~
~ lines

header field name value cr lf


cr lf

~
~ entity body ~
~ body

Transport Layer: 3-4


Other HTTP request messages
POST method: HEAD method:
 web page often includes form  requests headers (only) that
input would be returned if specified URL
 user input sent from client to were requested with an HTTP
server in entity body of HTTP GET method.
POST request message
PUT method:
 uploads new file (object) to server
GET method (for sending data to server):  completely replaces file that exists
 include user data in URL field of HTTP at specified URL with content in
GET request message (following a ‘?’): entity body of POST HTTP request
www.somesite.com/animalsearch?monkeys&banana
message

Transport Layer: 3-5


HTTP response message
status line (protocol HTTP/1.1 200 OK
status code status phrase) Date: Tue, 08 Sep 2020 00:53:20 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.9
mod_perl/2.0.11 Perl/v5.16.3
Last-Modified: Tue, 01 Mar 2016 18:57:50 GMT
header ETag: "a5b-52d015789ee9e"
lines Accept-Ranges: bytes
Content-Length: 2651
Content-Type: text/html; charset=UTF-8
\r\n
data data data data data ...
data, e.g., requested
HTML file

* Check out the online interactive exercises for more examples: h ttp://gaia.cs.umass.edu/kurose_ross/interactive/
Transport Layer: 3-6
HTTP response status codes
 status code appears in 1st line in server-to-client response message.
 some sample codes:
200 OK
• request succeeded, requested object later in this message
301 Moved Permanently
• requested object moved, new location specified later in this message (in
Location: field)
400 Bad Request
• request msg not understood by server
404 Not Found
• requested document not found on this server
505 HTTP Version Not Supported
Transport Layer: 3-7
DNS records
DNS: distributed database storing resource records (RR)
RR format: (name, value, type, ttl)

type=A type=CNAME
 name is hostname  name is alias name for some “canonical” (the
 value is IP address real) name
 www.ibm.com is really servereast.backup2.ibm.com
type=NS  value is canonical name
 name is domain (e.g., foo.com)
 value is hostname of
type=MX
authoritative name server for  value is name of SMTP mail server
this domain associated with name
Application Layer: 2-8
DNS protocol messages
DNS query and reply messages, both have same format:
2 bytes 2 bytes

message header: identification flags

 identification: 16 bit # for query, # questions # answer RRs

reply to query uses same # # authority RRs # additional RRs


 flags:
questions (variable # of questions)
• query or reply
• recursion desired
answers (variable # of RRs)
• recursion available
• reply is authoritative authority (variable # of RRs)

additional info (variable # of RRs)

Application Layer: 2-9


DNS protocol messages
DNS query and reply messages, both have same format:
2 bytes 2 bytes

identification flags

# questions # answer RRs

# authority RRs # additional RRs

name, type fields for a query questions (variable # of questions)

RRs in response to query answers (variable # of RRs)

records for authoritative servers authority (variable # of RRs)

additional “ helpful” info that may additional info (variable # of RRs)


be used
Application Layer: 2-10
Output port queuing
datagram This is a really important slide
switch buffer link
layer line
fabric termination
protocol
(rate: NR) queueing (send) R

 Buffering required when datagrams arrive


from fabric faster than link transmission Datagrams can be lost
rate. Drop policy: which datagrams to drop due to congestion, lack of
if no free buffers?
buffers
 Scheduling discipline chooses Priority scheduling – who
among queued datagrams for gets best performance,
transmission network neutrality
Network Layer: 4-11
IP Datagram format
32 bits
IP protocol version number type of total datagram
ver head. length length (bytes)
header length(dword/4 byte) len service
fragment fragmentation/
“type” of service: 16-bit identifier flgs
 diffserv (0:5) offset reassembly
time to upper header
 ECN (6:7) header checksum
live layer checksum
TTL: remaining max hops source IP address 32-bit source IP address
(decremented at each router)
Maximum length: 64K bytes
destination IP address 32-bit destination IP address
upper layer protocol (e.g., TCP or UDP) Typically: 1500 bytes or less
options (if any) e.g., timestamp, record
overhead route taken
 20 bytes of TCP payload data Se usato header length
 20 bytes of IP sarà maggiore di 5
(variable length,
 = 40 bytes + app typically a TCP
layer overhead for or UDP segment)
TCP+IP
Network Layer: 4-12
IPv6 datagram format
flow label: identify
priority: identify
32 bits datagrams in same
priority among ver pri flow label "flow.” (concept of
datagrams in flow
payload len next hdr hop limit “flow” not well defined).
source address
128-bit (128 bits)
IPv6 addresses destination address
(128 bits)

payload (data)

What’s missing (compared with IPv4):


 no checksum (to speed processing at routers)
 no fragmentation/reassembly
 no options (available as upper-layer, next-header protocol at router)
Network Layer: 4-13

You might also like