openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
161 stars 98 forks source link

please say more about the settings of odhcpd in openwrt #31

Closed featman closed 9 years ago

featman commented 9 years ago

Hi, i used to use ur software named "6relayd" before the openwrt(14.07), and i also can get the public ipv6 addr in downstream devices , and i am successful to go the web of ipv6. but today ,i cant use 6relayd because of http://wiki.openwrt.org/doc/uci/6relayd ,so i had compiled it in my router ,and start the odhcpd in os ,but i cant get a useful ipv6 addr on br-lan ,i am failed .Thus, i would like to know the more settings about odhcpd, i guess many people have the same problem, so please say more ,and i try it later. u can sent a email to me if its possible ,or, u can write it in the README of source ,i hope u can do some examples to help us solve it. thank u very much!!!

by the way, my network environment is native ipv6 ,and use odhcp6c ,the router can get a public ipv6 addr, and my openwrt version is Chaos Calmer trunk

my email: songzhicheng2007@163.com

im waiting for ur reply, thank u!

crvv commented 9 years ago

This is my config. It works. in /etc/config/dhcp, add

config dhcp 'lan' option ra_management '1' option ra 'hybrid' option dhcpv6 'hybrid' option ndp 'relay'

config odhcpd 'odhcpd' option maindhcp '0' option leasefile '/tmp/hosts/odhcpd' option leasetrigger '/usr/sbin/odhcpd-update'

config dhcp 'wan' option interface 'wan' option ignore '1'

config dhcp 'wan6' option dhcpv6 'hybrid' option ra 'hybrid' option ndp 'relay' option master '1' option interface 'wan'

Blaok commented 9 years ago

I did as above but clients can only get addresses (IPv6). Packets from or to the clients are not properly routed. The router, however, is very well connected to the IPv6 Internet. I wonder why...

crvv commented 9 years ago

这楼所有人应该都懂中文,写中文吧 odhcpd的最新版本还是有一些问题,有时会莫明其妙地挂掉,重启odhcpd后恢复 我这边如果客户端是Linux,包括Android,在获取地址之后并不能用,如果运行一个"traceroute -6 google.com",再等一会,ipv6才能正常。Windows没这个问题

Blaok commented 9 years ago

我这里的情况是所有客户端都能获取地址但都连不上,Windows和Linux都一样。。。只有路由器能连上。。。感觉是路由器的路由表不对头,wan和lan获取的IPv6地址是一样的,而客户端发来的IPv6包并没有被正确地路由。。。完全不造怎么办啊。。。是有那个内核模块我没装么?

以及,为什么odhcpd还有问题的情况下6relayd就不见了。。。虽然6relayd我也没调通。。。

crvv commented 9 years ago

以前没有odhcpd的时候6relayd很好用,但现在6relayd也不好使了,好像是因为OpenWrt的改动 我的odhcpd基本正常,不能用的话,和路由器型号还有openwrt的版本可能都有关系吧 要不你试试拿这个重新编译,github.com/CRVV/OpenWrt_BB。因为原先odhcpd和dnsmasq共用一个配置文件,我就改了odhcpd的配置文件名,其它没什么变化

crvv commented 9 years ago

如果ipv6的地址获取方式是slaac,默认的配置就是好的

Blaok commented 9 years ago

换了个路由器和OpenWRT的版本(OpenWrt Barrier Breaker r42853),还是一样的表现。你那个我试了一下,我这里编译过不去,提示错误。你的内核是多少?我手里的都是3.10.49。

问题似乎就是出在路由上面,客户端只能ping通路由器的本地链路fe80::/64地址,ping不通公网地址。odhcpd是否需要配合radvd,ndppd这些软件使用?会与什么软件冲突吗?我这个路由器用he.net的tunnelbroker是好用的,也就是说内核应该支持IPv6的各种路由和转发。所以为啥原生IPv6反而不好用了呢。。。。。

crvv commented 9 years ago

内核也是3.10.49 odhcpd不用配合其它软件 我觉得主要还是odhcpd的问题,至于具体是怎么回事我也不清楚了

ypy705 commented 9 years ago

我的网络环境是slaac方式获取,dhcp配置是这样的:

config dhcp 'lan' option interface 'lan' option ra_management '1' option ra 'relay' option ndp 'relay'

config odhcpd 'odhcpd' option maindhcp '0' option leasefile '/tmp/hosts/odhcpd' option leasetrigger '/usr/sbin/odhcpd-update'

config dhcp 'wan6' option interface 'wan6' option ra 'relay' option ndp 'relay' option master '1'

weakiwi commented 8 years ago

我也是odhcpd会定时挂掉,体现就是pc能获得2001开头的ipv6地址,但是ping google.com就全部timeout,最后解决方法是在启动里面加了个sleep 60 /etc/init.d/odhcpd restart。要不然就是每次路由重启都手动执行一下这个命令,执行完马上能ping通外网