You are not logged in.

#1 2012-12-26 20:29:49

hawaiicharles
Member
Registered: 2012-12-21
Posts: 71

Wired static IP address support discussion

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?

Offline

#2 2012-12-26 22:03:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: Wired static IP address support discussion

Correct way is netcfg.  You shouldn't have to make a service file; that method causes more problems than its worth IMO.

Last edited by graysky (2012-12-26 22:04:11)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2012-12-27 01:05:20

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Wired static IP address support discussion

That wiki link is for wireless, Wired is, strangely, elsewhere: https://wiki.archlinux.org/index.php/Sy … et_network.

The correct way is whatever you want.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#4 2012-12-27 17:38:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Wired static IP address support discussion

fsckd wrote:

The correct way is whatever you want.

This. Arch is what you make of it !!


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2012-12-27 21:08:02

hawaiicharles
Member
Registered: 2012-12-21
Posts: 71

Re: Wired static IP address support discussion

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?

Offline

#6 2012-12-27 22:11:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: Wired static IP address support discussion

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)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2012-12-28 19:54:42

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: Wired static IP address support discussion

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)

Offline

#8 2012-12-28 20:01:39

hawaiicharles
Member
Registered: 2012-12-21
Posts: 71

Re: Wired static IP address support discussion

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:
DNS=('10.1.1.101')
DNS=('10.1.1.102')

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.

Offline

Board footer

Powered by FluxBB