Chinaunix

标题: Linux 无故网络中断!!!郁闷 [打印本页]

作者: wangye2000    时间: 2007-01-07 13:40
标题: Linux 无故网络中断!!!郁闷
我有两台Linux 机器,网络老是会自动中断,没法ping 通其他机器,也ping 不通本机器,不可以ping通网关,但是自己可以ping通自己,也可以ping通127.0.0.1,查看网络服务也没问题,也没有启用防火墙,重启网络服务也没用,但是只要重启一下机器就又好了,但是过不了两三个小时有会自动中断,已经重装过系统了,还是同样现象,这是什么问题呢?这台机器以前装的是windows,一点问题都没有,网卡和网线应该没问题,接交换机的口也换过了
作者: HonestQiao    时间: 2007-01-07 13:44
网卡和网线应该没问题?

这个需要确认。

你用的什么网卡?

最好换一块网卡或者网线测试先。
作者: wangye2000    时间: 2007-01-07 13:58
标题: 回复 2楼 HonestQiao 的帖子
网线使用的是成品线,换过三根了,网应该没问题,之前这台机器是windows的,一直使用得很好,还会有其他问题吗?比如说网卡自动休眠或者CMOS设置引起的,如何解决?
作者: wangye2000    时间: 2007-01-07 14:07
标题: 回复 3楼 wangye2000 的帖子
而且两台机器同样故障,没那么巧吧
作者: sunkez    时间: 2007-01-07 14:12
标题: 回复 1楼 wangye2000 的帖子
有IP地址或者MAC地址冲突了吧!!
作者: wangye2000    时间: 2007-01-07 14:23
标题: 回复 5楼 sunkez 的帖子
IP地址应该没冲突,都是手动设置的,要是冲突的话,重启后也不能解决问题啊,
mac地址都没改过,要是冲突应该不是这种现象,我这个是过一段时间后就自动断了
作者: brokencluster    时间: 2007-01-07 14:40
你的ip是启动起来自己配置的还是写的文件里开机自动读的?
作者: wangye2000    时间: 2007-01-07 15:00
标题: 回复 7楼 brokencluster 的帖子
ip 是用netconfig 命令配的
作者: ttvast    时间: 2007-01-07 21:43
网卡型号,你用的什么驱动
作者: pishafa    时间: 2007-01-07 21:55
检查过SYSLOG么?
作者: peixubin    时间: 2007-01-08 08:12
把机器型号和linux版本报一下
dmesg,/var/log/messages
作者: wangye2000    时间: 2007-01-08 09:37
华硕925主板集成的网卡,驱动是装linux时自带的,查看/var/log/message,没有发现什么异常现象.
作者: wangye2000    时间: 2007-01-08 09:42
linux 版本是centos 4.4
作者: peixubin    时间: 2007-01-08 11:20
用另一个盘装redhat el 4试一下。
或者debian3.1
作者: wangye2000    时间: 2007-01-08 13:24
不能装其他的版本,我们都是用统一的版本,这个版本也用了很久了,不止这一台机器,
今天发现一个奇怪的现象,我用ifconfig 察看网络状态时,它显示接受和发送的数据包为0  
也就是说数据包没有出网卡,但是一重启又好了,真是头痛,急死了
作者: ttvast    时间: 2007-01-08 13:39
你的网卡是Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller
CentOS/RHEL自带的驱动sky2是有问题的,你要去下载安装sk98lin才可以
作者: wangye2000    时间: 2007-01-08 14:16
标题: 回复 16楼 ttvast 的帖子
你好,请问我到哪可以下这个驱动??
作者: ttvast    时间: 2007-01-08 14:20
原帖由 wangye2000 于 2007-1-8 14:16 发表
你好,请问我到哪可以下这个驱动??


你把我难住了
作者: wangye2000    时间: 2007-01-08 14:30
标题: 回复 16楼 ttvast 的帖子
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)
        Subsystem: ASUSTeK Computer Inc. Marvell 88E8053 Gigabit Ethernet controller PCIe (Asus)
        Flags: bus master, fast devsel, latency 0, IRQ 217
        Memory at cdefc000 (64-bit, non-prefetchable) [size=16K]
        I/O ports at c800 [size=256]
        Expansion ROM at cdec0000 [disabled] [size=128K]
        Capabilities: [48] Power Management version 2
        Capabilities: [50] Vital Product Data
        Capabilities: [5c] Message Signalled Interrupts: 64bit+ Queue=0/1 Enable+
        Capabilities: [e0] Express Legacy Endpoint IRQ 0
        Capabilities: [100] Advanced Error Reporting


是的,我的网卡就这型号,我要到哪去下载sk98lin呢??怎么安装??
作者: wangye2000    时间: 2007-01-08 14:34
标题: 回复 18楼 ttvast 的帖子
不好意思,我自己先搜一下吧,谢谢
作者: wangye2000    时间: 2007-01-08 14:56
[root@localhost ~]# ls /lib/modules/2.6.9-42.EL/kernel/drivers/net/
3c59x.ko     b44.ko    eepro100.ko   mii.ko         pcnet32.ko      r8169.ko   smc9194.ko     tokenring
8139cp.ko    bnx2.ko   epic100.ko    natsemi.ko     ppp_async.ko    s2io.ko    starfire.ko    tulip
8139too.ko   bonding   ethertap.ko   ne2k-pci.ko    ppp_deflate.ko  sis900.ko  sungem.ko      tun.ko
82596.ko     dl2k.ko   fealnx.ko     netconsole.ko  ppp_generic.ko  sk98lin    sungem_phy.ko  typhoon.ko
8390.ko      dummy.ko  forcedeth.ko  netdump.ko     pppoe.ko        skge.ko    sunhme.ko      via-rhine.ko
acenic.ko    e1000     hp100.ko      ns83820.ko     pppox.ko        sky2.ko    tg3.ko         via-velocity.ko
amd8111e.ko  e100.ko   ixgb          pcmcia         ppp_synctty.ko  slhc.ko    tlan.ko        wireless


这里面包含sk98lin啊 ,但是用lsmod 察看时,加载的是sky2 :
[root@localhost sk98lin]# lsmod
Module                  Size  Used by
md5                     8001  1
ipv6                  241761  12
parport_pc             27777  1
lp                     15405  0
parport                37641  2 parport_pc,lp
autofs4                22725  0
sunrpc                143397  1
button                 10449  0
battery                12869  0
ac                      8773  0
uhci_hcd               32601  0
ehci_hcd               32069  0
snd_azx                21585  0
snd_hda_codec         121281  1 snd_azx
snd_pcm_oss            52345  0
snd_mixer_oss          21825  1 snd_pcm_oss
snd_pcm                91973  3 snd_azx,snd_hda_codec,snd_pcm_oss
snd_timer              27973  1 snd_pcm
snd                    56997  6 snd_azx,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              12961  1 snd
snd_page_alloc         13641  2 snd_azx,snd_pcm
sky2                   39493  0
dm_snapshot            21093  0
dm_zero                 6337  0
dm_mirror              31645  0
ext3                  118729  2
jbd                    59609  1 ext3
dm_mod                 60357  8 dm_snapshot,dm_zero,dm_mirror
ata_piix               15557  4
libata                 67613  1 ata_piix
sd_mod                 20545  7
scsi_mod              117709  2 libata,sd_mod

怎么样改为sk98lin呢?
作者: ttvast    时间: 2007-01-08 14:57
这里的sk98lin版本不对,你要另外下载
作者: wangye2000    时间: 2007-01-08 15:21
标题: 回复 22楼 ttvast 的帖子
sk98lin.tar.bz2
  
这个行吗?
作者: ttvast    时间: 2007-01-08 15:35
好像可以,看看版本,应该是8.x就对了
作者: wangye2000    时间: 2007-01-08 15:49
标题: 回复 22楼 ttvast 的帖子
[root@localhost DriverInstall]# pwd
/root/LinuxDrivers/LinuxDrivers/Marvell_LAN/DriverInstall
[root@localhost DriverInstall]# dir
install.log  install.sh  README  sk98lin.4  sk98lin.tar.bz2
[root@localhost DriverInstall]# ./install.sh
Installation script for sk98lin driver.
Version 8.16.2.3 (Mar-30-2005)
(C)Copyright 2003-2004 Marvell(R).
====================================================
Add to your trouble-report the logfile install.log
which is located in the  DriverInstall directory.
====================================================


1) installation
2) generate patch
3) exit
Choose your favorite installation method: 1 输入1后回车
提示:
Please read this carfully!

This script will automatically compile and load the sk98lin
driver on your host system. Before performing both compilation
and loading, it is necessary to shutdown any device using the
sk98lin kernel module and to unload the old sk98lin kernel
module. This script will do this automatically per default.
If you want to shutdown and unload the old sk98lin kernel module
manually, run the script in the EXPERT mode.

Please plug a card into your machine. Without a card we aren't
able to check the full driver functionality.

Do you want proceed? (y/N) 我在这输入y ,不知道提示让我插什么card,后又提示:
Create tmp dir (/tmp/Sk98IdNgprbmcXlOReKoHDOMN)                                                    [   OK   ]
Check user id (0)                                                                                  [   OK   ]
Check kernel version (2.6.9-42.ELsmp)                                                              [   OK   ]
Check kernel symbol file (/proc/kallsyms)                                                          [   OK   ]
Check kernel type (SMP)                                                                            [   OK   ]
Check number of CPUs (2)                                                                           [   OK   ]
Check architecture (found)                                                                         [   OK   ]
Set architecture (i386)                                                                            [   OK   ]
Check compiler (/usr/bin/gcc)                                                                      [   OK   ]
Check mcmodel flags (none)                                                                         [   OK   ]
Check module support (/sbin/insmod)                                                                [   OK   ]
Check make (/usr/bin/make)                                                                         [   OK   ]
Check archive file (sk98lin)                                                                       [   OK   ]
Check kernel gcc version (3.4.6) (Kernel:3.4.6 == gcc:3.4.6)                                       [   OK   ]
Check sk98lin driver availability (not loaded)                                                     [   OK   ]
Check kernel header files (not found)                                                              [ failed ]
Kernel header not found. Please install the linux header files
development package or crate a symbolic link from the
/usr/src/KERNEL_VERSION directory to linux
     Example: ln -s /usr/src/KERNEL_VERSION /usr/src/linux

Installation of sk98lin driver module failed.
Delete temp directories (done)           安装失败,请问怎么装
作者: wujiangshan    时间: 2007-01-08 16:04
标题: 你可能中了arp病毒
到网上找anti arp sniffer装到你电脑上,测一下是否局域网内有电脑中了arp病毒了
作者: peixubin    时间: 2007-01-08 16:07
# system-config-packages
选中kernel development
作者: wangye2000    时间: 2007-01-08 16:13
原帖由 peixubin 于 2007-1-8 16:07 发表
# system-config-packages
选中kernel development

没有system-config-packages 命令
又提示其他的错误了:
[root@localhost DriverInstall]# ./install.sh

Installation script for sk98lin driver.
Version 8.16.2.3 (Mar-30-2005)
(C)Copyright 2003-2004 Marvell(R).
====================================================
Add to your trouble-report the logfile install.log
which is located in the  DriverInstall directory.
====================================================


1) installation
2) generate patch
3) exit
Choose your favorite installation method: 1
Please read this carfully!

This script will automatically compile and load the sk98lin
driver on your host system. Before performing both compilation
and loading, it is necessary to shutdown any device using the
sk98lin kernel module and to unload the old sk98lin kernel
module. This script will do this automatically per default.
If you want to shutdown and unload the old sk98lin kernel module
manually, run the script in the EXPERT mode.

Please plug a card into your machine. Without a card we aren't
able to check the full driver functionality.

Do you want proceed? (y/N) y
Create tmp dir (/tmp/Sk98IkIgaTaQrGfkMJOqrcECl)                      [   OK   ]
Check user id (0)                                                    [   OK   ]
Check kernel version (2.6.9-42.ELsmp)                                [   OK   ]
Check kernel symbol file (/proc/kallsyms)                            [   OK   ]
Check kernel type (SMP)                                              [   OK   ]
Check number of CPUs (2)                                             [   OK   ]
Check architecture (found)                                           [   OK   ]
Set architecture (i386)                                              [   OK   ]
Check compiler (/usr/bin/gcc)                                        [   OK   ]
Check mcmodel flags (none)                                           [   OK   ]
Check module support (/sbin/insmod)                                  [   OK   ]
Check make (/usr/bin/make)                                           [   OK   ]
Check archive file (sk98lin)                                         [   OK   ]
Check kernel gcc version (3.4.6) (Kernel:3.4.6 == gcc:3.4.6)         [   OK   ]
Check sk98lin driver availability (not loaded)                       [   OK   ]
Check kernel header files (not found)                                [ failed ]
Kernel header not found. Please install the linux header files
development package or crate a symbolic link from the
/usr/src/KERNEL_VERSION directory to linux
     Example: ln -s /usr/src/KERNEL_VERSION /usr/src/linux

Installation of sk98lin driver module failed.
Delete temp directories (done)                                       [   OK   ]
作者: wangye2000    时间: 2007-01-08 16:18
[root@localhost src]# pwd
/usr/src
[root@localhost src]# ls kernels/
2.6.9-42.EL-hugemem-i686  2.6.9-42.EL-i686  2.6.9-42.EL-smp-i686
[root@localhost src]#
[root@localhost src]# ll
total 16
drwxr-xr-x  5 root root 4096 Jan  6 17:54 kernels
drwxr-xr-x  7 root root 4096 Jan  6 17:55 redhat
[root@localhost src]#


我如何建那个错误中提示的连接阿?
作者: ttvast    时间: 2007-01-08 16:22
ln -s /usr/src/kernels/2.6.9-42.EL-i686 /usr/src/linux
作者: wangye2000    时间: 2007-01-08 16:42
原帖由 ttvast 于 2007-1-8 16:22 发表
ln -s /usr/src/kernels/2.6.9-42.EL-i686 /usr/src/linux



驱动装好了,但是好像还是加载了sky2 ,我如何让他加载sk98lin呢??
我用lsmod 都可以看到两个:sky2 和 sk98lin
我用rmmod sky2 后,eth0 就不可以用了,然后我用modprobe sk98lin 后,我的eth0 还是不能用
如何让它生效 ???
作者: wangye2000    时间: 2007-01-08 17:05
标题: 回复 31楼 wangye2000 的帖子
那位能说一下吗?搞了一天了,还没搞定阿
作者: aran    时间: 2007-01-08 19:59
原帖由 wangye2000 于 2007-1-7 14:23 发表
IP地址应该没冲突,都是手动设置的,要是冲突的话,重启后也不能解决问题啊,
mac地址都没改过,要是冲突应该不是这种现象,我这个是过一段时间后就自动断了


你把mac地址改了看看,mac地址冲突好象不提示.

我有个同学,他们公司的宿舍是通过mac地址认证上网的.
要上网,还得去网管中心去登记.做啥事都要被监控,做了坏事(其实也就是看些成人的片子),一下子就会找到头上.

后来,我把机器的mac地址改成扫描到的服务器的mac地址,就上去拉!

linux和unix在网络设置放面比较严格.
由其是unix,如果那些地方设置的不合理,或是违反常规.就别想联到网上去.而这些情况在windows下,许多就被忽略了.
作者: feiy    时间: 2007-01-08 20:27
提示: 作者被禁止或删除 内容自动屏蔽
作者: ttvast    时间: 2007-01-08 21:49
/etc/modprobe.conf
alias eth0 sk98lin
alias eth1 sk98lin

还有,你看一下系统现在的sk98lin.ko是不是你安装上去的那一个, modprobe sk98lin之后看看dmesg有没有什么输出。
作者: ttvast    时间: 2007-01-08 21:52
sk98lin: no version for "struct_module" found: kernel tainted.
sk98lin: Network Device Driver v8.32.2.3
(C)Copyright 1999-2006 Marvell(R).
eth0: Marvell Yukon 88E8053 Gigabit Ethernet Controller
eth1: Marvell Yukon 88E8053 Gigabit Ethernet Controller

问题肯定是这个问题,因为我以前用sky2的时候发生过同样的情况,换成这个驱动就从来没有发生过(几个月)。
作者: hnzhanglei    时间: 2007-01-09 10:43
/etc/modprobe.conf
alias eth0 sk98lin
alias eth1 sk98lin
或者
/etc/modules.conf
alias eth0 sk98lin
alias eth1 sk98lin

[ 本帖最后由 hnzhanglei 于 2007-1-9 10:47 编辑 ]
作者: haowengyan    时间: 2007-01-10 10:14
标题: 1
ddddddddddddd
作者: dayan_he    时间: 2007-01-30 19:00
to  aran :

" 后来,我把机器的mac地址改成扫描到的服务器的mac地址,就上去拉! "

不太明白,  这个服务器不是机器的同一个网络内,但是也是你们同学公司的服务器吧!!!


楼主的问题解决了没有,呵呵,为什么不吭一声那
作者: broceliu    时间: 2007-01-30 20:49
对 看下日志   分析分析  具体问题具体对待
作者: wangye2000    时间: 2007-02-01 17:58
谢谢大家,问题解决了,是网卡的问题,不过我的网卡驱动还是没装上,我直接就换了一块网卡,"ttvast
"你能不能把更新网卡驱动的全过程发一下??
作者: mjy-033    时间: 2010-03-02 10:56
我也遇到同樣的問題,暈死了,主備兩個機器,同時連不進,
service network restart 正常,ping 不通外部網關
reboot就OK了:
[root@lhtmsbg01 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:55:83:798
          inet addr:10.134.28.105  Bcast:10.134.29.255  Mask:255.255.254.0
          inet6 addr: fe80::226:55ff:fe83:79d8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12465190 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5218289 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2394691026 (2.2 GiB)  TX bytes:5870121855 (5.4 GiB)
          Interrupt:122


第二個機器:
eth0      Link encap:Ethernet  HWaddr 18:A9:05:3B:A8:84
          inet addr:10.134.28.106  Bcast:10.134.29.255  Mask:255.255.254.0
          inet6 addr: fe80::1aa9:5ff:fe3b:a884/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9113159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1005016 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4432884884 (4.1 GiB)  TX bytes:73213489 (69.8 MiB)
          Interrupt:122




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