Network management tools in Linux help administrators configure, monitor, and troubleshoot network interfaces and connections efficiently.
1. IP Command
The ip
command is a powerful modern network configuration utility.
Basic IP Command Usage
## Show network interfaces
ip link show
## Show IP addresses
ip addr show
## Configure IP address
sudo ip addr add 192.168.1.100/24 dev eth0
2. NetworkManager (nmcli)
NetworkManager provides a comprehensive CLI for network management.
NetworkManager Commands
## List network connections
nmcli connection show
## Add a new connection
nmcli connection add type ethernet con-name myconnection
## Modify connection
nmcli connection modify myconnection ipv4.addresses 192.168.1.100/24
3. Ping
## Test network connectivity
ping google.com
## Specify packet count
ping -c 4 google.com
4. Traceroute
## Trace network path
traceroute google.com
Network Configuration Workflow
graph TD
A[Network Management] --> B{Tools}
B --> |Configuration| C[ip command]
B --> |Connection Management| D[NetworkManager]
B --> |Diagnostics| E[Ping/Traceroute]
C --> F[Interface Setup]
D --> G[Connection Control]
E --> H[Network Troubleshooting]
Tool |
Primary Function |
Complexity |
Use Case |
ip |
Low-level configuration |
Advanced |
Direct interface management |
nmcli |
Connection management |
Intermediate |
User-friendly configuration |
ifconfig |
Legacy tool |
Basic |
Simple network info |
Advanced Network Management
5. ss (Socket Statistics)
## List all network connections
ss -tuln
## Show TCP connections
ss -t
6. netstat Alternative
## Display network statistics
netstat -tuln
Best Practices
- Use modern tools like
ip
and nmcli
- Understand each tool's specific use case
- Always verify configurations
- Use diagnostic tools for troubleshooting
Troubleshooting Network Issues
Common Diagnostic Commands
## Check network interfaces
ip link
## Verify IP configuration
ip addr
## Test connectivity
ping -c 4 localhost
At LabEx, we recommend practicing these tools in a controlled environment to develop practical networking skills.
Security Considerations
- Use sudo for system-level network changes
- Be cautious when modifying network configurations
- Understand the impact of each command
- Always have a backup configuration