免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2014 | 回复: 2
打印 上一主题 下一主题

[系统管理] 关于/etc/hosts 和网卡的疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-11 09:03 |只看该作者 |倒序浏览
一机器的
en0网卡地址是10.13.1.21,状态up;
en1网卡地址是192.168.128.200,状态down;

/etc/hosts文件配置如下
#  /etc/hosts
#
# This file contains the hostnames and their address for hosts in the
# network.  This file is used to resolve a hostname into an Internet
# address.  
#
# At minimum, this file must contain the name and address for each
# device defined for TCP in your /etc/net file.  It may also contain
# entries for well-known (reserved) names such as timeserver
# and printserver as well as any other host name and address.
#
# The format of this file is:
# Internet Address        Hostname        # Comments
# Items are separated by any number of blanks and/or tabs.  A '#'
# indicates the beginning of a comment; characters up to the end of the
# line are not interpreted by routines which search this file.  Blank
# lines are allowed.

# Internet Address        Hostname        # Comments
# 192.9.200.1             net0sample        # ethernet name/address
# 128.100.0.1                token0sample        # token ring name/address
# 10.2.0.2                x25sample        # x.25 name/address
127.0.0.1                loopback localhost        # loopback (lo0) name/address
192.168.128.200        localhost
10.13.1.21        p550a

我的问题是:/etc/hosts中已经有“127.0.0.1                loopback localhost”,
后加入的“192.168.128.200        localhost”可能是什么用意,并且“192.168.128.200”的网卡是DOWN状态?

论坛徽章:
0
2 [报告]
发表于 2008-12-11 09:45 |只看该作者
多此一举,造成混乱。
ping localhost

[ 本帖最后由 fck 于 2008-12-11 11:37 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-12-13 02:24 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP