$30
CS 542 – Computer networks I – Fundamentals
– Homework 2 – 55 points
Instructions:
• Please submit soft copies on the blackboard.
• Team submissions are accepted. A team of 1 – 3 is accepted.
• For team submissions, one submission is sufficient. Anyone from the team
can submit—no need for everyone in the group to submit.
• All should submit typewritten documents. The handwritten ones are not
accepted. Zero points will be awarded if the submission is not a typewritten
one.
• Please contact Viswatej Kasapu (vkasapu@hawk.iit.edu) if something
is not clear. After submission, please do not say any excuses like "we
understood differently." If you doubt any questions, please email me but
do not expect me to give ideas or hints to the solution.
• The due date is Friday, May 14, 2021, at 11:59 PM (midnight) Central
Time.
• Submissions after the due date are not accepted. This is the hard deadline.
I must submit the grades to the University before the deadline. So, I cannot
provide extensions to you. Please submit before the due date without
fail. Otherwise, zero points will be given.
Note:
• For every question which has a calculation, you should show steps clearly.
No points will be given for direct answers. Explanation and justification
are mandatory.
• In all questions, provide answers in the decimal system (not binary,
hexadecimal, or 256 bases).
1. A host with IP address 130.23.43.20 and physical address B2:34:55:10:22:10 has a packet
to send to another host on another network with IP address 141.23.56.21 and physical
address A4:6E:F4:59:83:AB. The next-hop (router) for this destination in the sender's
routing table is Router R1 with IP address 130.23.43.25 and physical address
B2:53:45:01:33:10. Give the ARP request packet format from the sender and its
corresponding reply packet format filled with all necessary fields. Consider the Ethernet as
hardware type and IPv4 as protocol type. (10 points)
2. Consider the updated ARP cache table at time t. The maximum number of attempts is 10,
and the time-out value is 600 seconds. After 120 seconds, the input module receives two
ARP packets, and the output module receives one IP packet from IP software. These are
the only three packets host received in the last 120 seconds. Consider cache table is updated
every 60 seconds. Give the updated cache table at times t+60 seconds and t+120 seconds,
respectively. (10 points)
Packets received:
• An ARP reply from the host with IP address 114.5.7.89 and physical address
457342ACAE32
• An ARP reply from the host with IP address 201.11.56.7 and physical address
A46EF45983BC
• An IP packet that has to be forwarded to the next hop with IP address 188.11.8.71
State Queue Attempt Time-out Protocol Addr Hardware Addr
R 5 500 180.3.6.1 ACAE32457342
P 2 2 129.34.4.8
P 14 7 201.11.56.7
R 8 60 114.5.7.89 457342ACAE32
F
3. For each one, mention whether it is a valid or invalid value for the HLEN field in the IP
datagram header. Give your supporting reasons. (4 points)
a. 1011
b. 1201
c. 0011
d. 0101
4. In an IP packet, the value in the HLEN field is 1100, and the value of the total length is
111111000. How many bytes of data is the packet carrying? Are there any options? If so,
what is the length of the options? (3 points)
5. The total IP datagram length is 70 bytes, out of which data length is 34 bytes. Is this
example a valid IP datagram or not? Give your supporting reasons. (2 points)
6. An IP datagram is divided into three fragments. All fragments are equal in size and have a
base header of 20 bytes. The size of data in each fragment is 800 bytes. The first and last
fragments can be divided further, but the second cannot be fragmented further. Give D, M,
and fragmentation offset values of each fragment. (4 points)
7. A fragment has arrived with the first few hexadecimal digits, as shown below:
4500 003C 0001 8370……
This is the second fragment. How many bytes of data does this fragment contain? What is
the offset of the next fragment? (3 points)
8. The first 32 bits of an IP datagram are shown below. Is it a valid IP datagram? Explain
your answer? (2 points)
0001 1010 0000 0000 0000 0000 0001 1110
9. An IP packet has arrived with the first few hexadecimal digits as shown below:
4600 0040 0001 0000 1217……
The initial 'Time to Live" value in the hexadecimal format is BC. How many hops have
this packet already traveled? How many hops can this packet travel before being dropped?
(3 points)
10. When does the TCP sliding windows shrink? Why is it not recommended? (2 points)
11. Given following TCP header dump in hexadecimal format. Give your answers in decimal
format (5 points)
0325 0091 0000 0321 0000 3467 5001 08BE 0000 0000
a. What is the source port number
b. What is sequence number
c. What is header length
d. What is the use of segment (which bit is set in the control field and give your
answer based on that bit)
e. What is the window size
12. The TCP sliding window values of rwnd and cwnd are 18 and 13, respectively. The last
acknowledgment number was 115. A segment with the acknowledgment number 121 and
the rwnd of 10 has just been received. Draw a diagram showing the window before and
after. The assumption cwnd has not changed. (4 points)
13. The UDP header in the hexadecimal format is 0223 000E 00AA E217. (3 points)
a. What is the source port number?
b. What is the destination port number?
c. What is the total length of the user datagram?