diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 76efc55ef..581725384 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -30,9 +30,6 @@ - [Date and Time](./config/date-time.md) - [Kernel](./config/kernel.md) - [Network](./config/network/index.md) - - [Interface Names](./config/network/interface-names.md) - - [Static Configuration](./config/network/static.md) - - [dhcpcd](./config/network/dhcpcd.md) - [iptables](./config/network/iptables.md) - [wpa_supplicant](./config/network/wpa_supplicant.md) - [iwd](./config/network/iwd.md) diff --git a/src/config/network/connman.md b/src/config/network/connman.md index c5fac7a87..403987d27 100644 --- a/src/config/network/connman.md +++ b/src/config/network/connman.md @@ -7,7 +7,7 @@ possible. The `connman` package contains the basic utilities to run ConnMan. ## Starting ConnMan To enable the ConnMan daemon, first [disable](../services/index.md) any other -network managing services like [dhcpcd](./dhcpcd.md), +network managing services like [dhcpcd](./index.md#dhcpcd), [wpa_supplicant](./wpa_supplicant.md), or `wicd`. These services all control network interface configuration, and interfere with each other. diff --git a/src/config/network/dhcpcd.md b/src/config/network/dhcpcd.md deleted file mode 100644 index 3c1ea0cc4..000000000 --- a/src/config/network/dhcpcd.md +++ /dev/null @@ -1,22 +0,0 @@ -# dhcpcd - -To run [dhcpcd(8)](https://man.voidlinux.org/dhcpcd.8) on all interfaces you can -enable the `dhcpcd` service. - -If you want to run dhcpcd just on a specific interface you can use the -`dhcpcd-eth0` service if this matches your interface name. Otherwise you can -just copy `dhcpcd-eth0` and change it to match your interface. - -``` -$ ip link show -1: lo: 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: enp3s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 - link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:f -# cp -R /etc/sv/dhcpcd-eth0 /etc/sv/dhcpcd-enp3s0 -# sed -i 's/eth0/enp3s0/' /etc/sv/dhcpcd-enp3s0/run -# ln -s /etc/sv/dhcpcd-enp3s0 /var/service/ -``` - -For more information on configuring dhcpcd see -[dhcpcd.conf(5)](https://man.voidlinux.org/dhcpcd.conf.5) diff --git a/src/config/network/index.md b/src/config/network/index.md index ed11e5072..702560e08 100644 --- a/src/config/network/index.md +++ b/src/config/network/index.md @@ -1,5 +1,59 @@ # Network -Network configuration in Void Linux can be done with different methods. The -default installation comes with the -[dhcpcd(8)](https://man.voidlinux.org/dhcpcd.8) service enabled. +Network configuration in Void Linux can be done in several ways. The default +installation comes with the [dhcpcd(8)](https://man.voidlinux.org/dhcpcd.8) +service enabled. + +## Interface Names + +Newer versions of [udev(7)](https://man.voidlinux.org/udev.7) no longer use the +traditional Linux naming scheme for interfaces (`eth0`, `eth0`, `wlan0`, ...). + +This behavior can be reverted by adding `net.ifnames=0` to the [kernel +cmdline](../kernel.md#cmdline). + +## Static Configuration + +A simple way to configure a static network at boot is to add the necessary +[ip(8)](https://man.voidlinux.org/ip.8) commands to the `/etc/rc.local` file: + +``` +ip link set dev eth0 up +ip addr add 192.168.1.2/24 brd + dev eth0 +ip route add default via 192.168.1.1 +``` + +## dhcpcd + +To run [dhcpcd(8)](https://man.voidlinux.org/dhcpcd.8) on all interfaces, enable +the `dhcpcd` service. + +To run `dhcpcd` only on a specific interface, copy the `dhcpcd-eth0` service and +modify it to match your interface: + +``` +$ ip link show +1: lo: 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: enp3s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 + link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:f +# cp -R /etc/sv/dhcpcd-eth0 /etc/sv/dhcpcd-enp3s0 +# sed -i 's/eth0/enp3s0/' /etc/sv/dhcpcd-enp3s0/run +# ln -s /etc/sv/dhcpcd-enp3s0 /var/service/ +``` + +For more information on configuring `dhcpcd`, refer to +[dhcpcd.conf(5)](https://man.voidlinux.org/dhcpcd.conf.5) + +## Wireless + +Before using wireless networking, use +[rfkill(8)](https://man.voidlinux.org/rfkill.8) to check whether the relevant +interfaces are soft- or hard-blocked. + +Void provides several ways to connect to wireless networks: + +- [wpa_supplicant](./wpa_supplicant.md) +- [iwd](./iwd.md) +- [NetworkManager](./networkmanager.md) +- [ConnMan](./connman.md) diff --git a/src/config/network/interface-names.md b/src/config/network/interface-names.md deleted file mode 100644 index a57cd50f2..000000000 --- a/src/config/network/interface-names.md +++ /dev/null @@ -1,7 +0,0 @@ -# Interface Names - -In newer versions udev changed the well known traditional Linux naming scheme -(`eth0`, `eth0`, `wlan0`, ...). - -This behavior can be reverted by adding `net.ifnames=0` to the [kernel -cmdline](../kernel.md#cmdline). diff --git a/src/config/network/networkmanager.md b/src/config/network/networkmanager.md index 2e3d319e1..b4e6fe97a 100644 --- a/src/config/network/networkmanager.md +++ b/src/config/network/networkmanager.md @@ -10,9 +10,9 @@ package contains the basic utilities to run To enable the [NetworkManager(8)](https://man.voidlinux.org/NetworkManager.8) daemon, first [disable](../services/index.md) any other network managing -services like [dhcpcd](./dhcpcd.md), [wpa_supplicant](./wpa_supplicant.md), or -`wicd`. These services all control network interface configuration, and -interfere with each other. +services like [dhcpcd](./index.md#dhcpcd), +[wpa_supplicant](./wpa_supplicant.md), or `wicd`. These services all control +network interface configuration, and interfere with each other. Also, ensure that the `dbus` service is [enabled](../services/index.md) and running. [NetworkManager(8)](https://man.voidlinux.org/NetworkManager.8) uses diff --git a/src/config/network/static.md b/src/config/network/static.md deleted file mode 100644 index f30ad375f..000000000 --- a/src/config/network/static.md +++ /dev/null @@ -1,14 +0,0 @@ -# Static Configuration - -A static network in Void Linux can be configured with -[ip(8)](https://man.voidlinux.org/ip.8). - -A simple way to configure the static network at boot is to add the necessary -[ip(8)](https://man.voidlinux.org/ip.8) commands to the `/etc/rc.local` file. - -``` -# Static IP configuration via iproute -ip link set dev eth0 up -ip addr add 192.168.1.2/24 brd + dev eth0 -ip route add default via 192.168.1.1 -```