Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
故而 我删除了 /etc/resolv.conf , 将/run/systemd/resolv/resolv.conf 关联到 etc下的resolv.conf 这是 /etc/netplan/50-cloud-init.yaml 文件 apt update 也会报错 还请知道的朋友帮帮忙
- 附件
-
- resolv.conf
- %%RJ9R_{RE8Z$9JHTU@EIY2.png (11.41 KiB) 查看 16689 次
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
8.8.8.8 是 谷歌的 dns 網址
是否已被阻檔
請先確認
如果不確定 先試試其它為被阻擋的 dns
是否已被阻檔
請先確認
如果不確定 先試試其它為被阻擋的 dns
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
1. 如果你修改這個 可能需要重新開機 或 重新啟動網路 才會生效50-cloud-init.yaml
2. 直接在 /etc/resolv.conf 修改我删除了 /etc/resolv.conf , 将/run/systemd/resolv/resolv.conf 关联到 etc下的resolv.conf
建議
這樣是 一次性 生效
2-1. 重新開機 或 重新啟動網路 就被更新了內容
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
1. ping -c 3 www.baidu.com但是www.baidu.com 无法ping通
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=47 time=219 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=47 time=187 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=47 time=242 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 187.433/215.854/241.578/22.186 ms
2. ping -c 3 www.a.shifen.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=47 time=298 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=47 time=273 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=47 time=270 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 270.248/280.474/297.809/12.330 ms
3. 試試
ping -c 3 14.215.177.39
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
poloshiao 写了: ↑2018-10-25 17:211. ping -c 3 www.baidu.com但是www.baidu.com 无法ping通
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=47 time=219 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=47 time=187 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=47 time=242 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 187.433/215.854/241.578/22.186 ms
2. ping -c 3 www.a.shifen.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=47 time=298 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=47 time=273 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=47 time=270 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 270.248/280.474/297.809/12.330 ms
3. 試試
ping -c 3 14.215.177.39
这是我 输入 ping -c 3 14.215.177.39 的结果:
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
1. ping -c 3 14.215.177.39这是我 输入 ping -c 3 14.215.177.39 的结果:
PING 14.215.177.39 (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39: icmp_seq=1 ttl=47 time=229 ms
64 bytes from 14.215.177.39: icmp_seq=2 ttl=47 time=214 ms
64 bytes from 14.215.177.39: icmp_seq=3 ttl=47 time=214 ms
--- 14.215.177.39 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 214.022/219.244/229.423/7.198 ms
2. whois 14.215.177.39
... (略)
inetnum: 14.208.0.0 - 14.223.255.255
netname: CHINANET-GD
descr: CHINANET Guangdong province network
... (略)
3. 你可以再試試
dig www.baidu.com
4. 補充
我得到的回應資料 僅供參考 跟你的 不一定一樣
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
poloshiao 写了: ↑2018-10-25 19:091. ping -c 3 14.215.177.39这是我 输入 ping -c 3 14.215.177.39 的结果:
PING 14.215.177.39 (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39: icmp_seq=1 ttl=47 time=229 ms
64 bytes from 14.215.177.39: icmp_seq=2 ttl=47 time=214 ms
64 bytes from 14.215.177.39: icmp_seq=3 ttl=47 time=214 ms
--- 14.215.177.39 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 214.022/219.244/229.423/7.198 ms
2. whois 14.215.177.39
... (略)
inetnum: 14.208.0.0 - 14.223.255.255
netname: CHINANET-GD
descr: CHINANET Guangdong province network
... (略)
3. 你可以再試試
dig www.baidu.com
4. 補充
我得到的回應資料 僅供參考 跟你的 不一定一樣
这是操作dig www.baidu.com 、 whois 14.215.177.39 , 我发现 whois 并没有安装,我在执行 apt install whois 报错了
- astolia
- 论坛版主
- 帖子: 6396
- 注册时间: 2008-09-18 13:11
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
@poloshiao 又来瞎搅和一大堆。Destination Host Unreachable说明网络链路都没有通,你在dns解析上绕半天有屁用
这种情况基本都是虚拟机网络设置问题,如果没有特殊需求,直接把连接方式选成 网络地址转换(NAT) ,让虚拟机用宿主机的网络就行了。另外也可查一下是不是宿主机上的防火墙软件把virtualbox的网络请求给拦了
这种情况基本都是虚拟机网络设置问题,如果没有特殊需求,直接把连接方式选成 网络地址转换(NAT) ,让虚拟机用宿主机的网络就行了。另外也可查一下是不是宿主机上的防火墙软件把virtualbox的网络请求给拦了
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
apt install whois 出现问题,所以我更换了源为阿里云的源:
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
Destination Host Unreachable说明网络链路都没有通
1. 心中存疑我 ping 8.8.8.8 ping 通了,但是www.baidu.com 无法ping通
當然需要提問者 提供他的數據
2. 終端機指令及文字回應我发现 whois 并没有安装,我在执行 apt install whois 报错了
請直接複製貼上來 (包含指令及回應文字)
不要摘錄 不要擷圖
方便回文直接引用你貼上來的資料
方便你閱讀
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
-
- 帖子: 10
- 注册时间: 2018-10-25 12:48
- 系统: Ubuntu
- astolia
- 论坛版主
- 帖子: 6396
- 注册时间: 2008-09-18 13:11
Re: Oracle VM 安装Ubuntu 18.04 LTS 无法ping 通百度,提示:temporary failure in name resolution
我就知道是这种事。你要弄两个网卡没关系,但一定要弄好路由表。你的问题就出在请求走的是仅主机(Host-Only)网络,根本无法与外界联通。
用ip route看当前的路由表,default是否有两个,或者只有一个但是仅主机(Host-Only)网络的那个
我没用netplan,你可以参考 https://askubuntu.com/a/1043546 禁用仅主机网络的默认路由设置