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.

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.

Destination (Subnet no.) / Number of hops
1
2
3
4 / (not included)
5
6
7
8

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.

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.

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).

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."

  1. 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?
  2. 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?
  3. 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?
  4. Given MaxRcvBuffer, LastByteRead, NextByteExpected, and LastByteRcvd, what is the maximum amount of out-of-ordered data that the TCP receiver can buffer?

1