127.0.0.1与localhost
2009-05-13 11:31:36来源:未知 阅读 ()
rhel 5
[root@ns100 vm]# ping localhost
PING localhost.atyu.com (202.106.195.29) 56(84) bytes of data.
64 bytes from 202.106.195.29: icmp_seq=1 ttl=249 time=20.3 ms
64 bytes from 202.106.195.29: icmp_seq=2 ttl=249 time=18.1 ms
64 bytes from 202.106.195.29: icmp_seq=3 ttl=249 time=13.7 ms
64 bytes from 202.106.195.29: icmp_seq=4 ttl=249 time=14.7 ms
--- localhost.atyu.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7121ms
rtt min/avg/max/mdev = 13.764/16.771/20.382/2.645 ms
[root@ns100 vm]# ping local
ping: unknown host local
[root@ns100 vm]# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.028 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.026 ms
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.026/0.027/0.028/0.001 ms
[root@ns100 vm]#
[root@ns100 vm]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 ns100.atyu.com
OpenBSD 4.2
# ping local
^C
# ping localhost
PING localhost.yuyizhi.org (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.495 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.118 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.092 ms
--- localhost.yuyizhi.org ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.092/0.235/0.495/0.184 ms
# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.189 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.092 ms
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.088/0.123/0.189/0.046 ms
#
# cat /etc/hosts
# $OpenBSD: hosts,v 1.11 2002/09/26 23:35:51 krw Exp $
#
# Host Database
#
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0 10.255.255.255
# 172.16.0.0 172.31.255.255
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- 提示:bad kernel: arp : 内网IP地址 is on em0 but got rep 2009-05-13
- freeBSD7 boot from zfs 2009-05-13
- gmirror - recovering from a failed HDD 2009-05-13
- Time and space optimization 2009-05-13
- Update The FreeBSD From Previous Releases Using So 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash