1- Linux添加永久路由
vi /etc/sysconfig/network-scripts/route-eth1
ADDRESS0=192.168.10.0
NETMASK0=255.255.255.0
GATEWAY=10.10.10.254
2- 添加ip及其路由
ip
link:网络接口属性
addr:协议地址
route:路由
link
show
ip -s link show //详细信息包
ip link show
set
ip link set dev [up|down]
ip link set eth1 up
addr
add
ip addr add ADDRESS dev DEV
del
ip addr del ADDRESS dev DEV
show
ip addr show dev DEV to PREFIX
flush
ip addr flush dev DEV to PREFIX
ip addr add 192.168.100.3/24 dev eth1 label eth1:0
ip addr del 10.2.2.2/8 dev eth1 //删除地址
ip addr show
ip addr flush eth1 to 10/8 //删掉10/8 删除地址
ip route add to 10.0.0.0/8 dev eht0 via 172.16.0.1 //添加
ip route flush to 10/8 //删除
ip route