Вы находитесь на странице: 1из 2

FTP: is application layer protocol, uses more than one port at server side.

Out-of-Band Control: FTP sends its control information, which includes user identification, password, and put/get commands, on one connection,
and sends data files on a separate parallel connection. Because it uses a separate connection for the control information, FTP uses out-of-band control. Components of web searching: Crawler/Index/Rank. Propagation
delay is defined as how long it takes for a certain amount of bytes to transferred over a medium. Propagation delay is the distance between the two routers divided by the propagation speed. d/s where d is the distance and s is
the speed. Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R Propagation delay: d = length of physical link s = propagation speed in medium (2x108m/sec) propagation
delay = d/s. Consider two hosts, A and B, are separated by 5,000 kilometers and are directly connected by a link with transmission rate R=20Mbps. The propagation speed over the link is 2.5*108meters/sec. What
is the propagation delay of the link? Propagation delay = distance/speed, = (5000x1000)/2.5 x 10^8, (50 x 100000)/(25 x 10^7), 2/10^2, = .02 secs Consider only one file of 50,000 bits from Host A to Host B. What is the
transmission delay? D trans = L/R, t= 50000/(20x10^6) + 0.02, = .0025 + .02, = .0225 secs. Suppose the file is sent continuously as one big message. What is the maximum number of bits that will be in the link at any given
time? D (end-to-end) = ( m/s + L/R), At 0.02 seconds, the first bit reaches host B, we have to find out how many bits were transmitted into the link in 0.02 seconds, R=20mbps, In 1 second 0mb are sent, In 0.02 seconds
(20x0.02) mbs are sent, In 0.02 seconds, 0.4mb or 4000,000 bits are sent, Now 400,000 > 50,000(file size), Hence a maximum of 50,000 bits can be in the link during the file transfer, A max of 50,000 bits will be in the link
during the file transfer. Let x denote the size of the file, what is the minimum value of x for the link to be continuously transmitting? P2P architecture: no always-on server, arbitrary end systems directly communicate, peers
are intermittently connected and change IP addresses. Email System: ann@njit.edu  [user agent]  [mail server]  smtp[mail server][user agent] bob@gmail.com 1) Ann uses UA to compose message and
“to bob. 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) bob@gmail.com can now invoke the UA at his end to procure the message from the MS queue. The protocols
used to do this are POP3 or IMAP4, however bob is using web-based mail, and he will most probably invoke the UA and obtain the message using HTTP. 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. UDP and TCP uses 1’s complement for their checksums. Suppose UDP and TCP use 8-bit words in computing the checksum write down the checksum of
this message 010101010111000001001100 11101101. Write down the information used in UDP for de-multiplexing Destination IP add, Dest port no.; write down the information used in TCP for de-multiplexing source IP,
Source port no, dest IP, dest port no. Suppose within your web browser, you click on a link to obtain webpage. The IP address for associated URL is not cached in your local host. Suppose that DNS servers should be
visited before your host receives the IP address. The successive visits incur an RTT of RTT1,RTT2,…,RTTn. Suppose that the base html file associated with the link references two very small objects on the same
server A and another three small objects in another server B. Let RTT_A denote the RTT between the local host and server A and RTT_B denote the RTT between the local host and server B. Suppose the IP
address of server B is not cached in the local host. Neglecting transmission times, a) Nonpersistent http with no parallel TCP connections? Time = DNS for A + time for base + Time for 2 objects A + DNS for B +
Time for 3 objects B, Time = (i=1)E^n RTTi +(j=1)E^n RTTj + 2RTT_A + 2x2 RTT_A + 3x2 RTT_B. b) nonpersistent http with parallel connections? Time= DNS for A + Time for Base + 2 RTT_A + DNS for B + 2
RTTB c) Persistent http without pipelining or parallel connection? Time = DNS A + Time for Base + Time for 2 object A + DNs B + Time for 3 Object B, =(i=1)E^n RTTi + 2RTT_A + 2 RTT_A + (j=1)E^n RTTj + 4
RTT_B, = (i=1)E^n RTTi + (j=1)E^n RTTj + 2 RTT_A + 2RTT_A + 4RTT_B d) Persistent http with pipelining and parallel connections? Time = DNS A + time for base + 2 objects A + DNS B + Time for 3 Objects, =
(i=1)E^n RTTi + (j=1)E^n RTTj + 2 RTT_A + mRTTA + 2 RTT_B. Host A requests a HTML file of size O = 100kbytes from web server B. suppose RTT = 100 msec and S = 100bytes. Transmission rate R = 1mbps.
The Transmission goes through a slow start process. No error and no congestion in the network. Calculate the total time for Host A to get to file. O =100kb, RTT = 100ms, S =100B, R=1Mbps, Latency = 2 RTT +
O/R + P[RTT +(S/R)]-((2^p)-1)S/R. P = min(Q, k -1), K = [log2 ((O/S)+1), = [log2((100x1000/100) +1)], [log2(1001)] =10. Q =[log2 [(1+ (RTT/(S/R)))] +1], =[log2 [( 1 + (100 x 1000 x 1000/1000x 100 x 4))] +1 ],
=[log2(251) +1], =8. log2(z)=log(z)/log(2). Latency = 2 x (100/1000) + (100x1000)/(10^6)/4 + 8[(100/1000) + (100/(10^6/4))] – ((2^8-1)-1)x 4(10^4). = 1.3520 seconds. Window size vs. Sequence #, suppose that the
lowest sequence number that the receiver is waiting for is packet m. In this case, its window is [m, m+w-1] and it has received and ACKed packet m-1 and the w-1 packets before that, where w is the size of the window. If
none of those w ACKs have been yet received by the sender, then ACK messages with values of [m-w,m-1] may still be propagating back. If no ACKs with these ACK numbers have been received by the sender, then the
sender’s window would be [m-w, m-1]. Thus, the lower edge of the senders’ window is m-w, leading edge of the receivers window is m+w-1. In order for the leading edge of receiver’s window to not overlap with the training
edge of the sender’s window, the sequence number space must thus be big enough to accommodate 2w sequence numbers. That is, the sequence number space must be at least twice as large as the window size, k > w. Q =
[log2 (1 + (RTT/(S/R))] +1 , K= [log2((o/s) +1)]. Propagation delay d/s = length of phys link/pop.speed (2x108m/sec Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R Maximum no of
bits in the link: max {no of bits sent in dprop, file size} Nodal delay: dproc + dqueue + dtransm + dprop Queue delay: L * a/R or [NL+(L-X)]/R withN:packets already in queue, x:bits of current transmitted pkt P2P architecture: no
always-on server, arbitrary end systems directly communicate, peers are intermittently connected and change IP addresses, highly scalable. Response time: 2*RTT (one to initiate TCP con. + one for HTTP request and first
few bytes of response) + transmit time RTT: EstRTT = (1­α)EstRTT + α SampRTT. Packet switching: data sent through net in discrete chunks, each end­to­end data stream divided into packets, packets share network 
resources, each packet uses full link BW Congestion: packets queue and wait  asynchr. Stat. multiplexing: sequence of packets does not have to have fixed pattern, shared on demand Store&Forward: entire packets must 
arrive at router before it can be transmitted to next link  Out-of-Band Control: FTP sends its control information, which includes user identification, password, and put/get commands, on one connection, and sends data files
on a separate parallel connection. Because it uses a separate connection for the control information, FTP uses out-of-band control. FTP: is application layer protocol, uses more than one port at server, Messages “in­band”
control & data messages may be interleaved (HTTP, DNS, SMTP) “out­of­bound”  control and data messages carried in separate connections (FTP) Multiplexing (at sender): gathering data from multiple sockets,
enveloping with header De-multiplexing (at receiver): delivering received segments to correct socket, each datagram has source IP +dest IP, each segment has source port + dest port. 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 cover the object P=min{Q,K-1} K=[log2 (O/S +1)] Latency =2RTT + O/R + P[RTT+ S/R] – (2P-1)S/R
Q=[log2(1+RTT/S/R)]+1 Slow start: fixed window WS/R>RTT+S/R  delay=2RTT+O/R , WS/R<RTT+S/R  delay=2RTT+O/R + (K-1)[S/R + RTT+ WS/R]. Client-Server: distr. Time dcs = max{N*F/Us, F/min(di)} where N: no.
of peers, Us: upload time, F: file, di:download BW. Socket: host-local, appl. created, OS controlled interface into which app. processes can both send and receive messages. DNS: distributed DB, appl. layer protocol, maps IP
address to name(resolve names), root name servers (.com/.org/.edu)  TLD (top level domain) servers: responsible for .com/.org, authoritative DNS servers: organizations, UDP. TCP: uses 1’s complement for their 
checksums. UDP: preserves meg boundaries TCP: does not! Byte­stream oriented) Components of web searching: Crawler(gather content, depth first), Index (organize), Rank (take query), 4 laws: show ID, obey robot
exclusion standard, not hog resources, report errors. TCP/IP model: application (Telnet, FTP, SMTP,DNS) – Transport( TCP, UDP) – Internet (IP, ARP,DHCP)—Network Access (Data Link—Physical) (Ethernet, ADSL)
HTTP: web’s appl. protocol, uses TCP, port 80, “stateless” (no info maintained) non-persistent: at most one object send over one TCP connection (1.0) 1) initiate 2) accept 3) send ‘request’ msg 4) forms ‘response’ msg
persitent: multiple 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) deliver_data() rdt2.1 seq# added (0,1) to check
whether ACK, NAK is corrupted, check for duplicates rdt3.0 timeout to check for loss, 4 stages: 1)send pkt0 2)rcv pkt0, send ACK0 3) rcv ACK0, send pkt1 4)rcv pkt1, send ACK1, after timeoutresend Performance: T=
L
/R Utilization: U=T/RTT+L/R Pipelining: increment seq#, buffer at sender/receiver, increase utilization How much buffering: avg buffering =(typical)RTT (e.g. 250ms) * link capacity C with N flows RTT*C / sqrt(N) 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. Host A is sending host B a file of 700 bytes over TCP
connection. MSS = 200 bytes. The original window size is 200 bytes and the TCP connection is going through a slow start procedure. The timeout value is 700ms. It takes all the packets, including data packets and
ACK packets, 00ms to arrive at host B except the 2ed, the 3rd and the last data packets. The 2ed and the 3rd data packets are lost. It takes the last data packet 250ms to arrive. Draw in the figure all the packets
needed for transferring the file, their arrival time, ack# and seq#.
A TCP connection is used to send 120kb of data. The sender has an MSS(maximum segment size) of 4kbytes and a congestion window threshold of 16kbytes. Assuming that the sender detects a triple dup ACK at
the end of the 3th RTT and a timeout at end of 8th RTT. The receiver’s buffer size is 22kb. Show the values of congestion window size, congestion window threshold, and amount of data sent over time for each
RTT.
RTT Threshold Congestion window Size Data Sent
1 16k 4k 4k
2 16k 8k 12k
3 16k 16k 28k
4 8k 8k 36k
5 8k 12k 48k
6 8k 16k 64k
7 8K 20k 84k
8 8k 22k (rcv buffer)
9 11k 4k
100 11k 8k

Вам также может понравиться