How to find out the MTU size for an Android smartphone

Any team for sizing MTU for Android?

+6
source share
5 answers

You must use the NetworkInterface class to request and receive network interfaces, then call getMTU() .

+4
source

Without ROOTING your phone, you can use the ping command from a Windows / Mac / Unix system.

For Windows, try the following:

 ping -l 1473 -f 10.68.34.75 

Adjust the payload using the -l command line option. When you reach a higher limit, you will see this message (French) and you will find the MTU size:

Le paquet doit être fragmenté mais paramétré DF.

+4
source

Today, looking at the netcfg code, I saw that the interface configuration is in / sys / class / net .. and then I thought about you! (Yesterday I read your question)

If you have root access, open a terminal and run

 cat /sys/class/net/<interface>/mtu 
+3
source

For most network connections, MTUs can be resolved by detecting MTUs. You can use the Ping command with different payload sizes and not fragment to find the aChrysler value. Good luck.

+1
source

1480, I believe, but you can check by using ifconfig $DEVICE with the root device and checking the MTU there.

0
source

Source: https://habr.com/ru/post/919858/


All Articles