免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1481 | 回复: 0
打印 上一主题 下一主题

andriod client dhcpcd无法自动添加gateway [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-08-07 17:00 |只看该作者 |倒序浏览
本帖最后由 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.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是怎么动态的将gateway添加到自己的路由规则中的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP