Assignment #4 - comp

advertisement
Computer Communications Network (COMP312)
Assignment Four
(Due on 30 Apr., 2004)
1. The diagram below shows a company with 4 remote sites (LANs) and two IP tunnels established
between R1 and R3, and between R2 and R4. The company's policy mandates that all inter-LAN
communication must use IP tunnels (for security reasons). The following setup obviously does not
comply with the company's policy.
Add a least number of additional IP tunnels to the network, such that the company's policy is
complied. Explain your answer, and show the routing paths for LAN A to reach other LANs.
IP tunnel 1
R1
R3
R2
R4
IP tunnel 2
LAN A
LAN B
LAN C
LAN D
2. When router X receives an RIP message from its neighbor router Y, which contains a route to a
destination network D with a distance of d hops, it calls the function update_route() to update its
routing table:
update_route(D, d, Y)
{
if (a route to D does not exist)
Add a new routing entry: Destination = D, Cost = d + 1, Next_hop = Y.
else
...
},
Fill in the missing else statement.
3. Consider the following IP network that is subnetted with a fixed-length subnet mask. The
numbers next to the LAN segments indicate their subnet numbers. The routers use RIP-I to share
the routing information with split horizon and poisonous reverse. Use a hop count of 16 to
represent infinity. Assuming that the routing protocol has reached the steady state, write down the
distance vectors sent by R2 and R4 on subnet 4 (use the table format on the next page). Explain
your answers briefly.
1
R1
2
R2
3
4
R3
R4
R5
5
6
R6
R7
7
1
8
Destination (Subnet no.)
1
2
3
4
5
6
7
8
Number of hops
(not included)
4. Consider the following IP subnetted network. The three routers employ a routing protocol that do
not carry subnet mask information (e.g., RIP-I). Therefore, the route's subnet mask is assumed to
be the same as the subnet mask of the network interface where the route is received.
In this case, can a host on LAN D reach a host on LAN A? Explain your answer.
LAN A:
132.10.3.128/26
R1
LAN C:
132.10.1.0/24
LAN B:
132.10.3.64/26
R2
R3
LAN D:
132.10.2.0/24
5. Both TCP and UDP use end-to-end checksum to detect errors that escape from error detection
from the lower layers (IP and data-link) and errors occurred to the packets while residing in router
buffers. Consider the following TCP connection that spans across three data-link networks. Each
data-link network provides CRC for error detection. Consider the following two scenarios:
a) Errors have been introduced to the source IP address when the packet is buffered in R1, and
there are no other errors.
b) Errors have been introduced to the source IP address in the link between S and R1, and there
are no other errors.
TCP connection
S
R1
CRC/IP checksum
R2
CRC/IP checksum
R
CRC/IP checksum
Assume that each CRC can detect the errors with probability pCRC and each 16-bit checksum (for
both IP and TCP) can detect the errors with probability pIP. The error detection events are
mutually independent. Compute the probability that the errors can be detected for scenarios (a)
and (b).
2
6. Consider a TCP connection establishment in which a client does an active open and a server does
a passive open. Moreover, the acknowledgment from the client (the third TCP segment) is lost.
a) Will the client still be able to send data to the server and why?
b) Will the server receive the data and why, assuming that the data arrives at the receiver
correctly?
c) Contrary to what was said in the class about the active/passive close of TCP connections, an
HTTP server in fact performs an active close and an HTTP client performs a passive close.
There are a few good reasons for this design. However, point out one disadvantage of this
design.
7. This question concerns the states kept by a TCP sender and a TCP receiver for data transmission.
Note: your answer may not need all the items stated in the "Given List."
a. Given LastByteWritten, LastByteAcked, LastSentByte, and MaxSendBuffer, what is the
condition that the TCP sender allows an application process to write D bytes of data into the
TCP send buffer?
b. Given LastByteWritten, LastByteAcked, LastSentByte, and MaxWindow, what is the condition
that all the data in the send buffer can be sent out immediately, without waiting for
acknowledgments?
c. Given LastByteWritten, LastByteAcked, and LastByteSent, and that the TCP sender just
receives an acknowledgment (the value of the acknowledgment is given by ACK), what is the
condition that this acknowledgement will acknowledge all the data that has been sent out?
d. Given MaxRcvBuffer, LastByteRead, NextByteExpected, and LastByteRcvd, what is the
maximum amount of out-of-ordered data that the TCP receiver can buffer?
3
Download