View previous topic :: View next topic |
Author |
Message |
marcelser Tux's lil' helper
Joined: 30 Sep 2004 Posts: 100
|
Posted: Sat Dec 28, 2024 12:08 pm Post subject: dhcpcd first acquiring correct IP, then renewing to sth else |
|
|
since the last world update and emerge my dhcpcd is driving me mad.
I have set the IP of my machine in the router (IP to mac binding) to 192.168.1.50, this used to work. Now when the machine boots it first acquires 192.168.1.50 (when all leases have been cleaned) but then somewhere in the middle of the boot process it requests a new dhdpcd and then it switches to 192.168.199 (or some dynamic dhcp address) I guess because 192.168.1.50 is already in use (by itself) and so the router cannot hand it again out so it returns a new one. As I'm running a bunch of servers on the machine (apache, mmonit, teamspieak, some api, etc.) It's crucial that the IP does not change once it got acquired from dhcpcd. I also don't get where and how it could re-request a dhcp it has never happened before.
I already tried deleting the lease in /var/lib/dhcpcd/ for the network card and also cleaning the lease in the router for this DUID & MAC without success. I then again first requests 192.168.1.50 which is correct and for a short time I can even connect to it with ssh but then after few seconds it kicks in a second dhcp request and corrupts the 192.168.1.50 with something dynamic handed out by the router.
Any ideas how I can stop this (apart from setting everything manually which would be a pain in the ass)
I'm totally clueless what is happening |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1811 Location: Germany
|
|
Back to top |
|
|
gentoo_ram Guru
Joined: 25 Oct 2007 Posts: 504 Location: San Diego, California USA
|
Posted: Sat Dec 28, 2024 4:53 pm Post subject: |
|
|
Maybe you have two different DHCP client programs running? Or maybe you are starting 'dhcpcd' as a daemon which configures all interfaces by default and then later your system is starting a network device startup script which runs a DHCP client again on the specific interface.
Are you using systemd or open-rc? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6180 Location: Dallas area
|
Posted: Sat Dec 28, 2024 5:51 pm Post subject: |
|
|
You're setting it on the router, are you telling dhcpd to use that same ip address?
Are both the router and dhcpd on your computer trying to be dhcp server? Pick one of the to be the server.
I don't use dhcpd on my machine, I hard set it to a specific address.
On the router I have a range of ips that I tell the router to leave out of dhcp serving.
In other words I have 2-50 for static ips and let the router handle 51-254. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
|