14

I recently installed Arch linux and everything is working just fine, except for the internet. After booting I always have to enter the following commands to make it work:

sudo ip link set enp3s0 up
sudo dhcpcd enp3s0

After that the internet connection works just fine.

I know I could just create a script that runs automatically after booting up, but I would like to know what the "nice" way is to fix this and why this is happening in the first place, maybe I did something wrong during the installation?

In case it's helpful, here's some info: (gathered after running said commands)

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 05)
    Subsystem: Dell Device 0578
    Flags: bus master, fast devsel, latency 0, IRQ 29
    I/O ports at 2000 [size=256]
    Memory at f1404000 (64-bit, prefetchable) [size=4K]
    Memory at f1400000 (64-bit, prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 01
    Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
    Capabilities: [d0] Vital Product Data
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 0e-00-00-00-36-4c-e0-00
    Kernel driver in use: r8169
    Kernel modules: r8169

and the relevant part of ip link

2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 5c:f9:dd:62:dd:f0 brd ff:ff:ff:ff:ff:ff
2
  • 2
    Did you follow wiki.archlinux.org/index.php/Network_configuration ?
    – aventurin
    Nov 8, 2016 at 20:31
  • @aventurin yes, but I think the problem might be that the wifi connection is set up before the lan connection starts up.. the wifi is automatically connected after every reboot.. Could it be that lan is ignored later on because of this? Nov 11, 2016 at 18:15

2 Answers 2

10

Coming here years later with a possible answer because I also had this issue. Maybe will help future wanderers on their trips to this page.

A basic fact - Arch is using systemd these days to control system services. We'll be issuing commands to tell systemd to launch the dhcpcd service at boot.

Assuming you plan to use dhcpcd (and not Network Manager or other options), the goal is to have the dhcpcd service start up at boot. The dhcpcd service brings up any necessary interface(s) automatically - at least ethernet type ones. Wireless obviously requires additional configuration.

The commands to enable, start now, and check status of the dhcpcd:

$ systemctl enable dhcpcd.service
$ systemctl start  dhcpcd.service
$ systemctl status dhcpcd.service

Note: enabling the service will also cause it to run at boot.

The Arch documentation is extensive and excellent but achieving simple, basic things that pretty much all normal people need to do requires a ton of knowledge and reading big chunks of a number of the very long documentation pages. After all this reading, if you're lucky you finally emerge, dazed, with the one or two lines that are all that's needed for most common scenarios.

1
  • I had the same problem, but with the wifi network interface(wlan0). The solution worked for me. Aug 12, 2020 at 8:48
3
systemctl enable dhcpcd.service

or

systemctl enable [email protected]

This answer may be out of date, consult the ArchWiki page for more info

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .