linux添加删除路由
添加默认网关
[root@mysql_209 ~]# route add default gw 192.168.8.254 [root@mysql_209 ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface link-local * 255.255.0.0 U 1006 0 0 bond0 192.168.0.0 * 255.255.0.0 U 0 0 0 bond0 default 192.168.8.254 0.0.0.0 UG 0 0 0 bond0
|
添加指定路由
route add -net 192.168.201.0 netmask 255.255.255.0 gw 192.168.8.251
|
删除路由
[root@mysql_209 ~]# route del default
|
设置DNS
[root@mysql_209 ~]# cat /etc/resolv.conf nameserver 114.114.114.114
|
yum报错
刚开通公网路由后执行yum install可能会报错超时,需要执行yum clean all然后再执行yum install即可。
|