Arch: настройка сети – networkmanager и wpa_supplicant

 

Настройка сети в Arch Linux с помощью networkmanager и wpa_supplicant.

Устанавливаем:

$ sudo pacman -S wpa_supplicant wireless_tools networkmanager network-manager-applet

Находим активные интерфейсы:

$  ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 3c:97:0e:a8:d8:31 brd ff:ff:ff:ff:ff:ff
3: wwp0s20u4i6: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 0a:f4:53:ed:bb:89 brd ff:ff:ff:ff:ff:ff
4: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 6c:88:14:a2:9c:b0 brd ff:ff:ff:ff:ff:ff

Тут enp0s25 – LAN карта, wlp3s0 – WiFi карта.

Добавляем NetworkManager в автозапуск:

$ sudo systemctl enable NetworkManager.service
Created symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service -> /usr/lib/systemd/system/NetworkManager-dispatcher.service.

Отключаем dhcpd, т.к. DHCP будет управляться networkmanager:

$ sudo systemctl disable dhcpcd.service
$ sudo systemctl disable dhcpcd@.service
$ sudo systemctl stop dhcpcd.service
$ sudo systemctl stop dhcpcd@.service

Добавляем wpa_supplicant в автозапуск:

$ sudo systemctl enable wpa_supplicant.service
Created symlink /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service -> /usr/lib/systemd/system/wpa_supplicant.service.
Created symlink /etc/systemd/system/multi-user.target.wants/wpa_supplicant.service -> /usr/lib/systemd/system/wpa_supplicant.service

Перезапускаем LAN и WiFi интерфейсы:

$ sudo ip link set down enp0s25
$ sudo ip link set down wlp3s0
$ sudo systemctl start wpa_supplicant.service
$ sudo systemctl start NetworkManager.service

Проверяем:

$ ip  a s enp0s25
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 3c:97:0e:a8:d8:31 brd ff:ff:ff:ff:ff:ff
    inet 10.11.100.43/24 brd 10.11.100.255 scope global dynamic enp0s25
       valid_lft 691014sec preferred_lft 691014sec
    inet 10.11.100.90/24 brd 10.11.100.255 scope global secondary enp0s25
       valid_lft forever preferred_lft forever
    inet6 fe80::ab3f:c807:d188:5cca/64 scope link 
       valid_lft forever preferred_lft forever

Если приложение nm-applet не появилось в трее – запускаем вручную:

$ nm-applet &
[1] 7388

Проверяем WiFi:

$ ip  a s wlp3s0
4: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 6c:88:14:a2:9c:b0 brd ff:ff:ff:ff:ff:ff
    inet 172.29.78.12/24 brd 172.29.78.255 scope global dynamic wlp3s0

Готово.

Настройка сети через netctl хорошо описана тут>>>.