Difference between revisions of "Talk:Network configuration"

From ArchWiki
Jump to: navigation, search
(Hostname resolution: new section)
(Hostname resolution: re)
Line 37: Line 37:
  
 
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:48, 8 November 2014 (UTC)
 
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:48, 8 November 2014 (UTC)
 +
 +
:I've also found https://lists.debian.org/debian-devel/2013/07/msg00809.html
 +
:I vote for reverting that edit (and the same on the [https://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=prev&oldid=340136 Beginners' guide]). I don't use a line like that in my /etc/hosts and have no problems at all, and if it's a workaround for bugs in some applications, it should be mentioned in their wiki articles, with a link to the upstream bug report.
 +
:-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:25, 9 November 2014 (UTC)

Revision as of 02:25, 9 November 2014

IP address aliasing with netctl

Configuration presented here isn't working. —This unsigned comment is by Xcfw (talk) 13:33, 17 September 2013‎. Please sign your posts with ~~~~!

Static network service

I've found the current service convoluted, so tried to improve it. [1]:

  • EnvironmentFile= passes all arguments to ExecStart= and ExecStop=, so single bash scripts can be used instead of multiple Exec lines and sh -c (see man systemd.service and man systemd.exec). This makes it easier to change the ip logic, if needed.
  • The IP addresses were made consistent throughout Network configuration#Static IP address.
  • The configuration file was renamed to net-conf-interface, as the special character @ has no meaning there (avoiding unnecessary escaping).

Tested on my current install and it works without issue. -- Alad (talk) 01:04, 25 August 2014 (UTC)

I think it's a matter of preference to use scripts or not. Surely is easier when you expect to change logic, test commands, run other commands right after, etc. Ive renamed the section; think "udev rules" was a relict. Then I've added crosslinks between the wireless example unit and this section, good to have both methods and spell them out because net connectivity is crucial. Sidenote: Your approach made me wonder, if we should not have a basic section about sourcing scripts in Systemd#Writing_custom_.service_files. This talk indicates that as well. --Indigo (talk) 19:59, 25 August 2014 (UTC)
Good work, and I agree to expand on sourcing scripts. This may also help users familiar with bash scripts for the boot process. -- Alad (talk) 01:36, 1 September 2014 (UTC)
There is something strange about the current service file - the service will execute at boot, but the network may stay down; see [2]. Adapting [Unit] from systemd-networkd.service seems to make it work properly (bold parts are additions):
[Unit]
Description=Network connectivity (%i)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
BindsTo=sys-subsystem-net-devices-%i.device
After=network-pre.target sys-subsystem-net-devices-%i.device
Before=network.target multi-user.target shutdown.target
Conflicts=shutdown.target
Wants=network.target
Maybe someone could confirm this... -- Alad (talk) 01:36, 1 September 2014 (UTC)

Hostname resolution

I feel that there is more to this edit: the linked Debian documentation mentions that aliasing 127.0.1.1 to the hostname is "a workaround for some software (e.g., GNOME)". I have also found this post, which says "In the long run the UNIX hostname should not be put in /etc/hosts at all."

So, is aliasing 127.0.1.1 (or the permanent IP address) really necessary on Arch, and in which cases?

-- Lahwaacz (talk) 08:48, 8 November 2014 (UTC)

I've also found https://lists.debian.org/debian-devel/2013/07/msg00809.html
I vote for reverting that edit (and the same on the Beginners' guide). I don't use a line like that in my /etc/hosts and have no problems at all, and if it's a workaround for bugs in some applications, it should be mentioned in their wiki articles, with a link to the upstream bug report.
-- Kynikos (talk) 02:25, 9 November 2014 (UTC)