Network Configuration & Management
Scenario: Diagnosing and Configuring Network Connectivity for a New Web Server
Objective: A new web server (web01) has been deployed but is not accessible from the local network, and it can't reach external sites. You need to diagnose the issue and configure its network interface correctly. The server should get its IP via DHCP initially, then you'll assign a static IP.
🌐 Interface Management
Learn to configure and manage network interfaces using modern Linux tools:
- ip addr - View and configure IP addresses
- ip link - Manage network interface properties
- nmcli - NetworkManager command-line interface
- dhclient - DHCP client configuration
🛣️ Routing & Gateway Configuration
Control how network traffic flows through your system:
- ip route - Display and modify routing tables
- ip route add - Add static routes
- traceroute - Trace network path to destinations
🔍 Network Diagnostics
Troubleshoot connectivity and analyze network performance:
- ping - Test basic connectivity
- netstat/ss - Display active connections and listening ports
- nslookup/dig - DNS resolution and debugging
🔒 Network Security
Secure your network connections and control traffic flow:
- iptables - Configure firewall rules
- ufw - Uncomplicated Firewall management
- ss -tuln - Monitor listening services
💡 Pro Tips
- Always backup network configuration before making changes
- Use ip commands instead of deprecated ifconfig
- Test connectivity after each configuration change
- Document your network topology and IP assignments
- Use NetworkManager for desktop systems, systemd-networkd for servers