You are on page 1of 2

Birla Institute of Technology & Science, Pilani

First Semester 2008-2009


Computer Networks (BITS C481)
Test-2 Regular (Close Book) [SOLUTIONS]
Date: 14/10/08 Time: 50 mints. Weightage: 20% (40M)

Sol:1 Total 8 RTTs required for file transmission. 1+1+3+1+1+1+1=9M

Sol:2
a) An IP datagram sent over L1 can contain at most 1480 bytes of data (since it uses 20
bytes for the header). Thus A is fragmented into 3 datagrams. Two of size 1500 (1480 + 20
bytes of header) followed by one of size 1040 (1020+20 bytes of header).
Only the last datagram, the one of size 1100, has its offset-flag bit set to 0. The other 2
datagrams have their offset-flag bits set to 1. 2+1=3M

b) An IP datagram sent over L2 can contain at most 1080=1100-20 bytes of data. Therefore
the two fragments of size 1500 (1480 data bytes) received by R2 must be fragmented
further into 2 fragments; each original being fragmented into one of size 1100 (20+1080)
and one of size 20+(1480-1080)=420. 3+2=5M
The third fragment received by R2, the one of size 1040, is small enough to be forwarded
over R2 without further fragmentation
Therefore H will receive 5 fragments in total:
1. Size 1100
2. Size 420
3. Size 1100
4. Size 420.
5. Size 1040
The only fragment with offset-flag bit set to 0 is the fragment of size 1040 originally sent
from R1 and then forwarded onto H by R2. The other 4 datagrams have their offset-flag
bits set to 1.

Sol:3
a) i) A ii) A iii) B iv) B 1+1+1+1=4M
b) /27 or 255.255.255.224 or /27 1M
c) First and last host address in subnet 3: 12.2.3.97, 12.2.3.126 1+1+1=3M
First and last host address in subnet 5: 12.2.3.161, 12.2.3.190
First and last host address in subnet 3: 12.2.3.193, 12.2.3.222
Note: First and last address in each subnet is used for subnet address and broadcast
address respectievely.
d) Broadcast address for subnet 1 and 2 are respectievely:12.2.3.63/27 and 12.2.3.95/27
1+1=2M

Sol: 4a Yes it is possible. 4M


123456
123456
123456

A1
Timeout, 123456
Resend 123456
1,2,3 123456

123456
A1
123456
123456

Sol:4b Traceroute sends a series of packets for which it sets the IP “Time To Live” (TTL)
hop-count field to different values. Setting the TTL to N will result in the Nth router
generating a “Time Exceeded” ICMP message which it sends back to the originating host.
Because ICMP messages are sent using IP packets, traceroute can extract from their source
address the IP address associated with the router at the Nth hop. 4M

Sol: 4c) Eventually, the NAT box needs to reclaim memory and port numbers to use for
new data transfers. Also, a stale map entry could be viewed as a security risk, as an
attacker could send packets to the hosts behind the NAT box using a source address and
port number of a past transfer. 2+2=4M

------------------------------------------------------------------------------------------

You might also like