• 注册
  • 查看作者
  • IP 隧道建立后无法 Ping 通,求助网络大佬

    在机器 A 和机器 B 这两台机器上建立了一条 IP 隧道,用的是 IPIP 模式,但是建立好之后无法 ping 通,用同样的方式在另外的两台机器上建立是能够 ping 通的,百思不得其解,求助 v 友帮忙看下。

    A 机器隧道

    [email protected]: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
        link/ipip 192.168.0.27 peer 192.168.0.53
        inet 1.1.1.1 peer 2.2.2.2/32 brd 255.255.255.255 scope global tun1
           valid_lft forever preferred_lft forever
        inet6 fe80::5efe:c0a8:1b/64 scope link 
           valid_lft forever preferred_lft forever
    

    B 机器隧道

    [email protected]: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
        link/ipip 192.168.0.53 peer 192.168.0.27
        inet 2.2.2.2 peer 1.1.1.1/32 brd 255.255.255.255 scope global tun1
           valid_lft forever preferred_lft forever
        inet6 fe80::5efe:c0a8:35/64 scope link 
           valid_lft forever preferred_lft forever
    

    在 A 机器中 ping 2.2.2.2 不通,抓包 tun1 结果是

    09:32:03.045283 IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1434, length 64
    09:32:04.069248 IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1435, length 64
    09:32:05.093183 IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1436, length 64
    09:32:06.117212 IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1437, length 64
    

    可见只有发出去的包,没有回来的包。 抓包 A 机器 eth0 网卡结果是:

    09:32:58.309256 IP 192.168.0.27 > 192.168.0.53: IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1488, length 64 (ipip-proto-4)
    09:32:58.310069 IP 192.168.0.53 > 192.168.0.27: IP 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 58496, seq 1488, length 64 (ipip-proto-4)
    09:32:59.333270 IP 192.168.0.27 > 192.168.0.53: IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1489, length 64 (ipip-proto-4)
    09:32:59.334073 IP 192.168.0.53 > 192.168.0.27: IP 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 58496, seq 1489, length 64 (ipip-proto-4)
    09:33:00.357227 IP 192.168.0.27 > 192.168.0.53: IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1490, length 64 (ipip-proto-4)
    09:33:00.358090 IP 192.168.0.53 > 192.168.0.27: IP 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 58496, seq 1490, length 64 (ipip-proto-4)
    09:33:01.381253 IP 192.168.0.27 > 192.168.0.53: IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1491, length 64 (ipip-proto-4)
    09:33:01.382149 IP 192.168.0.53 > 192.168.0.27: IP 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 58496, seq 1491, length 64 (ipip-proto-4)
    09:33:02.405262 IP 192.168.0.27 > 192.168.0.53: IP 1.1.1.1 > 2.2.2.2: ICMP echo request, id 58496, seq 1492, length 64 (ipip-proto-4)
    

    既有 request 包也有 reply 包,但是却没有到达机器的 tun1 上,不知道是为什么,这种情况应该怎么解决呢?

  • 0
  • 0
  • 0
  • 4
  • 请登录之后再进行评论

    登录
  • 单栏布局 侧栏位置: