ip命令
ip命令例子
Assign a IP Address to Specific Interface / remove IP Address
# ip addr add 192.168.50.5 dev eth1
# ip addr del 192.168.50.5/24 dev eth1
Enable Network Interface / Disable Network Interface
# ip link set eth1 up
# ip link set eth1 down
Add Static Route / Remove Static Route
# ip route add 10.10.20.0/24 via 192.168.50.100 dev eth0
# ip route del 10.10.20.0/24
Add Default Gateway
# ip route add default via 192.168.50.100
Check an IP Address / Check Route Table
# ip addr show
# ip route show