Tuesday, April 23, 2024

IP Fragmentation

Some basic info

Ethernet header is 14bytes
TCP header is 40byes
standard IP MTU is 1500bytes



DF is not set 

find MTU of source

powershell to see max MTU of win11:

netsh interface ipv4 show interfaces 


Send some test traffic that is bigger than the MTU of the source

ping -l 1600 <destination>


Check with wireshark at destination

fragmented in 2 packets

first packet


second packet


DF is set


Send some test traffic that is bigger than the MTU of the source 

ping -l 1600 -f <destination>

packet will be dropped at the laptop




test

import os import argparse import json def load_json_file(filepath):     with open(filepath, 'r') as f:         return json.load(f) d...