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

    How to automatically re-run DHCP when a USB-ethernet interface is plugged in

    Scheduled Pinned Locked Moved Routing and Multi WAN
    4 Posts 2 Posters 626 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.
    • U Offline
      Ulysses_
      last edited by

      Hi.

      The WAN-side interface is a USB-ethernet stick. It gets an IP by DHCP when booting up. But if it is unplugged while running and then plugged back in, the pfsense DHCP client does not automatically give it an IP. Unlike linux distros where plugging such an interface would automatically kick the DHCP client to obtain an IP etc.

      How would you facilitate this linux functionality to automatically make the DHCP client get an IP as soon as such an interface is plugged in?

      1 Reply Last reply Reply Quote 0
      • H Offline
        heper
        last edited by

        problem #1
        @Ulysses_:

        The WAN-side interface is a USB-ethernet stick.

        do yourself a favour and get a good nic

        @Ulysses_:

        It gets an IP by DHCP when booting up. But if it is unplugged while running and then plugged back in, the pfsense DHCP client does not automatically give it an IP. Unlike linux distros where plugging such an interface would automatically kick the DHCP client to obtain an IP etc.

        How would you facilitate this linux functionality to automatically make the DHCP client get an IP as soon as such an interface is plugged in?

        no clue. i'm pretty sure pfSense isn't tested for this scenario, because nobody wants/needs to unplug interfaces on a running router…..

        1 Reply Last reply Reply Quote 0
        • U Offline
          Ulysses_
          last edited by

          Thanks but actually the use of such a nic is intentional (pfsense runs in a VM and only pfsense sees this WAN-side nic, the host's regular nic has no cable attached and the host has no drivers for the usb-ethernet nic installed at all, the purpose of this being that only VM's can ever see the internet and get infected or owned).

          Is there any support for running scripts periodically or when an nic module is added?

          1 Reply Last reply Reply Quote 0
          • U Offline
            Ulysses_
            last edited by

            Just noticed the same problem occurs with any nic when the router it is connected to is rebooted: pfsense's DHCP client does not get periodically called to obtain an IP.

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