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

Ipv6 not forwarded from wan to lan #38

Closed yairweiss closed 4 years ago

yairweiss commented 9 years ago

Hi,

We are developing a cellular router based on Openwrt Barrier Breaker r44550. Our cellular WAN interface gets an IPv6 global prefix using RA packet automatically. This is done after our telephony software configures a static Ipv6 local link address which is received by the cellular operator (for the wan interface). Then we perform "ifup wan" and "ifup wan6" and we get the RA packet that configures the wan with global Ipv6 prefix.

The issue in our case is that our lan interface does not get the Ipv6 prefix automatically. If we set manually "option ip6prefix" to the wan then it works but we think this should be done automatically by odhcpd, are we missing something here? We think it does not make sense that our SW will poll the wan interface for the global prefix and will configure ip6prefix since this is what odhcpd should do and we just don't know how to configure it...

Thanks in advance for your assistance.

Our configuration is as follow:

etc/config/network:

config interface loopback option ifname lo option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0

config interface lan option ifname usbnet0 option type bridge option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 option ip6assign 64

config interface wan option ifname ccinet0 option proto static option ip6addr 'fe80::84e9:3fd7:e533:cb6f/64'

config interface wan6 option ifname ccinet0 option proto dhcpv6

etc/config/dhcp

config dhcp 'lan' option interface 'lan' option start '100' option limit '150' option leasetime '12h' option dhcpv6 disabled option ra server

config dhcp wan6 option dhcpv6 disabled option ra server option master 1

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

sbyx commented 9 years ago

In general if your router get's a delegated prefix via DHCPv6 prefix delegation it will automatically distribute it.

You should check if that DHCPv6 exchange works reliably. You should check that "ifstatus wan6" contains something in "ipv6-prefix".

Using Router Advertisements only you can only get a local address for your router but not a whole prefix for your clients.