You are not logged in.

#1 2024-04-29 23:59:11

rockzombie2
Member
Registered: 2018-10-19
Posts: 11

Ethernet doesn't connect automatically on startup

I recently reinstalled Arch on my system and for some reason the network doesn't connect automatically. I've been running the following script based on some help I found on another forum post in order for my ethernet to connect to the internet.

modprobe e1000e
ip link set dev enp0s31f6 up
ip address add 192.158.0.16/24 dev enp0s31f6
ip route add 192.168.0.0/24 dev enp0s31f6
ip route add default via 192.168.0.1

I'll be honest and admit I'm not really sure what it's doing, but it works. The thing is, I'm pretty sure I have dhcpcd.service enabled, yet it doesn't seem to work.

This is the output of ip link:

chris@nzxt ~> ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 4c:cc:6a:fc:00:4e brd ff:ff:ff:ff:ff:ff
3: wlp7s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:28:f8:68:e7:78 brd ff:ff:ff:ff:ff:ff

Could I get some help troubleshooting this please?

Offline

#2 2024-04-30 00:55:46

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 244

Re: Ethernet doesn't connect automatically on startup

Is there really 'ip address add 192.158...'?

Which network manager do you use?

Offline

#3 2024-04-30 07:26:28

seth
Member
Registered: 2012-09-03
Posts: 52,615

Re: Ethernet doesn't connect automatically on startup

I'm pretty sure I have dhcpcd.service enabled

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

and

systemctl status dhcpcd
sudo nmap --script broadcast-dhcp-discover

Offline

#4 2024-04-30 20:35:53

rockzombie2
Member
Registered: 2018-10-19
Posts: 11

Re: Ethernet doesn't connect automatically on startup

dimich wrote:

Is there really 'ip address add 192.158...'?

Which network manager do you use?

I think dhcpcd? Although I'm not positive how to verify that.

That's a good catch, by the way, but yes that's what is in my script. I updated it to 168 just now so I'll see if that works next time I reboot.

seth wrote:

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
chris@nzxt ~> find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dhcpcd@enp0s3lf6.service                 | multi-user.target.wants
dhcpcd.service                           | multi-user.target.wants
getty@tty1.service                       | getty.target.wants
netctl@my\x2dnetwork.service             | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-pulse.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
remote-fs.target                         | multi-user.target.wants            
systemd-userdbd.socket                   | sockets.target.wants               
wireplumber.service                      | pipewire.service.wants             
xdg-user-dirs-update.service             | default.target.wants               
zed.service                              | system                             
zfs-import-cache.service                 | zfs-import.target.wants            
zfs-import.target                        | zfs.target.wants                   
zfs-mount.service                        | zfs.target.wants                   
zfs.target                               | multi-user.target.wants            
zfs-zed.service                          | zfs.target.wants      
seth wrote:

and

systemctl status dhcpcd
sudo nmap --script broadcast-dhcp-discover
chris@nzxt ~> systemctl status dhcpcd
              doas nmap --script broadcast-dhcp-discover
● dhcpcd.service - DHCP/ IPv4LL/ IPv6RA/ DHCPv6 client on all interfaces
     Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-04-29 22:21:57 EDT; 18h ago
   Main PID: 933 (dhcpcd)
      Tasks: 5 (limit: 19024)
     Memory: 3.7M (peak: 6.1M)
        CPU: 1.095s
     CGroup: /system.slice/dhcpcd.service
             ├─ 933 "dhcpcd: [manager] [ip4] [ip6]"
             ├─ 944 "dhcpcd: [privileged proxy]"
             ├─ 946 "dhcpcd: [network proxy]"
             ├─ 947 "dhcpcd: [control proxy]"
             └─1341 "dhcpcd: [BPF ARP] enp0s31f6 192.168.0.238"
doas (chris@nzxt) password: 
Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-30 16:30 EDT
Pre-scan script results:
| broadcast-dhcp-discover: 
|   Response 1 of 1: 
|     Interface: enp0s31f6
|     IP Offered: 192.168.0.175
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 192.168.0.1
|     IP Address Lease Time: 2h00m00s
|     Renewal Time Value: 1h00m00s
|     Rebinding Time Value: 1h45m00s
|     Subnet Mask: 255.255.255.0
|     Broadcast Address: 192.168.0.255
|     Domain Name Server: 192.168.0.1, 192.168.0.1
|_    Router: 192.168.0.1
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.16 seconds

Offline

#5 2024-04-30 20:40:34

seth
Member
Registered: 2012-09-03
Posts: 52,615

Re: Ethernet doesn't connect automatically on startup

dhcpcd@enp0s3lf6.service                 | multi-user.target.wants
dhcpcd.service                           | multi-user.target.wants
netctl@my\x2dnetwork.service             | multi-user.target.wants

You've colliding dhcpcd services (global and enp0s3lf6 specific) and a netctl profile enabled.
Only keep dhcpcd.service, disable the other two.

There's a dhcp server on 192.168.0.1 so there's no reason why it would not work, except

modprobe e1000e

Why do you (have to) do this manually?

lsmod

after the boot?

Offline

#6 2024-04-30 21:27:16

rockzombie2
Member
Registered: 2018-10-19
Posts: 11

Re: Ethernet doesn't connect automatically on startup

I disabled all but the dhcpcd.service. Upon restarting, my ping to 1.1.1.1 said network unreachable. I ran my script again to connect to the internet once again.

Output of lsmod:

Module                  Size  Used by
uvcvideo              176128  0
videobuf2_vmalloc      20480  1 uvcvideo
uvc                    12288  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         40960  1 uvcvideo
videodev              393216  2 videobuf2_v4l2,uvcvideo
videobuf2_common       94208  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
8021q                  53248  0
garp                   16384  1 8021q
mrp                    20480  1 8021q
stp                    12288  1 garp
llc                    16384  2 stp,garp
vboxnetflt             40960  0
vboxnetadp             32768  0
snd_hda_codec_realtek   204800  1
snd_hda_codec_generic   114688  1 snd_hda_codec_realtek
vboxdrv               692224  2 vboxnetadp,vboxnetflt
intel_rapl_msr         20480  0
intel_rapl_common      45056  1 intel_rapl_msr
nvidia_drm            122880  0
intel_uncore_frequency    12288  0
nvidia_uvm           6631424  0
intel_uncore_frequency_common    16384  1 intel_uncore_frequency
nvidia_modeset       1605632  1 nvidia_drm
snd_soc_avs           221184  0
snd_soc_hda_codec      28672  1 snd_soc_avs
snd_hda_ext_core       36864  2 snd_soc_avs,snd_soc_hda_codec
snd_soc_core          466944  2 snd_soc_avs,snd_soc_hda_codec
snd_usb_audio         503808  0
snd_compress           28672  2 snd_soc_avs,snd_soc_core
intel_tcc_cooling      12288  0
ac97_bus               12288  1 snd_soc_core
snd_usbmidi_lib        49152  1 snd_usb_audio
snd_hda_codec_hdmi     94208  2
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_ump                36864  1 snd_usb_audio
x86_pkg_temp_thermal    16384  0
btusb                  86016  0
intel_powerclamp       20480  0
snd_rawmidi            53248  2 snd_usbmidi_lib,snd_ump
iwlmvm                712704  0
coretemp               16384  0
snd_hda_intel          65536  0
btrtl                  32768  1 btusb
snd_seq_device         16384  2 snd_ump,snd_rawmidi
iTCO_wdt               16384  0
nvidia              60370944  2 nvidia_uvm,nvidia_modeset
kvm_intel             425984  0
btintel                57344  1 btusb
intel_pmc_bxt          16384  1 iTCO_wdt
snd_intel_dspcfg       40960  2 snd_soc_avs,snd_hda_intel
btbcm                  24576  1 btusb
mc                     90112  5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
hid_cmedia             12288  0
mac80211             1576960  1 iwlmvm
i915                 4227072  1
ppdev                  24576  0
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
btmtk                  12288  1 btusb
ee1004                 16384  0
iTCO_vendor_support    12288  1 iTCO_wdt
libarc4                12288  1 mac80211
kvm                  1380352  1 kvm_intel
vfat                   20480  1
mxm_wmi                12288  0
fat                   106496  1 vfat
snd_hda_codec         225280  6 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_codec_realtek
drm_buddy              20480  1 i915
bluetooth            1097728  6 btrtl,btmtk,btintel,btbcm,btusb
iwlwifi               573440  1 iwlmvm
irqbypass              12288  1 kvm
i2c_algo_bit           20480  1 i915
snd_hda_core          151552  8 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek
ttm                   110592  1 i915
ecdh_generic           16384  1 bluetooth
rapl                   20480  0
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
mousedev               24576  0
e1000e                376832  0
snd_pcm               212992  9 snd_soc_avs,snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_compress,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
crc16                  12288  1 bluetooth
intel_cstate           20480  0
drm_display_helper    237568  1 i915
cfg80211             1351680  3 iwlmvm,iwlwifi,mac80211
mei_me                 57344  0
snd_timer              53248  1 snd_pcm
cec                    86016  2 drm_display_helper,i915
i2c_i801               40960  0
snd                   159744  15 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_ump,snd_pcm,snd_rawmidi
ptp                    45056  2 iwlmvm,e1000e
intel_gtt              28672  1 i915
intel_uncore          258048  0
psmouse               233472  0
pcspkr                 12288  0
rfkill                 40960  4 iwlmvm,bluetooth,cfg80211
soundcore              16384  1 snd
i2c_smbus              20480  1 i2c_i801
mei                   200704  1 mei_me
pps_core               32768  1 ptp
video                  77824  2 i915,nvidia_modeset
parport_pc             77824  0
parport                81920  2 parport_pc,ppdev
intel_pmc_core        118784  0
intel_vsec             20480  1 intel_pmc_core
wmi                    36864  2 video,mxm_wmi
pmt_telemetry          16384  1 intel_pmc_core
pmt_class              16384  1 pmt_telemetry
acpi_pad               24576  0
joydev                 24576  0
mac_hid                12288  0
fuse                  212992  1
loop                   36864  0
nfnetlink              20480  1
ip_tables              36864  0
x_tables               69632  1 ip_tables
dm_crypt               65536  0
cbc                    12288  0
encrypted_keys         28672  1 dm_crypt
trusted                53248  2 encrypted_keys,dm_crypt
asn1_encoder           12288  1 trusted
tee                    45056  1 trusted
dm_mod                225280  1 dm_crypt
hid_generic            12288  0
usbhid                 77824  0
crct10dif_pclmul       12288  1
crc32_pclmul           12288  0
crc32c_intel           16384  0
polyval_clmulni        12288  0
polyval_generic        12288  1 polyval_clmulni
uas                    32768  0
gf128mul               16384  1 polyval_generic
usb_storage            90112  1 uas
ghash_clmulni_intel    16384  0
serio_raw              16384  0
sha512_ssse3           53248  0
atkbd                  40960  0
sha256_ssse3           32768  1
sha1_ssse3             32768  2
libps2                 20480  2 atkbd,psmouse
zfs                  6512640  11
aesni_intel           360448  0
vivaldi_fmap           12288  1 atkbd
spl                   155648  1 zfs
nvme                   65536  2
crypto_simd            16384  1 aesni_intel
cryptd                 28672  2 crypto_simd,ghash_clmulni_intel
nvme_core             249856  3 nvme
xhci_pci               24576  0
nvme_auth              28672  1 nvme_core
xhci_pci_renesas       24576  1 xhci_pci
i8042                  53248  0
serio                  28672  6 serio_raw,atkbd,psmouse,i8042

EDIT: As for running modprobe manually, I'm not sure if I have to do that, I think it was part of a solution I found when I came up with this script.

Last edited by rockzombie2 (2024-04-30 21:29:14)

Offline

#7 2024-04-30 21:29:31

seth
Member
Registered: 2012-09-03
Posts: 52,615

Re: Ethernet doesn't connect automatically on startup

e1000e                376832  0

Was that before you ran your script?

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#8 2024-05-04 07:56:52

rockzombie2
Member
Registered: 2018-10-19
Posts: 11

Re: Ethernet doesn't connect automatically on startup

Well my ethernet seems to automatically connect now without needing to run the script.

I see that e1000e module is loaded as well.

However, when I tried to run that command after reboot, it said it found no journals or something to that effect, so maybe this is another issue: why am I not generating any journals?

Offline

#9 2024-05-04 08:20:24

seth
Member
Registered: 2012-09-03
Posts: 52,615

Re: Ethernet doesn't connect automatically on startup

it said it found no journals or something to that effect

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855


tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*

Offline

#10 2024-05-06 16:40:03

rockzombie2
Member
Registered: 2018-10-19
Posts: 11

Re: Ethernet doesn't connect automatically on startup

seth wrote:

The exact output:

No journal files were found.                                                                    
http://0x0.st/oaxK.txt  
seth wrote:
tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*

I tried to running it with bash, both shells seems to agree the file/directory doesn't exist

chris@nzxt ~> tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
fish: No matches for wildcard '/etc/systemd/login.conf.d/*'. See `help wildcards-globbing`.
tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~^
chris@nzxt ~ [124]> sh tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
fish: No matches for wildcard '/etc/systemd/login.conf.d/*'. See `help wildcards-globbing`.
sh tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~^
chris@nzxt ~ [124]> sh
sh-5.2$ tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
tail: cannot open '/etc/systemd/login.conf' for reading: No such file or directory
tail: cannot open 'tail' for reading: No such file or directory
tail: cannot open '/etc/systemd/login.conf.d/*' for reading: No such file or directory
sh-5.2$ exit
exit
chris@nzxt ~ [1]> bash
[chris@nzxt ~]$ tail -n1000 /etc/systemd/login.conf tail -n1000 /etc/systemd/login.conf.d/*
tail: cannot open '/etc/systemd/login.conf' for reading: No such file or directory
tail: cannot open 'tail' for reading: No such file or directory
tail: cannot open '/etc/systemd/login.conf.d/*' for reading: No such file or directory
[chris@nzxt ~]$ 

Offline

#11 2024-05-06 16:44:47

seth
Member
Registered: 2012-09-03
Posts: 52,615

Re: Ethernet doesn't connect automatically on startup

"logind.conf" - sorry, typo. copypasted…

Offline

Board footer

Powered by FluxBB