Difference between revisions of "Talk:Netctl"

From ArchWiki
Jump to: navigation, search
(Hooks and interfaces explanations: rm closed)
(Profile Names: rm closed)
Line 1: Line 1:
== <s>Profile Names</s> ==
 
 
Perhaps I am missing something as I have been fighting networking stuff for at least 2 weeks. (Not all netctl, I'm glad to say.) But the eduroam profiles given here seem to be inconsistent with the advice not to name profiles with strings which include hyphens. Am I missing something? (By the way, it would be handy to know what *is* safe. Presumably [a-z], probably [A-Z0-9]. Anything else?) --[[User:Margali|cfr]] ([[User talk:Margali|talk]]) 03:56, 3 March 2014 (UTC)
 
 
:''Everything'' is safe to use, hyphens are just more prone to PEBKAC errors. When you use directly ''netctl'' to manage profiles (i.e. you run {{ic|netctl enable ''profile''}} instead of {{ic|systemctl enable netctl@''profile''}}), nothing bad will ever happen even when there is a hyphen in the profile name.
 
:Yes, the hyphens are encoded into {{ic|\x2d}} when the symlink in {{ic|/etc/systemd/system/}} is created, but there is nothing more than that. Searching the [https://bbs.archlinux.org/viewtopic.php?pid=1311864/ forums thread] mentioned in the note on this page, several other threads and relevant man pages, the only reference to hyphens being really ''special'' is in path units, where they substitute {{ic|/}}, which obviously can't be used in file name. Especially there are no "connection drop issues" because of hyphens.
 
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:25, 3 March 2014 (UTC)
 
 
::closing old discussion  -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 17:47, 13 April 2017 (UTC)
 
 
 
== <s>Wireless/Wired failover dependency management.</s> ==
 
== <s>Wireless/Wired failover dependency management.</s> ==
  

Revision as of 07:54, 14 November 2017

Wireless/Wired failover dependency management.

When I set up wireless failover, I needed to create a custom dependency to avoid the "already up" problem. Thought I would share:

/etc/systemd/system/netctl@failover.service.d/dependencies.conf

   [Unit]
   Wants=dhcpcd@bond0.service
   Wants=wpa_supplicant@wlan0.service
   Before=dhcpcd@bond0.service
   Before=wpa_supplicant@wlan0.service

This made sure that the interfaces were bonded and up before anything else attempted to use the device; isolates this dependency to the failover (so other profiles *may* work) profile and allows the AP association to happen before DHCPCd times out. —This unsigned comment is by Greyson (talk) 16:55, 5 November 2014. Please sign your posts with ~~~~!

Yes,this is a problem that I also had, when starting the bond just with the wireless interface up. I've been studying a solution to this problem, and yours, while being correct, is parcial. If there isn't any dhcp server on the wireless network, it will timeout anyway. I played a while, and I believe the solution is to set the dhcpcd timeout to zero and, instead of having netctl calling it, create a different systemd service for the bond0 interface, so if it dies for any reason, systemd will restart it. I haven't had the time to test this solution, if you can test, please share here so we can change the wiki page.
Grazzolini (talk) 17:05, 5 November 2014 (UTC)
closing old discussion -- Rdeckard (talk) 17:48, 13 April 2017 (UTC)

Explain WPAConfigSection

It would be nice if there were an additional example using Security=wpa-configsection that explained each line in the example (/etc/netctl/examples/wireless-wpa-configsection). I'd imagine I'm not the first person discouraged from using netctl-auto because of this. -- Ryne Everett (talk) 16:28, 21 June 2015 (UTC)

As stated in the netctl.profile(5) man page, the WPAConfigSection variable is an array of config lines passed to wpa_supplicant. See example wpa_supplicant.conf (shipped with the Arch package at /etc/wpa_supplicant/wpa_supplicant.conf) for detailed explanation. -- Lahwaacz (talk) 19:20, 21 June 2015 (UTC)
Thanks, I wouldn't have guessed that would be the file to explain those values. If/When I figure it out I may add an additional example section explaining just the required values. (Surely all 10 in the example aren't required?) This is too common of a need (required for netctl-auto) to require so much studying. -- Ryne Everett (talk) 19:38, 21 June 2015 (UTC)
Remember that you are configuring wpa_supplicant, not netctl, so the info belongs to WPA supplicant (it may already be there). -- Lahwaacz (talk) 20:27, 21 June 2015 (UTC)

DHCP clients

I had the problem described under "Job for netctl@wlan(...).service failed", and changing my netctl profiles to use dhclient solved it. My /etc/dhcpcd.conf was unchanged from the version in the package, and my /etc/dhclient.conf was based on /usr/share/dhclient/dhclient.conf.example from the dhclient client package. These request different options from the DHCP server:

/etc/dhcpcd.conf
...
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

and

/etc/dhclient.conf
...
request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;

I removed DHCPClient='dhclient' from my netctl profiles, and made dhcpcd request the extra options by adding

option subnet_mask, broadcast_address, time_offset, routers

to /etc/dhcpcd.conf, and netctl works O.K. with dhcpcd as the DHCP client.

I don't know why requesting the extra options should make a difference, and I haven't tried any tests to see which of them are necessary.--Pdc (talk) 19:41, 25 August 2015 (UTC)

Sucks for laptops

I have used this tool for years on server and desktop but since using it on a laptop I've come to the conclusion that it is just a bad tool.

starting/stopping profiles usually doesn't work for various reasons even though I have simple standard profiles. I'm just running manual commands at this point. —This unsigned comment is by Erikvanvelzen (talk) 08:07, 14 November 2017‎. Please sign your posts with ~~~~!

Code_of_conduct#Personal_topics.2Frants -- Alad (talk) 07:53, 14 November 2017 (UTC)