Skip to content

Network

szorfein edited this page Oct 18, 2020 · 4 revisions

Network

Here how you can enable the network on.

Wifi

Found your wifi card.

# ip a
---
5: wlan0: ---

Start the iwd daemon

# systemctl start iwd

Use iwctl to connect on your wifi box

# iwctl --passphrase passphrase station wlan0 connect SSID

Configure

For the DHCP:

# cat > /etc/systemd/network/50-dhcp.network
[Match]
Name=wl*

[Network]
DHCP=yes
^D

For the DNS query:

# cat >> /etc/systemd/resolved.conf
[Resolve]
DNS = 1.1.1.1
^D

Service

# systemctl start systemd-networkd
# systemctl start systemd-resolved

Enable service for the next reboot

# systemctl enable systemd-networkd
# systemctl enable systemd-resolved
# systemctl enable iwd

Ethernet

Configure

# cat > /etc/systemd/network/50-dhcp.network
[Match]
Name=en*

[Network]
DHCP=yes
^D

# cat >> /etc/systemd/resolved.conf
[Resolve]
DNS = 1.1.1.1
^D

Start service

# systemctl start systemd-networkd
# systemctl enable systemd-networkd

# systemctl start systemd-resolved
# systemctl enable systemd-resolved

Test

# ping -c1 gentoo.org
Clone this wiki locally