Solved How to test Jumbo Frames on FreeBSD

vermaden

Son of Beastie

Reaction score: 1,176
Messages: 2,763

Hi,

on Linux I can test if Jumbo Frames are working with ping -M do -s 8972 <IP> command, how to make such test from FreeBSD?

Thanks.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,751
Messages: 30,832

I've used this in the past to check for MTU settings: http://www.pc-freak.net/blog/freebsd-jumbo-frames-network-configuration-short/

Near the end of the article the exact same command is used. Isn't that working for you?

edit: Oh, wait, the article talks about testing it on Linux. Which is why the command is the same :-/

Comparing the Linux man page with ping(8), it looks like -D is equivalent to -M do, so the command would be ping -D -s 8972 <IP>
 

phoenix

Administrator
Staff member
Administrator
Moderator

Reaction score: 1,259
Messages: 4,099

Why would you put in a bug report for this? The command you want (run as root) is: ping -D -s 8000 1.2.3.4

The way to test if jumbo frames are working or not is to start with -s 1000 and increment your way up until it fails. Try with 1472 (for normal MTU), then 2000, then 3000, then 4000, and so on. When you get the following message, you've exceeded the MTU of the interface:
Code:
ping: sendto: Message too long
Code:
[fcash@romulus  ~]$ ifconfig | grep mtu
vtnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

[fcash@romulus  ~]$ sudo ping -D -s 1000 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1000 data bytes
1008 bytes from 10.10.10.102: icmp_seq=0 ttl=64 time=0.387 ms
1008 bytes from 10.10.10.102: icmp_seq=1 ttl=64 time=0.335 ms
1008 bytes from 10.10.10.102: icmp_seq=2 ttl=64 time=0.346 ms

--- 10.10.10.102 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.335/0.356/0.387/0.022 ms

[fcash@romulus  ~]$ sudo ping -D -s 1400 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1400 data bytes
1408 bytes from 10.10.10.102: icmp_seq=0 ttl=64 time=0.419 ms
1408 bytes from 10.10.10.102: icmp_seq=1 ttl=64 time=0.379 ms
1408 bytes from 10.10.10.102: icmp_seq=2 ttl=64 time=0.472 ms

--- 10.10.10.102 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.379/0.423/0.472/0.038 ms

[fcash@romulus  ~]$ sudo ping -D -s 1500 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1500 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
ping: sendto: Message too long
^C
--- 10.10.10.102 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

[fcash@romulus  ~]$ sudo ping -D -s 1472 -c 3 10.10.10.102 
PING 10.10.10.102 (10.10.10.102): 1472 data bytes
1480 bytes from 10.10.10.102: icmp_seq=0 ttl=64 time=0.346 ms
1480 bytes from 10.10.10.102: icmp_seq=1 ttl=64 time=0.444 ms
1480 bytes from 10.10.10.102: icmp_seq=2 ttl=64 time=0.513 ms

--- 10.10.10.102 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.346/0.434/0.513/0.069 ms

[fcash@romulus  ~]$ sudo ping -D -s 1492 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1492 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
ping: sendto: Message too long
^C
--- 10.10.10.102 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
[fcash@romulus  ~]$ sudo ping -D -s 1470 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1470 data bytes
1478 bytes from 10.10.10.102: icmp_seq=0 ttl=64 time=0.337 ms
1478 bytes from 10.10.10.102: icmp_seq=1 ttl=64 time=0.477 ms
^C
--- 10.10.10.102 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.337/0.407/0.477/0.070 ms
[fcash@romulus  ~]$ sudo ping -D -s 1473 -c 3 10.10.10.102
PING 10.10.10.102 (10.10.10.102): 1473 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
ping: sendto: Message too long
^C
What's not working for you?
 

VladiBG

Aspiring Daemon

Reaction score: 243
Messages: 602

Using a sweep ping with don't fragment flag is the way to determinate the max MTU.

example:
ping -i 0.1 -D -g 1460 -G 1500 10.10.10.102


Where
-i is wait seconds between sending each packet
-D is don't fragment flag
-g is the sweepminsize
-G is the sweepmaxsize
 
Top