You are not logged in.

#101 2013-05-17 21:39:44

Malstrond
Member
From: Germany
Registered: 2009-06-03
Posts: 87

Re: Announcing netctl

God damn it!
You can't just change the name of configuration parameters like DHCPOptions to DhcpcdOptions and not even include a warning in the pacman postinstall message or at least refuse to start the profile with the now invalid parameter.
Instead it just gets silently ignored.

Offline

#102 2013-05-19 13:53:28

john_schaf
Member
From: France
Registered: 2007-02-24
Posts: 103

Re: Announcing netctl

the /etc/netctl/interfaces and /etc/netctl/hooks does not seem to work. Can somebody explain to me how to use this ?

I put ExecUpPost= and ExecPreDown= variables in a file and nothing happens...

Offline

#103 2013-05-20 09:54:55

rix
Member
Registered: 2012-07-25
Posts: 221

Re: Announcing netctl

Hoping don't be in the wrong place and sorry just in case.

I've just faced with a new arch installation. Everything ok till netctl which works as aspected but my profile can't be enable (starting succeed).
Systemd returns me that the fault could be of a missing [installation] section in the service file. I resolved made the link manually (and I think one could also add such section in the service file) but what happened?

Thanks.

Last edited by rix (2013-05-20 10:00:08)

Offline

#104 2013-05-21 12:38:08

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

Re: Announcing netctl

Is netctl-sleep.service supposed to run ExecUpPost? Current status is, that it wont run these. It would be great if it would, as I use these to open an ssh socks proxy at university. I think it should run all of these Exec scripts when suspending and hibernating.

Offline

#105 2013-05-28 14:37:35

htho
Member
From: Würzburg, Germany
Registered: 2013-05-28
Posts: 4

Re: Announcing netctl

I missed good old netcfg-menu, so I wrote a script wich behaves like it.

I thougt I should share it:

#! /bin/bash

filter()
{
NUM=0;
ls -1 `find /etc/netctl/ -maxdepth 1 -type f -print` | while read i ; do
    echo $(basename $i) $(basename $i); NUM=$(($NUM+1)); done;
}

LINES=$(filter)
FILE=$(dialog --stdout --no-tags --title "net-menu" --menu "Select a Profile:" 20 50 10 $LINES)

if [ $FILE ]; then
	echo "Starting Profile: $FILE ..."
	sudo netctl start $FILE
else
	echo "Canceled"
fi

Offline

#106 2013-06-04 14:29:32

schultzter
Member
From: Montreal, QC
Registered: 2012-01-18
Posts: 15
Website

Re: Announcing netctl

eldragon wrote:

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.

I'm having the same issue. Did you ever figure out what the problem was?

For some reason my wireless card is no longer connecting. I was trying to find a way to get more verbose logs out of netctl/systemctl to get a better idea of what's going on, but I can't find anything anywhere. My error messages look a lot like yours. I guess tonight I'll have to take the laptop down to the old computer so I can get a network connection and trouble-shoot side-by-side.

Thanks,


Headed for the second star to the right and straight on 'til morning...

  Schultzter

Offline

#107 2013-06-05 01:22:40

sullivanva
Member
From: Herndon, VA USA
Registered: 2005-07-21
Posts: 126

Re: Announcing netctl

After the latest upgrade somehow my /etc/udev/rules.d/10-network.rules only half works.

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="wifi0"

# ls /sys/class/net
eth0 lo wlan0

Which may account for why wireless isn't working for some people.

Yes, I have /etc/udev/rules.d/80-net-name-slot.rules linked to /dev/null.


--HAPS

Offline

#108 2013-06-05 01:55:20

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Announcing netctl

I'm not sure why it is breaking wiht the wifi0, as that should be the one that works.  But maybe since you have eth0 in the first part of the rule it breaks the whole thing... I don't know.  In any case, you can't use kernel namespaces in your rules anymore.  This was always a somewhat bad idea, and as of a few versions of systemd ago, it is no longer supported at all.  Fr some it worked for a little bit longer, but it seems that for most it has broken by now.

What happens if you choose to use something else for eth0 (like maybe net0) instead?  Do they both work then?

Offline

#109 2013-06-12 12:35:14

ko-alex
Member
Registered: 2013-06-12
Posts: 1

Re: Announcing netctl

I'm concerned about the handling of "IP6=no" in netctl.  A quick perusal of the code suggests that this is setting:

sysctl -q -w net.ipv6.conf.<interface>.accept_ra=0

which is in line with the documentation that it blocks router advertisements.  The problem is that it does this really late in the process - after the interface is up and after ipv4 DHCP (if this is requested).  This gives plenty of time for router advertisements to be accepted before they are blocked.  As a result, on my home network (which is IPv4/6 dual stack), "IP6=no" results in a fully configured IPv6 address just as with "IP6=stateless".

This is concerning as there is a real risk of malicious router advertisments on public IPv4-only wireless hotspots, and "IP6=no" does not prevent this at present.  As a side point, I wonder whether it might be better to make a (correctly functioning) "IP6=no" be the default for the same reason.

Thanks very much for your work on netctl - it seems like a great tool.

Offline

#110 2013-06-17 15:37:38

WolleTD
Member
Registered: 2012-11-13
Posts: 70

Re: Announcing netctl

Hey guys,
after several problems according wifi, I decided trying to reproduce several situations with multiple WLANs, suddenly gone WLANs and disabled interfaces... While I couldn't reproduce most of the problems I thought I have, I broke down the following:

Whenever the interface is disabled by the fancy button on my notebook, by rfkill or by "ip link set wlp3s0 down", the dhcpcd process of netctl-auto seems to have problems and should possibly restart.

The two possibilities I've tested were:

1. Killing the current dhcpcd process to start a new one. Actually, that works pretty well, Interesting fact is, while the original dhcpcd process started by netctl is getting problems after reconnecting, my manually started dhcpcd process (with just "dhcpcd wlp3s0") has no problems with the reconnection. Changing networks is no problem, too, the manually started dhcpcd process gets terminated by the new one.

2. systemctl restart netctl-auto@wlp3s0. Works, but I don't like restarting the whole thing.

So, what is the difference between my dhcpcd and netctl's dhcpcd?

Edit: Okay, I discovered there are some other "problems" dhcpcd, too... For example, when netctl-auto connects to a wireless network and DHCP fails, dhcpcd is terminated and netctl-auto will do nothing at all. That's the point where I have to terminate all netctl* services and manually start a netctl profile...

Last edited by WolleTD (2013-06-19 13:28:14)

Offline

#111 2013-06-28 13:13:13

WolleTD
Member
Registered: 2012-11-13
Posts: 70

Re: Announcing netctl

I just wanted to inform you, it's not the best solution I think, but I altered the /usr/lib/network/auto.action for the LOST and REESTABLISHED sections:

  # Testing the restart of dhcpcd when losing connection
  LOST)
    dhcpcd -k "$interface"
    exit $?
  ;;
  REESTABLISHED)
    if [[ -x "$PROFILE_DIR/interfaces/$interface" ]]; then
        source "$PROFILE_DIR/interfaces/$interface"
    fi
    dhcpcd -qL -t "${TimeoutDHCP:-10}" $DhcpcdOptions -K "$interface"
    exit $?
    # Not handled.
    # exit 0
  ;;

And it works well. But after reestablishing a connection, for some reason, dhcpcd also tries to acquire a IPv6 address. Doesn't happen on connection, even though both dhcpcd calls are identical.

Offline

#112 2013-07-25 14:55:09

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

Re: Announcing netctl

@WolleTD, an alternative is to add an executable hook, for instance /etc/netctl/hooks/auto-with-rfkill, containing

case $ACTION in
  LOST)
    ACTION=DISCONNECT
  ;;
  REESTABLISHED)
    ACTION=CONNECT
  ;;
esac

NOTE: this will only work in netctl 1.3 and newer. For earlier versions, change ACTION to action.

Offline

#113 2013-08-02 11:33:35

Malstrond
Member
From: Germany
Registered: 2009-06-03
Posts: 87

Re: Announcing netctl

dhcpcd has full DHCPv6 support (not just router solicitation as in version 5.x) nowadays. Can we get support for using it for IP6=dhcp instead of dhclient, for example a DHCPClient6 option?

Offline

#114 2013-09-25 12:41:22

wwgfd
Member
From: UK
Registered: 2012-10-11
Posts: 32

Re: Announcing netctl

I'm just installing and setting up netctl for the first time ...reading through the wiki page and the linked man pages (very helpful, thank you!)

I wasn't using `netcfg` previously however it was installed
-- actually I just ran `wpa_supplicant` and then `dhcpcd` directly as root, lol

Anyway, I need some clarification please.

In the netctl.profile man page is states:

Whenever a profile is read, all executable scripts in
'/etc/netctl/hooks/' and any executable script in
'/etc/netctl/interfaces/' with the name of the interface for the profile
are sourced.

I was just wondering what constituted as an "executable" script please?

Does it matter what the file name is? (i.e. does it need a '.conf' suffix or something?)
~ or ~
Does it mean that I have to explicitly set the executable bit with `chmod`?

Thanks


What would Gordon Freeman do?

Offline

#115 2013-09-25 14:59:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Announcing netctl

Yes it has to be set to executable permissions for the root user… otherwise it can't… uhh, execute.

Offline

#116 2013-09-25 15:27:49

wwgfd
Member
From: UK
Registered: 2012-10-11
Posts: 32

Re: Announcing netctl

@WonderWoofy -- Haha yeah, I guess it does sound a bit of a stupid question, but thanks for the clarification anyway! wink

I had assumed as much already and set the execute bit for the user privileges only ( using `chmod u+x ...` )

The reason I'd asked before was I just wondered if there are any file extensions that are always considered executable?
Or if netctl expects a particular file extension / suffix for the 'interface' config files? -- maybe one which it can auto-execute for itself?

I know that the man page said not to use certain suffixes for the main profile files but it wasn't clear if this applied to the files under './interfaces' and './hooks' as well...

Profile names must not contain newlines and should not end in '.action', '.conf', or '.service'.

Anyway I've connected okay using `systemctl start netctl@wlan0.service` now!

I did try the auto-connect service first, but this didn't work! -- I'll have to look in to the "why" of this more, later

smile  Thanks so much!!


What would Gordon Freeman do?

Offline

#117 2013-12-22 10:53:19

iwonbigbro
Member
Registered: 2010-09-01
Posts: 11

Re: Announcing netctl

I was hoping hooks / interfaces would provide similar "hooking" capabilities of ifup/ifdown hook scripts I am used to on Debian.  However, hooking these scripts, the environment tells you nothing about the interface or its configuration at all:

IFPLUGD_CURRENT=up
OLDPWD=/
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
IFPLUGD_PREVIOUS=down
ForceConnect=yes
PWD=/
LANG=en_US.UTF-8
SHLVL=2
_=/usr/sbin/env

So it seems to have a state IFPLUGD_CURRENT and IFPLUGD_PREVIOUS.  Also, ForceConnect seems to be in there.  But nothing whatsoever about what interface is being started/stopped.  In my existing ifup/ifdown hooks, I get ACTION (ifup/ifdown), DEVICE, INTERFACE/IFACE.

Also, it converts any settings for the interface into environment variables, prefixed with IF_.

Offline

#118 2014-03-18 20:45:15

Malstrond
Member
From: Germany
Registered: 2009-06-03
Posts: 87

Re: Announcing netctl

Does anyone know how to specify per-profile DHCP client options in netctl nowadays?  DhcpcdOptions was removed.

Offline

#119 2014-03-18 21:19:31

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: Announcing netctl

Malstrond wrote:

Does anyone know how to specify per-profile DHCP client options in netctl nowadays?  DhcpcdOptions was removed.

For dhcpcd DhcpcdOptions should still work I think. If you use dhclient, the variable is DhclientOptions. At least those variables are used in the scripts and I don't see why they would not be accepted.

Last edited by progandy (2014-03-18 21:20:15)

Offline

#120 2014-03-18 22:46:24

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

Re: Announcing netctl

Malstrond wrote:

Does anyone know how to specify per-profile DHCP client options in netctl nowadays?  DhcpcdOptions was removed.

They are still supported, but no longer documented in netctl.profile(5). This is part of the move to a plugin based DHCP client system. If you wish you can propose a text for netctl.dhcp(5).

It would be nice to extend client support. Nowadays dhcpcd supports IPv6 too, so that could be added. Other clients, such as udhcp could also be added. In the near future, it might be possible to add support for the built-in client in systemd/networkd.

Offline

#121 2014-03-31 22:23:26

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: Announcing netctl

I still have a DNS server adding problem... the config files are copyed from a other pc which works without problems, but on the new one resolv.conf is "empty"

# Generated by resolvconf

How this can happend? Maybe a time issue?

Ok i get the problem solved

There was a config error with wrong dev names and netctl start fails, but the fun part is netctl-auto works also with the bad config only resolv was not set.

Last edited by Lucky (2014-03-31 22:51:53)

Offline

Board footer

Powered by FluxBB