Link
  1. How to add/remove an IP address to interface (volatile)
  2. How to enable/disable an interface
  3. How to display route table
  4. How to add/remove static routes
  5. Resources and More

How to add/remove an IP address to interface (volatile)

# adding an address
ip addr add 172.16.0.10/24 dev eth2
# removing an address
ip addr del 172.16.0.10/24 dev eth2

How to enable/disable an interface

# enabling an interface
ip link set eth2 up
# disabling an interface
ip link set eth2 down

How to display route table

ip route show

How to add/remove static routes

# adding a static route
ip route add 10.10.10.0/24 via 192.168.0.1 dev eth0
# removing a static route
ip route del 10.10.10.0/24
# adding a default gateway
ip route add default via 192.168.0.1

Resources and More