0

I am currently using a Linux (Debian) box as my router/gateway and would like to test some other solutions (like VyOS, PFSense, OPNSense...) without replacing it (for now).

The testing would happen with VMs and/or spare machines.

While the IPv4 part isn't a problem, I'm wondering how to do the IPv6 routing.

Currently I'm getting a /48 from my provider and then use radvd and wide-dhcpv6-client to give /64 addresses to my machines.

radvd.conf:

interface enp1s0d1  { 
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;

        prefix ::/64 { 
                AdvOnLink on; 
                AdvAutonomous on; 
                AdvRouterAddr on; 
        };
};

interface enp1s0d1.20  {
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;

        prefix ::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

interface enp1s0d1.30  {
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;

        prefix ::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

dhcp6c.conf:

profile default
{
  information-only;
  request domain-name-servers;
  request domain-name;
  script "/etc/wide-dhcpv6/dhcp6c-script";
};

interface enp1s0 {
    # send rapid-commit;
    # send ia-na 0;
    send ia-pd 0;
};

id-assoc na 0 {
};

id-assoc pd 0 {
    prefix ::/48 infinity;
    prefix-interface enp1s0d1 {
        sla-len 16;
        sla-id 0;
        ifid 1;
    };
    prefix-interface enp1s0d1.20 {
        sla-len 16;
        sla-id 1;
        ifid 1;
    };
    prefix-interface enp1s0d1.30 {
        sla-len 16;
        sla-id 2;
        ifid 1;
    };
};

(The configurations are mostly copied from examples on the internet. I still just have a basic understanding of IPv6)

(I planned to do my test on the network behind enp1s0, but I could create a new vlan if that would be needed/easier)

If I understand it correctly then the issue is that /64 addresses can't be split any further, and I would have to give the router an /56 address, so it can then give /64 addresses to the machines behind it.

Am I right? And if so, how would I do that? Or is there a better way to do it?

Greg Askew
  • 34,339
  • 3
  • 52
  • 81
rmweiss
  • 183
  • 1
  • 6

0 Answers0