我知道可以在运行时读取和设置MTU,例如:
adb shell ip -d -s l l dev rmnet0
adb shell ifconfig rmnet0 mtu <MTU>这存在这样设置的MTU在重启电话后无法保持的问题。
那么,在使用Android开源项目源代码构建自己的版本时,如何配置接口的默认MTU呢?
似乎没有任何地方提到这一点,grepping代码似乎也没有帮助。此外,默认的Linux内核配置文件似乎不存在于Android中。
肯定有办法做到这一点,对吧?
发布于 2013-01-31 18:47:56
显然,PMTUD是一个更好的解决方案(RFC4821)。它可以在init.rc的AOSP构建中启用(例如,system/core/rootdir/init.rc),方法是在"on boot“部分的末尾添加以下行:
on boot
# Other configurations here...
# Set TCP MTU Probing to automatic:
write /proc/sys/net/ipv4/tcp_mtu_probing 1https://stackoverflow.com/questions/14101746
复制相似问题