3

I have a Linux system with the default DHCP server (ISC) and an Android phone Galaxy J7 which connects and gets its IP address from the DHCP server.

Right now, the Galaxy J7 was allocated an address automatically, but I'd like to force assign a different one. I've changed the settings in the DHCP server and I know those work since I had those used before and it was just fine. Now I changed the network IP address for my new WiFi router so the device was assigned a new IP automatically before I changed the setup to force the static IP.

How do I force the phone to pick the new IP address? I tried for forget the WiFi setup and re-enter it, but the exact same IP was re-assigned. So I think that the server memorize that IP. I looked in the leases:

less /var/lib/dhcp/dhcpd.leases

and I can't find the IP of my phone!?

I tried to restart the server too, but that usually doesn't help at all and guess what... It didn't do anything about the existing lease (and yet it's not in the list of leases!)

So I'm at a loss.

For Linux, I've seen that you can use dhcpclient -r and then dhcpclient to reassign a new IP. But for the Android, Termux says those commands do not exist. I probably need to properly reset on both side...

Someone has done that successfully before?

2
  • 1
    You should focus on server side. Android's DHCP client is in Java stack which isn't configurable or manually controllable. It's the server which remembers MAC vs. IP mapping and usually reassigns the same IP. DHCP client may also remember the IP address and may forward that in a new DHCP request but ultimately it's the server who decides which IP to assign. Commented Mar 30, 2021 at 8:55
  • @IrfanLatif Oh! I finally got it. The DHCP was not running correctly and thus did not properly distribute IP addresses. Once I fixed the server, the IPs were properly assigned again. Since I did not have any issues with my server in a long time, I did not think of checking that part. Thank you. Commented Mar 30, 2021 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .