- 論壇徽章:
- 0
|
本帖最后由 walktory 于 2015-08-07 17:02 編輯
andriod5.0
系統(tǒng)起來之后無法自動添加gw,導致不能正常上網(wǎng)
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
---------------------------------------------------------------------------------------------------------------------------------------------------
然后對比可以上網(wǎng)的手機
dhcpcd-hooks/ dhcpcd-run-hooks dhcpcd.conf 腳本都是一樣的
但是可以上網(wǎng)的手機route規(guī)則為
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.66 192.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是怎么動態(tài)的將gateway添加到自己的路由規(guī)則中的 |
|