`

网络设置

阅读更多

route add default gw 172.18.3.50  默认路由的添加
route add -host  192.168.168.110 dev eth0:1  主机路由的添加
route add -host 192.168.168.120 gw 192.168.168.119   主机路由的添加
route add -net 192.168.24.0 netmask 255.255.254.0 dev eth0  添加一个到子网的路由
route add -net 192.168.4.0 netmask 255.255.255.0 gw 172.18.3.50  添加一个到子网的路由
 

 

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up 


删除路由
]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

# route del –host 192.168.168.110 dev eth0:1

/etc/rc.d/init.d/network restart启动生效

service network restart

netstat -r

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.167.16.204
NETMASK=255.255.254.0
GATEWAY=10.167.16.1

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics