View previous topic :: View next topic |
Author |
Message |
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Thu Sep 21, 2023 7:10 am Post subject: DHCP fails to assign IP [SOLVED] |
|
|
At some point last almost 2 years ago, this and a few other problems happened.
One other problem is still ongoing here
So about a couple months ago I did a fresh install.
Result was the same with the same problems. For network to work I have to use IPSET.
Documentation followed:
https://wiki.gentoo.org/wiki/Handbook:AMD64
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking#Using_DHCP
https://wikitest.gentoo.org/wiki/Network_management_using_DHCPCD
https://forums.gentoo.org/viewtopic-t-771986.html (almost worked until reboot)
Code: | Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
Kernel driver in use: r8169 |
The device is up
Code: | # cat /etc/conf.d/net
config_eth0="dhcp"
modules_wlan0="wpa_supplicant"
config_wlan0="dhcp
#macchanger -r wlan0"
|
I also tried with an empty net config file. It worked once but after reboot, did not work again.
Code: | # dhcpcd eth0
sending commands to dhcpcd process |
Does not get the device an ip.
At some point depending on what I try, I get:
Code: | no valid interfaces found |
Usually when restarting the network.
I looked into this topic:
https://forums.gentoo.org/viewtopic-t-1148627-highlight-dhcp+valid+interfaces.html
Deleted dhcpcd from default runlevel and restarted net.eth0. Output indicated to have received an address. ifconfig sees no address
Í removed dhcpcd and rebooted.
Nothing provides dhcp was the message after boot.
Similar problem here and no solution
https://forums.gentoo.org/viewtopic-t-1013970-highlight-dhcp+valid+interfaces.html
On my desktop. Everything works.
I cannot see the difference on the configs
Not sure what else to look for and it has been exhausting to the point of overthinking. _________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Last edited by HeXiLeD on Fri Dec 15, 2023 5:05 am; edited 2 times in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3948
|
Posted: Thu Sep 21, 2023 11:15 am Post subject: |
|
|
Is net.wlan0 also enabled?
If yes plz disable it together with dhcpcd.
And enable only net.eth0.
Do you have a dhcp server installed except the one provided by your router? _________________
|
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3487
|
Posted: Thu Sep 21, 2023 11:27 am Post subject: |
|
|
That's quite a bit to get through.
So:
* you're configuring the interface with netifrc
* your network uses dhcp
* you have multiple network interface; eth0 doesn't work and you want to fix it. Does wifi work?
* are you able to configure it by typing commands manually instead of starting system services?
Quote: | # cat /etc/conf.d/net
config_eth0="dhcp"
modules_wlan0="wpa_supplicant"
config_wlan0="dhcp
#macchanger -r wlan0" |
Is this even a valid config?
If you want to comment macchanger out, terminate the quotation first. The way it is now doesn't look right, though I don't know what is netifrc going to do with this input. It may or may not work, possibly crashing and burning, depending on implementation details.
Quote: | Deleted dhcpcd from default runlevel and restarted net.eth0 | Good. They were in a conflict. Use either one or the other.
Do you have any consistent errors? "Depending on what I try" is certainly true, but doesn't help a lot. We need to be on the same page, gotta start from a known state.
Also, you might try this:
Reboot your system to clear all changes you made in the runtime, and see which services providing net are active. There were some not so funny issues with service dependencies a caused by an ebuild update few months ago.
Quote: | On my desktop. Everything works. | Does your desktop has exactly the same network interfaces? The same number of interfaces, named in the same way?
Some bugs only bite if certain conditions are met. |
|
Back to top |
|
|
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Mon Sep 25, 2023 10:24 am Post subject: |
|
|
This conf was an error of mine after long hours and lost sleep over this issue. Once corrected , eth0 is now working.
Quote: | # cat /etc/conf.d/net
config_eth0="dhcp"
modules_wlan0="wpa_supplicant"
config_wlan0="dhcp
#macchanger -r wlan0" |
Is this even a valid config?
If you want to comment macchanger out, terminate the quotation first. The way it is now doesn't look right, though I don't know what is netifrc going to do with this input. It may or may not work, possibly crashing and burning, depending on implementation details.
[/quote]
Wifi is not working at this moment.
The interface detects and finds the wireless network but does not obtain an ip or connects.
# cat /etc/wpa_supplicant/wpa_supplicant.conf
Code: | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
network={
ssid="SSI"
psk="mypass"
proto=RSN
key_mgmt=WPA-PSK
auth_alg=OPEN
mesh_fwding=1
} |
User is on the wheel group
# rc-update show | grep net*
Code: | local | default nonetwork
net.eth0 | default
net.lo | default
netmount | default |
Desktop uses dhcp and not net. scripts
I would ditch the net.scripts if dhcpcd worked. _________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54791 Location: 56N 3W
|
Posted: Mon Sep 25, 2023 10:28 am Post subject: |
|
|
HeXiLeD,
Stop the interface you want to use dhcpcd on.
Make sure dhcpcd is not already running.
What does Code: | dhcpcd -v <interface> | tell?
The whole command and output please. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Mon Sep 25, 2023 12:10 pm Post subject: |
|
|
On boot eth0 does not come up because it was removed from run levels.
Code: | ifconfig eth0 up
dhcpcd -v eth0
invalid vendor format: eth0 |
/etc/dhcpcd.conf is also not writable
Right now I will either use dhcpdc for one interface that semi-works or net-misc/netifrc for the other interface. _________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244 |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1998
|
Posted: Mon Sep 25, 2023 1:06 pm Post subject: |
|
|
I think Neddy meant the -d option (--debug) instead of -v (which is often verbose, but here it is --vendor).
In any case, are there firmware error messages in dmesg for this ethernet device? Some do need it including several recent RealTek. |
|
Back to top |
|
|
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Mon Sep 25, 2023 1:48 pm Post subject: |
|
|
Code: | dhcpcd -d eth0
sending commands to dhcpcd process
send OK
|
No error messages.
The eth0 also does not come up on boot.
In any case it needs:
_________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244 |
|
Back to top |
|
|
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Fri Dec 15, 2023 5:05 am Post subject: |
|
|
Code: |
emerge -C net-misc/dhcpcd net-misc/dhcpcd-ui
emerge net-misc/dhcp
|
cat /etc/conf.d/net
Code: |
# https://wiki.gentoo.org/wiki/Handbook:X86/Installation/System#Network
# https://wiki.gentoo.org/wiki/Netifrc
config_eth0="dhcp"
# https://wiki.gentoo.org/wiki/Netifrc#DHCP_with_WPA_Supplicant
modules_wlan0="wpa_supplicant"
wpa_supplicant_wlan0="-Dnl80211 -d -f /var/log/wpa_supplicant.log"
config_wlan0="dhcp"
|
Went back to openrc scripts, ie: net.eth0
Wired and wireless network is now working after months and months of no solution.
cd /etc/init.d/
Code: |
ln -s net.lo net.eth0
ln -s net.lo net.wlan0
rc-update add net.eth0 default
rc-update add net.wlan0 default
rc-update del wpa_supplicant default |
rc-update show default | grep net
Code: | net.eth0 | default
net.lo | default
net.wlan0 | default
netmount | default |
This problem is [SOLVED] _________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244 |
|
Back to top |
|
|
|