Navigation

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

    Static IPv6 address allocation based on MAC

    IPv6
    3
    8
    181
    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.
    • H
      hiryu last edited by

      Searched around first and couldn't find an answer, though I'm sure SOMEONE must have asked about this before.

      Is it possible to allocate addresses via PfSense/DHCPv6 based on just the Mac address? I need to allocate a consistent address to a device regardless of whether it's booted into another OS, or if the OS has been reinstalled.

      It seems this might be possible with DUID-EN, however, I'm unsure if it's possible for DHCPv6 to insist on DUID-EN.

      While I have worked with IPv6 in the past somewhat, this is my first experience with DHCPv6.

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

        @hiryu

        If you want addresses based on the MAC, you don't need DHCPv6. It happens automagically with SLAAC. However, depending on the configuration, a consistent random number might be used instead. The details for changing that depend on the operating system.

        1 Reply Last reply Reply Quote 0
        • H
          hiryu last edited by

          This would require some manual tuning of multiple OS's to result in an identical OS.

          At this point, it's probably easier/faster to just assign the same static address across them... Which means each time there's a new install on any of these machines, manual intervention in terms of network configuration will be necessary...

          Which I suppose isn't the end of the world and probably faster than recreating the static mappings for the update DUID's, and OS installs aren't going to be super common.

          In theory, my prefix is supposed to be static as well.

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

            @hiryu said in Static IPv6 address allocation based on MAC:

            In theory, my prefix is supposed to be static as well.

            Mine virtually is. In my experience, the MAC is used with Linux, at least openSUSE, but Windows uses a random number, However, that might be one of the things that can be changed with policies on the domain controller, but I don't know, as I don't work with that sort of thing.

            Regardless, while I haven't tried it on IPv6, pfSense does support static mapping for it, just as it does for IPv4.

            1 Reply Last reply Reply Quote 0
            • H
              hiryu last edited by

              Yeah, that's the issue... Each OS seems to do its own thing, and then I'm given a different address per OS per machine.

              Interestingly, Ubuntu seems to provide the same DUID/IAID/etc for each interface and I get the same IP for Ethernet as I do for WiFi on my laptop... Which is pretty great and exactly what I want there. I'll have to have different IP's for my laptop in windows, but I'm in linux about 98% (or more) of the time.

              This leaves 3 machines where I'll have to do some manual configuration each time an OS is reinstalled... The rest of the stuff on my network is pretty static as far as changes go. I guess I can live with that.

              I wish there was an option to handle things by mapping IP's directly to MAC addresses like with DHCPv4 as I think this makes sense in some situations, but the above is workable and it is what it is.

              As it stands right now, IPv6 support for my network is beginning to shape up nicely.

              Thanks for the help!

              JKnott 1 Reply Last reply Reply Quote 0
              • johnpoz
                johnpoz LAYER 8 Global Moderator last edited by

                I believe the duid for windows would be here

                HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters\Dhcpv6DUID

                You should be able to change it there to match what you want it to be so it gets the same IP as when you boot your other OSes.

                H 1 Reply Last reply Reply Quote 0
                • JKnott
                  JKnott @hiryu last edited by

                  @hiryu said in Static IPv6 address allocation based on MAC:

                  Interestingly, Ubuntu seems to provide the same DUID/IAID/etc for each interface and I get the same IP for Ethernet as I do for WiFi on my laptop... Which is pretty great and exactly what I want there.

                  I use openSUSE, but get different addresses for WiFi and Ethernet. However, given that the addresses are MAC based, they'd have to be. However, when connected via Ethernet, the WiFi address is reachable, unlike with Windows.

                  1 Reply Last reply Reply Quote 0
                  • H
                    hiryu @johnpoz last edited by

                    @johnpoz Thanks! This may prove useful!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Products

                    • Platform Overview
                    • TNSR
                    • pfSense Plus
                    • Appliances

                    Services

                    • Training
                    • Professional Services

                    Support

                    • Subscription Plans
                    • Contact Support
                    • Product Lifecycle
                    • Documentation

                    News

                    • Media Coverage
                    • Press
                    • Events

                    Resources

                    • Blog
                    • FAQ
                    • Find a Partner
                    • Resource Library
                    • Security Information

                    Company

                    • About Us
                    • Careers
                    • Partners
                    • Contact Us
                    • Legal
                    Our Mission

                    We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                    Subscribe to our Newsletter

                    Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                    © 2021 Rubicon Communications, LLC | Privacy Policy