Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    prevent dhclient from requesting previous address


    I'm using dhclient 4.1.1-P1 on ubuntu 11.04 with .38 kernel. When I sniff what dhclient does on connecting to a network I see that it tells the dhcp what IP address it previously had to get the same one again. Is there a way of preventing dhclient form doing that?

    I thought dhclient would just check in its lease files in /var/lib/dhcp, but even if I delete those before starting dhclient it still knows what IP address I previously had and requests it from the dhcp server.

    Just to clarify I know that the dhcp server would give me the same ip anyway by checking my mac address or hostname. That's not the case here, dhclient tells the dhcp server what address it wants before the server said anything about it. (And I'm already changing the mac address on every boot and tell dhclient not to send the hostname).

    Does anyone know how dhclient knows what IP I previously had even though I delete all lease files?

    In case anyone wonders I'm just paranoid about privacy, because I use public wirelesses pretty often. I realize it's kind of pointless. But discussing that is not the point of this thread.

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    Apparently, it keeps the current lease in memory,
    so unless you reboot, it will remember. There is
    a command line argument to tell it to release
    the current lease, but this would require editing
    the script that calls dhclient.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts