当前位置:网站首页>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 ms
Outliers 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: nis
Check 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.conf
If resolv.conf File has no read permission , Can also cause ping uknown host The situation of .
边栏推荐
- easyclick,ec权朗网络验证源码
- Redis 过期策略+conf 记录
- [chestnut sugar GIS] ArcScene - how to make elevation map with height
- Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
- MySQL reset password, forget password, reset root password, reset MySQL password
- Strictly abide by the construction period and ensure the quality, this AI data annotation company has done it!
- [Solved] Splunk: Cannot get username when all users are selected“
- Golang interview finishing three resumes how to write
- Motivation du Protocole de chiffrement avancé AES
- [NPUCTF2020]ezlogin xPATH注入
猜你喜欢
Jinglianwen technology's low price strategy helps AI enterprises reduce model training costs
BBR 遭遇 CUBIC
力扣刷题(2022-6-28)
景联文科技低价策略帮助AI企业降低模型训练成本
STM32之ADC
Generics and reflection, this is enough
实现BottomNavigationView和Navigation联动
odoo13搭建医院HRP环境(详细步骤)
[hardware] origin of standard resistance value
海思 VI接入视频流程
随机推荐
數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
Generics and reflection, this is enough
最小生成树 Minimum Spanning Tree
Niuke network: maximum submatrix
[hardware] origin of standard resistance value
psnr,ssim,rmse三个指标的定量分析
Share 10 JS closure interview questions (diagrams), come in and see how many you can answer correctly
xshell配置xforward转发火狐浏览器
[NPUCTF2020]ezlogin xPATH注入
Data analysis learning records -- complete a simple one-way ANOVA with Excel
AES高级加密协议的动机阐述
2016. 增量元素之间的最大差值
BBR 遭遇 CUBIC
实现BottomNavigationView和Navigation联动
[leetcode] most elements [169]
4 special cases! Schools in area a adopt the re examination score line in area B!
PMP project integration management
20220527_数据库过程_语句留档
WebRTC音视频采集和播放示例及MediaStream媒体流解析
Learning records of data analysis (II) -- simple use of response surface method and design expert