网络时断时续,ping返回如下,高人教我

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

网络时断时续,ping返回如下,高人教我

#1

帖子 sivaj » 2007-10-04 22:51

ubuntu@GNU:~$ ping -c2 192.168.18.1
connect: Network is unreachable
ubuntu@GNU:~$ ping -c2 192.168.18.1
PING 192.168.18.1 (192.168.18.1) 56(84) bytes of data.
From 169.254.7.1 icmp_seq=1 Destination Host Unreachable
From 169.254.7.1 icmp_seq=2 Destination Host Unreachable

--- 192.168.18.1 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1002ms
, pipe 2
ubuntu@GNU:~$ ping -c2 192.168.18.1
PING 192.168.18.1 (192.168.18.1) 56(84) bytes of data.
From 169.254.7.1 icmp_seq=1 Destination Host Unreachable
From 169.254.7.1 icmp_seq=2 Destination Host Unreachable

三台电脑共享一个路由上网
头像
qianwx
帖子: 730
注册时间: 2006-07-08 14:41

#2

帖子 qianwx » 2007-10-08 18:52

借问一下,你的所有电脑都是linux系统么??
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

#3

帖子 sivaj » 2007-10-11 22:38

就我一台是linux 其他都是xp
leafduo
帖子: 13
注册时间: 2007-10-10 23:42
联系:

#4

帖子 leafduo » 2007-10-11 23:23

这个跟操作系统没关系吧……
设置有点问题吧,比如网关,子网掩码之类
ping localhost 先 :D
sfissw
帖子: 354
注册时间: 2007-06-21 1:30
来自: Shanghai
联系:

#5

帖子 sfissw » 2007-10-12 7:38

网关路由器的ip
子网掩码3个255最后0


还有问题
查硬件吧
还是你系统装的有问题?
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

#6

帖子 sivaj » 2007-10-13 18:14

为什么我的/etc/network/interfaces文件里只有两行,在网上看了很多这个文件都有很多行的
我的:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
头像
xiehuipiaofeng
帖子: 85
注册时间: 2007-07-31 23:04

#7

帖子 xiehuipiaofeng » 2007-10-14 21:19

是你没有给网卡分配IP地址。不过你要首先看你的机器有没有识别网卡。

$ lspci | grep Ethernet
如果出现如下的现实,则说明你的网卡系统已经识别了。否则就要去找驱动了。不过一般情况下,只要你的网卡别太有个性了,ubuntu都能识别出来。
00:13.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705M Gigabit Ethernet (rev 03)

也可以用这个命令ethtool eth0查看你的网卡具体的信息。

sudo vim /etc/network/interfaces
 网卡通过DHCP自动获取IP地址
  # The primary network interface (配置主网络接口)
  #开机自动激活eth0接口
  auto eth0
  #配置eth0接口为DHCP自动获取
  iface eth0 inet dhcp
  获取IP地址
  sudo dhclient eth0

 网卡静态分配IP地址
  #开机自动激活eth0接口
  auto eth0
  #配置eth0接口为静态设置IP地址
  iface eth0 inet static
  address 192.168.1.2
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  gateway 192.168.1.1
 激活以上设置
  sudo /etc/init.d/networking restart

 DNS 设置
  sudo /etc/resolv.conf
  加入
  nameserver DNSServer IP ADDRSS
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

#8

帖子 sivaj » 2007-10-17 23:05

谢谢 :lol:
头像
wanzcong
帖子: 201
注册时间: 2007-08-23 3:52

#9

帖子 wanzcong » 2007-10-18 1:15

搞定没啊
honghe000
帖子: 59
注册时间: 2007-04-28 15:42

#10

帖子 honghe000 » 2007-10-18 16:19

我的也出现同样问题 查询网卡 和网络配置都没问题
头像
xiehuipiaofeng
帖子: 85
注册时间: 2007-07-31 23:04

#11

帖子 xiehuipiaofeng » 2007-10-19 23:34

wanzcong 是不是在天津南开大学上学呀?天津人吗?


honghe000把你的配置贴出来,这样我们也可以看看问题到底在哪。不过你检查过网线和网络设备吗?
bootu
帖子: 66
注册时间: 2006-12-05 10:53

我也有这个问题

#12

帖子 bootu » 2007-10-24 9:07

我的也出现这样的问题,重启下网卡就好了,隔几分钟就不行了,需要再重启网卡。请奇怪的问题。
iterfaces配置如下
auto lo
iface lo inet loopback


auto eth2
#iface eth2 inet dhcp

auto ath0
#iface ath0 inet dhcp

auto wlan0
#iface wlan0 inet dhcp

配置了iterfaces 就会出现下面的情况。
auto lo
iface lo inet loopback


auto eth2
#iface eth2 inet dhcp

auto ath0
#iface ath0 inet dhcp
iface eth0 inet static
address 192.168.104.118
netmask 255.255.255.0
network 192.168.104.0
broadcast 192.168.104.255
gateway 192.168.104.1

auto wlan0
#iface wlan0 inet dhcp

shoto@shoto-laptop:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... /etc/network/interfaces:98: duplicate interface
ifdown: couldn't read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:98: duplicate interface
ifup: couldn't read interfaces file "/etc/network/interfaces"
[fail]
bootu
帖子: 66
注册时间: 2006-12-05 10:53

我也有这个问题

#13

帖子 bootu » 2007-10-24 9:07

好象这个问题有的人挺多的,我是升了7.10以后才成这样的。
viewtopic.php?t=83143
bootu
帖子: 66
注册时间: 2006-12-05 10:53

#14

帖子 bootu » 2007-10-24 9:20

???好奇怪的问题
上次由 bootu 在 2007-10-24 9:24,总共编辑 1 次。
bootu
帖子: 66
注册时间: 2006-12-05 10:53

#15

帖子 bootu » 2007-10-24 9:20

:twisted: :oops: :x
回复