Computer Network Previous Year
Computer Network Previous Year
Information Technology
B.Tech (6th Semester)
Assignment 3 (For All Students)
Subject Name: Computer Network Subject Code: KCS 603
Note: Maintain an assignment register. Collaboration and use of external sources are permitted, but must be
fully acknowledged and cited. You will get most out of the problems if you tackle them on your own.
Collaboration may involve only discussion; all the writing must be done individually. Be ready for the viva
voice at the time of assignment submission.
Problem 1: Fragmentation
Suppose a router receives an IP packet of 552 bytes, and has to fragment the packet and forward the fragments across a
network with an MTU of 300 bytes. Then, a subsequent router has to further forward the packet (and/or any resulting
fragments) onto another network that has an MTU of 100 bytes. Here, the MTU refers to the size of the largest packet
that can be carried in a link-layer frame. If the size of the TCP header is 20 bytes and that of the IP header is also 20
bytes (i.e., there are no options), compute the values for the following fields in the IP headers for all of the fragments
that traverse each network:-
a) Length
b) MF
c) Offset
Problem 2: Why does the Offset field in the IP header measure the offset in 8-byte units? (Hint: Recall that the Offset
field is 13 bits long.)
Problem 3: Suppose a TCP message that contains 1024 bytes of data and 20 bytes of TCP header is passed to IP for
delivery across two networks interconnected by a router (i.e., it travels from the source host to a router to the destination
host). The first network has an MTU of 1024 bytes; the second has an MTU of 576 bytes. Each network’s MTU gives the
size of the largest IP datagram that can be carried in a link-layer frame. Give the sizes and offsets of the sequence of
fragments delivered to the network layer at the destination host. Assume all IP headers are 20 bytes.
Problem 4: In a datagram, the M bit is zero, the value of HLEN is 5, the value of total length is 200, and the offset value
is 200. What is the number of the first byte and number of the last byte in this datagram? Is this the last fragment, the first
fragment, or a middle fragment?
We use CIDR. Without using longest prefix matching, a forwarding table looks like this. If we use longest prefix
matching, we can combine a few entries together. What is a table with a minimum number of entries that still be able to
forward packet correctly?
Problem 6: IP forwarding.
Consider the network diagram below. Each router (a square in the figure) is labeled with the names of its interfaces (e.g.,
eth0) and the IP addresses assigned to each. Each network (a circle) is labeled with its network name and prefix length.
a) Suppose the following IP packet arrived at a router R1. (Only a subset of the header fields are shown.) Which
entry in the forwarding table would it match?
Problem 7: IP forwarding.
Consider the forwarding and (partial) ARP tables below taken from a router connected to four different networks on ports
eth0, eth1, eth2, and eth3. The router uses the IP addresses 192.168.32.2, 192.168.0.3, 192.168.6.1, and 192.168.7.1, on
each of those networks, respectively.
a) Suppose the following Ethernet frame arrived at a router with the tables above. (Only a subset of the header fields
are shown.) Which entry in the forwarding table would it match?
b) Assume that the packet is forwarded according to the tables above. What would the following fields of the frame
contain as it leaves the router?
Problem 8: An IP datagram has arrived with the following information in the header (in hexadecimal):
45 00 00 54 00 03 00 00 20 06 00 00 7C 4E 03 02 B4 0E 0F 02
Problem 10: A router with IP address 195.5.2.12 and Ethernet physical address AA:25:AB:1F:67:CD has received a
packet for a destination with IP address 185.11.78.10. When the router checks its routing table, it finds out the packet
should be delivered to a router with IP address 195.5.2.6 and Ethernet physical address AD:34:5D:4F:67:CD.
a. Show the entries in the ARP request packet sent by the router. Assume no subnetting.
b. Show the entries in the ARP packet sent in response to part a.
c. Encapsulate the packet made in part a in the data link layer. Fill in all the fields.
d. Encapsulate the packet made in part b in a data link frame. Fill in all the fields.
Problem 11: Link and Network Layer
Problem 13: You have just explained the ARP protocol to a friend. When you are all done, he says: ''I've got it.
ARP provides a service to the network layer, so it is part of the data link layer.'' What do you say to him?
For the network shown below, provide a global distance-vector table, indicating the distance from each node to
all other nodes, when:
a. Each node only knows the distances to its immediate neighbors
b. Each node has reported the information it had in the preceding step to its immediate neighbors.
c. Step (b) happens a second time
For the same network topology provided in the previous question, state how the link-state algorithm would build
the routing table for node D. To start you off, the first entry of the table for D has been provided below; use this
to get to the next step, and the next, and so on, to get the final routing table for D.