ip route add 172.22.2.0/24 via 172.22.3.254 dev eth0
二、添加永久路由(需要重启网络)
编辑或新建/etc/sysconfig/network-scripts/route-interface 文件中,比如 vi /etc/sysconfig/network-scripts/route-eth0 添加两条路由: 172.22.2.0/24 via 172.22.3.254 dev eth0 172.21.0.0/16 via 172.22.3.254 dev eth0