网络设置

xiaoxiao2022-06-12  79

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=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=10.167.16.204NETMASK=255.255.254.0GATEWAY=10.167.16.1

转载请注明原文地址: https://www.6miu.com/read-4934003.html

最新回复(0)