IPv6 prefix length hint option for interfaces file?

Kernels & Hardware, configuring network, installing services

IPv6 prefix length hint option for interfaces file?

Postby tllewell55 » 2019-08-08 11:58

I am setting up IPv6 to be routed by a Debian 10 box. Currently I am trying to get /etc/network/interfaces to set up the upstream link to my ISP. So far I have:
Code: Select all
# WAN interface
allow-hotplug enp1s0
iface enp1s0 inet6 dhcp
        accept_ra 2
        request_prefix 1

This gets me a /64, which doesn't allow me to subnet and use EUI-64 addresses downstream (this is for a lab setup, so I can tolerate having everything blown away when the prefix changes). It doesn't look like the man page for the interfaces file has been updated since dhclient 4.4 came out, so maybe the option for the prefix length hint hasn't shown up yet. Or is there one, yet?
I could just subnet the /64 or use the command line and try to get a shorter prefix, but it would be nice to have one more obscure option for the interfaces file, wouldn't it? ;-)
tllewell55
 
Posts: 3
Joined: 2019-08-08 00:44

Re: IPv6 prefix length hint option for interfaces file?

Postby Head_on_a_Stick » 2019-08-09 08:28

I don't have any experience with IPv6 but it looks like systemd-networkd may be able to do what you want, see systemd.network(5).
User avatar
Head_on_a_Stick
 
Posts: 10321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: IPv6 prefix length hint option for interfaces file?

Postby tllewell55 » 2019-08-09 11:36

Thanks for the reply, Head_on_a_Stick, but I'm not sure about that. What I don't see is a clear way to assign the received prefix to the interior (LAN) port. Perhaps the OtherInformation= item in [IPv6PrefixDelegation] is supposed to do this, but if so it's not very clear that's the case. And if so, that would be for the normal use case where you were simply trying to delegate the prefix, which is not exactly what I am trying to do.

Anyway, I've been trying to get something other than a /64. I've been issuing command lines like "sudo dhclient -P --address-prefix-len 60 -N enp1s0" and according to the packet traces I'm getting I'm still sending requests for a /64. So I don't know if my ISP would give me a shorter prefix if I asked for one. If I'm going to do that it doesn't look like Debian's stock ISC 4.4 dhclient is going to do it. Am I doing something wrong? I am getting leases.

However, it occurs to me that I could route to my lab environment with link local addresses and assign the prefix I got at the LAN interface where my lab's end systems live. And I can always chop up the /64 when I feel rested enough to tackle subnetting in hex numbers.
tllewell55
 
Posts: 3
Joined: 2019-08-08 00:44

Re: IPv6 prefix length hint option for interfaces file?

Postby tllewell55 » 2019-08-09 17:02

Well, it actually does work. You just have to specify the option correctly, because it fails silently if you don't. Argh, another umpteen hours troubleshooting operator error that I won't get back.

It'd still be nice to have an option for the interfaces file.
tllewell55
 
Posts: 3
Joined: 2019-08-08 00:44


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable