some review slides

advertisement
A Day in the Life of an HTTP Query
Brower
application
1.HTTP
Socket interface
3.TCP
4.IP
client/server
paradiam
Web server
application
2.DNS query
multiplexing
demultiplexing
5.Ethernet
HTTP
Socket interface
TCP
IP
Ethernet
3.Transport
protocols
EI T
HTTP & data
6.IP router
7.Running routing protocol
5/12/05
1
CS118/Spring05
Computer Networking: the overall picture
 What is packet switching?
 Data is cut into chunks, sent in a "store-and-forward: way
 statistical multiplexing  queueing delay, potential losses
 why packet switching?
Efficient resource
sharing
Flexible delivery
Packet
(carries
destination
address)
Router-1
Router-2
header
data
 What’s in a packet:
 header: contains all the information,and only the information
that’s needed for the protocol’s functionality
5/12/05
2
CS118/Spring05
Relative importance of transmission&propagation delay
which link takes less time to get a packet to the other end?
(1) 1 Mbps bandwidth,
1 ms propagation delay
(2) 100 Mbps bandwidth,
100 ms propagation delay
1. Small packet (50bytes)
400bits
 1  1.4ms
1000bits / ms
400bits
D2 
 100ms  100.004ms
100,000bits / ms
D1 
80 106 bits
 1ms  80.001sec
2. Large packet (10MB) D1 
6
10 bits / s
80 106 bits
D2 
 100ms  180ms
6
100 10 bits / s
5/12/05
3
CS118/Spring05
Link Utilization: One Example
A sends packets to B using sliding window
 bandwidth:
1Mbps
 Propagation delay: 100 msec
 data packet size: 1000 bytes (ACK very small)
 window size: 4 packets
 RTT = trans-delay(8ms) + 200ms = 208ms
 utilization: (A's busy-time  total-time)
= (8ms  4)  208ms
propagation delay
A
B
bandwidth
8 msec
5/12/05
4
CS118/Spring05
IP Suite: End Hosts vs. Routers
host
host
HTTP message
HTTP
TCP segment
TCP
router
IP
Ethernet
interface
5/12/05
HTTP
IP packet
Ethernet
interface
IP
TCP
router
IP packet
SONET
interface
SONET
interface
IP
IP packet
Ethernet
interface
This course focuses5 on the routers…
IP
Ethernet
interface
CS118/Spring05
The HTTP protocol
Non-persistent
Use TCP transport service
 http/1.0: server parses request,
 client initiates TCP connection
(creates socket) to server
 server accepts TCP connection from
client
 http messages exchanged between
browser (http client) and Web server
(http server)
 TCP connection closed
responds, closes TCP connection
 2 RTTs to fetch object
http is “stateless”
 default for htp/1.1
 on same TCP connection: server


 many browsers open multiple parallel
connections
Persistent
 server maintains no information about
parses request, responds, parses new
request,..
 client sends requests for all
referenced objects as soon as it
receives base HTML.
 Pipelining: browser sending multiple
requests before getting responses
past client requests
5/12/05
TCP connection
object request/transfer
6
CS118/Spring05
DNS: Domain Name System
 provides name to IP address translation
 DNS
name: variable length, easy for human to
remember
 IP address: fixed length, tied to network topology,
easy for computer to process
 example: send mail to john@cs.ucla.edu
DNS
server
5/12/05
cs.ucla.edu
application
131.179.96.15
TCP
131.179.96.15
7
IP
131.179.96.15
CS118/Spring05
DNS usage example
 user provides the DNS name of the server
 Client process sends a query to a local DNS server
 each
host knows a local DNS server’s IP address
 the local DNS server either has the info or can get
it from another DNS server
 Client process receives the IP address from DNS
server reply, open a TCP connection to the
receiving host
5/12/05
8
CS118/Spring05
name space and naming system
name space
defines the set of all possible names
similar
to address space
can be either flat or hierarchical
• Ethernet address space is flat; DNS name space is
hierarchical
naming system
a collection of name-to-value bindings
name resolution
given a name, return the corresponding value
5/12/05
9
CS118/Spring05
Basic DNS design
a hierarchical name space
 starting from the root, growing downward (and
side ways too)
 variable depth hierarchy
 each
non-leaf node in the tree is a domain
 any domain can have its own sub-domains, no limit
on the depth of any branch
 DNS name structure is completely independent
from the Internet's topological structure
5/12/05
10
CS118/Spring05
Reliable data delivery between two nodes
 error/loss recovery by retransmission:
 sequence
number for each piece of data
 Acknowledgment
 retransmission timer
 sliding window: relations between seq# and
window size
(Max. seq. number + 1)/2  window-size
 relation between window size, throughput, and
round-trip time(RTT):
Equality achieved in the
absence of errors/losses
5/12/05
Window-size
Throughput 
round-trip time
11
CS118/Spring05
TCP header format
0
3
1
1
6
IP header
source port
destination port
Data sequence number
acknowledgment number
Hlen unused
u a p r s F
r c s s y i
g k h t n n
window size
checksum
urgent pointer
Options (viable length)
data
5/12/05
12
CS118/Spring05
ON TCP
 How does TCP achieve reliable data delivery?
 What
are the fundamental mechanisms?
 How do they work?
 How does TCP perform flow control?
 How does TCP perform congestion control?
 How does TCP estimate its RTT and set the
retransmission timeout (RTO)?
5/12/05
13
CS118/Spring05
IP Packet Structure
usually 20 bytes
usually IPv4
4-bit
8-bit
4-bit
Version Header Type of Service
Length
(TOS)
3-bit
Flags
16-bit Identification
fragments
8-bit Time to
Live (TTL)
16-bit Total Length (Bytes)
8-bit Protocol
13-bit Fragment Offset
16-bit Header Checksum
20-byte
Header
32-bit Source IP Address
more later
32-bit Destination IP Address
Options (if any)
Payload
5/12/05
14
error
check
header
CS118/Spring05
Download