OpenWrt Forum Archive

Topic: [solved] ipv6 is not working from lan

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

My setup:
modem / residential gateway (Cisco EPC3825)
|
router, openwrt chaos calmer (Linksys WRT1200AC)
|
lan (ethernet)

Ipv6 connectivity works perfectly if I plug my pc ethernet cable directly to modem. Also the openwrt router it self seems to have a perfectly working ipv6 connectivity. But once I plug pc ethernet cable to router ipv6 connectivity stops working.

##### modem #####

Global IPv6 Address:     2001:14ba:800::164:26a4:ab50/128
Link-Local IPv6 Address:     fe80::e648:c7ff:fee9:ed1c/64
IPv6 Gateway:     fe80::217:10ff:fe86:a782
DNS IPv6 1:     2001:14b8:1000::1
DNS IPv6 2:     2001:14b8:1000::2
LAN IPv6 Prefix / System Delegated Prefix:     2001:14ba:8f3:1b00::/56
DHCPv6, LAN Delegated Prefix: 2001:14ba:8f3:1b00::/64

##### router / openwrt #####
ifconfig output:

br-lan    Link encap:Ethernet  HWaddr C0:56:27:73:37:DB  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::c256:27ff:fe73:37db/64 Scope:Link
          inet6 addr: fdd9:bae4:a13a::1/60 Scope:Global
          inet6 addr: 2001:14ba:8f3:1b80::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr C2:56:27:73:37:DB  
          inet addr:192.168.1.33  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2001:14ba:8f3:1b00:c256:27ff:fe73:37db/128 Scope:Global
          inet6 addr: fe80::c056:27ff:fe73:37db/64 Scope:Link
          inet6 addr: 2001:14ba:8f3:1b00:c056:27ff:fe73:37db/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

/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 globals 'globals'
        option ula_prefix 'fdd9:bae4:a13a::/48'

config interface 'lan'
        option ifname 'eth1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'

/etc/config/dhcp

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'
        option localservice '1'

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

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'

ping6 -c 1 ipv6.google.com

PING ipv6.google.com (2a00:1450:400f:804::200e): 56 data bytes
64 bytes from 2a00:1450:400f:804::200e: seq=0 ttl=55 time=18.448 ms

--- ipv6.google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss

##### from my pc #####
ifconfig:

ens9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.70  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fdd9:bae4:a13a::294  prefixlen 128  scopeid 0x0<global>
        inet6 fe80::e4d:e9ff:feab:645c  prefixlen 64  scopeid 0x20<link>
        inet6 2001:14ba:8f3:1b80:e4d:e9ff:feab:645c  prefixlen 64  scopeid 0x0<global>
        inet6 fdd9:bae4:a13a:0:e4d:e9ff:feab:645c  prefixlen 64  scopeid 0x0<global>
        ether 0c:4d:e9:ab:64:5c  txqueuelen 1000 (Ethernet)

route -n -6:

Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
2001:14ba:8f3:1b80::/64        ::                         U    100 0     0 ens9
fdd9:bae4:a13a::294/128        ::                         U    256 0     0 ens9
fdd9:bae4:a13a::/64            ::                         U    100 0     0 ens9
fdd9:bae4:a13a::/48            fe80::c256:27ff:fe73:37db  UG   100 0     0 ens9
fe80::/64                      ::                         U    256 0    17 ens9
::/0                           fe80::c256:27ff:fe73:37db  UG   100 0     0 ens9
::/0                           ::                         !n   -1  1  2656 lo
::1/128                        ::                         Un   0   6     7 lo
2001:14ba:8f3:1b80:e4d:e9ff:feab:645c/128 ::                         Un   0   1     0 lo
fdd9:bae4:a13a::294/128        ::                         Un   0   1     0 lo
fdd9:bae4:a13a:0:e4d:e9ff:feab:645c/128 ::                         Un   0   1     0 lo
fe80::e4d:e9ff:feab:645c/128   ::                         Un   0   2    23 lo
ff00::/8                       ::                         U    256 2   100 ens9
::/0                           ::                         !n   -1  1  2656 lo

ping6 -W 3 -c 1 ipv6.google.com

PING ipv6.google.com(arn09s05-in-x0e.1e100.net) 56 data bytes

--- ipv6.google.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Any ideas?

(Last edited by eqpox on 16 Dec 2015, 18:25)

Can you / Have you enable(d) Prefix Delegation on your Cisco modem/router?

If your modem is handling address allocation and prefix delegation only semi-properly, you might try the "relaying mode" at the Openwrt router:
https://wiki.openwrt.org/doc/uci/networ … ent_dhcpv6

(Last edited by hnyman on 16 Dec 2015, 15:51)

silentcreek wrote:

Can you / Have you enable(d) Prefix Delegation on your Cisco modem/router?

I think it is enabled (default modem settings):

Network Setup (LAN) IPv6                 
                
Gateway Prefix          
This page allows configuration of the internal DhcpV6 server for the
LAN. When modifying the System Delegated Prefix, set the System
Delegated Prefix first, and press Apply so that the system can calculate
its LAN Delegated Prefix.
System Delegated Prefix:        "2001:14ba:8f3:b100::/56"

------------------------------------------------------------------------

Network Address
Server Settings (DHCPv6)
                
LAN Delegated Prefix will be derived from System Delegated Prefix and
Start Address will have the same prefix as the LAN Delegated Prefix.
Enabled                  "true"
LAN Delegated Prefix:    "2001:14ba:8f3:b100::/64"
Start Address:           "2001:14ba:8f3:b100::/64"
Number of Addresses:     "255"
Valid Lifetime:          "60"
Enabled Rapid Commit     "false"
Enabled Unicast          "false"
Enabled EUI-64 Addressing       "true"
hnyman wrote:

If your modem is handling address allocation and prefix delegation only semi-properly, you might try the "relaying mode" at the Openwrt router:
https://wiki.openwrt.org/doc/uci/networ … ent_dhcpv6

Thanks, this solved the issue. Almost. It didn't work out of the box and after some googling I found this: https://dev.openwrt.org/ticket/16923

ipv6 now works and my /etc/config/dhcp looks like this:

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'
        option localservice '1'

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

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

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

Only 'wan' is needed. Setup containing 'wan6' section didn't work.

Nice to hear that you got it working.

eqpox wrote:
System Delegated Prefix:        "2001:14ba:8f3:b100::/56"
...
LAN Delegated Prefix:    "2001:14ba:8f3:b100::/64"

One additional observation now that you have provided meaningful details from the modem settings. I guess that core problem lies at the modem settings, as it delegates only a single /64 for its LAN = Openwrt router and clients behind that. For prefix delegation to work downstream, there should be several /64 prefixes available (at least two, so that the Openwrt router would keep one for itself and its WAN side (=modem side) and assign the other for its LAN). When the Openwrt router gets assigned a only single /64, there is nothing to delegate further for its own LAN side.

Actually, your case might be for interest for the odhcpd developer (sbyx / CyrusFF), as the automatic switch from PD mode to relaying did not work. (Wiki gives you the impression that it should work.)

(Last edited by hnyman on 16 Dec 2015, 20:59)

The discussion might have continued from here.