You are not logged in.
I am able to get a network connection using dhcpcd just fine, but I really would like to use netctl. Below is /etc/netctl/static:
% cat /etc/netctl/static
Description='ethernet connection'
Interface=enp1s0
Connection=ethernet
IP=static
Address=('192.168.0.200/24')
Gateway='192.168.0.1'
DNS=('192.168.0.1')
TimeoutUp=40
TimeoutCarrier=40
This profile is enabled but when I reboot, I have no network but I do not know why.
% sudo journalctl -u netctl@static
-- Logs begin at Thu 2014-12-18 19:40:28 EST, end at Mon 2015-04-20 15:42:43 EDT. --
Apr 20 12:06:43 gemini systemd[1]: Starting ethernet connection...
Apr 20 12:06:44 gemini network[392]: Starting network profile 'static'...
Apr 20 12:06:49 gemini network[392]: No connection found on interface 'enp1s0' (timeout)
Apr 20 12:06:49 gemini network[392]: Failed to bring the network up for profile 'static'
Apr 20 12:06:49 gemini systemd[1]: netctl@static.service: main process exited, code=exited, status=1/FAILURE
Apr 20 12:06:49 gemini systemd[1]: Failed to start ethernet connection.
Apr 20 12:06:49 gemini systemd[1]: Unit netctl@static.service entered failed state.
Apr 20 12:06:49 gemini systemd[1]: netctl@static.service failed.
If I disable that profile and instead use dhcpcd@enp1s0.service, following a reboot, the network works as expected.
% sudo systemctl status dhcpcd@enp1s0.service
* dhcpcd@enp1s0.service - dhcpcd on enp1s0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2015-04-20 15:08:22 EDT; 40min ago
Process: 391 ExecStart=/usr/bin/dhcpcd -q -w %I (code=exited, status=0/SUCCESS)
Main PID: 892 (dhcpcd)
CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@enp1s0.service
`-892 /usr/bin/dhcpcd -q -w enp1s0
Apr 20 15:08:15 gemini dhcpcd[391]: enp1s0: carrier acquired
Apr 20 15:08:15 gemini dhcpcd[391]: DUID 00:01:00:01:1a:2b:7d:1a:68:05:ca:09:0e:6a
Apr 20 15:08:15 gemini dhcpcd[391]: enp1s0: IAID ca:09:0e:6a
Apr 20 15:08:15 gemini dhcpcd[391]: enp1s0: soliciting an IPv6 router
Apr 20 15:08:16 gemini dhcpcd[391]: enp1s0: rebinding lease of 192.168.0.200
Apr 20 15:08:22 gemini dhcpcd[391]: enp1s0: leased 192.168.0.200 for 86400 seconds
Apr 20 15:08:22 gemini dhcpcd[391]: enp1s0: adding route to 192.168.0.0/24
Apr 20 15:08:22 gemini dhcpcd[391]: enp1s0: adding default route via 192.168.0.1
Apr 20 15:08:22 gemini systemd[1]: Started dhcpcd on enp1s0.
Apr 20 15:08:29 gemini dhcpcd[892]: enp1s0: no IPv6 Routers available
Any thoughts are welcomed.
Last edited by graysky (2015-04-20 21:21:48)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
If I disable my 'static' profile and enable a 'bridge' profile, netctl is able to bring up the adapter just fine ... why does the static configuration fail?
% cat /etc/netctl/bridge
Description='lxc bridge'
Interface=br0
Connection=bridge
BindsToInterfaces=('enp1s0')
IP=static
Address=('192.168.0.200/24')
Gateway='192.168.0.1'
DNS=('192.168.0.1')
SkipForwardingDelay=yes
% sudo journalctl -u netctl@bridge
-- Logs begin at Thu 2014-12-18 19:40:28 EST, end at Mon 2015-04-20 17:34:23 EDT. --
Apr 20 17:31:46 gemini systemd[1]: Starting lxc bridge...
Apr 20 17:31:47 gemini network[400]: Starting network profile 'bridge'...
Apr 20 17:31:47 gemini network[400]: RTNETLINK answers: Network is down
Apr 20 17:31:47 gemini network[400]: Started network profile 'bridge'
Apr 20 17:31:47 gemini systemd[1]: Started lxc bridge.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
By default, basic static netctl profiles (but not bridge profiles with static ip, just confirmed) fail if there is no physical connection:
Apr 20 12:06:49 gemini network[392]: No connection found on interface 'enp1s0' (timeout)
You can override this behaviour with 'SkipNoCarrier=yes' in the profile.
Last edited by alphaniner (2015-04-20 21:51:47)
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
What is the output of:
ls -l /etc/netctl/static
ls -l /etc/systemd/system/multi-user.target.wants
Jin, Jîyan, Azadî
Offline
@alphaniner - Yes, but they network cable is actually connected
@HS -
% ls -l /etc/netctl/static
-rw-r--r-- 1 root root 183 Apr 20 17:29 /etc/netctl/static
% ls -l /etc/systemd/system/multi-user.target.wants | grep netctl
lrwxrwxrwx 1 root root 41 Apr 20 17:29 netctl@static.service -> /etc/systemd/system/netctl@static.service
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Then maybe
TimeoutUp
Maximum time, in seconds, to wait for an interface to get up. Defaults to ‘5’.
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
Try this:
# chmod 600 /etc/netctl/static
It would be useful to see the entire output of the second command.
Which command are you using to start netctl?
Jin, Jîyan, Azadî
Offline
@alphanier - I set it to 40 but still no change; the bridge comes up right away
@HS - 644 or 600 gives the same result. I started it via `netctl enable netctl` followed-up by a reboot.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
do you have the netctl ifplugd service enabled?
Offline
@dcd - No, shouldn't need it. I have this setup on many other machines without it.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@alphanier - ... the bridge comes up right away
Well, bridge profiles don't seem to care at all whether or not the master interface can be brought up, so that's not surprising.
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
You say you "need netctl" - is there a particular reason for that? If you can be tempted to try an alternative, systemd-networkd is just awesome for static configurations - dhcp too, for that matter.
Offline
@tomk - Yes, I know other bridge alternatives are out there, but netctl's implementation is so easy I have it working now via a single profile (bridge as described). I have been using systemd-networkd prior to that. Is the bridge implementation in there equally good in your experience?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I don't use bridges. You said your static connection wasn't working, hence my networkd suggestion.
Offline
Adding a bridge is always possible, that's why the error does not appear there.
Your "static" profile works just fine here. The only thing I can think of is that you still have some competing (guess: systemctl --type=service lists a systemd-networkd) service running which grabs the interface before netctl starts up.
Offline
The only thing I can think of is that you still have some competing (guess: systemctl --type=service lists a systemd-networkd) service running which grabs the interface before netctl starts up.
If I may, the (full) output of this command will show if any .services are conflicting:
ls -l /etc/systemd/system/multi-user.target.wants
Jin, Jîyan, Azadî
Offline
% ls -l /etc/systemd/system/multi-user.target.wants
total 0
lrwxrwxrwx 1 root root 40 Nov 29 2013 cpupower.service -> /usr/lib/systemd/system/cpupower.service
lrwxrwxrwx 1 root root 38 Nov 29 2013 cronie.service -> /usr/lib/systemd/system/cronie.service
lrwxrwxrwx 1 root root 40 Sep 7 2014 lighttpd.service -> /usr/lib/systemd/system/lighttpd.service
lrwxrwxrwx 1 root root 42 Nov 29 2013 lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service
lrwxrwxrwx 1 root root 41 Aug 7 2014 monitorix.service -> /usr/lib/systemd/system/monitorix.service
lrwxrwxrwx 1 root root 41 Apr 20 17:29 netctl@bridge.service -> /etc/systemd/system/netctl@bridge.service
lrwxrwxrwx 1 root root 35 Aug 7 2014 psd.service -> /usr/lib/systemd/system/psd.service
lrwxrwxrwx 1 root root 40 Apr 19 17:08 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 36 Aug 1 2014 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx 1 root root 35 Aug 1 2014 ufw.service -> /usr/lib/systemd/system/ufw.service
lrwxrwxrwx 1 root root 40 Aug 15 2014 vncserver@:1.service -> /etc/systemd/system/vncserver@:1.service
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline