Networking-Blog

My WordPress Blog

Linux MTU Size Pings

Pinging with MTU packet Size.

ping -s 1438 85.234.75.1

PING 85.234.75.1 (85.234.75.1) 1438(1466) bytes of data.
1446 bytes from 85.234.75.1: icmp_seq=1 ttl=84 time=87.5 ms
1446 bytes from 85.234.75.1: icmp_seq=2 ttl=84 time=144 ms
1446 bytes from 85.234.75.1: icmp_seq=3 ttl=84 time=87.9 ms
1446 bytes from 85.234.75.1: icmp_seq=4 ttl=84 time=111 ms
!
Ping MTU packet Size with no Fragmentation of Packet.

ping -M dont -s 1472 85.234.75.2
PING 85.234.75.2 (85.234.75.2) 1472(1500) bytes of data.
1480 bytes from 85.234.75.2: icmp_seq=1 ttl=239 time=90.9 ms
1480 bytes from 85.234.75.2: icmp_seq=2 ttl=239 time=91.0 ms
1480 bytes from 85.234.75.2: icmp_seq=3 ttl=239 time=89.3 ms
1480 bytes from 85.234.75.2: icmp_seq=4 ttl=239 time=92.1 ms

Linux MTU

sudo ip link set eth0 mtu 1500
!
sudo ifconfig
!

Enable MTU Path Discovery:

sudo vi /etc/sysctl.conf
!
# Path Maximum Transfer Unit discovery–disable this and the MTU settings are derived
# from the MTUs of all the hops along the# path to the host you are connecting to,
# including the host itself; 1 enables, 0 disables
net.ipv4.ip_no_pmtu_disc = 1

Allow MTU Path Discovery through the firewall :

sudo iptables -I FORWARD 7 -i eth0 -p tcp –tcp-flags SYN,RST SYN -j TCPMSS –clamp-mss-to-pmtu
sudo iptables -I OUTPUT 7 -i eth0 -p tcp –tcp-flags SYN,RST SYN -j TCPMSS –clamp-mss-to-pmtu