Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Issues with dhcpcd on remote dedicated server
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
accella
n00b
n00b


Joined: 02 Aug 2024
Posts: 5

PostPosted: Fri Aug 02, 2024 3:48 pm    Post subject: [SOLVED] Issues with dhcpcd on remote dedicated server Reply with quote

Over the past few days, I've been working on installing gentoo on a remote dedicated server. I've gotten everything working except dhcpcd, which means I cannot ssh into the server to work on it without using a rescue image and chrooting in. I can however use IPMI to view and interact with the server via a virtual console, so it's not like I am completely locked out.

From what it looks like, the server appears to stuck on this IPv4LL address.

https://imgur.com/a/vb7W2qA

https://imgur.com/a/zOa93x9

I'm unsure how to address this kind of issue, any guidance would be greatly appreciated.


Last edited by accella on Sat Aug 03, 2024 1:00 pm; edited 3 times in total
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1028
Location: Somewhere in Denmark

PostPosted: Fri Aug 02, 2024 6:10 pm    Post subject: Reply with quote

There's a dhcp-server available? - you could try adding
Code:
noipv4ll
to /etc/dhcpcd.conf

https://forums.gentoo.org/viewtopic-t-1131615-start-0.html
Back to top
View user's profile Send private message
accella
n00b
n00b


Joined: 02 Aug 2024
Posts: 5

PostPosted: Fri Aug 02, 2024 7:32 pm    Post subject: Reply with quote

freke wrote:
There's a dhcp-server available? - you could try adding
Code:
noipv4ll
to /etc/dhcpcd.conf

https://forums.gentoo.org/viewtopic-t-1131615-start-0.html


Thank you for the response! I went ahead and tried adding noipv4ll to my dhcpcd.conf, but unfortunately it doesn't change much. Now I just have no ip address.

https://imgur.com/a/lD8LSxL
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Fri Aug 02, 2024 9:40 pm    Post subject: Reply with quote

Welcome to the forums.

Disabling IPv4LL instructs dhcpcd that, in the absence of a valid DHCP response, you would prefer having no address over having a link-local address. Thus, your result seems to confirm that there is no functional DHCP server on the network. Were you expecting DHCP service to work? Do you have enough information that you can configure a static address in /etc/conf.d/net, at least as a temporary so you can get in and perform more thorough diagnostics?

When you use the rescue image, does that get an address from DHCP or are you controlling it through some other means, such as (emulated) serial?
Back to top
View user's profile Send private message
accella
n00b
n00b


Joined: 02 Aug 2024
Posts: 5

PostPosted: Fri Aug 02, 2024 10:40 pm    Post subject: Reply with quote

Hu wrote:
Welcome to the forums.


Thanks for having me!

Hu wrote:
When you use the rescue image, does that get an address from DHCP or are you controlling it through some other means, such as (emulated) serial?


I do get an address from DHCP when using the rescue images, and I can ssh in using the IP my host is providing for me to set things up. This is actually how I installed Gentoo in the first place, as Gentoo's Minimal Installation CD has the same DHCP issues as my OS right now.

My approach for the past few hours of working on this has actually been to try emulate the networking of these rescue images. It appears they are using some kind of service called lswaspd-setup to setup the networking. Here is some of what I found using dmesg (with REDACTED IP's):

Code:
removed


My plan from here is to try backing up my gentoo root/kernels, then initiating an install of Ubuntu in my hosting provider's portal. I want to see if this lswaspd-setup service shows up on an actual OS.

Hu wrote:
Do you have enough information that you can configure a static address in /etc/conf.d/net, at least as a temporary so you can get in and perform more thorough diagnostics?


I should if I have the IP right? I actually had tried adding "static ip_address=MY_IP" to dhcpcd.conf a few hours ago, but it didn't give me any connectivity. I can try it in /etc/conf.d/net too if that makes a difference.


Last edited by accella on Fri Aug 02, 2024 11:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
accella
n00b
n00b


Joined: 02 Aug 2024
Posts: 5

PostPosted: Fri Aug 02, 2024 11:27 pm    Post subject: Reply with quote

Okay, I got it working now. I'm not using dhcpcd, but instead using netifrc to configure a static IP like Hu suggested. I did it exactly as instructed here: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/System#netifrc_.28OpenRC.29

This actually solves the problem for me. My server has a dedicated IP address that won't be changing, so this solution should work long term. It fact, this is probably what I was supposed to do from the beginning rather than messing around with DHCP.

I feel a bit silly, but really happy to have everything working. Thanks so much for the help guys!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Sat Aug 03, 2024 12:40 am    Post subject: Reply with quote

Well done. If you are satisfied with the solution, please edit the initial post to include [SOLVED] or similar in the thread title.

Before declaring victory, check that other aspects of your network function as you intend. In particular, check that DNS is configured properly, since that would normally be configured by DHCP, and is now your responsibility when using a static configuration. You can probably receive connections without working DNS (and so you might not have noticed a problem yet), but client applications (such as Portage) will need working DNS to be fully usable.
Back to top
View user's profile Send private message
accella
n00b
n00b


Joined: 02 Aug 2024
Posts: 5

PostPosted: Sat Aug 03, 2024 1:00 pm    Post subject: Reply with quote

Hu wrote:
In particular, check that DNS is configured properly, since that would normally be configured by DHCP, and is now your responsibility when using a static configuration.


Thank you for pointing this out, I hadn't realized this yet. I was actually able to update the @world set on the server anyway, but this was only because I was still using the resolv.conf I copied over from the rescue image before chrooting. For a more intentional solution, I decided to add the following to /etc/conf.d/net:
Code:
dns_servers_eno0="8.8.8.8"


And now I have DNS! Thanks again for the help. I will be marking this post as SOLVED now.
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