Netplanを使用したマルチキャストルーティング

Netplanを使用したマルチキャストルーティング

Ubuntu 18.04.2 Netplanの構文でインターフェイスへのマルチキャストパスを設定しようとすると、次のことは許可されません。

routes:
 - to: 224.0.0.0/4
   dev: eno1

この構成は機能しません。

addresses:
 - 192.160.0.1/24
routes:
 - to: 224.0.0.0/4
   via: 192.168.0.1

マルチキャストルーティングを正しく設定する方法は?

ベストアンサー1

Ubuntu 20.04で設定したばかりの場合は、次to:の警告が表示されます。

Error in network definition: unicast route must include both a 'to' and 'via' IP

そのパスはユニキャストパスであると推定されます。ただし、viaマルチキャストパスを追加する場合はこれは必要ありません。

正しい設定は次のとおりです。

    ens224:
      addresses:
      - 192.160.0.1/24
      routes:
      - to: 224.0.0.0/4
        scope: link

これにより、次のパスが追加されます。

224.0.0.0/4 dev ens224 proto static scope link

scope:説明: http://manpages.ubuntu.com/manpages/focus/man5/netplan.5.html より正確に: http://manpages.ubuntu.com/manpages/focus/man8/ip-route.8.html

              scope SCOPE_VAL
                     the scope of the destinations covered by the route prefix.  SCOPE_VAL may be
                     a number or a string from the file /etc/iproute2/rt_scopes.  If this
                     parameter is omitted, ip assumes scope global for all gatewayed unicast
                     routes, scope link for direct unicast and broadcast routes and scope host
                     for local routes.

おすすめ記事