Manjaro Network Configuration Guide
Properly configuring your network in Manjaro Linux is essential for establishing reliable internet connectivity and enabling seamless communication between devices. Whether you’re setting up a home server, configuring a workstation, or simply trying to optimize your network performance, understanding how to manage network settings in Manjaro is a valuable skill. This comprehensive guide covers everything from basic network concepts to advanced configuration techniques, providing both graphical and command-line approaches to suit your preferences.
Introduction
Manjaro, like most modern Linux distributions, comes with robust networking capabilities that can be configured through various methods. The distribution primarily uses NetworkManager as its default network management tool, which offers a user-friendly approach to handling connections. However, Manjaro also supports alternative solutions like systemd-networkd and dhcpcd for those who prefer different networking paradigms.
Network configuration in Manjaro can range from simple automatic setups to complex manual configurations depending on your needs. Whether you’re connecting to wireless networks, setting up static IP addresses, or troubleshooting connectivity issues, Manjaro provides all the necessary tools and capabilities to manage your networking environment effectively.
This guide aims to demystify Manjaro’s network configuration process, helping both beginners and experienced users navigate the sometimes complex world of Linux networking with confidence.
Understanding Network Interfaces in Manjaro
Before diving into configuration, it’s important to understand how Manjaro identifies and manages network interfaces. This knowledge forms the foundation for all network-related tasks.
Types of Network Interfaces
Manjaro uses predictable network interface naming, which means interface names follow specific patterns based on their type:
- Ethernet interfaces typically start with “en” (e.g., enp0s3)
- Wireless interfaces usually begin with “wl” (e.g., wlan0 or wlp3s0)
- The loopback interface is always named “lo”
These naming conventions help in identifying the physical characteristics and location of network devices in your system.
Checking Network Information
To view your current network interfaces and their status, you can use several commands:
$ ip a
This command displays detailed information about all network interfaces, including their IP addresses, MAC addresses, and state.
For a more comprehensive overview focused on NetworkManager-managed connections, use:
$ nmcli device show | grep IP4
This command filters the output to show only IPv4-related information, including addresses, gateways, DNS servers, and routes.
Understanding the output of these commands helps you verify:
- Whether your interface has an IP address
- If the subnet mask is correctly configured
- Whether your gateway is properly set
- If DNS servers are configured correctly
- If routing is working as expected
Basic Network Configuration Tools
Manjaro offers multiple tools for network configuration, catering to different user preferences and expertise levels.
NetworkManager Overview
NetworkManager is Manjaro’s default network management solution. It consists of several components:
- A background daemon that handles the connections
- Command-line tools like nmcli for terminal-based management
- Text-based UI tool nmtui for semi-graphical configuration
- GUI applets that integrate with desktop environments
NetworkManager automatically manages network connections, making it ideal for most desktop and laptop users who need flexibility and ease of use.
GUI-based Tools
Depending on your desktop environment, Manjaro offers different GUI tools for network management:
- XFCE Environment:
- Right-click on the network icon in the taskbar
- Select “Edit Connections” to configure networks
- Use “Connection Information” to view current settings
- KDE Environment:
- Use the Network applet in the system tray
- Access network settings through System Settings
- GNOME Environment:
- Access network settings through the top-right menu
- Use GNOME’s integrated network management tools
These GUI tools provide intuitive interfaces for common networking tasks without requiring command-line knowledge.
Terminal-based Tools
For users who prefer the command line or need to automate network configuration, Manjaro offers several powerful tools:
- nmcli – NetworkManager’s command-line interface:
$ nmcli connection show
$ nmcli device status
- nmtui – NetworkManager’s text user interface:
$ nmtui
This launches a semi-graphical interface in the terminal.
- Basic networking commands:
$ ip a # Show interface information
$ ping -c 3 8.8.8.8 # Test connectivity
$ tracepath 8.8.8.8 # Trace network path
These tools provide powerful capabilities for inspecting and configuring network settings from the terminal.
Configuring DHCP Connections
Dynamic Host Configuration Protocol (DHCP) is the most common method for obtaining network settings automatically from a router or DHCP server.
Understanding DHCP
When your Manjaro system boots up, NetworkManager automatically attempts to connect to available DHCP servers through enabled network interfaces. The DHCP server then provides:
- IP address
- Subnet mask
- Default gateway
- DNS servers
- Lease time and other parameters
This automatic configuration makes DHCP ideal for most home and office environments where network details might change occasionally.
Setting up DHCP via GUI
- Access your network connections through your desktop environment’s network applet
- Edit the connection you want to configure
- Navigate to the IPv4 (or IPv6) settings tab
- Select “Automatic (DHCP)” from the Method dropdown
- Save your changes and reconnect to apply them
Setting up DHCP via Command Line
Using nmcli, you can configure DHCP with:
$ nmcli connection modify "Connection Name" ipv4.method auto
$ nmcli connection up "Connection Name"
To verify your DHCP configuration:
$ ip a
$ nmcli device show | grep IP4
DHCP is Manjaro’s default connection method, so minimal configuration is typically required unless you’ve previously set up static addressing.
Static IP Configuration via GUI
While DHCP works well for most scenarios, static IP configuration is essential for servers, network devices, or situations requiring consistent addressing.
When to Use Static IP Addresses
Static IPs are particularly useful for:
- Server configurations where other devices need to consistently reach your machine
- Network stability requirements where IP changes would cause disruption
- Environments without DHCP servers
- Situations requiring specific network parameters
Step-by-Step Static IP Setup with NetworkManager GUI
This guide focuses on XFCE as it’s Manjaro’s flagship desktop environment, but the process is similar for other desktops:
- Right-click on the network icon in the right side of the taskbar
- Select “Edit Connections”
- Highlight your current connection and click the cogwheel (edit) icon
- Navigate to the “IPv4 Settings” tab
- Change the “Method” dropdown from “Automatic (DHCP)” to “Manual”
- Click “Add” to create a new address entry
- Enter your desired static IP address (e.g., 192.168.1.10)
- Enter the subnet mask (e.g., 255.255.255.0 or /24)
- Enter your gateway address (typically your router’s IP, e.g., 192.168.1.1)
- Under DNS servers, enter your preferred DNS (e.g., 8.8.8.8, 8.8.4.4 for Google DNS)
- Click “Save”
- Disconnect and reconnect to apply the changes
Desktop Environment-Specific Instructions
While the general approach is similar across desktop environments, the menu locations and appearances may differ:
- XFCE: Access through the network icon in the system tray
- KDE: Use the Network settings in System Settings or the network applet
- GNOME: Access through the top-right menu and Settings application
After applying changes, verify your new static IP using the connection information tool or the ip a
command.
Static IP Configuration via Command Line
For server environments or users who prefer terminal-based management, Manjaro offers robust command-line options for static IP configuration.
Using NetworkManager CLI (nmcli)
NetworkManager’s command-line interface provides a powerful way to configure static IP addresses:
$ nmcli connection modify "Connection Name" ipv4.method manual ipv4.addresses "192.168.1.10/24" ipv4.gateway "192.168.1.1" ipv4.dns "8.8.8.8,8.8.4.4"
$ nmcli connection up "Connection Name"
This command sets a static IP with gateway and DNS in one operation. To verify:
$ nmcli device show | grep IP4
Using systemd Network Configuration
For systems where you prefer systemd-networkd over NetworkManager:
- First, disable NetworkManager:
$ sudo systemctl disable --now NetworkManager.service
- Create a configuration file for your interface (replace enp0s3 with your actual interface name):
$ sudo nano /etc/systemd/network/enp0s3.network
- Add the following content, adjusting the values for your network:
[Match]
Name=enp0s3
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=8.8.8.8
DNS=8.8.4.4
- Enable and start systemd-networkd:
$ sudo systemctl enable --now systemd-networkd.service
- Verify your configuration:
$ ip a
This method provides a more “traditional” Linux approach to network configuration through config files rather than NetworkManager’s database.
DNS Configuration
Domain Name System (DNS) translates human-readable domain names into IP addresses, making it a critical component of network configuration.
Understanding DNS in Manjaro
Manjaro typically gets DNS settings from either:
- DHCP server (automatic)
- Manual configuration
- systemd-resolved service
The system stores DNS configuration in several possible locations, with priority given to NetworkManager-managed connections when it’s active.
Configuring DNS Servers
Via NetworkManager GUI:
- Edit your connection settings
- In the IPv4 or IPv6 tab, enter your preferred DNS servers
- Save and reconnect
Via command line:
$ nmcli connection modify "Connection Name" ipv4.dns "8.8.8.8,1.1.1.1"
$ nmcli connection up "Connection Name"
Using /etc/resolv.conf (if not managed by NetworkManager):
$ sudo nano /etc/resolv.conf
Add your DNS servers:
nameserver 8.8.8.8
nameserver 1.1.1.1
Using Alternative DNS Services
Several public DNS services offer advantages:
- Google DNS (8.8.8.8, 8.8.4.4): Reliable and fast
- Cloudflare (1.1.1.1, 1.0.0.1): Privacy-focused and fast
- Quad9 (9.9.9.9): Security-focused with malicious domain blocking
Consider privacy implications when choosing a DNS provider, as they can potentially log your browsing activity.
Working with Wireless Networks
Wireless connectivity is essential for laptops and many desktop configurations in modern networks.
Wireless Hardware Support
Before configuring wireless networks, check that your hardware is properly detected:
$ ip a
Look for interfaces starting with “wl” to confirm wireless hardware detection.
If your wireless hardware isn’t detected, you might need to install drivers:
$ sudo pacman -S linux-firmware
For specific hardware, additional packages might be required.
Connecting to Wireless Networks
Using NetworkManager applet:
- Click on the network icon in your system tray
- Select your wireless network from the list
- Enter the security password when prompted
- NetworkManager will automatically connect to this network in the future
Using nmcli:
$ nmcli device wifi list
$ nmcli device wifi connect "SSID" password "yourpassword"
For networks with various security protocols (WPA, WPA2, WPA3), NetworkManager handles the details automatically in most cases.
Troubleshooting Wireless Issues
Common wireless problems include:
- Weak signal: Try repositioning your computer or router
- Driver issues: Check for missing firmware packages
- Hardware switches: Ensure your wireless isn’t disabled by hardware switches
- Interference: Change WiFi channels in your router settings
Diagnostic commands:
$ rfkill list all # Check if wireless is soft/hard blocked
$ dmesg | grep -i wifi # Check kernel messages for wireless issues
$ journalctl -u NetworkManager # Check NetworkManager logs
Network Manager vs. dhcpcd
Manjaro supports multiple network management approaches, each with its own advantages.
Comparing Network Management Solutions
NetworkManager:
- Comprehensive GUI and CLI tools
- Excellent for desktop use with changing networks
- Supports VPNs, WiFi, mobile broadband
- Automatic handling of network changes
- Well-integrated with desktop environments
dhcpcd:
- Lighter weight
- More traditional approach
- Better for fixed, server-like configurations
- Less automated, more predictable behavior
- Simpler configuration
Switching from NetworkManager to dhcpcd
If you prefer dhcpcd over NetworkManager:
- Disable NetworkManager:
$ sudo systemctl disable --now NetworkManager.service
- Enable dhcpcd:
$ sudo systemctl enable --now dhcpcd.service
- To use a static IP with dhcpcd, edit
/etc/dhcpcd.conf
:
$ sudo nano /etc/dhcpcd.conf
- Add your configuration:
interface eth0
static ip_address=192.168.1.10/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8
- Restart dhcpcd:
$ sudo systemctl restart dhcpcd.service
This approach is particularly useful for server configurations where simplicity and consistency are valued over flexibility.
Advanced Network Configuration
For users with more complex networking needs, Manjaro supports advanced configurations.
Network Bonding and Bridging
Network bonding combines multiple interfaces for increased bandwidth or redundancy:
$ sudo pacman -S ifenslave
Create a bonding configuration in /etc/systemd/network/bond.netdev
:
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=active-backup
Network bridging is useful for virtualization:
$ sudo pacman -S bridge-utils
VPN Configuration
Manjaro supports various VPN technologies:
- OpenVPN: Install the NetworkManager OpenVPN plugin:
$ sudo pacman -S networkmanager-openvpn
- WireGuard: Install WireGuard packages:
$ sudo pacman -S wireguard-tools
After installation, VPN connections can be configured through NetworkManager’s GUI or CLI tools.
Proxy Settings
System-wide proxy configuration can be set in /etc/environment
:
http_proxy=http://proxyserver:port/
https_proxy=http://proxyserver:port/
no_proxy=localhost,127.0.0.1
For application-specific proxy settings, refer to each application’s documentation.
Network Troubleshooting
Even well-configured networks can encounter issues. Here’s how to diagnose and fix common problems.
Common Network Issues
- Connection drops:
- Check physical connections
- Verify router or access point functionality
- Investigate signal strength for wireless connections
- IP address conflicts:
- Use
arp -a
to detect duplicate IPs - Configure static IPs outside DHCP ranges
- Use
- DNS resolution problems:
- Test with
ping 8.8.8.8
vs.ping google.com
- If IP pings work but domains don’t, it’s a DNS issue
- Test with
Diagnostic Tools
Manjaro provides several diagnostic tools:
$ ping -c 3 8.8.8.8 # Test basic connectivity
$ tracepath google.com # Trace the network path
$ dig google.com # Check DNS resolution
$ nmcli device show # Check NetworkManager's view
$ journalctl -u NetworkManager # Check logs for issues
Restoring Network Functionality
When all else fails:
- Restart the network service:
$ sudo systemctl restart NetworkManager
- Reset network interface:
$ sudo ip link set enp0s3 down
$ sudo ip link set enp0s3 up
- Check for hardware issues with
dmesg
.
Network Security Considerations
Once your network is configured, securing it is essential to protect your system.
Basic Firewall Configuration
Manjaro can use the Uncomplicated Firewall (ufw) for simple firewall management:
$ sudo pacman -S ufw
$ sudo ufw enable
$ sudo ufw allow ssh
$ sudo ufw status
This creates a basic firewall that allows SSH connections while blocking unwanted traffic.
Network Hardening Techniques
Additional security measures include:
- Disabling unnecessary services:
$ sudo systemctl disable --now avahi-daemon
- Securing wireless networks with WPA3 if possible
- Using strong passwords for all network services
- Considering network segregation for sensitive devices