Skip to content

Commit ac0bc73

Browse files
committed
finish readme
1 parent 0c00e85 commit ac0bc73

File tree

4 files changed

+65
-12
lines changed

4 files changed

+65
-12
lines changed

README.md

Lines changed: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# AWS Transit Gateway Multicast Demo
22

3-
This demo uses an environment in the AWS us-east-1 region containing the following resources:
3+
This guide helps you creating an environment to demonstrate the AWS Transit Gateway Multicast feature. The environment will be in the AWS us-east-1 region, containing the following resources:
44

5-
* A VPC with public and private subnets across three AZs.
5+
* A VPC with public and private subnets across two AZs.
66
* A Linux Bastion Host, accessible using SSM Session Manager and to be used as the multicast traffic source.
77
* An AutoScaling Group with 3 instances, accessible using SSM Session Manager and to be used as the multicast traffic receivers.
88
* A Transit Gateway with Multicast support.
@@ -54,22 +54,75 @@ Select the domain you created above, open the **Associations** tab and click **C
5454

5555
## Add a multicast source
5656

57-
Go to the EC2 console and take a note of the Bastion Host instance ID, we'll need the ID to identify the ENI we are adding as a multicast domain source.
58-
TODO
57+
From the [Transit Gateway Mulicast console](https://console.aws.amazon.com/vpc/home?region=us-east-1#TransitGatewayMulticastDomains:sort=transitGatewayMulticastDomainId), select the multicast domain you created earlier. Click the **Groups** tab and click **Add source**. Enter `239.0.0.1` in the **Group IP Address** field. In the **Choose network interfaces** filter field type `BastionHost`, select the ENI. Click the **Add sources** button to complete the operation.
58+
59+
![Add Members](img/TGW-Add-Sources.png)
5960

6061
## Add multicast members
6162

62-
Go to the EC2 console and take a note of the ASG instance IDs, we'll need the IDs to identify the ENIs we are adding as multicast domain destinations.
63-
TODO
63+
From the [Transit Gateway Mulicast console](https://console.aws.amazon.com/vpc/home?region=us-east-1#TransitGatewayMulticastDomains:sort=transitGatewayMulticastDomainId), select the multicast domain you created earlier. Click the **Groups** tab and click **Add member**. Enter `239.0.0.1` in the **Group IP Address** field. In the **Choose network interfaces** filter field type `ASGLINUX` (these are the instances in the Autoscaling group), select all thhe ENIs. Click the **Add Members** button to complete the operation.
64+
65+
![Add Members](img/TGW-Add-Members.png)
66+
67+
## Start terminal sessions to the source and members intances
68+
69+
Now that you have a one source and multiple members, you will use `iperf`, `omping`, and a Python sample application to test connectivity and bandwidth between the EC2 instances in the multicast domain.
70+
71+
Open the EC2 console, select the [BastionHost instance](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:search=BastionHost;sort=instanceState) and click **Connect**. For Connection method, select **Session Manager** and click **Connect**. Leave this session tab open.
72+
73+
Open the EC2 console, select the [McdemoCdkStack/ASGLINUX](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:search=BastionHost;sort=instanceState) one at the time and click **Connect**. For Connection method, select **Session Manager** and click **Connect**. Leave these sessions tabs open.
74+
75+
You should now have four browser windows/tabs with sessions established to the source and member instances.
76+
77+
![Sessions](img/SSS-Sessions.png)
78+
79+
## Test multicast connectivity using `iperf`
80+
81+
Start `iperf` servers in each of the instances part of the Autoscaling Group, these are the instances that will receive traffic from the source (BastionHost). Use the command below to listen for UDP multicast traffic on the group address `239.0.0.1`
82+
83+
`iperf -s -u -B 239.0.0.1`
84+
85+
Start an `iperf` client in the BastionHost (source) instance. Use the command below to send UDP multicast traffic to the group address `239.0.0.1`
86+
87+
`iperf -u -c 239.0.0.1`
88+
89+
You can also add parameters to `iperf` to create parallel connections, how long the test will run for, and how much bandwidth per connection to use. The command below will create a client with 10 connections, for 30 seconds, and 1Gb/s per connection.
90+
91+
`iperf -u -c 239.0.0.1 -t 30 -P 10 -b 1G`
92+
93+
To stop the `iperf` servers press CTRL+C twice.
94+
95+
## Test multicast connectivity using Python
96+
97+
The instances contain two Python scripts, a sender script to run in the BastionHost and a receiver script to run in the AutoScaling instances.
98+
99+
In the Autoscaling group instances (receivers) terminal sessions, execute the following:
100+
101+
`python /opt/mcreceiver.py`
102+
103+
In the BastionHost instance (sender) terminal session, execute the following to send one message to the receivers:
104+
105+
`python /opt/mcsender.py`
106+
107+
To send one message every one second continuously, you can use the following one liner:
108+
109+
`while true; do python /opt/mcsender.py; sleep 1; done;`
110+
111+
To stop the python scripts press CTRL+C.
112+
113+
## Test multicast connectivity using `omping`
64114

65-
## Test using iperf
115+
The `omping` tool needs the IP addresses of the instances you want to test connectivity, replace the 10.99.x.x addresses in the command below with your own and run the command on all terminal sessions starting with the BastionHost:
66116

67-
TODO
117+
`omping -m 239.0.0.1 -p 1234 10.99.x.x 10.99.x.x 10.99.x.x 10.99.x.x`
68118

69-
## Test using omping
119+
For example, in my environment the command is: `omping -m 239.0.0.1 -p 1234 10.99.169.17 10.99.147.76 10.99.195.70 10.99.248.153`
70120

71-
TODO
121+
You should see unicast responses in all instances from the other instances, but multicast responses only in the receiver instances.
72122

73-
## Test using Python sender and receiver scripts
123+
## Clean up
74124

75-
TODO
125+
* Delete all the subnet associations from the [Multicast domain](https://console.aws.amazon.com/vpc/home?region=us-east-1#TransitGatewayMulticastDomains:sort=transitGatewayMulticastDomainId).
126+
* Delete the VPC attachment from the [Transit Gateway Attachments](https://console.aws.amazon.com/vpc/home?region=us-east-1#TransitGatewayAttachments:sort=transitGatewayAttachmentId) console.
127+
* Delete the Transit Gateway from the [Transit Gateways](https://console.aws.amazon.com/vpc/home?region=us-east-1#TransitGateways:sort=transitGatewayId) console.
128+
* Run `cdk destroy` from your terminal in the folder you cloned this repo.

img/SSS-Sessions.png

432 KB
Loading

img/TGW-Add-Members.png

301 KB
Loading

img/TGW-Add-Sources.png

231 KB
Loading

0 commit comments

Comments
 (0)