Difference in all the 'ping' packages? Looking to find max MTU

I'm looking to find the max mtu size from openwrt itself via SSH. Usually linux ping -M do will do the trick but the installed 'ping' tool by default is missing this option.

Luci software packages show a couple different 'ping' tools, what's the difference? any recommendations?

  • iputils-ping
  • nping
  • noping
  • oping
  • I'm not sure what that means...
  • Just run the command ifconfig | grep 'MTU'
  • The loopback interface is set for 65536, most Ethernet interfaces (native IPv4 and IPv6) are set for 1500, 6in4 IPv6 is 1480
  • Is there a reason the built-in ping command (from BusyBox) doesn't work for you? :bulb:

(I'm still lost why the built-in ping cannot do a normal "MTU check".)

1 Like

I think we normally use iputils-ping on most Lix distros.

Ping is a very popular way to use ICMP, anybody can develop a software to do it a bit differently. I'd suggest searching for their names to find their official site and learn what specific features each of them have.

2 Likes

With iputils-ping run:

ping -M do -s 1800 openwrt.org
PING openwrt.org(wiki-01.infra.openwrt.org (2a03:b0c0:3:d0::1af1:1)) 1800 data bytes
ping: local error: message too long, mtu: 1492
ping: local error: message too long, mtu: 1492
^C
--- openwrt.org ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1021ms
4 Likes

I think you also have to try -s 1444 to verify that IPv6 packets of size 1492 = 40 (IPv6 header) + 8 (ICMPv6 header) + 1444 (ICMP payload size) do succeed, since there could be another link further away with a lower MTU.

I wasn't exactly calculating my mtu, just demonstrating how to use the fragment and size options.

1 Like

==Update==

Never mind. After logout and login, the new ping is used.

===

After doing okpg update; opkg install iputils-ping, how can invoke the ping utility to do MTU test?

When I do ping, it seems the default ping is used.

1 Like

Same issue here, even after installing iputils-ping it still uses the busybox included ping which lacks the -M flag. how to solve it?

Call it by the full path or remove the symlink to the busybox versiom that lives higher up in the path...

2 Likes

How? Or where in the path is the other ping version? I thought installing a package which overwrites busybox implemented would automatically do this?

Please post the output of
ls -all $(which ping)
EDIT: changed windows/dos dir to unix ls
to see where unadorned ping leads to....

2 Likes

There is no command dir in default Openwrt. I used find / -name ping, it seems to be under

/overlay/upper/usr/bin/ping

nping (its 140kb in size though) also works with:

nping --df --data-length 1420 1.1.1.1

Sorry, that should have been ls instead of dir, my bad for posting from the road without testing....

1 Like

Easiest method to measure path MTU is IMHO:

opkg update ; opkg install iputils-tracepath; tracepath www.google.com

EDIT: corrected tracepath to iputils-tracepaths, thanks @trendy

then post the output...

1 Like

The package is called iputils-tracepath :wink:

2 Likes