Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
vuoi
o PayPal
tutte le volte che vuoi
RTT
Once the IP address is known, elapses to set up the TCP connection and another
O
RTT elapses to request and receive the small object. The total response time is
O + + + +
2 RTT RTT RTT RTT
o 1 2 n
Problem 7.
a) + + + + ⋅
RTT RTT 2 RTT 3 2 RTT
1 n o o
= + + +
8 RTT RTT RTT .
o 1 n
b) + + + +
RTT RTT 2 RTT 2 RTT
1 n o o
= + + +
4 RTT RTT RTT .
o 1 n
c) + + + +
RTT RTT 2 RTT RTT
1 n o o
= + + +
3 RTT RTT RTT .
o 1 n
Problem 8.
HTTP/1.0: GET, POST, HEAD.
HTTP/1.1: GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, CONNECT.
See RFCs for explanations.
Problem 9.
The time to transmit an object of size L over a link or rate R is L/R. The average time
a) is the average size of the object divided by R:
∆= (900,000 bits)/(1,500,000 bits/sec) = .6 sec
The traffic intensity on the link is (1.5 requests/sec)(.6 msec/request) = .9. Thus, the
average access delay is (.6 sec)/(1 - .9) = 6 seconds. The total average response time is
therefore 6 sec + 2 sec = 8 sec.
b) The traffic intensity on the access link is reduced by 40% since the 40% of the
requests are satisfied within the institutional network. Thus the average access delay
is (.6 sec)/[1 – (.6)(.9)] = 1.2 seconds. The response time is approximately zero if the
request is satisfied by the cache (which happens with probability .4); the average
response time is 1.2 sec + 2 sec = 3.2 sec for cache misses (which happens 60% of the
time). So the average response time is (.4)(0 sec) + (.6)(3.2 sec) = 1.92 seconds. Thus
the average response time is reduced from 8 sec to 1.92 sec.
Problem 11.
UIDL abbreviates “unique-ID listing”. When a POP3 client issues the UIDL command,
the server responds with the unique message ID for all of the messages present in the
users mailbox. This command is useful for “download and keep”. By keeping a file that
lists the messages retrieved in earlier sessions, the client can use the UIDL command to
determine which messages on the server have already been seen.
Problem 13.
a) For a given input of domain name (such as ccn.com), IP address or network
administrator name, whois database can be used to locate the corresponding registrar,
whois server, dns server, etc.
f) An attacker can use the whois database and nslookup tool to determine the IP address
ranges, DNS server addresses, etc. for the target institution.
g) If under an attack a victim can analyze the source address of packets, the victim can
then use whois to obtain information about domain from which attack is coming and
possibly inform the administrators of the origin domain.
Problem 14.
No. Because the link is full duplex, you have 128 kbps in each direction, and the
uploading does not interfere with the downloading.
Problem 15.
There are N nodes in the overlay network. There are N(N-1)/2 edges.
Problem 16.
a) In this case, each of the five Gnutella clients immediately learns that it has one less
neighbor. Consider one of these five clients, called, Bob. Suppose Bob has only three
neighbors after X drops out. Then Bob needs to establish a TCP connection with another
peer. Bob should have a fresh list of active peers; he sequentially contacts peers on this
list until one accepts his TCP connection attempt.
b) In this case, Bob does not immediately know that X has departed. Bob will only learn
about X’s departure when it attempts to send a message (query or ping) to X. When Bob
attempts to send a message, Bob’s TCP will make several unsuccessful attempts to send
the message to B. Bob’s TCP will then inform the Gnutella client that X is down. Bob
will then try to establish a TCP connection with a new peer (see part (a)) to rebuild a fifth
connection.
Problem 17.
a) The advantage of sending the QueryHit message directly over a TCP connection from
Bob to Alice is that the QueryHit message is routed by the underlying Internet without
passing through intermediate peers; thus, the delay in sending the message from Bob to
Alice should be substantially less. The disadvantage is that each peer that has a match
would ask Alice to open a TCP connection; Alice may therefore have to opens tens or
hundreds of TCP connections for a given query. Furthermore, there will be additional
complications if Alice is behind a NAT (see Chapter 4).
b) When a QueryHit message enters a peer, the peer records in a table the MessageID
along with an identifier of the TCP socket from which the message arrived. When the
same peer receives a QueryHit message with the same MessageID, it indexes the table
and determines the socket to which it should forward the message.
c) KR
Problem 18.
Answer is unchanged for Ping/Pong messages. Replace Query message with Ping
message and QueryHit message with Pong message
Problem 19. 2
a) Each super-group leader is responsible for roughly 200 = 40,000 nodes. Therefore, we
would need about 100 super-group leaders to support 4 million nodes.
b) Each group leader might store the meta-data for all of the files its children are sharing.
A super-group leader might store all of the meta-data that its group-leader children store.
An ordinary node would first send a query to its group leader. The group leader would
respond with matches and then possibly forward the message to its super-group leader.
The super-group leader would respond (through the overlay network) with its matches.
The super-group leader may further forward the query to other super-group leaders.
Problem 20.
Alice sends her query to at most N neighbors. Each of these neighbors forwards the query
to at most M = N-1 neighbors. Each of those neighbors forwards the query to at most M
neighbors. Thus the maximum number of query messages is
2 (K-1)
N + NM + NM + … + NM
2 (K-1)
= N(1 + M + M + … + M )
K
= N(1-M )/(1-M)
K
= N[(N-1) - 1]/(N-2) .
Problem 21.
a) If you run TCPClient first, then the client will attempt to make a TCP connection with
a non-existent server process. A TCP connection will not be made.
b) UDPClient doesn't establish a TCP connection with the server. Thus, everything
should work fine if you first run UDPClient, then run UDPServer, and then type some
input into the keyboard.
c) If you use different port numbers, then the client will attempt to establish a TCP
connection with the wrong process or a non-existent process. Errors will occur.
Problem 22.
See Web-server programming assignment for this chapter for guidance.
Problem 23.
With the original line, UDPClient does not specify a port number when it creates the
socket. In this case, the code lets the underlying operating system choose a port number.
With the replacement line, when UDPClient is executed, a UDP socket is created with
port number 5432 .
UDPServer needs to know the client port number so that it can send packets back to the
correct client socket. Glancing at UDPServer, we see that the client port number is not
“hard-wired” into the server code; instead, UDPServer determines the client port number
by unraveling the datagram it receives from the client (using the .getPort() method). Thus
UDP server will work with any client port number, including 5432. UDPServer therefore
does not need to be modified.
Before:
Client socket = x (chosen by OS)
Server socket = 9876
After:
Client socket = 5432
Server socket = 9876
Chapter 3 Review Questions
1. Source port number y and destination port number x.
2. An application developer may not want its application to use TCP’s congestion
control, which can throttle the application’s sending rate at times of congestion.
Often, designers of IP telephony and IP videoconference applications choose to run
their applications over UDP because they want to avoid TCP’s congestion control.
Also, some applications do not need the reliable data transfer provided by TCP.
3. Yes. The application developer can put reliable data transfer into the application layer
protocol. This would require a significant amount of work and debugging, however.
4. a) false b) false c) true d) false e) true f) false g) false
5. a) 20 bytes b) ack number = 90
6. 3 segments. First segment: seq = 43, ack =80; Second segment: seq = 80, ack = 44 ;
Third segment; seq = 44, ack = 81
7. R/2
8. False, it is set to half of the current value of the congestion window.
Chapter 3 Problems
Problem 1. source port destination port
numbers numbers
→
a) A S 467 23
→
b) B S 513 23
→
c) S A 23 467
→
d) S B 23 513
e) Yes.
f) No.
Problem 2.
Suppose the IP addresses of the hosts A, B, and C are a, b, c, respectively. (Note that
a,b,c are distinct.)
To host A: Source port =80, source IP address = b, dest port = 26145, dest IP address = a
To host C, left process: Source port =80, source IP address = b, dest port = 7532, dest IP
address = c
To host C, right process: Source port =80, source IP address = b, dest port = 26145, dest
IP address = c
Problem 3. 0 1 0 1 0 1 0 1
+ 0 1 1 1 0 0 0 0
1 1 0 0 0 1 0 1
1
1
0
0
0
1
0
1
+
0
1
0
0
1
1
0
0
0
0
0
1
0
0
0
1
One's complement = 1 1 1 0 1 1 1 0.
To detect errors, the receiver adds the four words (the three original words and the
checksum). If the sum contains a zero, the receiver knows there has been an error. All
one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit
of the first word is converted to a 0 and the last digit of the second word is converted to a
1).
Problem 4.
Suppose the sender is in state “Wait for call 1 from above” and the receiver (the receiver
shown in the homework problem) is in state “Wait for 1 from below.” The sender sends
a packet with sequence number 1, and transitions to “Wait for ACK or NAK 1,” waiting
for an ACK or NAK. Suppose now the receiver receives the packet with sequence
number 1 correctly, sends an ACK, and transitions to state “Wait for 0 from below,”
waiting for a data packet with sequence number 0. However, the ACK is corrupted.
When the rdt2.1 sender gets the corrupted ACK, it resends the packet with sequence
number 1. However, the receiver is waiting for a packet with sequence number 0 and (as
shown in the home work problem) always sends a NAK when it doesn't get a packet with
sequence number 0. Hence the sender will always be sending a packet with sequence
number 1, and the receiver will always be NAKing that packet. Neither will progress
forward from that state.
Problem 5.
To best answer this question, consider why we needed sequence numbers in the first
place. We saw that the sender needs sequence numbers so that the receiver can tell if a
- Risolvere un problema di matematica
- Riassumere un testo
- Tradurre una frase
- E molto altro ancora...
Per termini, condizioni e privacy, visita la relativa pagina.