当前位置:网站首页>Ping domain name error unknown host, NSLOOKUP / system d-resolve can be resolved normally, how to Ping the public network address?
Ping domain name error unknown host, NSLOOKUP / system d-resolve can be resolved normally, how to Ping the public network address?
2022-07-02 23:08:00 【Sunny afternoon】
Abnormal phenomenon
ping Domain name error unknown host,nslookup/systemd-resolve It can be parsed normally ,ping Public address communication .
[email protected]:/etc# ping baidu.com
ping: unknown host baidu.com
[email protected]:/etc# nslookup www.baidu.com
Server: 192.168.61.200
Address: 192.168.61.200#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 183.232.231.174
Name: www.a.shifen.com
Address: 183.232.231.172
[email protected]:/etc# systemd-resolve www.baidu.com
www.baidu.com: 183.232.231.172
183.232.231.174
(www.a.shifen.com)
-- Information acquired via protocol DNS in 74.1ms.
-- Data is authenticated: no
[email protected]:/etc# ping 183.232.231.174
PING 183.232.231.174 (183.232.231.174) 56(84) bytes of data.
64 bytes from 183.232.231.174: icmp_seq=1 ttl=54 time=33.4 ms
64 bytes from 183.232.231.174: icmp_seq=2 ttl=54 time=32.7 ms
64 bytes from 183.232.231.174: icmp_seq=3 ttl=54 time=33.9 ms
64 bytes from 183.232.231.174: icmp_seq=4 ttl=54 time=45.0 ms
^C
--- 183.232.231.174 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3013ms
rtt min/avg/max/mdev = 32.723/36.281/45.043/5.077 msOutliers that need to be checked
1、 Check /etc/nsswitch.conf
[email protected]:~# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nisCheck hosts That's ok , Is it files dns,files Said the use of /etc/hosts and /etc/network The configuration file ,dns Said the use of /etc/resolv.conf In the document DNS Address resolution .
ping Program resolution of domain name depends on C Functions in the library gethostbyname() and gethostbyaddr(), Corresponding configuration file /etc/nsswitch.conf Medium hosts Configuration item .nslookup Direct use /etc/resolv.conf Medium DNS Domain name resolution , Therefore, it is not affected by this document .
2、 Check /etc/resolv.conf File permissions
# Ubuntu System
# Ubuntu In the system resolv.conf For a soft connection , If there is a problem , You can manually rebuild the soft connection ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
# Check carefully after reconstruction /etc/resolvconf/run/resolv.conf Whether the configuration is correct
[email protected]:~# ll /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Apr 26 16:20 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
# CentOS System
[[email protected] ~]$ ll /etc/resolv.conf
-rw-r--r--. 1 root root 61 Nov 3 2021 /etc/resolv.confIf resolv.conf File has no read permission , Can also cause ping uknown host The situation of .
边栏推荐
- 最小生成树 Minimum Spanning Tree
- P7072 [csp-j2020] live broadcast Award
- 【喜欢的诗词】好了歌
- 程序员版本的八荣八耻~
- The motivation of AES Advanced Encryption Protocol
- 创新实力再获认可!腾讯安全MSS获2022年度云原生安全守护先锋
- 阿里云有奖体验:如何使用 PolarDB-X
- Go language sqlx library operation SQLite3 database addition, deletion, modification and query
- 静态文件显示问题
- Qt QScrollArea
猜你喜欢
随机推荐
20220527_数据库过程_语句留档
設置單擊右鍵可以選擇用VS Code打開文件
STM32之ADC
首批 | 腾讯云完成国内首个云原生安全成熟度评估
Jerry's built-in shutdown current is 1.2ua, and then it can't be turned on by long pressing [chapter]
RecyclerView结合ViewBinding的使用
创新实力再获认可!腾讯安全MSS获2022年度云原生安全守护先锋
景联文科技低价策略帮助AI企业降低模型训练成本
数据分析学习记录--用EXCEL完成简单的单因素方差分析
Brief introduction of emotional dialogue recognition and generation
Webrtc audio and video capture and playback examples and mediastream media stream analysis
[leetcode] there are duplicate elements [217]
Methods to solve the tampering of Chrome browser and edeg browser homepage
情感对话识别与生成简述
2016. maximum difference between incremental elements
Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
Redis 过期策略+conf 记录
Analyse des données dossiers d'apprentissage - - analyse simple de la variance à facteur unique avec Excel
Successfully changed Splunk default URL root path
Golang interview finishing three resumes how to write



![The kth largest element in the [leetcode] array [215]](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)





