1.出现dropping request后eth0 RUNNING 标记消失
root:/# ifconfig
eth0 Link encap:Ethernet HWaddr 5C:6B:32:8A:1D:A8 inet addr:192.168.0.92 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:46767 errors:0 dropped:3 overruns:30 frame:30 TX packets:25829 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12234668 (11.6 MiB) TX bytes:9597803 (9.1 MiB) Interrupt:67lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:9301 errors:0 dropped:0 overruns:0 frame:0 TX packets:9301 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:678903 (662.9 KiB) TX bytes:678903 (662.9 KiB)2.通过设备检测程序检测eth0状态没有RUNNING标记后调用ifup eth0恢复。这种方法不是很好
3.调整内核参数
a.查看内核参数加载过程
PC机:/etc/rc.d/rc.sysinit
sysctl -e -p/etc/sysctl.conf >/dev/null 2>&1
嵌入式设备没有/etc/sysctl.conf,也没有rc.sysinit
b.根据嵌入式文件系统加载过程
修改rc.S中加入
sysctl -e -p/etc/sysctl.conf >/dev/null 2>&1
创建/etc/sysctl.conf
添加
# Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1