views:

22

answers:

2

I want to send the data such that the fragmentation of the data is disabled. For example in ping, if we write

ping localhost -M do -s 65507

-M do : disable fragmentation -s 65507 : maximum packet size

It gives me an error like

From localhost (127.0.0.1) icmp_seq=1 Frag needed and DF set (mtu = 16436)

Is there some other way to do this or using some other software. Preferably Iperf.

Thanks in advancet

A: 

The MTU of Ethernet is 1500 bytes including the headers. You can't just ignore that. There is no way you can send a packet that large without fragmentation.

EJP
+3  A: 

Sounds like you're looking for the Don't Fragment (DF) flag. It gets set on a per packet basis in the flags of the IP header. Anything sent larger than the MTU with DF set will result in an ICMP error message being generated. Without DF set the router may fragment and send. There are a lot of broken systems out there which either eat the ICMP error (crazy paranoid firewalls) or otherwise behave oddly.

RFC791 provides details on the rules for fragmenting IP datagrams.

Typical MTUs are 1500 bytes. The minimum MTU for IPv4 is 576, whilst for IPv6 it is 1280. Gigabit ethernet and other links often support much larger MTUs.

awoodland
RFC1191 is also interesting here in that it is how TCP "discovers" the lowest MTU of all the routers in the path between two hosts.
awoodland