免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6206 | 回复: 19
打印 上一主题 下一主题

[网络管理] 服务器网络连接中断问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-05-13 17:10 |只看该作者 |倒序浏览
想请教一下,

我这边是把服务器直接 挂在 外网上的,有独立 的公网IP

现在经常出现这台服务器不能提供服务的情况,连接不了其它internet ,其它主机 也不能访问进来(正常应用不能访问,不知道有没有非法访问行)

通过  tcpdump 观察了几天了,
主要一些异常数据包分为三类:
1、ARP
类似
ARP, Request who-has 119.6.62.93 tell 119.6.62.89, length 46

2、 看似域名请求
  IP 122.225.217.191.domain > 228.80.1.8.7175: 13421* 1/0/0 CNAME cbcehcdeac.hnh.asyezhu.com. (5
  这类报文本机没有回应(没有反方向的报文出去)。

3、ACK 攻击
   researchscan010.eecs.umich.edu.58269 > 228.80.1.8.https: Flags [.], ack 1773, win 91, options [nop,nop,TS val 583152360 ecr 277837444], length 0
   有https 端口服务,该类报文有些有回应有些没有,回应如下:

IP 228.80.1.8.https > researchscan010.eecs.umich.edu.58269: Flags [P.], seq 1773:1810, ack 358, win 122, options [nop,nop,TS val 277837548 ecr 583152377], length 37


其它暂时没有发现 什么 异常的。
请问网络会中断跟这三类的报文有 关系 吗?

刚刚我重启服务器 也不能连通,后来是
sudo ifdown -i eth0

sudo ifup -i eth0
后恢复。

不能连通时,检查路由表与连接正常时完全一致。
此时 ping 不通网关,
连接内部的 网络(eth1)可以PING通。

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2013-05-13 17:23 |只看该作者
重启服务器也不通,还需要手工设置网卡?
你检查下网卡在启动阶段的日志吧.
另外,外网不能访问的时候,内网能否正常访问?

论坛徽章:
0
3 [报告]
发表于 2013-05-14 13:54 |只看该作者
回复 2# chenyx


    在不通的时候 ,内网是 通的。

    早上出现不通时,重启服务器不行,重新启用 网卡也不通了。我是刚刚才把网卡启用(时间间隔有3个小时, 上行有其它工作没有管它得),又好了。
    怀疑肯定还是被攻击所致。

    我看了下 iptables-save 导出的内容 与我之前预写入的内容是完全 一致的,也就是说,没有被在 iptables 上做手脚。
   
    boot.log 中看起来没有任何问题发生,全是OK 连 warning 也没有一个。

    最后一次故障后启动时的 dmesg 内容:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.5.0-28-generic (buildd@panlong) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #48-Ubuntu SMP Tue Apr 23 23:03:38 UTC 2013 (Ubuntu 3.5.0-28.48-generic 3.5.7.9)
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.5.0-28-generic root=/dev/mapper/filesvr-root ro
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bf75ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bf76e000-0x00000000bf76ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000bf770000-0x00000000bf77dfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000bf77e000-0x00000000bf7cffff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000bf7d0000-0x00000000bf7dffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000bf7ed000-0x00000000bfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ffa00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001bfffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.5 present.
[    0.000000] DMI: HP ProLiant DL180 G6  , BIOS O20 10/15/2009
[    0.000000] e820: update [mem 0x00000000-0x0000ffff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
"dmesg" 983L, 64977C                                                                                                    1,1           Top
[    6.658936] type=1400 audit(1368493607.171:5): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=534 comm="apparmor_parser"
[    6.658943] type=1400 audit(1368493607.171:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=529 comm="apparmor_parser"
[    6.658950] type=1400 audit(1368493607.171:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=614 comm="apparmor_parser"
[    6.659156] type=1400 audit(1368493607.171:: apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=534 comm="apparmor_parser"
[    6.659165] type=1400 audit(1368493607.171:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=529 comm="apparmor_parser"
[    6.659172] type=1400 audit(1368493607.171:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=614 comm="apparmor_parser"
[    6.706095] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    6.718033] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.725766] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    6.732672] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[    6.824982] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.828182] microcode: CPU1 sig=0x106a5, pf=0x1, revision=0x11
[    6.829316] microcode: CPU2 sig=0x106a5, pf=0x1, revision=0x11
[    6.830360] microcode: CPU3 sig=0x106a5, pf=0x1, revision=0x11
[    6.831377] microcode: CPU4 sig=0x106a5, pf=0x1, revision=0x11
[    6.832502] microcode: CPU5 sig=0x106a5, pf=0x1, revision=0x11
[    6.833693] microcode: CPU6 sig=0x106a5, pf=0x1, revision=0x11
[    6.834735] microcode: CPU7 sig=0x106a5, pf=0x1, revision=0x11
[    6.835803] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    6.839993] kvm: disabled by bios
[    6.917968] kvm: disabled by bios
[    6.937087] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    7.019072] kvm: disabled by bios
[    7.023003] kvm: disabled by bios
[    7.044115] kvm: disabled by bios
[    7.119914] kvm: disabled by bios
[    7.123819] kvm: disabled by bios
[    7.209237] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[    7.222919] kvm: disabled by bios
[    7.281764] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
[    7.734086] vesafb: mode is 1024x768x32, linelength=4096, pages=0
[    7.734090] vesafb: scrolling: redraw
[    7.734093] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    7.738813] vesafb: framebuffer at 0xf8000000, mapped to 0xffffc90011c80000, using 3072k, total 3072k
[    7.738992] Console: switching to colour frame buffer device 128x48
[    7.773742] fb0: VESA VGA frame buffer device
[    7.990149] kjournald starting.  Commit interval 5 seconds
[    7.990575] EXT3-fs (dm-3): using internal journal
[    7.990580] EXT3-fs (dm-3): mounted filesystem with ordered data mode
[    8.069780] init: failsafe main process (947) killed by TERM signal
[    8.183566] type=1400 audit(1368493608.699:11): apparmor="STATUS" operation="profile_load" name="/usr/sbin/named" pid=1052 comm="apparmor_parser"
[    8.221696] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
[    8.222524] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

标示红色的日志正常吗?意味着什么?

如果需要我再把 dmesg 其它 内容附上。


下面是 kern.log 今天早上的内容:

May 14 09:06:48 filesvr kernel: [    7.773742] fb0: VESA VGA frame buffer device
May 14 09:06:48 filesvr kernel: [    7.990149] kjournald starting.  Commit interval 5 seconds
May 14 09:06:48 filesvr kernel: [    7.990575] EXT3-fs (dm-3): using internal journal
May 14 09:06:48 filesvr kernel: [    7.990580] EXT3-fs (dm-3): mounted filesystem with ordered data mode
May 14 09:06:48 filesvr kernel: [    8.183566] type=1400 audit(1368493608.699:11): apparmor="STATUS" operation="profile_load" name="/usr/sbin/named" pid=1052 comm="apparmor_parser"
May 14 09:06:48 filesvr kernel: [    8.221696] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
May 14 09:06:48 filesvr kernel: [    8.222524] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 14 09:06:48 filesvr kernel: [    8.450165] NET: Registered protocol family 15
May 14 09:06:49 filesvr kernel: [    8.490823] Initializing XFRM netlink socket
May 14 09:06:49 filesvr kernel: [    9.060427] igb: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
May 14 09:06:49 filesvr kernel: [    9.061365] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
May 14 09:22:37 filesvr kernel: [  955.578946] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
May 14 09:22:39 filesvr kernel: [  957.002321] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
May 14 09:22:39 filesvr kernel: [  957.003458] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 14 09:32:28 filesvr kernel: [ 1545.712290] igb: eth0 NIC Link is Down
May 14 09:32:30 filesvr kernel: [ 1547.342094] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
May 14 11:37:42 filesvr kernel: [ 9047.301720] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
May 14 11:37:44 filesvr kernel: [ 9048.701819] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
May 14 11:37:44 filesvr kernel: [ 9048.702956] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 14 13:09:17 filesvr kernel: [14532.466280] Netfilter messages via NETLINK v0.30.
May 14 13:09:17 filesvr kernel: [14532.476991] ctnetlink v0.93: registering with nfnetlink.
May 14 13:15:57 filesvr kernel: [14932.597650] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
May 14 13:15:59 filesvr kernel: [14933.997054] igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
May 14 13:15:59 filesvr kernel: [14933.998197] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 14 13:17:41 filesvr kernel: [15035.784712] device eth0 entered promiscuous mode
May 14 13:26:38 filesvr kernel: [15571.844158] device eth0 left promiscuous mode
May 14 13:26:50 filesvr kernel: [15584.335251] device eth0 entered promiscuous mode


多谢赐教。

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
4 [报告]
发表于 2013-05-14 14:08 |只看该作者
那个错误没见过,不过,应该不是主要的问题.
从你下面的日志上来看,你的系统eth0,是千兆的卡,经常发生up/down状态改变.不知道你eth0对端是什么设备,是否是千兆的.
建议你,首先看看网卡速率匹配的问题,另外,如果有驱动,最好升级下你的网卡驱动

论坛徽章:
0
5 [报告]
发表于 2013-05-14 14:24 |只看该作者
网卡的驱动 我想应该是 没有问题的,因为这台服务器有两张 网卡,连接内网的网卡,一直工作正常,
始终是外网的通讯 异常,,所以我觉得驱动 应该没有什么问题。

另外 日志上面的 状态变化,,我也有些费解,,其中部分 up/down 状态变化,肯定是因为我想尝试恢复,操作的结果,但是有些我就不知道是怎么回事了,
外线连接的交换设备应该是 100M 的。

早上 9:6 的时候,应该是我重启服务器的时间。

有没有其它可能?或者是否需要其它的资料以寻找 线索 ?

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
6 [报告]
发表于 2013-05-14 14:27 |只看该作者
我以前见过一个网卡,也是服务器的.我用来做nat的,在压力大的时候,网卡就掉了,后来换了一个Intel的网卡解决的问题.
你还是看看你的网卡的官网有没有新的驱动啥的吧

论坛徽章:
0
7 [报告]
发表于 2013-05-14 15:27 |只看该作者
从HP官网 找了下, 没有 UBUNTU 的驱动更新,
正好 内核本来有更新,我把内核更新(3.5.0.29)了,再观察一下。

记得以前也没有出这种奇怪 问题的,好像是上次最后 内核 更新(3.5.0.28)后,出现这个问题比较频率。

根据你的提示,回想了一下。

非常感谢哈,,如果还不行时再请教。~

论坛徽章:
0
8 [报告]
发表于 2013-05-16 09:39 |只看该作者
跟内核 版本没有关系,,还是要出问题。

再连接中断时,到 服务器那边 检查了下 硬件,,看到网卡的 工作指示灯,状态不正常,
看了下 两端的 水晶头, 都接触不大好,再加上 有一端 是在常有人员走动,可能碰触的地方,
把水晶头重新做了,暂时 OK,再行 观察。

扯淡的事情:这根用了几年网线,水晶头内的压线顺序居然 两端不一致,关键也还不是交叉直连的方式,
一端是 :橙白  橙 绿白 蓝白  蓝 绿  棕白 棕
另一端 : 橙白  橙 绿白 蓝 蓝白  绿  棕白 棕

奇了个怪,,还 用了 几年了。

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
9 [报告]
发表于 2013-05-16 09:43 |只看该作者
百兆线路,蓝和棕色的不连通都没事.
建议你,既然对端是百兆的,尝试将那个网卡的模式强制设置成百兆,观察下.

论坛徽章:
0
10 [报告]
发表于 2013-05-17 17:05 |只看该作者
今天 没有出问题~~继续 观察 中。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP