0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

マルチキャスト通信できない原因はrp_filterの設定方法でした。最大を取るなんて

Posted at

ルータ越しの通信において、受信プログラム(アプリ層)がマルチキャスト・パケットを受信できない問題に遭遇しました。当初からReverse Path Filter(以降、RPFと言う)が怪しいことは当たりをつけていたのですが、なんかしっくりこない現象の説明ができず悶々としていたのですが、先程ようやく解決しました。

問題

C7_1から配布されたマルチキャスト・パケットがC7_2で受けられません。C7_2のLANポートには届いている(tcpdump及びWireSharkで確認)。

net.ipv4.conf.eth2.rp_filter = 0とRPFを無効(パケット・フィルタリングを無効)にしたつもりでも受けられません。

net.ipv4.conf.all.rp_filter = 0とした場合でも同様に受けられません。

ちなみに、net.ipv4.conf.eth2.rp_filter = 2だと受けられます。

環境

  • GNS3 2.1.21
  • ホストOS: Ubuntu 18.04
  • ゲストOS: CentOS 7.4 1708(図中のC7_1とC7_2)

ネットワーク・トポロジ

ss_20190814_2.png

  • 両端末にファイアウォールは設定していない
  • 両端末(C7_1とC7_2)の間にルーティングは無し(pingは通らない)
  • ルータ(R1とR2)ではip pim dense-mode

解決

piyolianさんのウェブページにヒント(というか答え)がありました。

net.ipv4.conf.eth2.rp_filternet.ipv4.conf.all.rp_filterは、両者の 最大値 を取るようです。つまり、どちらか一方をゼロにしても、CentOS 7の初期値は1なので1、つまり厳格モードとなって受信できなかったようです。

蛇足ですが、piyolianさんのウェブページによると、CentOS 6時代はAND(論理積)だったそうです。

おまけ

両端末(C7_1とC7_2)の間がルーティングされている(pingされている場合)は、net.ipv4.conf.*.rp_filterを設定(変更)しなくても受信できます。

参考

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?