Static IP map not working



  • 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



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



  • 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


  • Rebel Alliance Developer Netgate

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



  • 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


Log in to reply