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
163 stars 99 forks source link

Add example config for relay and hybrid mode(s) #35

Open azrdev opened 9 years ago

azrdev commented 9 years ago

Please add an example configuration how the relay and/or hybrid mode(s) are supposed to work.

As I understand it, relay mode should supply publicly routable IPv6 adresses, if a foreign DHCP on the WAN interface does not delegate an IPv6 prefix. Hybrid mode should be 'static' with a fallback to 'relay' when ??.

I tried to set this up, but everything I can find configuration-wise either doesn't work (or I'm doing something wrong) or is built around the deprecated 6relayd. Running OpenWrt Barrier Breaker on a 1043ND v1 (if that matters somehow).

murilopontes commented 9 years ago

Try this configuration

cat /etc/config/dhcp

config dnsmasq option domainneeded '1' option boguspriv '1' option localise_queries '1' option rebind_protection '1' option rebind_localhost '1' option local '/lan/' option domain 'lan' option expandhosts '1' option authoritative '1' option readethers '1' option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' option localservice '0'

config dhcp 'lan' option interface 'lan' option start '100' option limit '150' option leasetime '12h' option ra 'relay' option dhcpv6 'relay' option ndp 'relay'

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

azrdev commented 8 years ago

@murix I got IPv6 addresses that were routable (at least after ping6ing my routers' external IPv6), with the following options (by hand, luci missed something, iirc the master option):

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

Using hybrid in place of relay still gives me addresses, but those are not routable anymore.


Please extend the documentation on the relay feature! Currently debugging what's going on is very hard, if not impossible.