In: Computer Science
Computer Networks
please No handwriting
thank you
Consider the hexadecimal numbers below which represents the first 20 bytes of an IP packet:
17 00 00 50 00 01 60 00 03 59 D1 A8 D8 3A C6 4E AC D9 12 E5 …..Based on packet, answer the following:
Answer:
Questions |
Answer |
How many bytes is the payload? |
|
Can this packet be further segmented? |
|
Which upper layer protocol has been used? |
|
How many hops can this packet visit before being discarded? |
|
Is this packet the last packet? Why? |
|
What is the source ip address? |
Payload size= (Total length of the packet)-(Header size)
2nd half of the first byte in the given packet indicates IHL field.
IHL=7
Header size = IHL*4 = 7*4 = 28 bytes
3rd and 4th bytes of ip packet indicates the Total length field.
Total length= 0x(0050)
TOTAL length=80 bytes
Payload=80-28= 52 bytes
---------------------------------------------------
This packet can't be fragmented further.
Because MF is set to 1.
The upper 3 bits from the 7th byte is 0x60
and the corresponding value for these fields is (“IP header flag field”), 0x40 = 0110 0000, matching the upper 3 bits values to the order of the bit-fields in the IP flags field.
Bit 1 Reserved 0
Bit 2 Don't Fragment 1 <------- this indicates that this packet should not be fragmented.
Bit 3 More fragments 1 <----- this indicates that this is not the last packet. This field should 0 if this packet is the last one.
------------------------------------------------------------
The 9th byte is 0x03 and the corresponding value for this field is Time to live (TTL). This indicates maximum of 3 hops can be visited before discarded.
-------------------------------------------------------------------------
The 13th, 14th, 15th and 16th bytes are “0xD8 3A C6 4E” and the corresponding value for these fields is (“Source Address”).
Source IP= 216.58.198.78
NOTE:-
PLEASE REMEMBER THAT THIS IS A BIG QUESTION!
SO IF ANY MISTAKES LEAPS UNKNOWINGLY THEN PLEASE COMMENT.
WE'LL RECTIFY IN NO TIME!!!
PLEASE GIVE UPVOTE IF YOU LIKE MY WORK!