Chinaunix

标题: 主机ping不通127.0.0.1 [打印本页]

作者: 26320401    时间: 2008-12-29 18:48
标题: 主机ping不通127.0.0.1
主机为RP4440,系统为11vi。
现在主机ping不通127.0.0.1.但却可以ping通lan0 ,也可以ping通其他机器和网关。
查看/etc/hosts文件和/etc/rc.config.d/netconf文件,均正常。
但是netstat -rn 缺显示缺少了,一条到127.0.0.1的路由,但是还回口的路由也不允许我去添加。
请问各位有何良策?
以下是hosts文件,和netstat的结果。
host1:/#more /etc/hosts
## Configured using SAM by root on Wed Mar 29 17:36:57 2000
# @(#)B.11.11_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
# <internet address>    <official hostname> <aliases>
#
# For example:
# 192.1.2.34    hpfcrm  loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
#       The format described in this file is the correct format.
#       The original Berkeley manual page contains an error in
#       the format description.
#
192.168.1.79    host1
127.0.0.1       localhost       loopback
192.168.1.201   dhrac1.datahouse.cn     dhrac1


host1:/#netstat -rn
Routing tables
Destination           Gateway            Flags   Refs Interface  Pmtu
192.168.1.79          192.168.1.79       UH        0  lan0       4136
192.168.1.0           192.168.1.79       U         2  lan0       1500
127.0.0.0             127.0.0.1          U         0  lo0           0
default               192.168.1.1        UG        0  lan0          0

host1:/#route add host 127.0.0.1 127.0.0.1
add host 127.0.0.1: gateway 127.0.0.1: cannot update loopback route
作者: dq00    时间: 2008-12-30 00:24
我也遇到了这样的问题,期待答案中。。。
作者: 26320401    时间: 2008-12-30 12:18
原帖由 dq00 于 2008-12-30 00:24 发表
我也遇到了这样的问题,期待答案中。。。


看来也只有我倆比较背了。
答案已经出来了:
ifconfig lo0 up 就可以。你试试
不过netstat -in 所看到的信息,并没有任何关于lo0不正常的信息,这才是叫人郁闷的。
作者: EN_LIJ    时间: 2008-12-30 16:38
遇到这种情况有可能是主机在初始化的时候由于某种原因而造成的,
解决办法 :
       1:删除网络配置文件,然后再新建一个一模一样的文件
        2:然后 重新启动一下,让系统重新认到网卡!
经过这样应该就没有问题了




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2