icmp请求已收到,但未回复 [英] icmp request received, but doesn't reply

查看:404
本文介绍了icmp请求已收到,但未回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了3台CentOS服务器,将server2配置为介于192.168.1.0/24和30.0.0.0/24之间的路由器,但是 ping 无法通过.

I set up 3 CentOS servers, configured server2 as router between 192.168.1.0/24 and 30.0.0.0/24, but ping can't get through.

我尝试从server1 ping 192.168.1.62 ,根据server3上的 tcpdump ,收到了ICMP请求,但它不会生成ICMP响应.

I tried ping 192.168.1.62 from server1, according to tcpdump on server3, ICMP request is received, but it doesn't generate ICMP response.

23:36:06.436243 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2838, length 64
23:36:07.436212 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2839, length 64

设置

服务器
  • 服务器1:

    Setup

    Servers
    • server1:

      • eth0-30.0.0.2

      server2:

      • eth0-192.168.1.61
      • eth0:0-30.0.0.1

      server3:

      • eth0-192.168.1.62
      • server1上的路由信息​​:

      • route info on server1:

      • 0.0.0.0 30.0.0.1

      server3上的路由信息​​:

      route info on server3:

      • 30.0.0.0/24 192.168.1.61

      推荐答案

      我正在接收ICMP数据包,但没有看到它们出去.问题与流量穿越多个接口和默认情况下启用反向路径筛选有关.

      I was receiving ICMP packets but did not see them go out. The problem was related to the traffic traversing multiple interfaces and reverse path filtering being on by default...

      我首先启用了火星源日志记录:

      I've enabled martian source logging first:

      $ echo 1 >/proc/sys/net/ipv4/conf/eth2/log_martians
      

      然后有几个选项可以处理它们......我正在启用松散处理它们:

      Then there are several options for what to do with them... I'm enabling loosely handling them:

      $ sysctl net.ipv4.conf.all.rp_filter=2
      

      有关详细信息,请参见以下内容:

      See these for details:

      这篇关于icmp请求已收到,但未回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆