You are not logged in.

#1 2015-01-23 04:22:38

siavashserver
Member
Registered: 2011-02-11
Posts: 73

Can not setup network connection after netctl 1.10 update

I'm using netctl's ifplugd service to automatically manage my network connections (LAN), however after latest update to netctl (1.10) I can not connect to other machines or internet anymore and I must downgrade to netctl 1.9.

Related netctl service:

netctl-ifplugd@enp2s0.service

My network connection profile: /etc/netctl/mynetwork

Description='A basic static ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=static
Address=('192.168.1.1/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.254'
DNS=('192.168.1.254')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

Related bits from journald:

Jan 23 01:13:36 arch ifplugd[251]: ifplugd 0.28 initializing.
Jan 23 01:13:36 arch ifplugd[251]: Using interface enp2s0/00:23:54:2C:CE:94 with driver <ATL1E> (version: 1.0.0.7-NAPI)
Jan 23 01:13:36 arch ifplugd[251]: Using detection mode: SIOCETHTOOL
Jan 23 01:13:36 arch ifplugd[251]: Initialization complete, link beat not detected.
Jan 23 01:13:36 arch kernel: IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
Jan 23 01:13:36 arch acpid[246]: starting up with netlink and the input layer
Jan 23 01:13:36 arch acpid[246]: 1 rule loaded
Jan 23 01:13:36 arch acpid[246]: waiting for events: event logging is off
Jan 23 01:13:37 arch kernel: floppy0: no floppy controllers found
Jan 23 01:13:37 arch kernel: ATL1E 0000:02:00.0 enp2s0: NIC Link is Up <100 Mbps Full Duplex>
Jan 23 01:13:37 arch kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
Jan 23 01:13:37 arch acpid[246]: client connected from 256[0:0]
Jan 23 01:13:37 arch acpid[246]: 1 client rule loaded
Jan 23 01:13:38 arch ifplugd[251]: Link beat detected.
Jan 23 01:13:39 arch ifplugd[251]: Executing '/etc/ifplugd/netctl.action enp2s0 up'.
Jan 23 01:13:39 arch ifplugd[251]: client: <3>Could not start any suitable profile
Jan 23 01:13:39 arch ifplugd[251]: Program execution failed, return value is 1.

Offline

#2 2015-01-23 09:21:09

jouke
Member
Registered: 2009-10-14
Posts: 72

Re: Can not setup network connection after netctl 1.10 update

Add ExcludeAuto=no to your profile. As there is no way to check a statically configured IP address for correctness, they are excluded from automatic profile selection by default starting netctl 1.10. I am sorry for the inconvenience. From netctl 1.10 onwards, the behavior of netctl-ifplugd@ is documented in the man pages. For more information on ExcludeAuto= and Priority=, consult netctl.profile(5).

Offline

#3 2015-01-23 14:36:09

siavashserver
Member
Registered: 2011-02-11
Posts: 73

Re: Can not setup network connection after netctl 1.10 update

Thank you very much for help! It works perfect as always again smile

Offline

#4 2015-01-23 15:35:54

george_c
Member
Registered: 2015-01-06
Posts: 1

Re: Can not setup network connection after netctl 1.10 update

This problem hit me too. I have a static IP address set up on a server, I upgraded netctl to 1.10 and it took me a couple of hours to work out why, after the upgrade, my network would not work. The messages were not helpful as I performed netctl starts, stops and status, or ip link commands. In the end I got the server back up by using ifconfig, ip addr add, ip route add etc. Then I found this forum entry (Thank you siavashserver and jouke!).

While the solution can be found in the netctl manual, it is a little obscure. I think this deserves the status of a bug. I don't think a simple upgrade should allow a whole class of users (everybody with a static ip address) to lose network connectivity without warning.

Even the (upgraded?) /etc/netctl/examples/ethernet-static file fails to include ExcludeAuto=no, so the documentation (at least in this regard) is faulty.

When I performed the upgrade I was warned

New optional dependencies for netctl
    openvswitch: for Open vSwitch connections
    ppp: for PPP connections

Is it possible to add a message there saying Warning! If you have a static ip address, this upgrade will destroy your network connectivity next time you reboot unless you add ExcludeAuto=no to your network profile?

jouke wrote:

Add ExcludeAuto=no to your profile. As there is no way to check a statically configured IP address for correctness, they are excluded from automatic profile selection by default starting netctl 1.10. I am sorry for the inconvenience. From netctl 1.10 onwards, the behavior of netctl-ifplugd@ is documented in the man pages. For more information on ExcludeAuto= and Priority=, consult netctl.profile(5).

Offline

#5 2015-01-23 22:23:34

jouke
Member
Registered: 2009-10-14
Posts: 72

Re: Can not setup network connection after netctl 1.10 update

This 'whole class of users' consists of users who use netctl-ifplugd to connect to a profile with a static address instead of directly via netctl@profile. As far as I know, this was never documented or endorsed. The new behavior is consistent with netctl-auto. It is documented and endorsed smile.
Using netctl-ifplugd to connect to a profile using DHCP was and still is supported. I expect no issues with that use case with the update to 1.10.

Offline

#6 2015-01-23 22:49:04

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Can not setup network connection after netctl 1.10 update

Barely OT: why is refusing to assign a static IP to an unplugged interface the default behaviour?

Edit for clarity: Rather, why is it the default behaviour for a static profile to fail if the interface is unplugged?

Last edited by alphaniner (2015-01-23 23:01:30)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2015-01-24 09:50:08

jouke
Member
Registered: 2009-10-14
Posts: 72

Re: Can not setup network connection after netctl 1.10 update

Let me give an explanation. In automatic profile selection, it is the role of netctl to decide not only when to start a profile, but also which profile to start.
For wireless connections netctl looks at the ESSID and signal strength to select a profile. For wired profiles, the best it can do is try profiles that could fail. A dhcp client will time out if no dhcp server is active, hence profiles that use dhcp can fail. The same does not hold for profiles that use static addresses. How could netctl determine which profile to start? It cannot and therefore such profiles are excluded from automatic profile selection by default.
In some cases this is not what you want. One such case is present in this topic, where there is only one static profile for an interface and it makes sense to use it. Another such case is when suitability of a profile can be tested, for example by testing reachability of some server. By adding ExecUpPost="/usr/bin/arping -qf -w 1 -I $Interface 192.168.2.1" to a profile that uses a static address, the profile can fail and is suitable for automatic profile selection. In this case too, it is meaningful to add ExcludeAuto=no to the profile.

@alphaniner: netctl uses profiles to establish a connection, so a physical link is considered a requirement. Of course, you can override this using SkipNoCarrier=yes.

Offline

Board footer

Powered by FluxBB