0% found this document useful (0 votes)
16 views

Computer Network Previous Year

The document provides 14 problems related to computer networking topics such as fragmentation, forwarding tables, routing algorithms, and the ARP protocol. Students are asked to solve the problems, which involve concepts like IP addressing, fragmentation, longest prefix matching, and distance vector and link state routing.

Uploaded by

vickyinnocent122
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Computer Network Previous Year

The document provides 14 problems related to computer networking topics such as fragmentation, forwarding tables, routing algorithms, and the ARP protocol. Students are asked to solve the problems, which involve concepts like IP addressing, fragmentation, longest prefix matching, and distance vector and link state routing.

Uploaded by

vickyinnocent122
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Rajkiya Engineering College Bijnor

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.

Release Date: 10 May, 2024 Submission Deadline: 14 May, 2024

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?

Problem 5: Longest prefix matching

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.

The forwarding table at R1 contains the following entries:

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?

b) On which port on R1 must the packet above have arrived?


c) How many hosts can network C accommodate (assuming unique IP addresses were the only constraint)?
d) What is a legal IP address for a host on network B?
e) Imagine R2 uses aggregation to maintain precisely one entry in its forwarding table to describe networks A, B,
and C. What would that entry look like? (Give both the network name including prefix length and the next hop.)

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

a. Are there any options?


b. Is the packet fragmented?
c. What is the size of the data?
d. Is a checksum used?
e. How many more routers can the packet travel to?
f. What is the identification number of the packet?
g. What is the type of service?
Problem 9: Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes. Suppose the original
datagram is stamped with the identification number 422. How many fragments are generated? What are the values in the
various fields in the IP datagram(s) generated related to fragmentation?

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

Consider the network shown above.


a. Assign IP address ranges to the subnets containing hosts A and B, and assign IP addresses in these ranges to hosts
A and B. (You don’t have to assign IP addresses to any hosts except A and B, butyou do need to specify the
address range being used by each subnet). Your subnet addressings should use the smallest amount of address
space possible,
b. What IP address range can the router advertise to the outside for all of the hosts reachable in these two subnets?
Again, you should choose your answer in a) above so that the minimum-size address space is advertised here.
c. Does the router interface with link-layer address 20:FF:3A:BC:01:4E have an IP address? If so, what is the role of
the IP address of the router’s IP interface in forwarding datagrams through the router.
Problem 12: IP packet
Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to
host B. Suppose that a TCP message that contains 900 bytes of data and 20 bytes of TCP header is passed to the
IP code at host A for delivery to B. Show the Total length, Identification, DF, MF, and Fragment offset fields of
the IP header in each packet transmitted over the three links. Assume that link A-R1 can support a maximum
frame size of 1024 bytes including a 14-byte frame header, link R1-R2 can support a maximum frame size of 512
bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including
a 12-byte frame header.

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?

Problem 14: Distance Vector Routing

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

Problem 15: Link State Routing

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.

Submission Deadline: 14 May, 2024


Recommended Text Books:
1. “Data Communication and Networking”, TMH by Behrouz A. Forouzan (Author)
2. “Computer Networking: A Top-Down Approach (6th Edition)” by James F. Kurose (Author), Keith W. Ross
(Author)

Book for further reading


1. “Computer Networks: A Systems Approach, (4th Edition)” by Larry L. Peterson (Author), Bruce S. Davie
(Author)

You might also like