Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1172070
  • 博文数量: 245
  • 博客积分: 10185
  • 博客等级: 上将
  • 技术积分: 2744
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-30 17:07
文章分类

全部博文(245)

文章存档

2015年(1)

2014年(1)

2013年(1)

2012年(1)

2011年(37)

2010年(20)

2009年(14)

2008年(38)

2007年(88)

2006年(44)

分类: LINUX

2007-01-28 17:10:19

14:46分发现wind(6.147)死机,重起主机后发现从登陆服务器上无法登陆,通过kvm登陆,重起,结果仍是如此。查看netstat –nr输出

[root@wind network-scripts]# netstat -nr

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

1.1.6.128   0.0.0.0         255.255.255.192 U        40 0          0 eth1

127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo

0.0.0.0         1.1.6.190   0.0.0.0         UG       40 0          0 eth1

结果正常,但还是无法ping 1.1.6.190

查看/var/log/messages,提示

Jan 28 15:23:34 wind kernel: bcm5700: eth0 NIC Link is DOWN

以为网卡坏,检查ping自己,发现正常,以为是连接windswitch端口坏,去机房查看,发现指示灯为绿色,应正常,更换在switch上的端口,问题依旧!

#more ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

IPADDR=1.1.6.147

NETMASK=255.255.255.192

GATEWAY=1.1.6.190

ONBOOT=yes

# more ifcfg-eth1

DEVICE=eth1

BOOTPROTO=static

IPADDR=1.1.6.147

NETMASK=255.255.255.192

GATEWAY=1.1.6.190

ONBOOT=no

[root@wind network-scripts]ifconfig -a

eth0   

Link encap:Ethernet  HWaddr 00:06:5B:8C:EB:8B 

          inet addr:1.1.6.147  Bcast:1.1.6.191  Mask:255.255.255.192

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:40243 errors:0 dropped:0 overruns:0 frame:0

          TX packets:39323 errors:1 dropped:0 overruns:0 carrier:0

          collisions:359 txqueuelen:100

          RX bytes:5284573 (5.0 Mb)  TX bytes:23082943 (22.0 Mb)

          Interrupt:29

 

 eth1   Link encap:Ethernet  HWaddr 00:06:5B:8C:EB:8A 

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:40243 errors:0 dropped:0 overruns:0 frame:0

          TX packets:39323 errors:1 dropped:0 overruns:0 carrier:0

          collisions:359 txqueuelen:100

          RX bytes:5284573 (5.0 Mb)  TX bytes:23082943 (22.0 Mb)

          Interrupt:28   

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:118 errors:0 dropped:0 overruns:0 frame:0

          TX packets:118 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:10884 (10.6 Kb)  TX bytes:10884 (10.6 Kb)

证明现在起用的是eth0,利用ifdown ,ifup命令反复将eth0 down up问题还是依旧,此时王伟怀疑server上的eth0eth1上的接线有误,将eth0,eth1的配置更改过来,再执行ifdown eth1,ifdown eth1,就正常!

[root@wind network-scripts]# more  ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

IPADDR=1.1.6.147

NETMASK=255.255.255.192

GATEWAY=1.1.6.190

ONBOOT=no

You have new mail in /var/spool/mail/root

[root@wind network-scripts]# more  ifcfg-eth1

DEVICE=eth1

BOOTPROTO=static

IPADDR=1.1.6.147

NETMASK=255.255.255.192

GATEWAY=1.1.6.190

ONBOOT=yes

[root@wind network-scripts]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:06:5B:8C:EB:8A 

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:92468 errors:0 dropped:0 overruns:0 frame:0

          TX packets:90404 errors:2 dropped:0 overruns:0 carrier:0

          collisions:940 txqueuelen:100

          RX bytes:12640169 (12.0 Mb)  TX bytes:54586605 (52.0 Mb)

          Interrupt:28

 

eth1      Link encap:Ethernet  HWaddr 00:06:5B:8C:EB:8B 

          inet addr:1.1.6.147  Bcast:1.1.6.191  Mask:255.255.255.192

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:92468 errors:0 dropped:0 overruns:0 frame:0

          TX packets:90404 errors:2 dropped:0 overruns:0 carrier:0

          collisions:940 txqueuelen:100

          RX bytes:12640169 (12.0 Mb)  TX bytes:54586605 (52.0 Mb)

          Interrupt:29

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:120 errors:0 dropped:0 overruns:0 frame:0

          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:11034 (10.7 Kb)  TX bytes:11034 (10.7 Kb)

 

建议大家遇到这种问题,还是先检查网卡是否正常,工作正常的话用ifconfig 0a先看哪个网卡在工作,再去看主机上的网线是否接错(dell 网卡数字1表示eth0.2表示eth1).

两点疑惑:

1) 重起时系统报错:

ssh secure shell 2.3.0(non commercial version)

fatal : creating listener failed :port22 probably already in use.

用netstat -an来看22端口在.不知这个提示是什么意思?

开始我还以为是系统什么原因导致ssh 无法启动,导致登陆服务器无法连接该机器!

2) linux下用什么来看网卡已up呢? ifconfig的哪列输出能看出来.

我知道solaris里的ifconfig -a

lo0: flags=849 mtu 8232
        inet 127.0.0.1 netmask ff000000
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500       inet 1.1.6.68 netmask ffffffc0 broadcast 159.226.6.127

up就表示网卡已起来!

------------------------------2007.2.7日补充---------------------------------

和solaris一样,up的网卡在 ifconfig的输出中能看出来.如现在已UP起来的eth1,就有这行显示:

eth1      Link encap:Ethernet  HWaddr 00:06:5B:8C:EB:8B 

          inet addr:1.1.6.147  Bcast:1.1.6.191  Mask:255.255.255.192

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:92468 errors:0 dropped:0 overruns:0 frame:0

          TX packets:90404 errors:2 dropped:0 overruns:0 carrier:0

          collisions:940 txqueuelen:100

          RX bytes:12640169 (12.0 Mb)  TX bytes:54586605 (52.0 Mb)

          Interrupt:29

 

 

 

阅读(1484) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~