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 ?
They all likely do what you describe as long as you can see non replies and set ping size
You can see the differences here:
(I'm still lost why the built-in ping cannot do a normal "MTU check".)
1 Like
Hikari
April 22, 2021, 2:32pm
3
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
trendy
April 22, 2021, 3:43pm
4
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
mikma
April 22, 2021, 4:04pm
5
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.
trendy
April 22, 2021, 4:08pm
6
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
mfka8
June 8, 2024, 2:56pm
8
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
mfka8
June 8, 2024, 5:04pm
10
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
mfka8
June 8, 2024, 6:15pm
12
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
trendy
June 9, 2024, 12:31pm
15
The package is called iputils-tracepath
2 Likes