HW10 Sol

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Fall 2014 Computer Communication Networks

HW#10_sol (Due date: 2014/01/07)


Question 1:(1/7 updated, )
An IPv4 datagram has arrived with the following in formation in the
header (in hexadecimal):
0x45 00 00 54 00 03 00 00 20 06 58 41 7C 4E 03 02 B4 0E 0F 02
a. Is the packet corrupted?
b. Are there any options?
c. Is the packet fragmented?
d. What is the size of the data?
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?
Let us first find the value of header fields before answering the
questions:
VER = 0x4 = 4
HLEN =0x5 = 5 5 4 = 20
Service =0x00 = 0
Total Length = 0x0054 = 84
Identification = 0x0003 = 3
Flags and Fragmentation = 0x0000 D = 0 M= 0 offset = 0
Time to live = 0x20 = 32
Protocol = 0x06 = 6
Checksum = 0x5841
Source Address: 0x7C4E0302 = 124.78.3.2
Destination Address: 0xB40E0F02 = 180.14.15.2
We can then answer the questions:
a. If we calculate the checksum, we get 0x0000. The packet is not
corrupted.
b. Since the length of the header is 20 bytes, there are no options.
c. Since M = 0 and offset = 0, the packet is not fragmented.
d. The total length is 84. Data size is 64 bytes (84 20).
e. Since the value of time to live = 32, the packet may visit up to 32
more routers.
f. The identification number of the packet is 3.
g. The type of service is normal.

Question 2:
A router receives an IPv4 packet with source IP address 130.45.3.3 and
destination IP address 201.23.4.6. The router cannot find the destination
IP address in its routing table. Which ICMPv4 message should be sent?
The appropriate ICMP message is destination unreachable message. This
type of message has different types of codes to declare what is
unreachable. In this case, the code is 0, which means the network is
unreachable (The codes are not discussed in the chapter; consult
references for more information).
Question 3:
Use Dijkstras algorithm to find the shortest path tree and the forwarding
table for node A in following figure.

Shortest path tree:

Forwarding table

Please answer the questions in your own words.

You might also like