You are not logged in.

#51 2013-04-11 07:04:46

ghen
Member
From: Belgium
Registered: 2010-08-31
Posts: 122

Re: Announcing netctl

I haven't looked into the details yet, but this will be painful for remote migration if netctl conflicts with netcfg.  First time right or no network. :-(

Even on a local machine, I cannot have the netctl manpages prior to removing netcfg...

Offline

#52 2013-04-11 07:10:18

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

Re: Announcing netctl

ghen wrote:

...I cannot have the netctl manpages prior to removing netcfg...

https://github.com/joukewitteveen/netct … aster/docs


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

Offline

#53 2013-04-11 07:17:22

ghen
Member
From: Belgium
Registered: 2010-08-31
Posts: 122

Re: Announcing netctl

Yeah, I know, and I built them locally via ABS now, but the point is really should netcfg and netctl be conflicting?  It doesn't allow for easy migration & rollback.
Do they have any common/conflicting files at all?

Offline

#54 2013-04-11 07:46:10

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Announcing netctl

ghen wrote:

[...] It doesn't allow for easy migration & rollback.
Do they have any common/conflicting files at all?

That's just simply untrue, I've gone back and forth with netcfg and netctl, if you have modified a config with netcfg for example, it'll be saved as a *.pacsave file when you install netctl and accept removal of netcfg. I had switched back and forth in a matter of minutes.

-- edit below --

If you're still not confident it'd be easy to migrate/rollback, then backup your configuration files for them manually, possibly even make a note of any services you made for each.

Last edited by opt1mus (2013-04-11 07:55:07)

Offline

#55 2013-04-11 08:57:16

Aton
Member
Registered: 2013-04-02
Posts: 70

Re: Announcing netctl

Is it safe to remove /etc/network.d after migration to netctl?

Offline

#56 2013-04-11 09:18:42

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: Announcing netctl

I keep seeing all these references to /etc/wpa_supplicant.conf

Should this not be /etc/wpa_supplicant/wpa_supplicant.conf as default, seeing as this is where wpa_supplicant installs the file?

I know you can set the path to this file, but shouldn't the netctl default be the same as the package default for wpa_supplicant?

Cheers.

[EDIT] Just raised a bug report for this[/EDIT]

Last edited by Padfoot (2013-04-11 09:46:07)

Offline

#57 2013-04-11 09:22:14

fijit
Member
Registered: 2012-07-06
Posts: 24

Re: Announcing netctl

Breakage wrote:
fijit wrote:

2) With netcfg it was possible to list PostUp/PreDown commands in the interface/<interface> file, to e.g. start services when connecting to the network. It seems that netctl does not execute these commands. Is there a way to get the same behaviour without including PostUp/PreDown in every profile file?

Try the "ExecUpPost=" & "ExecDownPre=" commands.

Yes, I know the names of the options changed. They work fine in individual profiles but not in interface hooks, at least not for me with 0.8.

Offline

#58 2013-04-11 12:04:50

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Announcing netctl

GNA wrote:

Can someone help me? This error prevents netctl-auto from starting. When I start it manually it works fine. It might be trying to start too early.

Apr 10 19:22:37 arch network[1797]: Successfully initialized wpa_supplicant
Apr 10 19:22:37 arch network[1797]: ctrl_iface exists and seems to be in use - cannot override it
Apr 10 19:22:37 arch network[1797]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Apr 10 19:22:37 arch network[1797]: Failed to initialize control interface '/run/wpa_supplicant'.
Apr 10 19:22:37 arch network[1797]: You may have another wpa_supplicant process already running or the file was
Apr 10 19:22:37 arch network[1797]: left by an unclean termination of wpa_supplicant in which case you will need
Apr 10 19:22:37 arch network[1797]: to manually remove this file before starting wpa_supplicant again.
Apr 10 19:22:38 arch network[1797]: The WPA supplicant did not start for interface 'wlan0'

I was having a similar issue; I had followed the wiki and issued

netctl enable <profile>

as well as enabling the netctl-auto@<interface> systemd service. I believe if using netctl-auto, you should not need to also enable a specific profile; it was causing a race condition on startup for me (both directly starting the profile and netctl-auto automatically starting it). So, if you enabled the profile directly, try

netctl disable <profile>

and leaving the netctl-auto@<interface> service enabled.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#59 2013-04-11 12:31:29

GNA
Member
Registered: 2011-02-15
Posts: 57

Re: Announcing netctl

nogoma wrote:
GNA wrote:

Can someone help me? This error prevents netctl-auto from starting. When I start it manually it works fine. It might be trying to start too early.

Apr 10 19:22:37 arch network[1797]: Successfully initialized wpa_supplicant
Apr 10 19:22:37 arch network[1797]: ctrl_iface exists and seems to be in use - cannot override it
Apr 10 19:22:37 arch network[1797]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Apr 10 19:22:37 arch network[1797]: Failed to initialize control interface '/run/wpa_supplicant'.
Apr 10 19:22:37 arch network[1797]: You may have another wpa_supplicant process already running or the file was
Apr 10 19:22:37 arch network[1797]: left by an unclean termination of wpa_supplicant in which case you will need
Apr 10 19:22:37 arch network[1797]: to manually remove this file before starting wpa_supplicant again.
Apr 10 19:22:38 arch network[1797]: The WPA supplicant did not start for interface 'wlan0'

I was having a similar issue; I had followed the wiki and issued

netctl enable <profile>

as well as enabling the netctl-auto@<interface> systemd service. I believe if using netctl-auto, you should not need to also enable a specific profile; it was causing a race condition on startup for me (both directly starting the profile and netctl-auto automatically starting it). So, if you enabled the profile directly, try

netctl disable <profile>

and leaving the netctl-auto@<interface> service enabled.

Thank you! That was exactly what I did wrong smile .

In my opinion the wiki is telling me to do it like this. Is this intended and the wiki needs work or is this a bug?

Last edited by GNA (2013-04-11 12:44:17)

Offline

#60 2013-04-11 12:37:41

moscar
Member
Registered: 2012-03-12
Posts: 23

Re: Announcing netctl

How do I start a bridge interface at boot?

Right now I have netctl-ifplugd@<interface>.service enabled, and that works fine.

When I do

# netctl start bridge

It also works fine. But if i enable that profile and reboot I have no connection at boot.

This is what ip addr outputs in the different stages described above: http://sprunge.us/MgKH

my two netctl profiles look like this:

bridge:

Description="KVM Bridge connection"
Interface=br0
Connection=bridge
BindsToInterfaces=(enp9s0)
IP=dhcp
## sets forward delay time
#FWDDelay=0
## sets max age of hello message
#MaxAge=10

Ethernet:

Description='A basic static ethernet connection'
Interface=enp9s0
Connection=ethernet
IP=static
Address=('1.3.3.75/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='1.3.3.7'
DNS=('8.8.8.8' '8.8.4.4')

## 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'

Am I doing something wrong, or is something not working like it should?

Last edited by moscar (2013-04-11 12:39:35)

Offline

#61 2013-04-11 15:42:57

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Announcing netctl

Aton wrote:

Is it safe to remove /etc/network.d after migration to netctl?

/etc/network.d/ as you're probably already aware, is created by netcfg and contains network profiles for it to use. After migration to netctl; yes you can safely remove this folder, although I would suggest that you backup any custom profiles within it - of course netctl uses a different format than netcfg within its profiles (i.e CamelCase and so forth) but you may wish to use them as a reference when creating new profiles for netctl to use.

Offline

#62 2013-04-11 17:24:41

Aton
Member
Registered: 2013-04-02
Posts: 70

Re: Announcing netctl

opt1mus wrote:
Aton wrote:

Is it safe to remove /etc/network.d after migration to netctl?

/etc/network.d/ as you're probably already aware, is created by netcfg and contains network profiles for it to use. After migration to netctl; yes you can safely remove this folder, although I would suggest that you backup any custom profiles within it - of course netctl uses a different format than netcfg within its profiles (i.e CamelCase and so forth) but you may wish to use them as a reference when creating new profiles for netctl to use.

Thanks, I wasn't sure whether netctl might still use that folder.

Offline

#63 2013-04-11 17:34:13

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Announcing netctl

GNA wrote:

Thank you! That was exactly what I did wrong smile .

In my opinion the wiki is telling me to do it like this. Is this intended and the wiki needs work or is this a bug?

I think the wiki was unclear; I just edited the node about enabling the

netctl-auto@<interface>

service to make it (hopefully) clearer.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#64 2013-04-11 22:40:56

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Announcing netctl

do not keep it simple? -- enough rant.

here my problem:

profile is

Description='Automatically generated profile by wifi-menu'
Interface=wlan0
Connection=wireless
SECURITY=wpa
ESSID='thetomsons'
IP=static
Address='192.168.11.11/24'
Gateway='192.168.11.1'
DNS=('192.168.11.1')
Key="somekey"

#netctl start thetomsons fails

journalctl output:

-- Unit netctl@thetomsons.service has begun starting up.
Apr 11 19:18:00 lappy network[2066]: Starting network profile 'thetomsons'...
Apr 11 19:18:00 lappy network[2066]: The interface of network profile 'thetomsons' is already up
Apr 11 19:18:00 lappy systemd[1]: netctl@thetomsons.service: main process exited, code=exited, status=1/FAILURE
Apr 11 19:18:00 lappy systemd[1]: Failed to start Networking for netctl profile thetomsons.
-- Subject: Unit netctl@thetomsons.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
-- 
-- Unit netctl@thetomsons.service has failed.
-- 
-- The result is failed.

and systemctl status's is:

netctl@thetomsons.service - Networking for netctl profile thetomsons
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Thu 2013-04-11 19:20:36 ART; 16s ago
     Docs: man:netctl.profile(5)
  Process: 2141 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

Apr 11 19:20:36 lappy systemd[1]: Starting Networking for netctl profile thetomsons...
Apr 11 19:20:36 lappy network[2141]: Starting network profile 'thetomsons'...
Apr 11 19:20:36 lappy network[2141]: The interface of network profile 'thetomsons' is already up
Apr 11 19:20:36 lappy systemd[1]: netctl@thetomsons.service: main process exited, code=exited, status=1/FAILURE
Apr 11 19:20:36 lappy systemd[1]: Failed to start Networking for netctl profile thetomsons.
Apr 11 19:20:36 lappy systemd[1]: Unit netctl@thetomsons.service entered failed state

nowhere i can see where it failed and any indication on what i should do to fix it.
the so well versed wiki says:

if issuing the above command results in a failure, then use journalctl -xn and netctl status <profile> in order to obtain a more in depth explanation of the failure. Make the needed corrections to the failed configuration and retest.

which by my books is not helpful at all. that  line alone is useless.

anyone can help? ath5k here.

Offline

#65 2013-04-11 23:28:09

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Announcing netctl

eldragon wrote:

[...]
Description='Automatically generated profile by wifi-menu'
Interface=wlan0
Connection=wireless
SECURITY=wpa
ESSID='thetomsons'
IP=static
Address='192.168.11.11/24'
Gateway='192.168.11.1'
DNS=('192.168.11.1')
Key="somekey"

This may be one of your problems, it needs to be in UpperCamelCase. So it should read thus;

Security=wpa

Read The Fine Manual.

Offline

#66 2013-04-12 04:57:57

justinmc
Member
From: Virginia, USA
Registered: 2008-10-14
Posts: 16

Re: Announcing netctl

I'm trying to figure out if I'm doing this the proper way, as opposed to a kludge:

To enable automatic connection on boot, I enabled the netctl-auto (wireless) and netctl-ifplugd (wired)  services for my individual NICs, via the following:

# systemctl enable netctl-auto@wifiNIC.service
# systemctl enable netctl-ifplugd@etherNIC.service

(Note that this method will fail if any individual netcfg profiles are enabled due to the race condition when wpa_supplicant gets called again)

Is this preferable to the method which seems to be implied in the wiki (last paragraph before the two Notes):

# netctl enable wiredProfile
# netctl enable wirelessProfile1
# netctl enable wirelessProfile2
# systemctl enable netctl-auto@.service
# systemctl enable netctl-ifplugd@.service

I've only found the former to work properly.

The man page only mentions netctl-{auto,ifplugd}@<interface>.service, not netctl-{auto,ifplugd}@.service.  Should the part in the wiki be re-written, or is there a good reason to point users towards using netctl-{auto,ifplugd}@.service?

Offline

#67 2013-04-12 05:18:48

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Announcing netctl

justinmc wrote:

The man page only mentions netctl-{auto,ifplugd}@<interface>.service, not netctl-{auto,ifplugd}@.service.

Favour the man pages, the wiki is clearly a work in progress and subject to changes by Tom Dick and Harry.

Also worth keeping an eye on the dev's github re: the netctl docs - https://github.com/joukewitteveen/netct … aster/docs

-- edit below --

Having just viewed the netctl wiki page, I don't see where it suggests attempting to enable these network services without stating an interface. Regardless, favour the man pages.

Last edited by opt1mus (2013-04-12 08:25:28)

Offline

#68 2013-04-12 14:58:21

justinmc
Member
From: Virginia, USA
Registered: 2008-10-14
Posts: 16

Re: Announcing netctl

opt1mus wrote:

Favour the man pages, the wiki is clearly a work in progress and subject to changes by Tom Dick and Harry.

-- edit below --

Having just viewed the netctl wiki page, I don't see where it suggests attempting to enable these network services without stating an interface. Regardless, favour the man pages.

That's what I figured.  I'll clean up the wiki a bit to make it a bit more clear.  As far as I can see, if you're using the network services with an interface, then there is no reason to enable profiles through netctl.

Offline

#69 2013-04-12 15:38:05

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: Announcing netctl

enihcam wrote:

Does netctl support mtu configuration?

Yes, something along the lines of..

ExecUpPost='/sbin/ip link set eth0 mtu 1472'

Offline

#70 2013-04-12 18:17:23

mezcal
Member
From: Czech Republic
Registered: 2006-01-31
Posts: 67
Website

Re: Announcing netctl

It works like a charm. Only openvpn is not working. According to the man pages it`s not supported.
Will be the openvpn connection type added?

netcfg openvpn profile:

CONNECTION="openvpn"
INTERFACE="ignore"
OVPN_CONFIG="/etc/openvpn/clients/lan/input-udp-1194.ovpn"
OVPN_FLAGS=""

Offline

#71 2013-04-12 20:53:27

Moparx
Member
Registered: 2006-02-05
Posts: 136
Website

Re: Announcing netctl

hungerfish wrote:

But I'm getting timeout-error messages during/after startup regarding wired and strangely enough also the wireless connection when no cable is plugged. Both wireless and wired connect if cable is present during boot, but I still get the following message:

Timed out waiting for device sys-subsystem-net-devices-multi-user.service
[DEPEND] Dependency failed for Automatic wired/wireless network connection using netctl profiles

I'm sure this is because I've somehow misconfigured this, but I've read the man pages, and to be frank, info is pretty sparse atm.

You did something like this in which you used your profile name:

 systemctl enable netctl-auto@multi-user.service

It should actually be the interface instead of the profile name. For example:

systemctl enable netctl-auto@eth0.service

And then it happened... a door opened to a world... rushing through the phone line like heroin through an addict's veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought... a board is found.
        "This is it... this is where I belong..."

Arch Linux x86_64 | LiCo #213644 | blog / configs

Offline

#72 2013-04-14 19:40:11

TrueBers
Member
Registered: 2013-04-14
Posts: 4

Re: Announcing netctl

Hey, guys!
Just migrated to netctl and tried to enable netctl-ifplugd@eth0. Everything works fine, but after reboot all my daemons like smbd, dnsmasq, miniupnpd doesn't start properly.
After some time spent in man: netctl.special, I've found that ifplugd service doesnt provide 'network.target' which needed by demons described above.
So, here is the question: how do one can provide that target to start all the demons properly?
Thanks!

Offline

#73 2013-04-14 21:31:46

jtan189
Member
Registered: 2012-07-12
Posts: 8

Re: Announcing netctl

I've enabled netctl-ifplugd@eth0.service, and everything seems to working fine, regarding automatically starting and stopping wired connections. However, I noticed that issuing "netctl list" when an wired connection is established (via netctl-iflugd@eth0.service) does not list the wired profile as active.

For example, say I have a single wired ethernet profile named "wiredProfile". Since removing this profile will prevent the netctl-ifplugd service from functioning correctly, I'm assuming that "wiredProfile" is the profile used to establish the automatic wired connection. However, "netctl list" does not mark "wiredProfile" with a '*', to mark it as active. Is this a bug, or am I doing something wrong?

Note: If I execute "netctl list" after manually starting a profile, then that profile is correctly marked as active.

Offline

#74 2013-04-14 21:51:44

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Announcing netctl

1. I'm using netctl-auto@wlp2s0.service and no profile is ever marked as active in the 'netctl list' output, or when issuing 'netctl status <profile>' even when one of the profiles was started by netctl-auto. Is that normal? Seems to me like it should show as active no matter what mechanism is used to start that profile. 

2. At what point are the scripts in /etc/netctl/interfaces executed? I have a script I'd like run after any profile connects. Using

ExecUpPost="su -c '/home/firecat53/.local/bin/ssh-connect.sh' firecat53 || True"

works fine, but adding an executeable script named "wlp2s0" into the "interfaces/" directory just hangs and the profile never connects.

#!/bin/sh
su -c '/home/firecat53/.local/bin/ssh-connect.sh' firecat53 || True

Does it get executed prior to the profile being activated? The manpage is not clear on this point.

3. The wiki said that 'netctl enable' was required with each profile, but using netctl-auto doesn't seem to require that (at least netctl-auto is working here, anyways, without having done that). What's the correct expected behavior?

Thanks!
Scott

Last edited by firecat53 (2013-04-14 22:04:58)

Offline

#75 2013-04-15 04:53:37

silverzhao
Member
Registered: 2011-07-05
Posts: 33

Re: Announcing netctl

jtan189 wrote:

I've enabled netctl-ifplugd@eth0.service, and everything seems to working fine, regarding automatically starting and stopping wired connections. However, I noticed that issuing "netctl list" when an wired connection is established (via netctl-iflugd@eth0.service) does not list the wired profile as active.

For example, say I have a single wired ethernet profile named "wiredProfile". Since removing this profile will prevent the netctl-ifplugd service from functioning correctly, I'm assuming that "wiredProfile" is the profile used to establish the automatic wired connection. However, "netctl list" does not mark "wiredProfile" with a '*', to mark it as active. Is this a bug, or am I doing something wrong?

Note: If I execute "netctl list" after manually starting a profile, then that profile is correctly marked as active.

The same problem here. I have enabled a  wired profile and a wireless profile to auto start at boot time, and both of them work, but neither of them is marked as active with a star.


What you are you do not see, what you see is your shadow.

Offline

Board footer

Powered by FluxBB