You are on page 1of 2

TCP: uses 1’s complement for their  Out-of-Band Control: FTP sends Propagation delay d/s = length of phys link/pop.

speed Packet switching: data sent 
its control information, which (2x108m/sec Transmission delay: R=link
checksums. UDP: preserves meg  through net in discrete chunks, 
includes user identification, bandwidth (bps) L=packet length (bits)
boundaries TCP: does not! Byte­ password, and put/get commands, time to send bits into link = L/R Maximum each end­to­end data stream 
stream oriented) on one connection, and sends data no of bits in the link: max {no of bits sent divided into packets, packets 
files on a separate parallel in dprop, file size} Nodal delay: dproc + dqueue share network resources, each 
connection. Because it uses a + dtransm + dprop Queue delay: L * a/R or packet uses full link BW 
separate connection for the control [NL+(L-X)]/R withN:packets already in
Congestion: packets queue and 
information, FTP uses out-of-band queue, x:bits of current transmitted pkt
P2P architecture: no always-on wait  asynchr. Stat. 
control. FTP: is application layer
server, arbitrary end systems
directly communicate, peers are
protocol, uses more than one port at multiplexing: sequence of 
intermittently connected and server, Messages “in­band” packets does not have to have 
change IP addresses, highly control & data messages may be  fixed pattern, shared on demand 
scalable interleaved (HTTP, DNS, SMTP)  Store&Forward: entire packets 
“out­of­bound”  control and data  must arrive at router before it can 
messages carried in separate  be transmitted to next link  
connections (FTP)
Components of web searching: TCP/IP model: application (Telnet, Client-Server: distr. Time dcs = max{N*F/Us, DNS: distributed DB, appl. layer
F
Crawler(gather content, depth FTP, SMTP,DNS) – Transport( /min(di)} where N: no. of peers, Us: upload protocol, maps IP address to
first), Index (organize), Rank (take TCP, UDP) – Internet (IP, time, F: file, di:download BW name(resolve names), root name
query), 4 laws: show ID, obey ARP,DHCP)—Network Access servers (.com/.org/.edu)  TLD
robot exclusion standard, not hog (Data Link—Physical) (Ethernet, (top level domain) servers:
resources, report errors ADSL) Socket: host-local, appl. created, OS responsible for .com/.org,
controlled interface into which app. authoritative DNS servers:
processes can both send and receive organizations, UDP
messages

Response time: 2*RTT (one to HTTP: web’s appl. protocol, uses Multiplexing (at sender): gathering data Information used in UDP for de­
initiate TCP con. + one for HTTP TCP, port 80, “stateless” (no info from multiple sockets, enveloping with
multiplexing Destination IP add, 
request and first few bytes of maintained) non-persistent: at header De-multiplexing (at receiver):
response) + transmit time most one object send over one TCP delivering received segments to correct Dest port no.; information used in 
RTT: EstRTT = (1­α)EstRTT + α  connection (1.0) 1) initiate 2) accept socket, each datagram has source IP +dest TCP for de­multiplexing  source 
3) send ‘request’ msg 4) forms IP, each segment has source port + dest IP, Source port no, dest IP, dest port 
SampRTT
‘response’ msg persitent: multiple port,
no.
objects over single connection,
server leaves conn. open after
sending response (1.1)
Reliable data transfer (rdt): 1)rdt_send() 2) udt_send() 3) rdt_rcv() 4) Go-back-N (GBN): window for up to N conseq. unACKed packets, timer
deliver_data() rdt2.1 seq# added (0,1) to check whether ACK, NAK is Selective repeat: individually ACKs for all corr. Received packets , only resend
corrupted, check for duplicates rdt3.0 timeout to check for loss, 4 stages: packets w/o ACKs, timeout buffer if out-of-order seq# >= 2n+1 because: receiver
1)send pkt0 2)rcv pkt0, send ACK0 3) rcv ACK0, send pkt1 4)rcv pkt1, waits for packet m window[m,m+n-1] (leading edge), received packet m-1 & n-
send ACK1, after timeoutresend Performance: T= L/R Utilization: 1 packets before, none of n ACKs yet received ACK message with [m-n,m-
U=T/RTT+L/R Pipelining: increment seq#, buffer at sender/receiver, increase 1]still propagating, none received window:[m-n,m-1](lower edge)to avoid
utilization overlap seq# space must be big enough to accommodate 2n seq#
Congestion Control: sender limits transmission: rate: congWin/RTT AIMD:  Delay modeling: R: rate/BW S: MSS(bits) O: Object size(bits) W: window
size/segments P: number of idle times Q: object infinite size K: no.of windows
increase by 1 after RTT until loss, cut CongWin half after loss Slow start: 
cover the object P=min{Q,K-1} K=[log2 (O/S +1)] Latency =2RTT + O/R +
CongWin=1MSS, double every RTT (increase CongWin for every ACK  P[RTT+ S/R] – (2P-1)S/R
rcvd), after 3 dup ACKs (loss)  cut in half, then linear growth, but after  Q=[log2(1+RTT/S/R)]+1 Slow start: fixed window WS/R>RTT+S/R 
timeout: set back to 1MSS  grow exp until threshold, then linear,  delay=2RTT+O/R , WS/R<RTT+S/R  delay=2RTT+O/R + (K-1)[S/R + RTT+
threshold: variable, ½ of CongWin before loss event WS/R]
TCP: point-to-point, reliable, in Connection Mgmt: 3­way  HTTP modeling: 1 base page + M images Characteristics of tier-1 ISP:
order, pipelined, buffers, full  non-persistent m+1 connections, total high link speed (1GB), direct
handshake: SYN (source 
duplex, conn-oriented flow control, resp. time = (M+1)*O/R + connection to all other tier-1 ISPs,
MSS: max segment size, TCP rdt: port+source IP,20bytes,SYN flag  connection to large no ofter tier-2
(M+1)*2RTT+sum of idle time, persistent
wait 500ms until ACK all segments set) –SYNACK –ACK  = (M+1)O/R + 3RTT + sum of idle times, ISPs, international coverage
, fast retransmit if sender receives 3 connection fully open, cosing  non-persistent with x parallel = (M+1)O/R
ACKs for same data connection: FIN—ACK,FIN—ACK  + (M/x +1)2RTT+sum…
Network layer: encapsulates segments into datagrams, forwarding & routing, datagram network(internet): connectionless  How much buffering: avg
buffering =(typical)RTT (e.g.
service, ”longest prefix matching”, “smart” end system (computers), many link types, Routers:  run routing 
250ms) * link capacity C with N
algorithm/protocol (RIP, OSPF,GBP) & forwarding, decentralized switching: given datagram destination, lookup output  flows RTT*C / sqrt(N)
port in forwarding table, queuing, (=input port fct) output port: Buffering, scheduling,
Email System: sender  [user agent]  [mail server(queue)]  smtp[mail server(queue)][user agent] receiver 1) sender sends mail through user
agent. Which ensures that the message reaches the mail server 2) The UA sends the message packet to the corresponding MS where the message is placed in 
the queue. This link works utilizing SMTP. 3) The mail server looks up the address of the recipients MS using DNS, sends the message to the MS again using 
SMTP. 4) now the message stays in the queue of the recipients MS. 5) receiver can now invoke the UA at his end to procure the message from the MS queue. 
The protocols used to do this are POP3 (authorization & transaction phase, stateless) or IMAP4 (keep all messages in one place/folder, keep user state), 
however Bob is using web­based mail, he will most probably invoke the UA and obtain the message using HTTP(hotmail, yahoo) 6) also if for some reason, 
Ann’s MS realizes that Bob’s MS is inaccessible or down, it will retain the message in its queue and try again at a rescheduled time. All Mailing protocols are 
application layer protocols and work on top of the TCP, which is transport layer protocol.  This is because reliability is more important than speed as compared 
to UDP
Exercise: n DNS servers have to be visit, one base HTML file + two small objects on server A, three small objects on server B  initially for all DNS contact to
obtain addresse = RTT1 + RTT2+…+RTTN = Σ RTTi a)non-persistent HTTP no parallel con: time = Σ RTTi + Σ RTTi +2RTT_A+2*2RTT_A+3*2RTT_B
b)non-persistent with parallel con: time = Σ RTTi + Σ RTTi + 2RTT_A (base file) +2RTT_A (for parallel con of 2 objects) + 2RTT_B (for parallel con for
3objects) c) persistent w/o pipelining: time= Σ RTTi + Σ RTTi + 2RTT_A + 2RTT_A + 4RTT_B d)persistent with pipelining: time= Σ RTTi + Σ RTTi +
2RTT_A + 1RTT_A + 2RTT_B

Exercise: sending 700bytes over TCP connection MSS=200bytes, org. window size 200byte, slow start, timeout 700ms, it takes all pkts 200ms to arrive