美文网首页
CentOS7.3联网问题解决方案

CentOS7.3联网问题解决方案

作者: 明训 | 来源:发表于2021-03-21 23:24 被阅读0次

IP设置方案

IPADDR=192.168.31.222
netmask 255.255.255.0 
GATEWAY=192.168.31.1

配置文件/etc/sysconfig/network-scripts/ifcfg-ens192

Ping问题

问题说明

[root@localhost ~]# ping www.baidu.com
ping: www.baidu.com: Name or service not known

解决方案

[root@localhost ~]# vim /etc/resolv.conf

默认内容为空

追加如下内容

nameserver 8.8.8.8
nameserver 8.8.4.4

重启网络服务

[root@localhost ~]# service  network restart
Restarting network (via systemctl):                        [  OK  ]
[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (36.152.44.95) 56(84) bytes of data.
64 bytes from 36.152.44.95 (36.152.44.95): icmp_seq=1 ttl=55 time=11.0 ms
64 bytes from 36.152.44.95 (36.152.44.95): icmp_seq=2 ttl=55 time=10.8 ms

尝试下载文件

[root@localhost work]# cd oray/
[root@localhost oray]# ls
[root@localhost oray]# wget http://download.oray.com/peanuthull/linux/phddns-3.0.2.x86_64.rpm
--2020-04-27 13:09:10--  http://download.oray.com/peanuthull/linux/phddns-3.0.2.x86_64.rpm
Resolving download.oray.com (download.oray.com)... 112.30.162.172
Connecting to download.oray.com (download.oray.com)|112.30.162.172|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1181158 (1.1M) [application/x-redhat-package-manager]
Saving to: ‘phddns-3.0.2.x86_64.rpm’

100%[=================================================>] 1,181,158   --.-K/s   in 0.1s    

2020-04-27 13:09:10 (11.2 MB/s) - ‘phddns-3.0.2.x86_64.rpm’ saved [1181158/1181158]

[root@localhost oray]# ls
phddns-3.0.2.x86_64.rpm

相关文章

网友评论

      本文标题:CentOS7.3联网问题解决方案

      本文链接:https://www.haomeiwen.com/subject/cmjacltx.html