DHCP Not Passing Routes by Default



  • I'm having an odd issue having just migrated hardware. I have two linux hosts on my network that haven't changed configuration at all. However, neither one of them is getting a default route from the DHCP server on my pfSense box. I know that I can manually specify option 33, but .. I feel like that's not the answer here. Both the gateway and domain name fields are blank (defaulted) for both networks on my dhcp configuration page.

    I'm wondering why these boxes aren't getting the default route. My windows computer does seem to have one, though presumably it's falling back to its own assumptions since the linux boxes don't get a route.

    Sample routing table below. And yes, I know that I can add the route in manually (which I have), but that's not the real answer :P

    No default route

    
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    10.0.0.0        0.0.0.0         255.255.0.0     U     0      0        0 eth0
    172.16.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
    
    

  • Rebel Alliance Global Moderator

    well why don't you look in the sniff and see if dhcp handed it out or not

    Its not option 33, it would be option 3 that gets handed out.  33 is static routes you can setup, but the default router would just be option 3 and that is clearly being handed out by pfsense from my setup.  So I would take a simple sniff and validate what is being offered or not, etc.  Maybe you are getting ip from other dhcp server?

    So you can see the settings I have in the reservation for this mac - I don't set router in it, but it still gets handed out by pfsense the 192.168.1.253 is its lan IP.

    I am running
    2.1.5-RELEASE (i386)
    built on Mon Aug 25 07:44:26 EDT 2014
    FreeBSD 8.3-RELEASE-p16






  • I always forget to just sniff the traffic.. \sigh

    Everything was in order - Option 3 as well as the others were what I expected them to do.

    The issue, as it turns out, has to do with having multiple NICs in Linux. In short, you can't always just unplug the cables and expect things to be happy. You have to ifdown and ifup the interfaces for the DHCP info to be set properly (or reboot) when you have multiple NICs. Embarrassingly, this isn't the first time I've run into this either.