View previous topic :: View next topic |
Author |
Message |
accella n00b
Joined: 02 Aug 2024 Posts: 5
|
Posted: Fri Aug 02, 2024 3:48 pm Post subject: [SOLVED] Issues with dhcpcd on remote dedicated server |
|
|
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 |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1028 Location: Somewhere in Denmark
|
|
Back to top |
|
|
accella n00b
Joined: 02 Aug 2024 Posts: 5
|
Posted: Fri Aug 02, 2024 7:32 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22618
|
Posted: Fri Aug 02, 2024 9:40 pm Post subject: |
|
|
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 |
|
|
accella n00b
Joined: 02 Aug 2024 Posts: 5
|
Posted: Fri Aug 02, 2024 10:40 pm Post subject: |
|
|
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):
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 |
|
|
accella n00b
Joined: 02 Aug 2024 Posts: 5
|
Posted: Fri Aug 02, 2024 11:27 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22618
|
Posted: Sat Aug 03, 2024 12:40 am Post subject: |
|
|
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 |
|
|
accella n00b
Joined: 02 Aug 2024 Posts: 5
|
Posted: Sat Aug 03, 2024 1:00 pm Post subject: |
|
|
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 |
|
|
|