当前位置:首页 » 操作系统 » linuxping域名

linuxping域名

发布时间: 2025-01-23 20:24:34

linux 下 ping 域名,在通之前总需要等一段时间,不知道是为什么。

因为linux和window不同,linux没有本地dns缓存,如果想快一点,可以用pdnsd设置本地缓存;没有本地dns缓存,在你上网或ping网址的时候都会先解析dns,让后才是其他,所以多数人就会感觉linux上网慢;

⑵ linux系统怎么ping网络

在Linux系统中使用命令"ping 网址"可以ping网络。例如,缺团使用"ping www.example.com"可以ping网站www.example.com。
拓者扮链展:除了ping网络,Linux系统还可以使用traceroute命首孙令来查看网络路径。使用该命令可以追踪从主机到另一个主机之间的路由,并显示每个路由中经过的主机列表。

⑶ Linux能ping通IPping不通域名

系统大全为您提供
今天碰到个问题,能ping通IP地址,ping不通域名,一直以为是DNS解析服务器的问题,找了半天,问题不在这里。
[root@wwwpostfix]#cat/etc/resolv.conf
nameserver202.96.209.133
optionsattempts:1timeout:1rotate
#nameserver10.202.72.117
nameserver10.202.72.118
nameserver114.114.114.114
nameserver8.8.8.8
[root@wwwpostfix]# 
看了一下路由表,问题也不在路由网关上。
[root@wwwpostfix]#netstat-rn
KernelIProutingtable
Destination  Gateway    Genmask    Flags MSSWindow irttIface
115.28.80.0  0.0.0.0    255.255.252.0 U    00     0eth1
10.163.176.0  0.0.0.0    255.255.240.0 U    00     0eth0
169.254.0.0  0.0.0.0    255.255.0.0  U    00     0eth0
169.254.0.0  0.0.0.0    255.255.0.0  U    00     0eth1
192.168.0.0  10.163.191.247 255.255.0.0  UG    00     0eth0
172.16.0.0   10.163.191.247 255.240.0.0  UG    00     0eth0
10.0.0.0    10.163.191.247 255.0.0.0   UG    00     0eth0
0.0.0.0    115.28.83.247 0.0.0.0    UG    00     0eth1
[root@wwwpostfix]# 
[root@wwwpostfix]# 
[root@wwwpostfix]# 
[root@wwwpostfix]# 
[root@wwwpostfix]#route
KernelIProutingtable
Destination  Gateway    Genmask    FlagsMetricRef  UseIface
115.28.80.0  *       255.255.252.0 U  0   0    0eth1
10.163.176.0  *       255.255.240.0 U  0   0    0eth0
link-local   *       255.255.0.0  U  1002 0    0eth0
link-local   *       255.255.0.0  U  1003 0    0eth1
192.168.0.0  10.163.191.247 255.255.0.0  UG  0   0    0eth0
172.16.0.0   10.163.191.247 255.240.0.0  UG  0   0    0eth0
10.0.0.0    10.163.191.247 255.0.0.0   UG  0   0    0eth0
default    115.28.83.247 0.0.0.0    UG  0   0    0eth1
然后再看看:
[root@wwwpostfix]#grephosts/etc/nsswitch.conf
#hosts:  dbfilesnisplusnisdns
#hosts:   filesdns
hosts:   dnsfiles
我修改为先dns,在files,测试了,也还是不通。
最后发现是防火墙的原因,我开启了防火墙,造成了ping域名不通。
域名解析用到了53端口,需要把下面的设置配置到防火墙里即可。
iptables-AINPUT-pudp--sport53-jACCEPT
iptables-AOUTPUT-pudp--dport53-jACCEPT
iptables-AINPUT-pudp--dport53-jACCEPT
iptables-AOUTPUT-pudp--sport53-jACCEPT
 
  以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。 
 
本文来自系统大全http:///如需转载请注明!推荐:win7纯净版

⑷ LINUX系统,每次ping域名都要等十几秒才能通,通了以后不丢包

看一下你的dns设置,
cat /etc/resolv.conf
再看一下你的nsswitch设置,
cat /etc/nsswitch.conf | grep hosts

热点内容
海鸥优化算法 发布:2025-05-08 01:12:52 浏览:971
威纶通exob禁止反编译设置 发布:2025-05-08 01:06:05 浏览:285
天津建经加密狗 发布:2025-05-08 01:06:04 浏览:204
filecoin币与分布式存储 发布:2025-05-08 00:55:22 浏览:177
取存储过程结果集 发布:2025-05-08 00:53:04 浏览:52
android木马远控 发布:2025-05-08 00:47:18 浏览:150
linuxusb工具 发布:2025-05-08 00:43:43 浏览:740
宅吧服务器地址 发布:2025-05-08 00:43:32 浏览:262
googleplay官网服务器地址 发布:2025-05-08 00:33:35 浏览:127
amh解压 发布:2025-05-08 00:22:47 浏览:806