IPv6 Dynamic Prefix with static suffix for LAN interface
-
Hi,
I migrated to a new ISP from which I get a dynamic /56 prefix. As I'm setting up my various internal networks for IPv6 I noticed it only lets me choose between a full static IPv6 or to track the WAN address and use the MAC address as the suffix.
Is it possible to use only the /56 prefix from the WAN interface and then assign a static suffix to the various LAN interfaces?Thanks.
-
Is it possible to use only the /56 prefix from the WAN interface and then assign a static suffix to the various LAN interfaces?
When you create a LAN interface, you choose a unique prefix ID for each interface. Your choices are 0 - ff with a /56. There is also a setting to prevent releasing the prefix, which you probably want to set.
-
@jknott said in IPv6 Dynamic Prefix with static suffix for LAN interface:
When you create a LAN interface, you choose a unique prefix ID for each interface.
That's right, but this only defines the first 64 bit of the address. My plan is to then statically assign the host part of the address, which is currently the MAC address, to for example: <56 bit prefix + prefix ID>::1. Is there a way to do that?
-
I haven't tried it, but perhaps if you ran DHCPv6 on the LAN, you could map a MAC to an IP address, as you can do on IPv4.
-
@jknott
Just to clarify, I mean to set the LAN Interface address on the pfSense box. -
@foerkede Why would you? Best compatibility is to assign one /64 to your LAN via track interface. Then in the DHCPv6 Server on LAN you add a static mapping for one machines DUID together with a hostname and an interface identifier of your liking. Now you can use that hostname in firewall rules, even after your prefix changed.
-
@foerkede said in IPv6 Dynamic Prefix with static suffix for LAN interface:
Just to clarify, I mean to set the LAN Interface address on the pfSense box.
Unless I'm mistaken, that already happens. Between not releasing the prefix and using the prefix ID, it shouldn't change. At least mine has been rock solid. The only time mine changed was when there was a problem at my ISP, though I also expect it will change when I get my new computer to run pfsense on.
-
@bob-dig said in IPv6 Dynamic Prefix with static suffix for LAN interface:
@foerkede Why would you? Best compatibility is to assign one /64 to your LAN via track interface. Then in the DHCPv6 Server on LAN you add a static mapping for one machines DUID together with a hostname and an interface identifier of your liking. Now you can use that hostname in firewall rules, even after your prefix changed.
Yes that's a good way to manage the clients in the network and I will probably do that.
My idea was to set the LAN Interface IPv6 to a memorable address, like <prefix>::1 as you do in IPv4, so you can configure static IPv6 addresses more easily (gateway and DNS config).
But I forgot that if the prefix changes, I have to change all the static addresses on the machines too. So the DHCPv6 solution seems to be the only good one if you don't get a static prefix from your ISP.Thanks for your fast and helpful input!