免费注册 查看新帖 |

Chinaunix

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

[网络管理] 路由器ping外网丢包.帮忙看看是那里的原因?(已解决) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-01 01:17 |只看该作者 |倒序浏览
以下是PING网易的丢包情况.
  1. Reply from 220.181.28.52: bytes=32 time=63ms TTL=52
  2. Request timed out.
  3. Reply from 220.181.28.52: bytes=32 time=76ms TTL=52
  4. Reply from 220.181.28.52: bytes=32 time=72ms TTL=52
  5. Reply from 220.181.28.52: bytes=32 time=80ms TTL=52
  6. Reply from 220.181.28.52: bytes=32 time=61ms TTL=52
  7. Reply from 220.181.28.52: bytes=32 time=72ms TTL=52
  8. Reply from 220.181.28.52: bytes=32 time=70ms TTL=52
  9. Request timed out.
  10. Reply from 220.181.28.52: bytes=32 time=82ms TTL=52
  11. Request timed out.
  12. Reply from 220.181.28.52: bytes=32 time=76ms TTL=52
  13. Reply from 220.181.28.52: bytes=32 time=76ms TTL=52
  14. Reply from 220.181.28.52: bytes=32 time=68ms TTL=52
  15. Reply from 220.181.28.52: bytes=32 time=79ms TTL=52
  16. Request timed out.
  17. Reply from 220.181.28.52: bytes=32 time=70ms TTL=52
  18. Reply from 220.181.28.52: bytes=32 time=75ms TTL=52
  19. Reply from 220.181.28.52: bytes=32 time=81ms TTL=52
  20. Reply from 220.181.28.52: bytes=32 time=85ms TTL=52
  21. Reply from 220.181.28.52: bytes=32 time=69ms TTL=52
  22. Reply from 220.181.28.52: bytes=32 time=67ms TTL=52
  23. Reply from 220.181.28.52: bytes=32 time=80ms TTL=52
  24. Reply from 220.181.28.52: bytes=32 time=81ms TTL=52
  25. Request timed out.
  26. Reply from 220.181.28.52: bytes=32 time=68ms TTL=52
  27. Reply from 220.181.28.52: bytes=32 time=77ms TTL=52
复制代码


路由器脚本:

  1. #!/bin/bash
  2. echo 1 > /proc/sys/net/ipv4/ip_forward
  3. /sbin/modprobe ip_conntrack_ftp
  4. /sbin/modprobe ip_nat_ftp
  5. /sbin/iptables -F -t filter
  6. /sbin/iptables -F -t nat
  7. /sbin/iptables -P INPUT DROP
  8. /sbin/iptables -P OUTPUT ACCEPT
  9. /sbin/iptables -P FORWARD ACCEPT
  10. /sbin/iptables -t nat -P PREROUTING ACCEPT
  11. /sbin/iptables -t nat -P POSTROUTING ACCEPT
  12. /sbin/iptables -t nat -P OUTPUT ACCEPT

  13. # ALLOW ALL IN PRIVATE NET
  14. /sbin/iptables -A INPUT -i eth1 -j ACCEPT

  15. # KEEP CONNECTIONS
  16. /sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

  17. # NAT
  18. /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 210.113.*.*
复制代码


网络连接情况:

  1. [odsnlrbq@route etc]$ /usr/bin/sar -n DEV 2 1
  2. Linux 2.4.21-27.0.2.EL (route)
  3. IFACE   rxpck/s   txpck/s   rxbyt/s   txbyt/s   rxcmp/s   txcmp/s  rxmcst/s
  4.         lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  5.       eth0   2479.05   2587.84 1512365.54 666432.43      0.00      0.00      0.00
  6.       eth1   2591.89   2231.76 667495.95 1484487.84      0.00      0.00      0.00

  7. Average:        IFACE   rxpck/s   txpck/s   rxbyt/s   txbyt/s   rxcmp/s   txcmp/s  rxmcst/s
  8. Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
  9. Average:         eth0   2479.05   2587.84 1512365.54 666432.43      0.00      0.00      0.00
  10. Average:         eth1   2591.89   2231.76 667495.95 1484487.84      0.00      0.00      0.00
复制代码

[ 本帖最后由 jk0wg 于 2007-12-1 03:25 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-12-01 01:59 |只看该作者
内网接口的状态:


  1. eth1      Link encap:Ethernet  HWaddr 00:0A:EB:97:5A:E5
  2.           inet addr:192.168.0.254  Bcast:192.168.0.255  Mask:255.255.255.0
  3.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  4.           RX packets:1860887 errors:0 dropped:0 overruns:0 frame:0
  5.           TX packets:1618328 errors:0 dropped:0 overruns:2 carrier:0
  6.           collisions:0 txqueuelen:1000
  7.           RX bytes:429213171 (409.3 Mb)  TX bytes:1185293554 (1130.3 Mb)
  8.           Interrupt:11 Base address:0xf000
复制代码

外网接口的状态:
  1. eth0      Link encap:Ethernet  HWaddr 00:8:*:*:*:*
  2.           inet addr:220.*.*.*  Bcast:220.*.*.*  Mask:255.255.255.252
  3.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  4.           RX packets:2142420 errors:0 dropped:0 overruns:0 frame:0
  5.           TX packets:2032082 errors:0 dropped:0 overruns:3 carrier:0
  6.           collisions:0 txqueuelen:1000
  7.           RX bytes:1366911528 (1303.5 Mb)  TX bytes:471374061 (449.5 Mb)
  8.           Interrupt:12 Base address:0xd000
复制代码



感觉数据很大. 不知道是否正常??

[ 本帖最后由 jk0wg 于 2007-12-1 02:01 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-12-01 03:26 |只看该作者
找到原因了.  内网有人下载东西. 最后通过限速后.正常了.

论坛徽章:
0
4 [报告]
发表于 2007-12-01 15:42 |只看该作者
LZ用什么限速的?tc还是其它软件?可否介绍一下!

论坛徽章:
0
5 [报告]
发表于 2007-12-01 17:19 |只看该作者
原帖由 lxw2016 于 2007-12-1 15:42 发表
LZ用什么限速的?tc还是其它软件?可否介绍一下!

我用的是白金老大的方法:

http://linux.chinaunix.net/bbs/v ... ;highlight=platinum
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP