As a DevOps professional, understanding and troubleshooting network connectivity is a crucial skill. The ip
, ping
, and traceroute
commands are essential tools for managing and diagnosing network issues in a Linux environment.
ip Command
Basic Syntax
ip [options] [object] [command]
Common Objects and Commands
link
: Manage network interfacesaddr
: Manage network addressesroute
: Manage the routing tableneigh
: Manage ARP or NDISC cache entries
Usage Examples
# Show network interfaces
$ ip link show
# Configure an IP address
$ sudo ip addr add 192.168.1.100/24 dev eth0
# Add a default gateway
$ sudo ip route add default via 192.168.1.1