Difference between revisions of "Talk:Netctl"

From ArchWiki
Jump to: navigation, search
(Remove closed discussion)
(Wireless/Wired failover dependency management.: rm closed)
 
(62 intermediate revisions by 19 users not shown)
Line 1: Line 1:
==Wrong headings==
+
== Explain WPAConfigSection ==
I believe that "Just one profile" is in fact about static profiles and "Multiple profiles" is in fact about profiles managed dynamically with respect to whether NIC's are connected or not. This is misleading, and should be corrected. What do you think? [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 09:16, 13 July 2013 (UTC)
 
:I've updated the section, let me know if there are more things to clarify. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:15, 25 July 2013 (UTC)
 
  
== Altering a currently enabled profile ==
+
It would be nice if there were an additional example using {{ic|1=Security=wpa-configsection}} that explained each line in the example ({{ic|/etc/netctl/examples/wireless-wpa-configsection}}). I'd imagine I'm not the first person discouraged from using netctl-auto because of this. -- [[User:RyneEverett|Ryne Everett]] ([[User talk:RyneEverett|talk]]) 16:28, 21 June 2015 (UTC)
  
Concerning this note:
+
:As stated in the [https://projects.archlinux.org/netctl.git/tree/docs/netctl.profile.5.txt#n281 netctl.profile(5)] man page, the {{ic|WPAConfigSection}} variable is an array of config lines passed to [[wpa_supplicant]]. See [http://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf example wpa_supplicant.conf] (shipped with the Arch package at {{ic|/etc/wpa_supplicant/wpa_supplicant.conf}}) for detailed explanation. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:20, 21 June 2015 (UTC)
{{Note|
 
* If there is ever a need to alter a currently enabled profile, execute {{ic|netctl reenable <profile>}} to apply the changes.
 
* ''interface'' is hardware minus, e.g netctl-auto@wlan0.service or netctl-auto@enp2s0.service
 
}}
 
I find the second line in this note confusing, and the first line may be unnecessary. I found myself having to reboot my system to get any wireless profile changes to take effect. Through trial and error, I finally figured out the command {{ic|systemctl restart netctl-auto@<interface>.service}} allows the changes to take effect without requiring a reboot. Further, it appears that the command {{ic|netctl reenable <profile>}} is not necessary to achieve these results; although, some profile modifications did require that I issue the {{ic|systemctl restart netctl-auto@<interface>.service}} command twice before my wireless Internet connection would come back up. Has anyone else observed this?
 
[[User:Mc33|Mc33]] ([[User talk:Mc33|talk]]) 04:59, 17 July 2013 (UTC)
 
  
: From netctl(1):
+
::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. -- [[User:RyneEverett|Ryne Everett]] ([[User talk:RyneEverett|talk]]) 19:38, 21 June 2015 (UTC)
:{{bc|<nowiki>reenable [PROFILE]
 
    Reenable the systemd unit for the profile specified. This is effectively a combination of ‘disable’ and ‘enable’.</nowiki>}}
 
: So I'd say the first line of the note is absolutely incorrect. I think your command {{ic|systemctl restart netctl-auto@<interface>.service}} should be listed instead, and we should probably add simple {{ic|netctl restart <profile>}} too in case people don't use {{ic|netctl-auto@.service}}. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:45, 17 July 2013 (UTC)
 
  
::On the contrary, the {{ic|reenable}} command is correct. But it applies to specific profiles, not to {{ic|netctl-auto}}. [[User:Halosghost|Halosghost]] ([[User talk:Halosghost|talk]]) 12:32, 17 July 2013 (UTC)
+
:::Remember that you are configuring ''wpa_supplicant'', not ''netctl'', so the info belongs to [[WPA supplicant]] (it may already be there). -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:27, 21 June 2015 (UTC)
  
::: Right, it does not apply to {{ic|netctl-auto}}, my mistake... But my point is, that it does not manipulate currently running processes, it only deletes & re-creates some symlink. To actually apply changes to some profile, you need to {{ic|netctl restart <profile>}}. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:05, 17 July 2013 (UTC)
+
== DHCP clients ==
  
: Regarding the second line, I have absolutely no idea of what does ''interface is hardware minus'' mean... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:45, 17 July 2013 (UTC)
+
I had the problem described under "Job for netctl@wlan(...).service failed", and changing my netctl profiles to use dhclient solved it. My {{ic|/etc/dhcpcd.conf}} was unchanged from the version in the package, and my {{ic|/etc/dhclient.conf}} was based on {{ic|/usr/share/dhclient/dhclient.conf.example}} from the dhclient client package. These request different options from the DHCP server:
 +
{{hc|/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
  
:I've removed the note as it's not related to that section, it's confusing etc. If someone wants it, feel free to expand and clarify it and put it back. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:49, 25 July 2013 (UTC)
+
# 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
 +
{{hc|/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 {{ic|1=DHCPClient='dhclient'}} from my netctl profiles, and made dhcpcd request the extra options by adding
 +
{{bc|option subnet_mask, broadcast_address, time_offset, routers}}
 +
to {{ic|/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.--[[User:Pdc|Pdc]] ([[User talk:Pdc|talk]]) 19:41, 25 August 2015 (UTC)
 +
 
 +
== <s>Sucks for laptops</s> ==
 +
 
 +
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. {{unsigned|08:07, 14 November 2017‎|Erikvanvelzen}}
 +
 
 +
:[[Code_of_conduct#Personal_topics.2Frants]] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 07:53, 14 November 2017 (UTC)

Latest revision as of 07:54, 14 November 2017

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)