While still somewhat new to Arch, I've already installed it several times (what can I say? I enjoy the process of installing an OS) in various configurations. Mostly I was following the beginner's guide, using ifplugd and the net-auto-wired.service for IP connectivity. While reading these forums, I discovered references to https://wiki.archlinux.org/index.php/Ne … IP_address, which looks like a better way to configure a static IP.
My first question: which way is most "correct" and why?
Secondly, it seems odd to me that I (the user) should have to create my own "network.service" file in /etc/systemd/system. I've had no trouble following the directions and getting it to work, but shouldn't that be something that's already built into Arch itself? It's not unprecedented to have template configuration files present "out-of-the-box", such as /etc/network.d/examples/* or /etc/skel/.xinitrc. So maybe /etc/systemd/system/network.service should be present in the base installation?
The correct way is whatever you want.
This. Arch is what you make of it !!
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Thanks for the replies. Graysky, could you elaborate on the problems you have seen with network.service? I tried it on at least 3 different installations (including my Raspberry Pi, which I just got yesterday), and I haven't had any problems. Well, other than one ones I caused myself by sloppy typing.
To my second question: Is there a reason why /etc/systemd/system/network.service isn't included by default in the base installation?
The service file you created doesn't tell systemd that it is providing network.target at all. Other services that require a functional network may start out-of-order and therefor fail.
Last edited by graysky (2012-12-27 22:13:10)
Uhm, the service files from the wiki have the exact same dependency information as the service files provided by netcfg ([Unit] Before/Wants=network.target, [Install] WantedBy=multi-user.target).
Last edited by ZekeSulastin (2012-12-28 19:56:48)
I just gave netcfg a try and I'm definitely sold. I made a test machine that mounts a cifs share via smbclient, and the share mounts and unmounts flawlessly when using netcfg. With network.service, the share didn't mount properly during boot, and caused a 60-second hang during shutdown because the network connection was pulled before the share got unmounted. I'm writing this for the benefit of others who might be searching on such an issue.
One thing: The template "ethernet-static" file (in /etc/network.d/examples/) is incomplete IMO. It doesn't have an entry for NETMASK, so I had to do some googling to find the proper syntax. I was also unsure of how to configure multiple DNS servers, so I just took a guess and made a second line for the second server, so it looks like this:
And does that mean /etc/resolve.conf isn't used at all?
Hopefully my questions aren't too overbearing... I'm still trying to get a handle on all these different options.