Linux静态路由及临时IP配置
Linux 静态路由相关命令
1、查看当前路由表:
route -n
2、添加静态路由:
route add -net 10.10.170.0/24 gw 10.10.180.254
3、删除静态路由:
route del -net 10.10.170.0/24 gw 10.10.180.254
Linux 临时IP地址添加与删除
1、添加临时IP:
ifconfig bond0 192.168.1.11 netmask 255.255.255.0
可以看到增加了12.168.131.11
2、删除临时IP:
ip a/addr/address del/delete 192.168.1.1/24 dev eth0
可以看到已经删除了192.168.131.11