EdgeRouter - Enable IPv6 support via CLI

Overview


Readers will learn how to enable IPv6 (Internet Protocol version 6) support for EdgeRouter.

IPv6 is gaining popularity and is bound to grow as IP addressing demands increase. The CLI has comprehensive IPv6 support. 

For IPv6 addresses, the CLI supports “::” (double‑colon) notation, which substitutes “::” for a contiguous sequence of 16-bit blocks set to zero. Here is an example: 2001:db8::1

If written out, the IPv6 address becomes: 2001:db8:0000:0000:0000:0000:0000:0001

Steps


The first step is to add 6rd support to the sit kernel module. 

The following configuration works with an ISP like CenturyLink but could probably be adapted to work with any other provider that uses it.

interfaces{
    tunnel tun0 {
        address ASSIGNEDPREFIXHERE::1/24
        description "CenturyLink IPv6 tunnel"
        encapsulation sit
        local-ip XX.XX.XX.XX
        remote-ip 205.171.2.64
    }
    ethernet eth1 {
        address ASSIGNEDPREFIXHERE::1/64
        ipv6 {
            dup-addr-detect-transmits 1
            router-advert {
                cur-hop-limit 64
                link-mtu 1280
                managed-flag false
                max-interval 300
                other-config-flag false
                prefix ASSIGNEDPREFIXHERE::/64 {
                    autonomous-flag true
                    on-link-flag true
                    valid-lifetime 2592000
                }
                reachable-time 0
                retrans-timer 0
                send-advert true
            }
        }
    }
}
protocols {
    static {
        interface-route6 ::/0 {
            next-hop-interface tun0 {
            }
        }
    }
}

ASSIGNEDPREFIXHERE should be the IPv6 prefix that your 6rd provider uses. With Centurylink, this looks like 2602:4b:xxxx:xxxx:xxxx::.

An example of what it looks like:

2602:4b:deaf:beef::1

The subnet mask is also specific to each provider, but the address on your ethernet will always have /64, and the sit tunnel (at least for CenturyLink) is /24. Obviously, set the local-ip to be your local IP (usually your outside interface IP). The above will also configure radvd to auto configuration.

And there you have it, 6rd, without the 6rd.