1
       __
     _/  \____
    /         \__
   /  Internet   \
   \_____________/
         |
    ------------
    + Router 1 +
    ------------
         |
    ------------
    + Router 2 +
    -------------
         |
        ...
  Internal Network
        ...

I'm attempting to learn ipv6 by creating a 6in4 tunnel on my home network using Hurricane Electric. My physical setup is per the illustration above.

I've read several ipv6 starter guides and various tutorials (especially: 1, 2), and pieced together information on how to perform the routing.

Routers 1 and 2 are fairly simple devices, with busybox installed (although Router 2 is somewhat more capable than Router 1).

On Router 1, I've issued the following commands:

HURR_ELEC_IPV4_SERVER=A.B.C.D
MY_WAN_IP_ADDR=E.F.G.H
HURR_ELEC_IPV6_CLIENT=XXXX:YYYY:ZZZZ:WWWW::2
HURR_ELEC_IPV6_SERVER=XXXX:YYYY:ZZZZ:WWWW::1
HURR_ELEC_IPV6_ROUTED_48=XXXX:YYYY:NNNN

ip tunnel add he-ipv6 mode sit remote $HURR_ELEC_IPV4_SERVER local $MY_WAN_IP_ADDR ttl 255
ip link set he-ipv6 up
ip addr add $HURR_ELEC_IPV6_CLIENT/64 dev he-ipv6
ip route add default via $HURR_ELEC_IPV6_SERVER dev he-ipv6
ip addr add $HURR_ELEC_IPV6_ROUTED_48::1/64 dev br0

#in my /var/radvd.conf file:

interface br0 {
  AdvSendAdvert on;
  AdvManagedFlag on;
  AdvOtherConfigFlag on;
  AdvLinkMTU 0;
  MinRtrAdvInterval 20;
  MaxRtrAdvInterval 60;
  AdvDefaultLifetime 0;

  prefix $HURR_ELEC_IPV6_ROUTED_48::/64
  {
  };
};

On Router 1, I kill the radvd process, then manually restart it. At this point, Router 1 is able to ping6 ipv6.google.com and get a result:

/ # ping6 ipv6.google.com
resolve success!
PING ipv6.google.com(2607:f8b0:4004:811::200e) 56 data bytes
64 bytes from 2607:f8b0:4004:811::200e: icmp_seq=1 ttl=57 time=18.3 ms
64 bytes from 2607:f8b0:4004:811::200e: icmp_seq=2 ttl=57 time=13.4 ms
64 bytes from 2607:f8b0:4004:811::200e: icmp_seq=3 ttl=57 time=17.7 ms
64 bytes from 2607:f8b0:4004:811::200e: icmp_seq=4 ttl=57 time=11.6 ms
...

Router 2 is a Netgear router, which has an Auto Config option. When using this mode, it successfully acquires an IPv6 address from Router 1. After Auto Config, the relevant IP addresses and ipv6 routing table look like this:

user@Router2:/# ip -6 addr show
...
9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
    inet6 fe80::KKKK:LLLL:MMMM:OOOO/64 scope link
       valid_lft forever preferred_lft forever
10: brwan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
    inet6 XXXX:YYYY:NNNN:0:KKKK:LLLL:MMMM:JJJJ/64 scope global dynamic
       valid_lft 2591980sec preferred_lft 604780sec
    inet6 fe80::KKKK:LLLL:MMMM:JJJJ/64 scope link
       valid_lft forever preferred_lft forever
...

user@Router2:/# ip -6 route show
XXXX:YYYY:NNNN::/64 dev brwan  proto kernel  metric 256  expires 2591969sec
...
fe80::/64 dev brwan  proto kernel  metric 256
fe80::/64 dev br0  proto kernel  metric 256

Router 2 can ping Router 1's br0 interface now:

user@Router2:/# ping6 XXXX:YYYY:NNNN::1
PING XXXX:YYYY:NNNN::1 (XXXX:YYYY:NNNN::1): 56 data bytes
64 bytes from XXXX:YYYY:NNNN::1: seq=0 ttl=64 time=7.225 ms
64 bytes from XXXX:YYYY:NNNN::1: seq=1 ttl=64 time=0.655 ms
64 bytes from XXXX:YYYY:NNNN::1: seq=2 ttl=64 time=0.673 ms
64 bytes from XXXX:YYYY:NNNN::1: seq=3 ttl=64 time=0.674 ms

But, Router 2 cannot ping Router 2's brwan interface (Hurricane Electric's client address):

user@Router2:/# ping6 XXXX:YYYY:ZZZZ:WWWW::2
PING XXXX:YYYY:ZZZZ:WWWW::2 (XXXX:YYYY:ZZZZ:WWWW::2): 56 data bytes
ping6: sendto: Network is unreachable

After adding a static route via Router 1's br0 interface address, Router 2 can ping Router 1's brwan interface:

user@Router2:/# ip -6 route add ::/0 via XXXX:YYYY:NNNN::1 dev brwan
user@Router2:/# ping6 XXXX:YYYY:ZZZZ:WWWW::2
PING XXXX:YYYY:ZZZZ:WWWW::2 (XXXX:YYYY:ZZZZ:WWWW::2): 56 data bytes
64 bytes from XXXX:YYYY:ZZZZ:WWWW::2: seq=0 ttl=64 time=10.858 ms
64 bytes from XXXX:YYYY:ZZZZ:WWWW::2: seq=1 ttl=64 time=0.660 ms
64 bytes from XXXX:YYYY:ZZZZ:WWWW::2: seq=2 ttl=64 time=0.647 ms

In my limited understanding, I would have thought that Router 1 would be able to get to the Internet, because it is able to get to the Hurricane Electric client interface IP address on Router 1's brwan, and brwan knows how to traverse the HE tunnel to get to the Internet.

However, when I ping Google, nothing happens:

user@Router2:/# ping6 ipv6.google.com
PING ipv6.google.com (2607:f8b0:4004:807::200e): 56 data bytes
^C^C
--- ipv6.google.com ping statistics ---
47 packets transmitted, 0 packets received, 100% packet loss

user@Router2:/# traceroute6 -v ipv6.google.com
traceroute to ipv6.google.com (2607:f8b0:4004:800::200e), 30 hops max, 16 byte packets
 1  XXXX:YYYY:NNNN::1 (XXXX:YYYY:NNNN::1) 32 bytes to XXXX:YYYY:NNNN:0:KKKK:LLLL:MMMM:JJJJ  0.455 ms  0.467 ms  0.420 ms
 2  *
56 bytes from (Router 1's br0 interface Link-Local addr) to ff02::1: icmp type 134 (Router Advert) code 0
0000: 00000000 00000000 030440c0 00278d00
0010: 00093a80 00000000 20010470 8c810000
0020: 00000000 00000000 010170f1 961dd439
  *  *
 3  *  *  *
 4  *  *
56 bytes from (Router 1's br0 interface Link-Local addr) to ff02::1: icmp type 134 (Router Advert) code 0
0000: 00000000 00000000 030440c0 00278d00
0010: 00093a80 00000000 20010470 8c810000
0020: 00000000 00000000 010170f1 961dd439
^C
user@Router2:/#

Why can't Router 2 reach the Internet?

UPDATE:

Per @grawity, I changed /var/radvd.conf to:

interface br0 {
  AdvSendAdvert on;

  prefix XXXX:YYYY:NNNN::/64
  {
  };
};

Now, Router 2 automatically gets assigned a default route (which is the link-local fe80 address of the br0 interface on Router 1). However, Router 2 still can't access the Internet.

2
  • 1
    Also, HE's tunnels are 6in4 tunnels. "6to4" specifically refers to the use of 6in4 with anycast gateways and the 2002::/16 prefix. (Though even router manufacturers sometimes mix these up.)
    – user1686
    May 22 '18 at 17:12
  • @grawity - thank you for the info! Updating the question. May 22 '18 at 17:16
1

Your router advertisements have AdvDefaultLifetime 0, which is documented as:

The lifetime associated with the default router in units of seconds. The maximum value corresponds to 18.2 hours. A lifetime of 0 indicates that the router is not a default router and should not appear on the default router list.

Therefore Router2 does not configure a default route based on the advertisements.


I would suggest starting with no options besides AdvSendAdvert on, because most of them don't seem necessary in environment yet. E.g. the two Flags only make sense if you also run DHCPv6.

That said, you will probably need DHCPv6 in the future, in order to implement Prefix Delegation and allow Router2 to obtain its own /64 subnet, as it cannot do that via pure SLAAC. Since IPv6 routers generally don't perform NAT, each of them will need its own /64, whether you try to stack them or not.

2
  • When I simplify the router advertisements, Router 2 does indeed automatically get a default gateway (which is the link-local address of Router 1's br0 interface-- why doesn't it use the global prefix?). Now I don't need to add an extra hop manually, but Router 2 still can't access the Internet. May 22 '18 at 17:28
  • 2
    The gateway's prefix is irrelevant, as long as the address can be resolved down to a MAC. Link-local makes the advertisements simpler.
    – user1686
    May 22 '18 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.