Arch Linux IP Routing - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux IP Routing Guide
Complete beginner-friendly guide to IP routing on Arch Linux, including routing tables, static routes, and network routing configuration.
Table of Contents
Routing Tables
View Routes
List routes:
# List routes
ip route show
# Or
route -n
# Show routing table
ip route list
Static Routes
Add Route
Add static route:
# Add route
sudo ip route add 192.168.2.0/24 via 192.168.1.1
# Or permanent
# Edit /etc/systemd/network/route-eth0
Delete Route
Remove route:
# Delete route
sudo ip route del 192.168.2.0/24
Routing Configuration
Persistent Routes
Make permanent:
# Create route file
sudo vim /etc/systemd/network/route-eth0
Add:
[Route]
Destination=192.168.2.0/24
Gateway=192.168.1.1
Troubleshooting
Routing Issues
Check routing:
# Check routes
ip route show
# Test connectivity
ping -r 192.168.2.1
# Trace route
traceroute 192.168.2.1
Summary
This guide covered routing tables, static routes, routing configuration, and troubleshooting.
Next Steps
- Arch Linux Networking - Network setup
- Arch Linux Network Utilities - Network tools
- ArchWiki Routing: https://wiki.archlinux.org/title/Network_configuration#Routing_table
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.