Difference between revisions of "Talk:Netctl"

From ArchWiki
Jump to: navigation, search
(netctl does not start at boot)
(List known conflicting network managers: re)
 
(89 intermediate revisions by 25 users not shown)
Line 1: Line 1:
==Passphrase in section 3.3==
+
== Explain WPAConfigSection ==
Passphrase in 3.3, what is it about? What is it protecting and how do I set it? <br>
 
-- [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 10:29, 27 May 2013 (UTC)
 
  
:That section is talking about obfuscating the passphrase to connect to a wireless network. By default, netctl stores the passphrase to connect to a wireless network in plaintext. If a nefarious user is able to read the passphrase stored on your system, then they can connect to your wireless network. Obfuscating the passphrase just makes this more difficult to do. Section 3.3 explains how to obfuscate the passphrase.
+
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)
:-- [[User:Jstjohn|Jstjohn]] ([[User talk:Jstjohn|talk]]) 15:29, 27 May 2013 (UTC)
 
  
::Thank you, now it is clear. [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 06:30, 29 May 2013 (UTC)
+
: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)
  
==netctl does not start at boot==
+
::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)
I carefully followed the instructions on this page and on the Beginner's Guide to migrate from netcfg to netctl and, as I said [https://bbs.archlinux.org/viewtopic.php?id=164240 here], netctl does not start at boot. Please tell me what is wrong and, if necessary, complete the instructions.--[[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 14:01, 30 May 2013 (UTC)
+
 
:As a result of the above mentioned thread I added the entry about {{ic|sudo systemctl disable network}} to the netcfg to netctl migration list. Please check and post here if that is wrong.
+
:::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)
 +
 
 +
== 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 {{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
 +
 
 +
# 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)
 +
 
 +
== How to resolve "The interface of network profile '…' is already up" permanently ==
 +
 
 +
I'm getting this when trying to run `sudo netctl start wlpNsM-SSID` after unplugging the Ethernet cable. This right after a reboot and login. How do I get Wi-Fi to ''just work'' after unplugging my Ethernet cable?
 +
 
 +
PS: Whenever I get this error I've checked the state of the Wi-Fi interface just afterwards, and it was always '''down''', so I'm very surprised the workaround even works.
 +
 
 +
[[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 03:40, 20 March 2018 (UTC)
 +
 
 +
== List known conflicting network managers ==
 +
 
 +
Looking at a list of dozens of service names it's hard to know which, if any, conflict with netctl. It would be good if this page mentioned at least the most common culprits, such as NetworkManager. -- [[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 20:30, 4 April 2018 (UTC)
 +
 
 +
:See [[:Category:Network managers]] for the few names known to the wiki, but really, ''any'' network management programs or user scripts would conflict. I don't see a point of adding a list which would be incomplete anyway. Ultimately the user should know what's running on his system. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:12, 4 April 2018 (UTC)
 +
 
 +
::Obviously any service could conflict with any other service. And knowing what is running is very different from knowing whether any of the things conflict. "Warning: Do not enable concurrent, conflicting network services" is only helpful if the user has some way of figuring out what constitutes a conflicting network service. By the way, did you mean [[:Category:Network_configuration]]? -- [[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 21:43, 4 April 2018 (UTC)
 +
 
 +
:::Yes, that's the category, sorry for the mistake. Part of knowing what's running is knowing what services manage network - that's what the warning says to look for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:18, 4 April 2018 (UTC)
 +
 
 +
:::The warning also states "Use systemctl --type=service to ensure that no other network service is running before enabling a netctl profile/service". Seems pretty clear to me that it means no other network daemon should be running. See also [[Network configuration#Network managers]]. -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 22:21, 4 April 2018 (UTC)

Latest revision as of 22:21, 4 April 2018

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)

How to resolve "The interface of network profile '…' is already up" permanently

I'm getting this when trying to run `sudo netctl start wlpNsM-SSID` after unplugging the Ethernet cable. This right after a reboot and login. How do I get Wi-Fi to just work after unplugging my Ethernet cable?

PS: Whenever I get this error I've checked the state of the Wi-Fi interface just afterwards, and it was always down, so I'm very surprised the workaround even works.

L0b0 (talk) 03:40, 20 March 2018 (UTC)

List known conflicting network managers

Looking at a list of dozens of service names it's hard to know which, if any, conflict with netctl. It would be good if this page mentioned at least the most common culprits, such as NetworkManager. -- L0b0 (talk) 20:30, 4 April 2018 (UTC)

See Category:Network managers for the few names known to the wiki, but really, any network management programs or user scripts would conflict. I don't see a point of adding a list which would be incomplete anyway. Ultimately the user should know what's running on his system. -- Lahwaacz (talk) 21:12, 4 April 2018 (UTC)
Obviously any service could conflict with any other service. And knowing what is running is very different from knowing whether any of the things conflict. "Warning: Do not enable concurrent, conflicting network services" is only helpful if the user has some way of figuring out what constitutes a conflicting network service. By the way, did you mean Category:Network_configuration? -- L0b0 (talk) 21:43, 4 April 2018 (UTC)
Yes, that's the category, sorry for the mistake. Part of knowing what's running is knowing what services manage network - that's what the warning says to look for. -- Lahwaacz (talk) 22:18, 4 April 2018 (UTC)
The warning also states "Use systemctl --type=service to ensure that no other network service is running before enabling a netctl profile/service". Seems pretty clear to me that it means no other network daemon should be running. See also Network configuration#Network managers. -- Rdeckard (talk) 22:21, 4 April 2018 (UTC)