当前位置:网站首页>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 .
边栏推荐
- 密码技术---密钥和SSL/TLS
- Jerry's charge unplugged, unable to touch the boot [chapter]
- 分布式监控系统zabbix
- [羊城杯2020]easyphp
- `Usage of ${}`
- [adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
- Niuke network: maximum submatrix
- xshell配置xforward转发火狐浏览器
- BBR 遭遇 CUBIC
- easyclick,ec权朗网络验证源码
猜你喜欢

Qt QScrollArea

4 special cases! Schools in area a adopt the re examination score line in area B!

WebRTC音视频采集和播放示例及MediaStream媒体流解析

The first batch of Tencent cloud completed the first cloud native security maturity assessment in China

创新实力再获认可!腾讯安全MSS获2022年度云原生安全守护先锋

Splunk audit setting

Webrtc audio and video capture and playback examples and mediastream media stream analysis

設置單擊右鍵可以選擇用VS Code打開文件

The motivation of AES Advanced Encryption Protocol
![[羊城杯2020]easyphp](/img/12/da28f738e50e625b0a66a94af3703d.png)
[羊城杯2020]easyphp
随机推荐
The first batch of Tencent cloud completed the first cloud native security maturity assessment in China
Typical case of data annotation: how does jinglianwen technology help enterprises build data solutions
2016. 增量元素之间的最大差值
Easyclick, EC Quanlang network verification source code
Minimum spanning tree
Data analysis learning records -- complete a simple one-way ANOVA with Excel
数据分析学习记录--用EXCEL完成简单的单因素方差分析
Addition, deletion, modification and query of handwritten ORM (object relationship mapping)
数据标注典型案例,景联文科技如何助力企业搭建数据方案
Share 10 JS closure interview questions (diagrams), come in and see how many you can answer correctly
静态文件显示问题
P7072 [csp-j2020] live broadcast Award
[leetcode] reverse the word III in the string [557]
Stop slave is stuck -- the event of the transaction is not copied completely
Strictly abide by the construction period and ensure the quality, this AI data annotation company has done it!
2016. maximum difference between incremental elements
[hardware] origin of standard resistance value
The motivation of AES Advanced Encryption Protocol
Brief introduction of emotional dialogue recognition and generation
Qt QScrollArea