Android MTU 值修改的实例详解
作者:王吉军 时间:2021-09-20 02:27:07
Android MTU 值修改的实例详解
通信术语 最大传输单元(Maximum Transmission Unit,MTU)是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位)。最大传输单元这个参数通常与通信接口有关(网络接口卡、串口等)。
1、首先使用 adb 命令进入系统,然后 ifconfig 查看可用网络
C:\>adb shell
$ su
su
# ifconfig
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6235 errors:0 dropped:0 overruns:0 frame:0
TX packets:6235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:374815 (366.0 KiB) TX bytes:374815 (366.0 KiB)
rmnet0 Link encap:Ethernet HWaddr 5A:32:84:B5:64:21
inet addr:113.126.255.131 Bcast:113.126.255.135 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2394 (2.3 KiB) TX bytes:5340 (5.2 KiB)
2、这里需要修改电信 3G rmnet0 网卡 MTU 值 格式: ip link set dev X mtu N 回车 (X=网卡名称 N=想改成多少MTU就填多少,最大1500)
# ip link set dev rmnet0 mtu 1000
ip link set dev rmnet0 mtu 1000
# ifconfig rmnet0
ifconfig rmnet0
rmnet0 Link encap:Ethernet HWaddr 5A:32:84:B5:64:21
inet addr:113.126.255.131 Bcast:113.126.255.135 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1000 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2394 (2.3 KiB) TX bytes:5340 (5.2 KiB)
3、上述设置是临时性的,机器一旦重启设置将会恢复默认
来源:http://blog.csdn.net/johnnycode/article/details/7418454
标签:Android,MTU
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Winform实现抓取web页面内容的方法
2022-03-07 21:15:53
Java设计模式之访问者模式
2023-04-17 20:00:15
![](https://img.aspxhome.com/file/2023/5/60135_0s.png)
Java日常练习题,每天进步一点点(8)
2022-04-15 16:40:26
![](https://img.aspxhome.com/file/2023/9/61879_0s.jpg)
Android中通知Notification使用实例(振动、灯光、声音)
2021-09-28 20:00:01
![](https://img.aspxhome.com/file/2023/3/109183_0s.jpg)
C#调用动态库
2021-07-30 03:46:25
![](https://img.aspxhome.com/file/2023/6/88336_0s.png)
C#中的三种定时计时器Timer用法介绍
2023-06-09 13:31:13
![](https://img.aspxhome.com/file/2023/6/111256_0s.jpg)
详解Flutter中key的正确使用方式
2021-11-05 04:31:02
C#给文字换行的小技巧
2023-07-01 07:38:00
详解Maven profile配置管理及激活profile的几种方式
2022-07-01 08:54:46
Android学习笔记之ActionBar Item用法分析
2022-03-12 00:18:59
java oshi如何查看cpu信息
2023-01-06 21:16:39
Go返回int64类型字段超出javascript Number范围的解决方法
2023-08-27 05:15:01
![](https://img.aspxhome.com/file/2023/6/107356_0s.png)
java 使用POI合并两个word文档
2022-09-30 12:22:54
Spring Boot 在启动时进行配置文件加解密的方法详解
2023-11-12 17:13:54
vs 中C#项目读取JSON配置文件的方法
2022-09-22 15:04:05
Java8中的 Lambda表达式教程
2023-10-13 01:32:29
详细图解Java中字符串的初始化
2023-11-20 19:34:24
![](https://img.aspxhome.com/file/2023/0/78010_0s.png)
C#中重载相等(==)运算符示例
2023-01-11 15:10:36
Android PickerView实现三级联动效果
2023-02-25 15:05:47
C# 9.0新特性——扩展方法GetEnumerator支持foreach循环
2021-08-27 22:38:09