LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 803|回复: 5

2007.0 amd64 网络不通?

[复制链接]
发表于 2007-5-12 21:45:41 | 显示全部楼层 |阅读模式
好不容易编译安装完,可以拨号,可以ping 局域网的,好象是不能域名解析,但是检查了/etc/host.conf,/etc/hosts,/etc/resolv.conf.都是正确的,安装的时候禁用了IPv6,安了dhcpcd,只有第一次启动的时候自动配置好了eth0,以后都超时!卸了dhcocd之后,设置静态IP,没问题!!
发表于 2007-5-12 21:52:10 | 显示全部楼层
把文件贴出来吧,BTW你在编内核的时候网络选了ppp没?
连接之后ifconfig贴出来看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-12 22:08:18 | 显示全部楼层
拨号之后的ifconfig:
eth0      Link encap:Ethernet  HWaddr 00:E0:A0:07:E6:2B  
          inet addr:192.168.1.152  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:a0ff:fe07:e62b/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:533 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:88648 (86.5 Kb)  TX bytes:3883 (3.7 Kb)
          Interrupt:11 Base address:0x2000

lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ppp0      Link encapoint-to-Point Protocol  
          inet addr:222.18.24.239  P-t-P:222.18.20.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:54 (54.0 b)  TX bytes:54 (54.0 b)




ping局域网:
PING 192.168.1.13 (192.168.1.13) 56(84) bytes of data.
64 bytes from 192.168.1.13: icmp_seq=1 ttl=64 time=745 ms
64 bytes from 192.168.1.13: icmp_seq=3 ttl=64 time=345 ms
64 bytes from 192.168.1.13: icmp_seq=4 ttl=64 time=345 ms
64 bytes from 192.168.1.13: icmp_seq=5 ttl=64 time=546 ms
64 bytes from 192.168.1.13: icmp_seq=6 ttl=64 time=646 ms
64 bytes from 192.168.1.13: icmp_seq=7 ttl=64 time=346 ms
64 bytes from 192.168.1.13: icmp_seq=8 ttl=64 time=347 ms
64 bytes from 192.168.1.13: icmp_seq=9 ttl=64 time=446 ms
64 bytes from 192.168.1.13: icmp_seq=10 ttl=64 time=647 ms

--- 192.168.1.13 ping statistics ---
11 packets transmitted, 9 received, 18% packet loss, time 9998ms
rtt min/avg/max/mdev = 345.182/490.643/745.314/149.989 ms




ping百度:
ping: unknown host www.baidu.com




/etc/hosts:
# /etc/hosts: Local Host Database
#
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/host.conf for the resolution order.
#

# IPv4 and IPv6 localhost aliases
127.0.0.1        gentoo.scu gentoo localhost
::1                localhost

#
# Imaginary network.
#10.0.0.2               myname
#10.0.0.3               myfriend
#
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers.  Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#




/etc/host.conf:
# /etc/host.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $

# The  file /etc/host.conf contains configuration information specific to
# the resolver library.  It should contain one configuration keyword  per
# line,  followed by appropriate configuration information.  The keywords
# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.



# This keyword specifies how host lookups are to be performed. It
# should be followed by one or more lookup methods, separated by
# commas.  Valid methods are bind, hosts, and nis.
#
order hosts,bind


# Valid  values are on and off.  If set to on, the resolv+ library
# will return all valid addresses for a host that appears  in  the
# /etc/hosts  file,  instead  of  only  the first.  This is off by
# default, as it may cause a substantial performance loss at sites
# with large hosts files.
#
multi off




/etc/resolv.conf
nameserver 202.115.32.39
nameserver 202.115.32.36
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-12 22:10:40 | 显示全部楼层
没开防火强,一切好象都那么正常,但是就是不通,极度郁闷!!
回复 支持 反对

使用道具 举报

发表于 2007-5-12 22:48:16 | 显示全部楼层
eth0
inet addr:192.168.1.152 Bcast:192.168.1.255 Mask:255.255.255.0

问题在这里
不要设置eth0的ip地址

你的/etc/conf.d/net里估计是设定了eth0的ip了吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-12 23:13:29 | 显示全部楼层
版主就是强人哈,服了!!非常感谢!
但是没有搞懂的是,在安装教程里面说得如果不安装dhcpcd,可以设置静态IP,而且至少不应该出这样的问题撒!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表