Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd first acquiring correct IP, then renewing to sth else
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
marcelser
Tux's lil' helper
Tux's lil' helper


Joined: 30 Sep 2004
Posts: 100

PostPosted: Sat Dec 28, 2024 12:08 pm    Post subject: dhcpcd first acquiring correct IP, then renewing to sth else Reply with quote

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
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1811
Location: Germany

PostPosted: Sat Dec 28, 2024 2:17 pm    Post subject: Reply with quote

Just a quick thoght an maybe wrong, but does the mac address change during boot?

https://forums.gentoo.org/viewtopic-p-6720812.html
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 504
Location: San Diego, California USA

PostPosted: Sat Dec 28, 2024 4:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6180
Location: Dallas area

PostPosted: Sat Dec 28, 2024 5:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum