NetworkManager: Difference between revisions
Guest09248 (talk | contribs) |
Guest09248 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
NetworkManager is a program that provides automatic detection and configuration for systems to connect to networks. | [https://networkmanager.dev/ NetworkManager] is a program that provides automatic detection and configuration for systems to connect to networks. | ||
== Installation == | == Installation == | ||
{{Cmd|# apk add {{Pkg|networkmanager}}}} | |||
NetworkManager comes with a command line interface and a curses-based interface, <code>nmcli</code> and <code>nmtui</code> respectively or you can use a additional gui interface: | |||
* {{Pkg|plasma-nm}} for Plasma integration and applet | * {{Pkg|plasma-nm}} for Plasma integration and applet | ||
* {{Pkg|network-manager-applet}} for a GTK system tray applet | * {{Pkg|network-manager-applet}} for a GTK system tray applet | ||
After installation start NetworkManager: | |||
<pre>rc-service networkmanager start</pre> | <pre>rc-service networkmanager start</pre> | ||
Line 17: | Line 19: | ||
{{Expand|the wpa_supplicant section is a work in progress (Please test before adding anything here)}} | {{Expand|the wpa_supplicant section is a work in progress (Please test before adding anything here)}} | ||
<!-- Disable '''networking''' and '''wpa_supplicant''' boot services--> | |||
* Follow: [[Wi-Fi#wpa_supplicant]] and [[Wi-Fi#Automatic_Configuration_on_System_Boot]] | |||
{{Note|{{Pkg|wpa_supplicant}} configuration might not be required, if it isnt it may be a good idea to have it setup just as a fallback}} | |||
<br> | |||
Now open {{Path|/etc/NetworkManager/NetworkManager.conf}} in a text editor and change it to something like this: | |||
{{Cat|/etc/NetworkManager/NetworkManager.conf|<nowiki>[main] | {{Cat|/etc/NetworkManager/NetworkManager.conf|<nowiki>[main] | ||
dhcp=internal | dhcp=internal | ||
plugins=ifupdown,keyfile | |||
[ifupdown] | |||
managed=true | managed=true | ||
[device] | [device] | ||
wifi.scan-rand-mac-address=yes | |||
wifi.backend=wpa_supplicant</nowiki>}} | wifi.backend=wpa_supplicant</nowiki>}} | ||
{{Note|if these options done work on your system you can change them as necessary}} | |||
<br> | |||
Now you need to stop conflicting services: | |||
{{Cmd|# rc-service networking stop}} | |||
and | |||
{{Cmd|# rc-service wpa_supplicant stop}} | |||
<br> | |||
Now restart NetworkManager: | |||
{{Cmd|# rc-service networkmanager restart}} | |||
<br> | |||
Now connect to a network using one of the interfaces mentioned in [[#NetworkManagerInstallation|Installation]] | |||
<br> | |||
If that connects and stays connected with no issues enable the {{Path|networkmanager}} service and disable the {{Path|networking}} and {{Path|wpa_supplicant}} boot services: | |||
{{Cmd|# rc-update add networkmanager}} | |||
{{Cmd|# rc-update del networking boot}} | |||
{{Cmd|# rc-update del wpa_supplicant boot}} | |||
<br> | <br> |
Revision as of 19:39, 4 January 2022
NetworkManager is a program that provides automatic detection and configuration for systems to connect to networks.
Installation
# apk add networkmanager
NetworkManager comes with a command line interface and a curses-based interface, nmcli
and nmtui
respectively or you can use a additional gui interface:
- plasma-nm for Plasma integration and applet
- network-manager-applet for a GTK system tray applet
After installation start NetworkManager:
rc-service networkmanager start
Wireless networks
wpa_supplicant backend
This material needs expanding ... the wpa_supplicant section is a work in progress (Please test before adding anything here) |
Now open /etc/NetworkManager/NetworkManager.conf in a text editor and change it to something like this:
Contents of /etc/NetworkManager/NetworkManager.conf
Now you need to stop conflicting services:
# rc-service networking stop
and
# rc-service wpa_supplicant stop
Now restart NetworkManager:
# rc-service networkmanager restart
Now connect to a network using one of the interfaces mentioned in Installation
If that connects and stays connected with no issues enable the networkmanager service and disable the networking and wpa_supplicant boot services:
# rc-update add networkmanager
# rc-update del networking boot
# rc-update del wpa_supplicant boot
iwd backend
NetworkManager supports wireless networks through iwd. After installation, enable the server and restart NetworkManager:
rc-service iwd start rc-service networkmanager restart
To use iwd though, you've have to edit NetworkManager's configuration because it still defaults to wpa_supplicant instead. Add the following to /etc/NetworkManager/NetworkManager.conf:
[device] wifi.backend=iwd
VPN support
Since version 1.16, NetworkManager has support for Wireguard[1].
Support for other VPN types is provided by plugins. They are provided in the following packages:
- networkmanager-openvpn for OpenVPN