web-dev-qa-db-ja.com

すべてのLinuxおよびUnixでパケットをドロップ

私は問題があります。 Supermicro製のマザーボード– X11SBA-LN4Fを持っています。 4つのイーサネットポートがあります。最初のポートでインターネットに接続します。 2番目のポートでは、ローカルネットワークに接続します。

とき、私はifconfigまたはnetstat -i、2番目のインターフェース(ローカルネットワーク)でドロップされたパケットを確認できます。このカウントは増加します

em2       Link encap:Ethernet  HWaddr 0c:c4:7a:7b:91:3e
          inet addr:192.168.110.181  Bcast:192.168.110.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17441 errors:0 dropped:1380 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1226317 (1.2 MB)  TX bytes:0 (0.0 B)

グーグルから検索した後、私はこれを見つけました: https://www.novell.com/support/kb/doc.php?id=7007165

Beginning with kernel 2.6.37, it has been changed the meaning of dropped packet count. Before, dropped packets was most likely due to an error. Now, the rx_dropped counter shows statistics for dropped frames because of:

Softnet backlog full  -- (Measured from /proc/net/softnet_stat)
Bad / Unintended VLAN tags
Unknown / Unregistered protocols
IPv6 frames when the server is not configured for IPv6

If any frames meet those conditions, they are dropped before the protocol stack and the rx_dropped counter is incremented.

まず第一に、私はこのコマンドを書きました:

tcpdump -vv -i em2

このコマンドの実行中、2番目のインターフェースでドロップされたパケットの数は停止します。しかし、tcpdumpを中止すると、ドロップされたパケットの数が再び増加します。

  • IPv6を無効にしました
  • すべてのVLANをチェックしました。そのポートには、ローカルネットワークにUntag VLAN=
  • ファイルを確認しました/proc/net/softnet_stat。そのファイルには最初の列からの情報しかありませんが、それは良いことです

    00000013 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00002fbc 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000f3 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000268f 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

  • すべてのトラフィックを「tcpdump」で分析しました。私が持っているのは– ARP要求、Broadcats、Ripだけです。そしてそれは悪くない

  • 無差別モードを有効にしましたが、それでも解決しませんでした
  • ケーブルとコネクタを確認しました
  • 最新のドライバーをインストール
  • リングキャッシュのサイズを増やしましたが、効果はありませんでした
  • そして、私はすべてのUnixとLinuxをチェックしました:Zeroshell、Pfense、FreeBsd、Ubuntu Server(ネイティブカーネルと私がコンパイルしたもの)、CentOS(ネイティブカーネルと私がコンパイルしたもの)。すべて同じ症状を示した。

    ethtool -i em2
    
    driver: igb
    version: 5.3.4.4
    firmware-version: 3.25, 0x800005d0
    bus-info: 0000:06:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: yes
    supports-priv-flags: no
    

そのインターフェースのすべての統計:

ethtool -S em2

NIC statistics:
     rx_packets: 29675
     tx_packets: 0
     rx_bytes: 2208735
     tx_bytes: 0
     rx_broadcast: 29636
     tx_broadcast: 0
     rx_multicast: 39
     tx_multicast: 0
     multicast: 39
     collisions: 0
     rx_crc_errors: 0
     rx_no_buffer_count: 0
     rx_missed_errors: 0
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     tx_window_errors: 0
     tx_abort_late_coll: 0
     tx_deferred_ok: 0
     tx_single_coll_ok: 0
     tx_multi_coll_ok: 0
     tx_timeout_count: 0
     rx_long_length_errors: 0
     rx_short_length_errors: 0
     rx_align_errors: 0
     tx_tcp_seg_good: 0
     tx_tcp_seg_failed: 0
     rx_flow_control_xon: 0
     rx_flow_control_xoff: 0
     tx_flow_control_xon: 0
     tx_flow_control_xoff: 0
     rx_long_byte_count: 2208735
     tx_dma_out_of_sync: 0
     lro_aggregated: 0
     lro_flushed: 0
     tx_smbus: 0
     rx_smbus: 0
     dropped_smbus: 0
     os2bmc_rx_by_bmc: 0
     os2bmc_tx_by_bmc: 0
     os2bmc_tx_by_Host: 0
     os2bmc_rx_by_Host: 0
     tx_hwtstamp_timeouts: 0
     rx_hwtstamp_cleared: 0
     rx_errors: 0
     tx_errors: 0
     tx_dropped: 0
     rx_length_errors: 0
     rx_over_errors: 0
     rx_frame_errors: 0
     rx_fifo_errors: 0
     tx_fifo_errors: 0
     tx_heartbeat_errors: 0
     tx_queue_0_packets: 0
     tx_queue_0_bytes: 0
     tx_queue_0_restart: 0
     rx_queue_0_packets: 29675
     rx_queue_0_bytes: 2090035
     rx_queue_0_drops: 0
     rx_queue_0_csum_err: 0
     rx_queue_0_alloc_failed: 0

私の問題はどこですか?私を助けてください。

 ifconfig em2; ethtool -S em2


em2       Link encap:Ethernet  HWaddr 0c:c4:7a:7b:91:3e
          inet addr:192.168.110.181  Bcast:192.168.110.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15387 errors:0 dropped:1224 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1085031 (1.0 MB)  TX bytes:0 (0.0 B)

NIC statistics:
     rx_packets: 15387
     tx_packets: 0
     rx_bytes: 1146579
     tx_bytes: 0
     rx_broadcast: 15367
     tx_broadcast: 0
     rx_multicast: 20
     tx_multicast: 0
     multicast: 20
     collisions: 0
     rx_crc_errors: 0
     rx_no_buffer_count: 0
     rx_missed_errors: 0
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     tx_window_errors: 0
     tx_abort_late_coll: 0
     tx_deferred_ok: 0
     tx_single_coll_ok: 0
     tx_multi_coll_ok: 0
     tx_timeout_count: 0
     rx_long_length_errors: 0
     rx_short_length_errors: 0
     rx_align_errors: 0
     tx_tcp_seg_good: 0
     tx_tcp_seg_failed: 0
     rx_flow_control_xon: 0
     rx_flow_control_xoff: 0
     tx_flow_control_xon: 0
     tx_flow_control_xoff: 0
     rx_long_byte_count: 1146579
     tx_dma_out_of_sync: 0
     lro_aggregated: 0
     lro_flushed: 0
     tx_smbus: 0
     rx_smbus: 0
     dropped_smbus: 0
     os2bmc_rx_by_bmc: 0
     os2bmc_tx_by_bmc: 0
     os2bmc_tx_by_Host: 0
     os2bmc_rx_by_Host: 0
     tx_hwtstamp_timeouts: 0
     rx_hwtstamp_cleared: 0
     rx_errors: 0
     tx_errors: 0
     tx_dropped: 0
     rx_length_errors: 0
     rx_over_errors: 0
     rx_frame_errors: 0
     rx_fifo_errors: 0
     tx_fifo_errors: 0
     tx_heartbeat_errors: 0
     tx_queue_0_packets: 0
     tx_queue_0_bytes: 0
     tx_queue_0_restart: 0
     rx_queue_0_packets: 15387
     rx_queue_0_bytes: 1085031
     rx_queue_0_drops: 0
     rx_queue_0_csum_err: 0
     rx_queue_0_alloc_failed: 0
1
Valeriu

おそらく何が起こっているのでしょうか?ここにtcpdump出力から投稿した内容に従って、サブネット上にIPv6ブロードキャストトラフィックが表示されています。

12:19:41.622297 IP6 (hlim 1, next-header UDP (17) payload length: 112) fe80::a4a0:460b:c99a:c992.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=455863 (elapsed-time 700) (client-ID hwaddr/time type 1 time 495735714 e03f49b54e07) (IA_NA IAID:65027913 T1:0 T2:0) (Client-FQDN) (vendor-class) (option-request vendor-specific-info DNS-server DNS-search-list Client-FQDN))

そして、あなたがここであなたの質問に書いたものに従って:

カーネル2.6.37以降、ドロップされたパケット数の意味が変更されました。以前は、ドロップされたパケットはエラーが原因である可能性が最も高かった。次の理由により、rx_droppedカウンターはドロップされたフレームの統計を表示します。

Softnet backlog full/ proc/net/softnet_statから測定)

悪い/意図しないVLANタグ

不明/未登録のプロトコル

---(サーバーがIPv6用に構成されていない場合のIPv6フレーム

これらの条件を満たすフレームは、プロトコルスタックの前にドロップされ、rx_droppedカウンターがインクリメントされます。

出力と質問から、サーバーでIPv6が実際に無効になっているように見えます。

これにより、ドロップされたパケットはネットワーク上の他のホストからのIPv6ブロードキャストトラフィックが原因である可能性が高いという結論に至りました。

これをテストするために、IPv6を再度有効にして、ドロップされたパケットがなくなるかどうかを確認できます。もしそうなら、これは無害です。

2