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

    Cannot obtain DHCP from WAN automatically, must be done manually.

    Scheduled Pinned Locked Moved DHCP and DNS
    10 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.
    • G Offline
      gerdawg
      last edited by

      I have a weird issue that I'm trying to pinpoint.

      Basically I'm using a ASUS 1005HAB netbook with a 10/100 network card in it. This is connected to a netgear GS108Ev2 switch that supports VLANing.

      I have the switch setup so that port 8 (WAN/modem) is untagged for vlan 20 and port 7 (pfsense) is tagged for VLAN20 (WAN) and VLAN1 (LAN). All other hardware on VLAN1 are set for untagged in the ports. In the past I've had the same type of setup using VMware ESXi trunking and all worked accordingly.

      The problem I'm having is that when pFSense boots it's not grabbing a DHCP address from the WAN gateway. On boot up there is no internet and in the console DHCP isn't assigned.

      -I've tried  oth spoofing the IP and setting a hostname and this doesn't seem to help.

      If I go into STATUS –> Interfaces and click on renew DHCP for alc0_vlan20 (WAN) I get an IP address. I'm just not able to obtain a DHCP address at bootup from my ISP using this configuration.

      Any idea's on how I can resolve this?

      1 Reply Last reply Reply Quote 0
      • W Offline
        wallabybob
        last edited by

        The system log should show some reports from the dhclient program during startup. These reports might give some hints as to what is happening.

        pfSense shell command

        clog /var/log/system.log | grep dhclient

        will show ALL the dhclient entries in the system log.

        1 Reply Last reply Reply Quote 0
        • G Offline
          gerdawg
          last edited by

          I'm sure you'll love this one but if I execute that command BEFORE I manually request DHCP from WAN the logs are completely blank.

          Afterwards - Here is what I get.

          $ clog /var/log/system.log | grep dhclient
          Sep  7 19:28:44 pfsense dhclient: PREINIT
          Sep  7 19:28:44 pfsense dhclient[12912]: DHCPREQUEST on alc0_vlan20 to 255.255.255.255 port 67
          Sep  7 19:28:44 pfsense dhclient[12912]: DHCPACK from 10.170.16.1
          Sep  7 19:28:44 pfsense dhclient: REBOOT
          Sep  7 19:28:44 pfsense dhclient: Starting add_new_address()
          Sep  7 19:28:44 pfsense dhclient: ifconfig alc0_vlan20 inet x.x.x.x netmask 255.255.192.0 broadcast 255.255.255.255
          Sep  7 19:28:44 pfsense dhclient: New IP Address (alc0_vlan20): x.x.x.x
          Sep  7 19:28:44 pfsense dhclient: New Subnet Mask (alc0_vlan20): 255.255.192.0
          Sep  7 19:28:44 pfsense dhclient: New Broadcast Address (alc0_vlan20): 255.255.255.255
          Sep  7 19:28:44 pfsense dhclient: New Routers (alc0_vlan20): x.x.x.x
          Sep  7 19:28:44 pfsense dhclient: Adding new routes to interface: alc0_vlan20
          Sep  7 19:28:44 pfsense dhclient: /sbin/route add default x.x.x.x
          Sep  7 19:28:44 pfsense dhclient: Creating resolv.conf
          Sep  7 19:28:44 pfsense dhclient[12912]: bound to x.x.x.x – renewal in 226571 seconds.

          1 Reply Last reply Reply Quote 0
          • G Offline
            gerdawg
            last edited by

            A little more to this:

            When scanning VLAN20 (WAN) using a port mirror and wireshark it looks like the ASUS nic is broadcasting DHCPv6 packets which has me really confused.

            I checked - IPv6 is off on this install as it should be for a default installation. I haven't configured it…......

            I'm not sure if this is the problem or not still as when I do a renew manually it grabs a DHCP address without a problem. I have yet to see what happens when the lease runs out but I suspect it might not renew automatically from my ISP either.

            I do have another pFsense box that's a celeron 2ghz with 1gb of DDR1 but I'm reluctant to use that over the atom n270 processor with 2gb of ram. I just wish I could figure out what the problem is with DHCP not getting selected on boot up. I might just put in the other box for now and do a reinstall but common sense tells me that it won't fix anything since it's basically a clean install already.

            1 Reply Last reply Reply Quote 0
            • W Offline
              wallabybob
              last edited by

              @gerdawg:

              I'm sure you'll love this one but if I execute that command BEFORE I manually request DHCP from WAN the logs are completely blank.

              I wonder if dhclient hasn't properly started. Next time this happens could you issue pfSense shell command```

              ps ax | grep dhclient

              
              If I recall correctly, some people have reported dhclient sometimes dies quietly on their systems.
              1 Reply Last reply Reply Quote 0
              • G Offline
                gerdawg
                last edited by

                grep only shows the query on dhclient while configured for VLAN on WAN.

                **spoke too soon.

                It appears that even without VLAN tagging, I'm unable to obtain DHCP from a WAN interface using this netbook.

                This is straight through, no VLAN tagging and the DHCP server isn't from my ISP anymore, it's grabbing DHCP from another internal pFSense server so I know it's not an ISP problem.

                When I reset the interfaces (option 1) the box grabbed an IP right away when bringing them up. I then rebooted the machine to test DHCP on boot and dhcp was not obtained from the WAN interface.

                So I'm guessing WAN DHCP just isn't starting on this box at all.

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gerdawg
                  last edited by

                  More data…fresh rebuild of the OS - full format, etc.

                  On first setup, I assign WAN interface/Lan Interface (Wifi for just testing right now only one physical NIC) and then pFsense goes through it's configuration and the welcome screen shows that WAN (alc0) receives a DHCP address from the internal DHCP server.

                  I simply reboot the machine and then no more WAN DHCP. I did watch the services this time around and on boot up it does state "Starting DHCP Service" done.

                  So I'm at a loss.......no dhcp.

                  If I go into shell and type dhclient alc0 then dhcpclient starts and I get an IP address.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    gerdawg
                    last edited by

                    Seems to have nothing to do with dhclient specificially.

                    I'm noticing when BSD boots the alc0 link light goes off on the switch/nic. It doesn't appear to go back on until well after all of the services are started. Any idea's on how to speed up the alc0 linking so that on boot it can acquire dhcp from the WAN?

                    1 Reply Last reply Reply Quote 0
                    • W Offline
                      wallabybob
                      last edited by

                      @gerdawg:

                      I did watch the services this time around and on boot up it does state "Starting DHCP Service" done.

                      I suspect this is reporting DHCP SERVER, not dhclient.

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Cjaiceman
                        last edited by

                        Was there ever a solution found to this, because I'm having the same issue?

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