User:WavyEbuilder/systemd-networkd

From Gentoo Wiki
Jump to:navigation Jump to:search

systemd-networkd is a minimal system service that manages networks.

Features

  • Easy and simple configuration
  • Comes with systemd

Installation

systemd-networkd comes as part of the sys-apps/systemd package. To enable the service:

root #systemctl enable systemd-networkd.service

Configuration

Configuration for systemd-networkd is done in /etc/systemd/network

DHCP with a wired adapter:

FILE /etc/systemd/network/20-wired.network
[Match]
Name=en*

[Network]
DHCP=yes

Static IP with a wired adapter:

FILE /etc/systemd/network/20-wired.network
[Match]
Name=en*

[Network]
Address=192.168.1.99
Gateway=192.168.1.1
DNS=192.168.1.1

DHCP with a wireless adapter:

FILE /etc/systemd/network/30-wireless.network
[Match]
Name=wl*

[Network]
DHCP=yes
IgnoreCarrierLoss=3s