- A+
ping: baidu.com: 未知的名称或服务
[root@localhost redis]# vim /etc/sysconfig/static-routes
内容为:any net default gw 193.168.11.2
[root@localhost redis]# ping baidu.com
ping: baidu.com: 未知的名称或服务
[root@localhost redis]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-d245a7076467
192.168.11.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
[root@localhost redis]# route add default gw 192.168.11.2
[root@localhost redis]# ping baidu.com
^C
[root@localhost redis]# ping baidu.com
PING baidu.com (220.181.38.148) 56(84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=128 time=51.4 ms