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

    Static IP map not working

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    5 Posts 3 Posters 5.1k 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.
    • ?
      Guest
      last edited by

      All,

      I am unable to set static IP addresses in the AMD64 version.  I have tried both the 29mar release and the 20mar release.  I am getting this error:

      The following input errors were detected:

      * The IP address must lie in the LAN subnet.

      I am using 192.168.3.0 for my subnet and trying to set a computer to 192.168.3.15.  I assume this has something to do with this post.  http://forum.pfsense.org/index.php/topic,23864.0.html.  This thread helped me fix the initial DHCP problem.

      Thanks for the help,
      -V

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        That (and likely many other issues on 64 bit) are caused by this:
        http://redmine.pfsense.org/issues/show/459

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          Ok, I think I fixed it.  You need to make the same change that was made in the services_dhcp.php file to the services_dhcp_edit.php file.  The new code should look like this:

          /* make sure it's not within the dynamic subnet */
          if ($_POST['ipaddr']) {
          $dynsubnet_start = ip2long($config['dhcpd'][$if]['range']['from']);
          $dynsubnet_end = ip2long($config['dhcpd'][$if]['range']['to']);
          $lansubnet_start = ip2long(long2ip(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)))+1;
          $lansubnet_end = ip2long(long2ip(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))))-1;

          Good luck,
          -V

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            @33_viper_33:

            Ok, I think I fixed it.  You need to make the same change that was made in the services_dhcp.php file to the services_dhcp_edit.php file.  The new code should look like this:

            As mentioned in the other thread, this is not a correct fix. I wouldn't keep making those kind of changes. Nobody ever responded to my inquiry in the other thread about whether or not this was fixed by using ip2ulong() instead of ip2long().

            Hopefully in the next week or so I can run a 64bit VM and work on this.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              in the next couple days, I'll give it a try.  I appreciate this not being the correct fix however, I'm in a production environment and can't afford downtime during peak hours.  So i needed a quick fix for the day and this was it.  I had stability issues running the 32 bit edition, so this was a solution and seems to be working so far.  I'm now just trying to get multi-wan working and i will be in business.

              Thanks,
              -V

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