andriod client dhcpcd无法自动添加gateway
本帖最后由 walktory 于 2015-08-07 17:02 编辑andriod5.0
系统起来之后无法自动添加gw,导致不能正常上网
root@tank:/system/etc/dhcpcd # busybox route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 306 0 0 wlan0
root@tank:/system/etc/dhcpcd #
没有default
需要我手动添加
route add default gw 192.168.1.1 dev wlan0
---------------------------------------------------------------------------------------------------------------------------------------------------
然后对比可以上网的手机
dhcpcd-hooks/ dhcpcd-run-hooks dhcpcd.conf脚本都是一样的
但是可以上网的手机route规则为
shell@armani:/ $ busybox route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 323 0 0 wlan0
192.168.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0
211.136.150.66192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
222.44.10.48 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
shell@armani:/ $ busybox route -n
请问这是上面原因,还有就是client的dhcpcd是怎么动态的将gateway添加到自己的路由规则中的
页:
[1]