Help us understand the problem. What is going on with this article?

Transit Gateway Multicast を使って、EC2で Multicast を試してみる

概要

Transit Gateway が Multicast に対応したので実際に EC2 で Multicast を試してみる。

(2019-12-04) AWS Transit Gateway にマルチキャストとインターリージョンピアリング機能を追加
https://aws.amazon.com/jp/blogs/news/aws-transit-gateway-adds-multicast-and-inter-regional-peering/

Multicast on Transit Gateways
https://docs.aws.amazon.com/ja_jp/vpc/latest/tgw/tgw-multicast-overview.html

Transit Gateway を使いますが、特に VPC をまたがらないとだめなわけではなく、1つの VPC でも動きます。

注意点

  • 2019-12-06 米国東部 (バージニア北部)のみ
  • EC2インスタンスによっては出来ないやつがあるみたいだ

https://docs.aws.amazon.com/ja_jp/vpc/latest/tgw/tgw-multicast-overview.html

Multicast source — An elastic network interface associated with a supported EC2 instance that sends multicast traffic.
Multicast group member — An elastic network interface associated with a supported EC2 instance that receives multicast traffic. A multicast group has multiple group members.

実際試す過程で、t2.micro では出来なかったが、t3.micro は出来た

(2019-12-23 追記) Nitro 以外のインスタンスをマルチキャスト送信者にすることはできないようです。
https://docs.aws.amazon.com/vpc/latest/tgw/tgw-multicast-overview.html

A non-Nitro instance cannot be a multicast sender.

手順

公式の手順通りでOK
https://docs.aws.amazon.com/ja_jp/vpc/latest/tgw/working-with-multicast.html

  • EC2 3台 (t3.micro)
  • 全て同一VPC
  • Source: 10.0.12.137
  • Reciever1: 10.0.15.220
  • Reciever2: 10.0.12.99 (Source と同じサブネット)

結果

iperf で確認してみる。
同じVPC、同じサブネットでも問題なく動いてた。

(2019-12-19 補足) iperf2 でやってます。iperf3 は multicast 対応してないかも

Multicast Source

[ec2-user@ip-10-0-12-137 ~]$ iperf -c 224.0.0.100 -u -T 1 -t 100 -i 1 -b 1M

Client connecting to 224.0.0.100, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
Setting multicast TTL to 1
UDP buffer size: 208 KByte (default)

[ 3] local 10.0.12.137 port 45323 connected with 224.0.0.100 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 131 KBytes 1.07 Mbits/sec
[ 3] 1.0- 2.0 sec 128 KBytes 1.05 Mbits/sec
[ 3] 2.0- 3.0 sec 128 KBytes 1.05 Mbits/sec

Multicast Reciever 1

[ec2-user@ip-10-0-15-220 ~]$ iperf -s -u -B 224.0.0.100 -i 1

Server listening on UDP port 5001
Binding to local address 224.0.0.100
Joining multicast group 224.0.0.100
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)

[ 3] local 224.0.0.100 port 5001 connected with 10.0.12.137 port 45323
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 129 KBytes 1.06 Mbits/sec 0.031 ms 0/ 90 (0%)
[ 3] 1.0- 2.0 sec 128 KBytes 1.05 Mbits/sec 0.171 ms 0/ 89 (0%)
[ 3] 2.0- 3.0 sec 128 KBytes 1.05 Mbits/sec 0.105 ms 0/ 89 (0%)

Multicast Recierver 2(ソースと同じサブネット)

[ec2-user@ip-10-0-12-99 ~]$ iperf -s -u -B 224.0.0.100 -i 1
Server listening on UDP port 5001
Binding to local address 224.0.0.100
Joining multicast group 224.0.0.100
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)


[ 3] local 224.0.0.100 port 5001 connected with 10.0.12.137 port 45323
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 129 KBytes 1.06 Mbits/sec 0.098 ms 0/ 90 (0%)
[ 3] 1.0- 2.0 sec 128 KBytes 1.05 Mbits/sec 0.015 ms 0/ 89 (0%)
[ 3] 2.0- 3.0 sec 128 KBytes 1.05 Mbits/sec 0.035 ms 0/ 89 (0%)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away