Example 1 An IP packet has arrived with the first 8 bits as shown <01000010 The receiver discards the packet. Why? CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 21 Example 1 An IP packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why?
Solution There is an error in this packet. The 4 left-most bits(0100) show the version, which is correct. The next 4 bits(0010)show the header length, which means(2 x 4=8),which is wrong. The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 22 Solution There is an error in this packet. The 4 left-most bits (0100) show the version, which is correct. The next 4 bits (0010) show the header length, which means (2 4 = 8), which is wrong. The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission
Example 2 In an IP packet, the value of hlen is 1000 in binary. How many bytes of options are being carried by this packet CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 23 Example 2 In an IP packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet?
Solution The hlen value is 8. which means the total number of bytes in the header is & 4 or 32 bytes The first 20 bytes are the main header, the next 12 bytes are the options CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 24 Solution The HLEN value is 8, which means the total number of bytes in the header is 8 4 or 32 bytes. The first 20 bytes are the main header, the next 12 bytes are the options
Example 3 In an IP packet, the value of hlen is 516 and the value of the total length field is 002816. How many bytes of data are being carried by this packet? CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 25 Example 3 In an IP packet, the value of HLEN is 516 and the value of the total length field is 002816. How many bytes of data are being carried by this packet?