DHCP Stopped working



  • Hello,
    i'm fairly new to pfSense.
    Created a pfSense 2.0 box to replace the existing debian-based firewall/gateway i had.

    The box has two WANs and two LANs.

    Set up everything: the interfaces, dhcp, openvpn, port forwarding, captive portal, static leases.
    Everything working like a charm-

    Today i noticed that a cpl clients on one of the LAN interfaces kept disconnecting. Would receive the lease once the cable would just plug in, then lose it in a few moments.
    Rebooted the box and now dhcp won't send out leases at all.
    Then i noticed this is also happening on the other lan interface as well.
    Meanwhile if configured with static ip's, the clients work like a charm-

    Any ideas.
    Best regards and thanks in advace.



  • can you show screenshot of your dhcp-server page?



  • Hello Metu69salemi.

    Thanks for your reply.
    I did some more investigating this morning.

    I removed all the static leases and left it as simple dhcp. Works again.
    I'm curious if there's some sort of caveat to know here.

    The network is built this way.
    I have machines with static leases spread from 10.0.0.2 to 10.0.0.169.
    I have left a dynamic pool fro 10.0.0.170 to 180.
    Then continue with static leases from 10.0.0.181 to 253.

    I modified the config.xml file today and removed all the static leases.
    DHCP works. On all interfaces. Place them again, goes again.

    Here's a screenshot of the config-
    As i said as long as i don't place the static leases, works fine.

    Another thing. The laptop i'm working on right now, has an ip i assigned manually 10.0.0.108.
    On the Status: DHCP leases view, that host shows as offline.

    ![Screen shot 2011-11-21 at 10.56.22.png](/public/imported_attachments/1/Screen shot 2011-11-21 at 10.56.22.png)
    ![Screen shot 2011-11-21 at 10.56.22.png_thumb](/public/imported_attachments/1/Screen shot 2011-11-21 at 10.56.22.png_thumb)



  • You should not have problems if were believing the image ;)

    But how did you add those static ip-leases?



  • :) yes you can believe the image.

    a bunch i added from the interface.

    then since i realized i have a hundred and some entries, i wrote a little script to parse the config file of my actual dhcp server and deliver me entries like this:

     <staticmap><mac>7C:C5:xx:xx:xx:xx</mac>
    				<ipaddr>10.0.0.xxx</ipaddr>
    				<hostname>sids-iphone</hostname></staticmap> 
    			<staticmap></staticmap>
    

    which then i proceeded to add to config.xml

    they all show up correctly.

    now i reverted to a clean config, (without the static leases) and adding them gradually still from config.xml-
    seems to still be ok but i'm only at the beginning.

    do you thing i should continue just from the gui?



  • Nope, was fine for a while. Then started doing it again.

    Maybe, i simply need to add them all from the interface.

    :(



  • There should be no difference that if you add them via gui or by editing config.xml(if you add them sameway as gui add'em)
    But i had this kind of entry when i tried

    
    	 <staticmap><mac>75:75:75:76:76:76</mac>
    				<ipaddr>192.168.3.240</ipaddr>
    				<hostname>test</hostname></staticmap> 
    
    

    So you might need to add description also.

    Or there is problem, because you're not having continous block of static ip's or something



  • i just finished adding everything by hand through the gui.
    Loads of entries.
    So far so good. Still hasn't dropped anything.

    Now i have some  news.
    This was the 2nd time i added entries manually.
    It blocked once. Deleted a bunch and restarted again, all from the gui.
    And it was fine since-

    Your remark about the comment section underlined something crucial-
    Meanwhile it's not important to have a comment value, i should really have an opening tag now shouldn't it?

    Would explain why it would get all weird about it.
    Which then would imply the php-xml parser should be re-checked ;)

    So, if if holds , and the mistake was mine (very gladly so), seems like i might have resolved my problem.



  • I'm sorry i can't explain that because i'm just normal user.. Not a dev or package maker



  • It's all good :). Once i find some time i might take a look at the php code of the gui parser myself.

    The box it's stable and in production now :)


Log in to reply