Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    IPv6 Dynamic Prefix with static suffix for LAN interface

    IPv6
    3
    8
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      foerkede
      last edited by

      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.

      JKnottJ 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @foerkede
        last edited by

        @foerkede

        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.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        F 1 Reply Last reply Reply Quote 0
        • F
          foerkede @JKnott
          last edited by

          @jknott

          @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?

          JKnottJ 1 Reply Last reply Reply Quote 0
          • JKnottJ
            JKnott @foerkede
            last edited by

            @foerkede

            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.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            F 1 Reply Last reply Reply Quote 0
            • F
              foerkede @JKnott
              last edited by

              @jknott
              Just to clarify, I mean to set the LAN Interface address on the pfSense box.

              Bob.DigB JKnottJ 2 Replies Last reply Reply Quote 0
              • Bob.DigB
                Bob.Dig LAYER 8 @foerkede
                last edited by Bob.Dig

                @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.

                F 1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @foerkede
                  last edited by

                  @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.

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  1 Reply Last reply Reply Quote 0
                  • F
                    foerkede @Bob.Dig
                    last edited by

                    @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!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.