Ping 응답이 손실되지만 tcpdump에서 볼 수 있습니다.

Ping 응답이 손실되지만 tcpdump에서 볼 수 있습니다.

레드햇 2.6.32-754.el6.x86_64

NIC 역할을 하고 관련 드라이버와 함께 제공되는 FPGA 카드가 있습니다.

내 RH 호스트에서 FPGA NIC를 통해 ping을 실행하면 많은 응답이 손실됩니다. 그러나 tcpdump를 실행하고 icmp에서 필터링하면 응답을 볼 수 있습니다.

다음은 ping의 샘플 출력입니다(누락된 시퀀스 번호가 많음).

 from 172.16.1.9: icmp_seq=465 ttl=128 time=0.600 ms
64 bytes from 172.16.1.9: icmp_seq=467 ttl=128 time=0.490 ms
64 bytes from 172.16.1.9: icmp_seq=480 ttl=128 time=0.565 ms
64 bytes from 172.16.1.9: icmp_seq=482 ttl=128 time=0.590 ms
64 bytes from 172.16.1.9: icmp_seq=516 ttl=128 time=0.448 ms
64 bytes from 172.16.1.9: icmp_seq=526 ttl=128 time=0.649 ms
64 bytes from 172.16.1.9: icmp_seq=528 ttl=128 time=0.534 ms
64 bytes from 172.16.1.9: icmp_seq=539 ttl=128 time=0.424 ms
64 bytes from 172.16.1.9: icmp_seq=546 ttl=128 time=0.606 ms
64 bytes from 172.16.1.9: icmp_seq=562 ttl=128 time=0.521 ms
64 bytes from 172.16.1.9: icmp_seq=569 ttl=128 time=0.651 ms
64 bytes from 172.16.1.9: icmp_seq=591 ttl=128 time=0.503 ms
64 bytes from 172.16.1.9: icmp_seq=617 ttl=128 time=0.652 ms
64 bytes from 172.16.1.9: icmp_seq=642 ttl=128 time=0.503 ms
64 bytes from 172.16.1.9: icmp_seq=643 ttl=128 time=0.672 ms
64 bytes from 172.16.1.9: icmp_seq=644 ttl=128 time=0.443 ms
64 bytes from 172.16.1.9: icmp_seq=657 ttl=128 time=0.427 ms
64 bytes from 172.16.1.9: icmp_seq=668 ttl=128 time=0.503 ms
64 bytes from 172.16.1.9: icmp_seq=704 ttl=128 time=0.332 ms
64 bytes from 172.16.1.9: icmp_seq=741 ttl=128 time=0.486 ms
64 bytes from 172.16.1.9: icmp_seq=742 ttl=128 time=0.478 ms
64 bytes from 172.16.1.9: icmp_seq=751 ttl=128 time=0.513 ms
64 bytes from 172.16.1.9: icmp_seq=753 ttl=128 time=0.511 ms
From 172.16.0.156 icmp_seq=788 Destination Host Unreachable
From 172.16.0.156 icmp_seq=789 Destination Host Unreachable
From 172.16.0.156 icmp_seq=790 Destination Host Unreachable
From 172.16.0.156 icmp_seq=792 Destination Host Unreachable
From 172.16.0.156 icmp_seq=793 Destination Host Unreachable
From 172.16.0.156 icmp_seq=794 Destination Host Unreachable
64 bytes from 172.16.1.9: icmp_seq=798 ttl=128 time=0.671 ms
64 bytes from 172.16.1.9: icmp_seq=799 ttl=128 time=0.608 ms
64 bytes from 172.16.1.9: icmp_seq=801 ttl=128 time=0.538 ms
64 bytes from 172.16.1.9: icmp_seq=814 ttl=128 time=0.402 ms
64 bytes from 172.16.1.9: icmp_seq=923 ttl=128 time=0.458 ms
From 172.16.0.156 icmp_seq=952 Destination Host Unreachable
From 172.16.0.156 icmp_seq=953 Destination Host Unreachable
From 172.16.0.156 icmp_seq=954 Destination Host Unreachable
From 172.16.0.156 icmp_seq=956 Destination Host Unreachable
From 172.16.0.156 icmp_seq=957 Destination Host Unreachable
From 172.16.0.156 icmp_seq=958 Destination Host Unreachable
64 bytes from 172.16.1.9: icmp_seq=966 ttl=128 time=0.472 ms
From 172.16.0.156 icmp_seq=979 Destination Host Unreachable
From 172.16.0.156 icmp_seq=980 Destination Host Unreachable
From 172.16.0.156 icmp_seq=981 Destination Host Unreachable
64 bytes from 172.16.1.9: icmp_seq=993 ttl=128 time=0.586 ms
^C
--- 172.16.1.9 ping statistics ---
997 packets transmitted, 96 received, +15 errors, 90% packet loss, time 996823ms
rtt min/avg/max/mdev = 0.332/31.837/2001.563/226.238 ms, pipe 3

다음은 동시에 실행되는 tcpdump의 스니펫입니다.

16:27:24.300566 IP 172.16.1.9 > 172.16.0.156: ICMP echo reply, id 56849, seq 990, length 64
    0x0000:  4500 0054 571e 0000 8001 89c5 ac10 0109  E..TW...........
    0x0010:  ac10 009c 0000 e573 de11 03de ecd8 f65b  .......s.......[
    0x0020:  0000 0000 9294 0400 0000 0000 1011 1213  ................
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637 0000                           4567..
16:27:25.300102 IP 172.16.0.156 > 172.16.1.9: ICMP echo request, id 56849, seq 991, length 64
    0x0000:  4500 0054 0000 4000 4001 e0e3 ac10 009c  E..T..@.@.......
    0x0010:  ac10 0109 0800 5073 de11 03df edd8 f65b  ......Ps.......[
    0x0020:  0000 0000 1e94 0400 0000 0000 1011 1213  ................
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637                                4567
16:27:25.300683 IP 172.16.1.9 > 172.16.0.156: ICMP echo reply, id 56849, seq 991, length 64
    0x0000:  4500 0054 571f 0000 8001 89c4 ac10 0109  E..TW...........
    0x0010:  ac10 009c 0000 5873 de11 03df edd8 f65b  ......Xs.......[
    0x0020:  0000 0000 1e94 0400 0000 0000 1011 1213  ................
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637 0000                           4567..
16:27:26.300166 IP 172.16.0.156 > 172.16.1.9: ICMP echo request, id 56849, seq 992, length 64
    0x0000:  4500 0054 0000 4000 4001 e0e3 ac10 009c  E..T..@.@.......
    0x0010:  ac10 0109 0800 0a72 de11 03e0 eed8 f65b  .......r.......[
    0x0020:  0000 0000 6394 0400 0000 0000 1011 1213  ....c...........
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637                                4567
16:27:26.300766 IP 172.16.1.9 > 172.16.0.156: ICMP echo reply, id 56849, seq 992, length 64
    0x0000:  4500 0054 5720 0000 8001 89c3 ac10 0109  E..TW...........
    0x0010:  ac10 009c 0000 1272 de11 03e0 eed8 f65b  .......r.......[
    0x0020:  0000 0000 6394 0400 0000 0000 1011 1213  ....c...........
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637 0000                           4567..
16:27:27.300141 IP 172.16.0.156 > 172.16.1.9: ICMP echo request, id 56849, seq 993, length 64
    0x0000:  4500 0054 0000 4000 4001 e0e3 ac10 009c  E..T..@.@.......
    0x0010:  ac10 0109 0800 2071 de11 03e1 efd8 f65b  .......q.......[
    0x0020:  0000 0000 4c94 0400 0000 0000 1011 1213  ....L...........
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637                                4567
16:27:27.300694 IP 172.16.1.9 > 172.16.0.156: ICMP echo reply, id 56849, seq 993, length 64
    0x0000:  4500 0054 5721 0000 8001 89c2 ac10 0109  E..TW!..........
    0x0010:  ac10 009c 0000 2871 de11 03e1 efd8 f65b  ......(q.......[
    0x0020:  0000 0000 4c94 0400 0000 0000 1011 1213  ....L...........
    0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223  .............!"#
    0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233  $%&'()*+,-./0123
    0x0050:  3435 3637 0000                           4567..
^C
1034 packets captured
1036 packets received by filter
0 packets dropped by kernel
1034 packets captured
1036 packets received by filter
0 packets dropped by kernel

따라서 tcpdump 출력에서 ​​ping이 완전히 놓친 시퀀스 번호 992, 991 및 990의 에코 응답을 볼 수 있기를 바랍니다.

내장 NIC로 전환하면 ping이 예상대로 작동합니다. 이것은 내 운전자를 의심하게 만듭니다. 하지만 드라이버라면 tcpdump도 icmp 응답을 볼 수 없나요?

답변1

내 운전기사야! NET_IP_ALIGN 오프셋과 관련된 내용이 혼동되고 ICMP 응답의 대상 MAC 주소 중 처음 2바이트가 드라이버에 의해 손상되었습니다. 분명히 tcpdump는 MAC 주소(무차별 모드)에 관심이 없지만 ping에는 관심이 있습니다.

흥미롭게도 대상 MAC 주소의 처음 2바이트가 0x00이면 핑은 응답을 볼 수 없지만 다른 바이트라면 통과할 것 같습니다! 따라서 0x00이 아닌 올바른 값일 필요는 없는 것 같습니다. 이것은 내 드라이버에 다시 문제가 될 수 있습니다.

관련 정보