Prefix delegation and IPv6 subnetting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have become fascinated by prefix delegation and ipv6 subnetting - to the extent that I have decided to learn more about it. I have set up the following test network using VirtualBox: (main router is a real host; the virtual hosts (Netn) run on my workstation)

  Internet
       |
       |
   ------------
   |           |
   |Main router|
   |           |
   -------------
      LAN
       |
       |
       | enp0s3
   -----------
   |         |
   | Net0    |
   |         |
   -----------
enp0s9 |   | enp0s8
       |   |
       |   --------------------
       |                      |
       | enp0s3               | enp0s3
   -----------            ----------
   |         |            |        |
   | Net1    |            | Net2   |
   |         |            |        |
   -----------            ----------
                       enp0s8 |
                              |
                              | enp0s3
                          -----------
                          |         |
                          | Net4    |
                          |         |
                          -----------


I have also decided that I want to use networkd for the purpose because I like the idea of systemd and networkd.

So far I have encountered two problem areas: 1) getting prefix delegation to work and 2) getting IP6 downstream routes set up. I'll return to the route setup problem in a later post.

The prefix delegation problem starts with the interactions between net0 and net2. Net0 is delegated a /56 prefix from the main router (which runs radvd and dhcpd6, not networkd, for historical reasons). I want net2 to delegate a /60 subnet to net3, but it doesn't happen. The immediate symptoms are that net0 doesn't start a dhcp6 server on downstream interface enp0s9 and net2 doesn't start a dhcp6 client on upstream interface enp0s3.

The hosts net0, net2 and net3 all run ArchLinux (kernel5.18.5-arch1-1, systemd 251.2-1). Here are the configuration files:
Host net0:
=====
# Upstream interface enp0s3 on net0
[Match]
Name=enp0s3

[Network]
# SLAAC IPv6 for obtaining the default route.
LinkLocalAddressing=ipv6
DHCP=yes

[IPv6AcceptRA]
DHCPv6Client=yes
=====

=====
# Downstream interface enp0s8 on net2
[Match]
Name=enp0s8

[Network]
DHCPPrefixDelegation=yes
IPv6SendRA=yes
IPv6AcceptRA=no
IPForward=yes
DHCPServer=yes

[DHCPPrefixDelegation]
UplinkInterface=enp0s3
SubnetId=8
Announce=yes

[Address]
Address=192.168.1.1/24

[DHCPServer]
PoolOffset=90
PoolSize=10
EmitDNS=yes
BindToInterface=yes

#[DHCPServerStaticLease]
# Net3 - IF enp0s3
#MACAddress=08:00:27:d7:6b:82
#Address=192.168.1.100
========

Host net2:
=====
#  Upstream interface enp0s3 on net2
[Match]
Name=enp0s3

[Network]
LinkLocalAddressing=ipv6
# SLAAC IPv6 for obtaining the default route
IPv6AcceptRA=yes
DHCP=yes
IPForward=yes

[DHCPv4]
Hostname=net2
UseHostname=no
# Ignore the hostname from the DHCP server
UseDNS=yes
UseNTP=yes
UseRoutes=yes
UseGateway=yes

[IPv6AcceptRA]
UseDNS=yes
DHCPv6Client=yes

[IPv6PrefixDelegation]
Managed=yes

[DHCPv6]
ForceDHCPv6PDOtherInformation=yes
UseHostname=no
UseDNS=yes
UseNTP=yes
=====

And here are the symptoms that to me doesn't look right:

On host net0:
[root@net0 ~]# ss -l6
Netid  State   Recv-Q   Send-Q                        Local Address:Port              Peer Address:Port  Process
icmp6  UNCONN  0        0 *%enp0s3:ipv6-icmp                    *:*
icmp6  UNCONN  0        0 *%enp0s8:ipv6-icmp                    *:*
icmp6  UNCONN  0        0 *%enp0s9:ipv6-icmp                    *:*
udp    UNCONN  0        0 [fe80::a00:27ff:fe8b:3d3]%enp0s3:dhcpv6-client [::]:*
udp    UNCONN  0        0 [::]:llmnr                     [::]:*
tcp    LISTEN  0        128 [::]:ssh                       [::]:*
tcp    LISTEN  0        511 *:https                        *:*
tcp    LISTEN  0        80 [::]:mysql                     [::]:*
tcp    LISTEN  0        4096 [::]:llmnr                     [::]:*
tcp    LISTEN  0        511 *:http                         *:*
[root@net0 ~]#

I'm missing a dhcpv6-server on enp0s8 (and enp0s9 for that matter)

Similar for host net2:

[root@net2 ~] ss -l6
Netid State  Recv-Q Send-Q Local Address:Port      Peer Address:Port Process
icmp6 UNCONN 0      0           *%enp0s8:ipv6-icmp *:*
icmp6 UNCONN 0      0           *%enp0s3:ipv6-icmp *:*
udp   UNCONN 0      0               [::]:llmnr [::]:*
tcp   LISTEN 0      4096            [::]:llmnr [::]:*
tcp   LISTEN 0      128             [::]:ssh [::]:*
[root@net2 ~]

Here I'm missing a dhcpv6-client on enp0s3.

I do need somebody to discuss these matters with since my thought sometimes appear to run in circles. I hope somebody will take the time to comment on this. Also I do apologize for the lengthy post but these matters are complicated - at least to me.

Kind regards

Bent



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux