Starting from:

$25

CS4150 - Lab 9  -IP Fragmentation - Checksum - Solved

1. You are given a virtual network with three hosts h1 (192.168.1.2), r1, and r2 (192.168.101.2). r1 has two interfaces with IPs 192.168.1.1 and 192.168.101.1, and acts as a router between h1 and r2. Let x be the MTU between r1 and r2. Find the value of x and report the approach that you used to discover it. Hint: use the tool hping3 installed on h1. Make sure to always
 
use the -V flag with hping3.

2. Given the value of x from the above questions, the password for r1 is user@x. Using this password, download the file ipfrags.tar.xz from r1 and extract it on your host machine. The extracted folder contains 540 IPv4 fragments, of which only 54 are legitimate. Use the IPv4 header checksum to weed out fragments with errors. Print the header details for all the
[40]
legitimate packets.

3. Assemble the 54 legitimate IPv4 fragments using the fragment flag and fragment offset information contained in the IPv4 header. How many IPv4 packet did you obtain after the assembly? What
[30]
are the sizes of these packets? What is the message contained within these packets?
[30]
Use the following structure to parse IPv4 packets that are stored as files.

typedef struct IPPacket_t {



 
 
 

unsigned char v_hl; unsigned char dscp_ecn; unsigned short int totalLen; unsigned short int id; unsigned short int flags_frag_offset; unsigned char ttl; unsigned char proto; unsigned short int checksum; unsigned char sAddr[4]; unsigned char dAddr[4]; unsigned int o1; unsigned int o2; unsigned char data[1024];

} IPPacket;

End of paper

More products