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

    DUID and IPv6 - static IP mapping best practice

    Scheduled Pinned Locked Moved IPv6
    19 Posts 4 Posters 1.3k Views
    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.
    • S
      SteveITS Galactic Empire @CatSpecial202
      last edited by

      @CatSpecial202 I think the goal is to not use the MAC, for privacy...?

      Quick search shows Ubuntu uses Link-layer address plus time (DUID-LLT).

      pfSense has multiple options to choose on its WAN: https://docs.netgate.com/pfsense/en/latest/config/advanced-networking.html#dhcp6-duid.

      There is a note somewhere in the pfSense docs to manually set a DUID if using a RAM disk, otherwise pfSense will not retain the DUID between restarts. The last one I was working on, when I tried to set it to Raw, upon saving it would change to DUID-LLT, which was frustrating but I was able to get it to use DUID-LL as I recall...though still had to figure out exactly what value was being used. But I digress...

      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
      Upvote ๐Ÿ‘ helpful posts!

      S CatSpecial202C 2 Replies Last reply Reply Quote 0
      • dennypageD
        dennypage @CatSpecial202
        last edited by dennypage

        @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

        As far as I understand DHCP static IP mapping with IPv6 works by using the DUID to regenerate the same IP. I believe this was caused by the DUID being regenerated with each OS installation? Isn't this prohibitive? IPv4 uses the MAC address, which always stays with the device regardless of OS installation.

        Not on Apple devices. Apple devices use a randomly generated MAC address as a privacy measure. You can turn it off, but it's on by default.

        As to IPv6 mappings, I run fully managed (RA) and assign addresses (DHCPv6) to clients using '::1', '::2', etc. This is essentially required when using track interface addresses. FWIW, I use the same last octet for IPv4 and IPv6 to make identification easier.

        YMMV

        JKnottJ 1 Reply Last reply Reply Quote 1
        • S
          SteveITS Galactic Empire @SteveITS
          last edited by

          Also of note for anyone finding this, pfSense has a "debug mode" which among lots of other log info will show the DUID pfSense is trying to use when it connects out.

          https://docs.netgate.com/pfsense/en/latest/config/advanced-networking.html#dhcp6-debug

          AFAICT it does require a pfSense restart to toggle on/off. Or at least it doesn't seem to do so by just toggling the checkbox.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote ๐Ÿ‘ helpful posts!

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

            @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

            When configuring the network interfaces in the ubuntu installer for instance there is only DHCPv6 and manual. there is no option for SLAAC.

            What is the procedure here?

            I run openSUSE and the only thing I had to do was enable IPv6. This is the beauty of SLAAC, there is no configuration required on the clients. It just works.

            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
            • JKnottJ
              JKnott @dennypage
              last edited by

              @dennypage said in DUID and IPv6 - static IP mapping best practice:

              Not on Apple devices. Apple devices use a randomly generated MAC address as a privacy measure. You can turn it off, but it's on by default.

              It's the same with openSUSE Linux. With SLAAC, you have a consistent address, which can be based on either the MAC address or a random number. There will also be up to 7 privacy addresses, with a new one every day. The privacy addresses are used for outgoing connections and the consistent address for incoming connections.

              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
              • CatSpecial202C
                CatSpecial202 @SteveITS
                last edited by CatSpecial202

                @SteveITS I'm talking about my LAN with DHCPv6. What is the DUID-LLT used for? My firewall WAN has a link local address

                fe80::21c:73ff:fe00:99%mvneta0
                

                So, this is used to generate the DUID for each of my interfaces?

                How would someone use Static IP mapping w/ DHCPv6 for IPv6 if it's relying on an impermanent DUID?

                @JKnott where is the SLAAC managed from? This is for my internal LAN. While installing ubunutu I do have to enable the interface but only have those two options. You're saying it should just be configured regardless of what i select?

                dennypageD JKnottJ S 3 Replies Last reply Reply Quote 0
                • dennypageD
                  dennypage @CatSpecial202
                  last edited by

                  @CatSpecial202

                  IPv6 wise, SlAAC is the opposite of managed. It's what happens when a network isn't actively managed.

                  See Services / Router Advertisement / LAN Router Mode. Further documentation may be found here.

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

                    @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

                    @JKnott where is the SLAAC managed from?

                    On the Router Advertisement page, select Unmanaged for Router Mode

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

                    CatSpecial202C 1 Reply Last reply Reply Quote 0
                    • S
                      SteveITS Galactic Empire @CatSpecial202
                      last edited by

                      @CatSpecial202 I understand, I was just kind of venting/discussing in general.

                      The DUID is also supposed to be unique to the device, not to the NIC, notably when multiple NICs are in a device.

                      There are several ways to generate a DUID but it's basically just random and up to the device to generate its own. Using the MAC address and factoring in time helps make it unique, is all. Generally it's saved on the device but if you format/reinstall, that file/data is lost. (or if you have pfSense set to use a RAM disk its DUID file is lost on boot, unless saved as noted above). Or I suppose an admin on the device can delete/create a new file.

                      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                      Upvote ๐Ÿ‘ helpful posts!

                      1 Reply Last reply Reply Quote 0
                      • CatSpecial202C
                        CatSpecial202 @JKnott
                        last edited by CatSpecial202

                        @JKnott I found this link stateless address autoconfiguration slaac that was helpful in my understanding. I keep thinking of this like a local thing and not a global thing, but i guess all IPv6 are designed to be discoverable on the global internet. SLAAC will always resolve an address that can route to the WAN port?

                        @SteveITS So, i guess this is a known issue with static IP mapping using DHCPv6 that if you reinstall the OS static IP mapping wont work. It's applying old methods to new ideas.

                        JKnottJ S 2 Replies Last reply Reply Quote 0
                        • JKnottJ
                          JKnott @CatSpecial202
                          last edited by

                          @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

                          SLAAC will always resolve an address that can route to the WAN port?

                          Depending on what you configure pfSense to provide, it will get global addresses which can be routed to the Internet and also, if configured, Unique Local Addresses which, like RFC1918 addresses on IPv4, are routeable, but not to the Internet.

                          There is one error in that article. SLAAC can provide the DNS address, with RDNSS. You use the Enable DNS setting on the Router Advertisement page to enable it.

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

                          CatSpecial202C 1 Reply Last reply Reply Quote 0
                          • CatSpecial202C
                            CatSpecial202 @JKnott
                            last edited by

                            @JKnott It mentions this in the article

                            If the O-flag is set to 1, it indicates that DNS information is available via DHCPv6. The router is basically telling the nodes to auto-configure an address via SLAAC and ask the DHCP server for DNS information.

                            Isn't it the DHCPv6 that will always have to provide that? SLAAC doesn't do this it just tells the service where to look.

                            JKnottJ 1 Reply Last reply Reply Quote 0
                            • S
                              SteveITS Galactic Empire @CatSpecial202
                              last edited by

                              @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

                              known issue with static IP mapping using DHCPv6 that if you reinstall the OS static IP mapping wont work

                              I suppose it's semantics whether it's a "known issue" or "by design" but it is up to the administrator/person to keep the DUID between drive wipes.

                              Note this can also be an issue when cloning VMs if the DUID isn't changed.

                              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                              Upvote ๐Ÿ‘ helpful posts!

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

                                @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

                                @JKnott
                                about 4 hours ago

                                @JKnott It mentions this in the article

                                If the O-flag is set to 1, it indicates that DNS information is available via DHCPv6. The router is basically telling the nodes to auto-configure an address via SLAAC and ask the DHCP server for DNS information.

                                Isn't it the DHCPv6 that will always have to provide that? SLAAC doesn't do this it just tells the service where to look.

                                Here's a capture of the relevant bits:

                                bb8c6efa-998f-4d0b-8e65-b7c310a1927c-image.png

                                You'll see that the O bit is not set, which means DHCPv6 is not used. SLAAC provides all you need, including the DNS address.

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

                                CatSpecial202C 1 Reply Last reply Reply Quote 0
                                • CatSpecial202C
                                  CatSpecial202 @JKnott
                                  last edited by

                                  @JKnott thanks. that is cool. I'm going to keep experimenting.

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

                                    @CatSpecial202 said in DUID and IPv6 - static IP mapping best practice:

                                    @JKnott thanks. that is cool. I'm going to keep experimenting.

                                    A very useful tool for that is Wireshark.

                                    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
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.