Documentation Index
Fetch the complete documentation index at: https://mintlify.com/joaopedroaa/dotfiles/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This guide covers network configuration for Arch Linux usingdhcpcd for DHCP client functionality and systemd-resolved for DNS resolution.
DHCP Configuration (dhcpcd)
Installation
Configuration File
The dhcpcd configuration is located at/etc/dhcpcd.conf.
Key Settings
Client Identification Use DUID (DHCP Unique Identifier) for client identification:DHCP Options
Requested Options Specify which options to request from the DHCP server:domain_name_servers- DNS server addressesdomain_name- Domain namedomain_search- DNS search domainsclassless_static_routes- Static routing informationinterface_mtu- Network MTU settingshost_name- Request hostname from network
IPv6 Configuration
SLAAC (Stateless Address Autoconfiguration) Generate stable private IPv6 addresses:DNS Resolution Hook
Disable dhcpcd’s automatic resolv.conf management:systemd-resolved to manage DNS configuration instead.
DNS Configuration (systemd-resolved)
Installation and Setup
systemd-resolved is typically pre-installed on Arch Linux.
Enable and start the service:
Symlink Configuration
Link the stub resolver to/etc/resolv.conf:
DNS Stub Listener
The systemd-resolved stub listener provides DNS resolution at:/etc/resolv.conf (symlinked to /run/systemd/resolve/stub-resolv.conf):
edns0- Enable DNS Extension Mechanismstrust-ad- Trust DNSSEC authenticated data
Check DNS Status
View current DNS configuration and upstream servers:Manual DNS Configuration
To set custom DNS servers for a specific interface:Hosts File
The/etc/hosts file provides static hostname-to-IP mappings.
Basic Configuration
IPv6 Addresses
Broadcast Address
Ad Blocking with Hosts File
The example configuration uses Steven Black’s unified hosts file for blocking ads, fake news, gambling, porn, and social media:Network Testing
Check Interface Status
Test Connectivity
View DHCP Leases
Monitor Network Traffic
Troubleshooting
No Network Connection
-
Check interface status:
-
Ensure dhcpcd is running:
-
Restart networking:
DNS Resolution Fails
-
Check systemd-resolved status:
-
Verify
/etc/resolv.confsymlink: -
Restart systemd-resolved:
Interface Not Getting IP Address
Manually request a new lease:File Locations
- dhcpcd configuration:
/etc/dhcpcd.conf - DNS configuration:
/etc/resolv.conf→/run/systemd/resolve/stub-resolv.conf - Hosts file:
/etc/hosts - DHCP leases:
/var/lib/dhcpcd/*.lease