Skip to main content
๐ŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy โ€” plus the companion book on Leanpub & Amazon. Start Learning
ip Command Cheat Sheet: Linux Networking 2026
DevOps

ip Command Cheat Sheet: Linux Networking 2026

Linux ip command cheat sheet covering interfaces, routes, VLANs, bonding, and network troubleshooting. Replaces ifconfig and route with modern syntax.

LB
Luca Berton
ยท 1 min read

A quick reference for the ip command โ€” modern Linux network configuration. Bookmark this page.

IP Addresses

# Show all addresses
ip addr show
ip a                          # Short form

# Show specific interface
ip addr show eth0

# Add IP address
sudo ip addr add 10.0.0.5/24 dev eth0

# Remove IP address
sudo ip addr del 10.0.0.5/24 dev eth0

# Flush all addresses on interface
sudo ip addr flush dev eth0
# Show all interfaces
ip link show
ip link show eth0

# Bring interface up/down
sudo ip link set eth0 up
sudo ip link set eth0 down

# Set MTU
sudo ip link set eth0 mtu 9000

# Set MAC address
sudo ip link set eth0 address 00:11:22:33:44:55

# Create VLAN interface
sudo ip link add link eth0 name eth0.100 type vlan id 100

Routes

# Show routing table
ip route show
ip route show table all

# Add route
sudo ip route add 10.1.0.0/16 via 10.0.0.1
sudo ip route add 10.1.0.0/16 via 10.0.0.1 dev eth0

# Add default gateway
sudo ip route add default via 10.0.0.1

# Delete route
sudo ip route del 10.1.0.0/16

# Show route to specific destination
ip route get 8.8.8.8

Neighbors (ARP)

# Show ARP table
ip neigh show
ip neigh show dev eth0

# Add static ARP entry
sudo ip neigh add 10.0.0.100 lladdr 00:11:22:33:44:55 dev eth0

# Delete entry
sudo ip neigh del 10.0.0.100 dev eth0

# Flush ARP cache
sudo ip neigh flush all

Network Namespaces

# List namespaces
ip netns list

# Create namespace
sudo ip netns add test-ns

# Run command in namespace
sudo ip netns exec test-ns ip addr show

# Connect namespaces with veth pair
sudo ip link add veth0 type veth peer name veth1
sudo ip link set veth1 netns test-ns

Monitoring

# Monitor link changes
ip monitor link

# Monitor address changes
ip monitor address

# Monitor route changes
ip monitor route

# Monitor all changes
ip monitor all

Tips and Tricks

  • ip replaces ifconfig, route, and arp โ€” use it for all network operations
  • Use ip -c for colored output
  • Use ip -j for JSON output (scriptable): ip -j addr show | jq .
  • Use ip -s link show for interface statistics (packets, bytes, errors)
  • Changes via ip are temporary โ€” use NetworkManager or /etc/network/interfaces for persistence
#Comparison #DevOps #DevOps #2026
Share:
Free Consultation

Need help implementing this?

I help enterprises design AI infrastructure, Kubernetes platforms, and automation strategies. Free 30-minute discovery call.

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer โ€” then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard โ†’
Luca Berton โ€” The Production AI Expert, Docker Captain

Luca Berton

The Production AI Expert ยท Docker Captain ยท KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min Production AI consultation

Book Now