参考:http://blog.feihsueh.org/2016/06/20/linux-network-configurations/
1. 设置内网网卡信息,无需设置网关

2. 设置外网网卡信息

3. 设置路由表,让外网网关为默认的网关,并且添加内网路由

# route add -net 192.168.88.0 netmask 255.255.255.0 dev eth1

重启网络
service network restart
附加:
删除一条路由表
# route del -net 10.10.10.128 netmask 255.255.255.128 #注意不是genmask
添加默认网关
route add default gw xxx.xxx.xxx.xxx
删除默认网关
route del default gw xxx.xxx.xxx.xxx
网友评论