OpenWrt Forum Archive

Topic: 6rd and ipv6-support

The content of this topic has been archived between 12 Jul 2015 and 30 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

Yeah its done in the default config but will not merge your old configs automatically.

CyrusFF wrote:

Yeah its done in the default config but will not merge your old configs automatically.

rebooted with a image built with package odhcpd and still no joy.  Not surprising I suppose since the prefix delegation is done with odhcp6c.

I have debugs serverside from working and non-working REQUEST and SOLLICITs, going to try and decipher what might be wrong in the meantime.  what is clear is that up until at least r39379 and before r39479, I was successfully using DHCP-PD.  thx in advance for your help

where can I find documentation as to the meaning of

CONFIG_PACKAGE_odhcpd_ext_prefix_class=0

?

I just pushed a fixed version which should address your issue along with some other minor fixes.

The config option you mention is an experimental feature described in http://tools.ietf.org/html/draft-bhanda … -prefix-05 but as its not really an RFC yet it doesn't really do much for you yet and 0 keeps it disabled.

CyrusFF wrote:

I just pushed a fixed version which should address your issue along with some other minor fixes.

Indeed, odhcp6c is able to get a prefix once more.  great!

I just updated to Barrier Breaker r39469 / LuCI Trunk (svn-r9951).
The new build uses odhcpd rather than 6relayd.
Since the update none of my Android devices are able to find any service that is operating on my DMZ. I think the problem is limited to IPv6.
I am not sure about other devices, or the effect on road warriors. However, I have not had any reports of problems from them so far.

Setup: for details see configs below.
    WAN is PPPoE.
    WAN6 is 6in4 from HENet, where I have a /48 subnet.
    I run two vlans one for the LAN and one for the DMZ.
    Vlan 1 is used form the LAN IP4 + IP6 addresses assigned by DHCP.
    Vlan 2 is used for the internet facing servers (dns, http(s), imaps, smtp, submission, sieve) all systems on this network have fixed ips for both IP4 + IP6.

Short term, what am I missing.
Long term, where can I find some documentation on odhcpd.  What direction is openwrt ipv6 development going in and what problems might I have in the future as a result of that development.


Network configuration:

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

config globals 'globals'
    option ula_prefix 'fdc6:9967:788d::/48'

config interface 'dmz'
    option proto 'static'
    option ifname 'eth0.1'
    option ipaddr '74.116.186.177'
    option netmask '255.255.255.240'
    option ip6assign '64'
    option ip6hint '10'

config interface 'lan'
    option type 'bridge'
    option proto 'static'
    option ifname 'eth0.2'
    option ipaddr '192.168.30.1'
    option netmask '255.255.255.224'
    option ip6assign '64'
    option ip6hint '30'

config interface 'wan'
    option ifname 'eth1'
    option proto 'pppoe'
    option username 'me@some.net'
    option password 'hush_hush'

config interface 'wan6'
    option proto '6in4'
    option peeraddr '216.66.38.58'
    option ip6addr '2001:470:1c:9e2::2/64'
    option ip6prefix '2001:470:b183::/48'
    option tunnelid '123456'
    option username 'something'
    option password 'nothing'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'
    option blinkrate '2'
    option enable_vlan4k '1'
    option max_length '3'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0 1 5t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '2 3 5t'

config switch_port
    option device 'switch0'
    option port '1'
    option led '6'

config switch_port
    option device 'switch0'
    option port '2'
    option led '9'

config switch_port
    option device 'switch0'
    option port '5'
    option led '2'

Dhcp configuration

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

config dhcp 'lan'
    option interface 'lan'
    option leasetime '12h'
    option dhcpv6 'hybrid'
    option ra 'hybrid'
    option ndp 'hybrid'
    option ra_management '1'
    option start '2'
    option limit '29'

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

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

config dhcp 'wan6'
    option dhcpv6 'hybrid'
    option ra 'hybrid'
    option ndp 'hybrid'
    option master '1'

config dhcp
    option interface 'dmz'
    option ignore '1'

(Last edited by zzz2002 on 6 Feb 2014, 23:29)

zzz2002 wrote:

I just updated to Barrier Breaker r39469 / LuCI Trunk (svn-r9951).
The new build uses odhcpd rather than 6relayd.
Since the update none of my Android devices are able to find any service that is operating on my DMZ. I think the problem is limited to IPv6.
I am not sure about other devices, or the effect on road warriors. However, I have not had any reports of problems from them so far.

define "find any service".  resolve DNS?  ping? connect?

My first impression that the problem is related to Android devices was incorrect.

In order to test I setup different DNS entries for each service, an IPv4 and IPv6 entry. eg smtp.klam.ca and smtp6.klam.ca.

I then tried to ping, telnet etc in to each service from a variety of devices. In every case the IPv4 version responded as expected, whereas the IPv6 version did nothing (they appeared to be blackholed).

Did 6relayd add routing that odhcpd does not?

I have also tried playing with the DMZ IPv6 DHCP settings without any noticeable difference.
I was not sure whether this was likely to be useful, as all of the systems attached to the DMZ use static addresses for both IPv4 and IPv6.

The problems seems to solved. I got there by the good old suck it and see method.

Is there any documentation, particularly some thing that describes the effect of hybrid, relay ...

My solution was to change the WAN6 dhcp6 & ra to server and drop the ndp stuff.
The lan setup seemed to work as is.
The server/dmz network I made dhcp6 &ra relay  and drop the NDP stuff.

I am not sure that this is the "best" setup, but it works for installation with a fixed IPv6 prefix.

Is ra_management = 0 the stateless DHCPv6 mode? For some reason my machines are not receiving any addresses with it on 0, but are receiving both stateful and stateless when set on 1. (I am using AICCU and it is working fine with relayd)

zzz2002 wrote:

Is there any documentation, particularly some thing that describes the effect of hybrid, relay ...

server: start a server for this service on this interface
relay: start a proxy / relay for this interface and use the interface with "option master 1" as upstream interface
hybrid: behaves like server if there is no interface marked with "option master 1" or if said interface has a delegated prefix otherwise it behaves as relay

relay is mainly useful if you don't get a PD on the WAN interface. OpenWrt then creates a pseudo bridge similar to relayd for IPv4.


lagonauta wrote:

Is ra_management = 0 the stateless DHCPv6 mode?

ra_management=0 sets the A-Flag (= clients use this for stateless address allocation) for the indivudal prefixes to 1 and the M-flag (= there is a DHCPv6-server managing addresses) to 0
ra_management=1 sets A-Flag and M-Flag to 1
ra_management=2 sets A-Flag to 0 and M-Flag to 1

(Last edited by CyrusFF on 23 Feb 2014, 08:52)

Since stopping 6relay obtaining public IPv6 on the LAN interface is very random. Sometimes the activation of guest wi-fi can correct the problem, but not always.
What is constant is that the wan interface has always public IPv6.

Sun Feb 23 11:12:41 2014 daemon.warn odhcpd[1215]: A default route is present but there is no public prefix on br-lan thus we don't announce a default route!

(Last edited by Manani on 23 Feb 2014, 14:53)

@CyrusFF:
One situation regarding odhcp6c has popped up. My second router normally gets ipv6 config info from the first router quite ok with odhcp6c.  However, I flashed the first router yesterday at 22:20 and odhcp6c sent REQUEST messages during the flash operation. After the first router had booted up at 22:25 (and answered?), the second router's odhcp6c started a REBIND transaction. So far it has taken 71643 seconds.

The log below gives indication that there is a 24h time limit for REBIND, so probably the router will somehow continue in a few hours, but odhcpc6 has been a bit stuck for the last 20 hours. The router can still ping ipv6.google.com, so ipv6 is not completely dead.

Tue Mar 18 21:52:17 2014 daemon.notice odhcp6c[1406]: Starting <POLL> transaction (timeout 600s, max rc 0)
Tue Mar 18 22:02:17 2014 daemon.notice odhcp6c[1406]: Starting REQUEST transaction (timeout 4294967295s, max rc 10)
Tue Mar 18 22:02:17 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 0ms, rc 0)
Tue Mar 18 22:02:17 2014 daemon.notice odhcp6c[1406]: Got a valid reply after 1ms
Tue Mar 18 22:02:17 2014 daemon.notice odhcp6c[1406]: Starting <POLL> transaction (timeout 600s, max rc 0)
Tue Mar 18 22:12:17 2014 daemon.notice odhcp6c[1406]: Starting REQUEST transaction (timeout 4294967295s, max rc 10)
Tue Mar 18 22:12:17 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 0ms, rc 0)
Tue Mar 18 22:12:17 2014 daemon.notice odhcp6c[1406]: Got a valid reply after 1ms
Tue Mar 18 22:12:17 2014 daemon.notice odhcp6c[1406]: Starting <POLL> transaction (timeout 600s, max rc 0)
Tue Mar 18 22:22:17 2014 daemon.notice odhcp6c[1406]: Starting REQUEST transaction (timeout 4294967295s, max rc 10)
Tue Mar 18 22:22:17 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 0ms, rc 0)
Tue Mar 18 22:22:18 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 990ms, rc 1)
Tue Mar 18 22:22:20 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 2970ms, rc 2)
Tue Mar 18 22:22:24 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 6750ms, rc 3)
Tue Mar 18 22:22:31 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 14030ms, rc 4)
Tue Mar 18 22:22:45 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 28400ms, rc 5)
Tue Mar 18 22:23:15 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 58021ms, rc 6)
Tue Mar 18 22:23:47 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 90370ms, rc 7)
Tue Mar 18 22:24:18 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 121010ms, rc 8)
Tue Mar 18 22:24:45 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 148050ms, rc 9)
Tue Mar 18 22:25:13 2014 daemon.notice odhcp6c[1406]: Starting REBIND transaction (timeout 83520s, max rc 0)
Tue Mar 18 22:25:13 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 0ms, rc 0)
Tue Mar 18 22:25:23 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 9350ms, rc 1)
Tue Mar 18 22:25:42 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 28630ms, rc 2)
Tue Mar 18 22:26:21 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 67282ms, rc 3)
Tue Mar 18 22:27:41 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 147082ms, rc 4)
Tue Mar 18 22:30:20 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 306400ms, rc 5)
Tue Mar 18 22:35:35 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 621490ms, rc 6)
Tue Mar 18 22:45:09 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 1195450ms, rc 7)
Tue Mar 18 22:54:51 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 1777750ms, rc 8)
...
Wed Mar 19 18:09:46 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 71072610ms, rc 125)
Wed Mar 19 18:19:17 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 71643270ms, rc 126)

The second router running odchp6c has uptime of 20 days and is running r39755, so odhcp6c is a bit old, but I do not think that there has been relevant odhcp6c check-ins during that time.

Is that REBIND loop expected?

EDIT:
After the timeout/retry period odhcp6c resumed normal operation via SOLICIT. No reboot, no service restarts in between.
The 24h timeout/retry period for REBIND sounds rather extensive.

Wed Mar 19 21:26:57 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 82903670ms, rc 145)
Wed Mar 19 21:37:10 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 83517050ms, rc 146)
Wed Mar 19 21:37:13 2014 daemon.notice odhcp6c[1406]: Send REBIND message (elapsed 83520000ms, rc 147)
Wed Mar 19 21:37:13 2014 daemon.notice odhcp6c[1406]: (re)starting transaction on br-lan
Wed Mar 19 21:37:13 2014 daemon.notice odhcp6c[1406]: Starting SOLICIT transaction (timeout 4294967295s, max rc 0)
Wed Mar 19 21:37:13 2014 daemon.notice odhcp6c[1406]: Got a valid reply after 2ms
Wed Mar 19 21:37:13 2014 daemon.notice netifd: Interface 'lan6' has lost the connection
Wed Mar 19 21:37:14 2014 daemon.notice odhcp6c[1406]: Starting REQUEST transaction (timeout 4294967295s, max rc 10)
Wed Mar 19 21:37:14 2014 daemon.notice odhcp6c[1406]: Send REQUEST message (elapsed 0ms, rc 0)
Wed Mar 19 21:37:14 2014 daemon.notice odhcp6c[1406]: Got a valid reply after 2ms
Wed Mar 19 21:37:14 2014 daemon.notice odhcp6c[1406]: entering stateful-mode on br-lan
Wed Mar 19 21:37:14 2014 daemon.notice odhcp6c[1406]: Starting <POLL> transaction (timeout 1800s, max rc 0)
Wed Mar 19 21:37:15 2014 daemon.info dnsmasq[1750]: reading /tmp/resolv.conf.auto
Wed Mar 19 21:37:15 2014 daemon.info dnsmasq[1750]: using nameserver 192.168.1.1#53
Wed Mar 19 21:37:15 2014 daemon.info dnsmasq[1750]: using local addresses only for domain lan
Wed Mar 19 21:37:15 2014 daemon.notice netifd: Interface 'lan6' is now up

(Last edited by hnyman on 19 Mar 2014, 20:41)

Pardon my noobiness, but is there a way to disable DHCPv6 leases? I installed Trunk r40004 and some of the devices that I have assigned a static DHCP are going the DHCPv6 way.

Manani wrote:

Since stopping 6relay obtaining public IPv6 on the LAN interface is very random. Sometimes the activation of guest wi-fi can correct the problem, but not always.
What is constant is that the wan interface has always public IPv6.

Sun Feb 23 11:12:41 2014 daemon.warn odhcpd[1215]: A default route is present but there is no public prefix on br-lan thus we don't announce a default route!

I still have the same behavior with Chaos Calmer. I have to disable and enable WiFi to get public IPv6 on the LAN side.

I can not access any of the IPv6 site. Yet it looks ok, I get public IPv6 on both the WAN as LAN.
I think my problem is related to a defect in the firewall settings.
Any help is welcome.
Thanks

@Manani

I have the same wan access as you (bridged freebox/alicebox v5 on openwrt) I can't make ipv6 work...

Got a WRT1900ac with chaos calmer... WAN get correct ipv6 and I can access ipv6 trought ssh but nothing on lan... don't know what to do sad

yanfox wrote:

@Manani

I have the same wan access as you (bridged freebox/alicebox v5 on openwrt) I can't make ipv6 work...

Got a WRT1900ac with chaos calmer... WAN get correct ipv6 and I can access ipv6 trought ssh but nothing on lan... don't know what to do sad

No changes on my side. I still can not find where it gets stuck.

The discussion might have continued from here.