18/07/2014 Senne Vaeyens

Multicast on AWS



Recently, for an Intershop on Amazon Web Services Proof of Concept, a requirement was to enable multicast traffic between two EC2 instances, each running in another availability zone. As you might know, multicast traffic is natively not supported on AWS VPC, not in an availability zone nor between availability zones.

This article explains how to enable multicast traffic between two (or more) hosts using an n2n L2 tunnel (we use CentOS 6.5).

 

 

The make process should now have created two binaries:

  • supernode -> to be run on the supernode, used for connection setup and VPN tunnel registration
  • edge -> to be run on the nodes that will participate in multicast traffic

 

 

On the supernode, start the supernode process and add it to rc.local so it starts automatically when we start the instance. The deamon is listening on UDP port 1200, so don’t forget to create an AWS Security Group that allows UDP traffic on this port between all nodes that participate in the n2n tunnel (also include the supernode).

 

 

We then start the edge process on the multicast-enabled nodes. Please note that 192.168.1.1 and 192.168.1.2 are the tunnel’s endpoint addresses which will be associated with the edge0 interface created by the edge process. n2na1 is the hostname of the supernode, the -E parameter allows multicast over the tunnel:

 

 

We can verify if edge was started correctly by checking if the edge0 interface was created:

 

 

At this stage, multicast traffic between both EC2 instance over the edge0 interface should be possible. To make sure that all multicast traffic chooses the edge0 interface, we set up a static route:

 

 

Tx to buckhill for their post on n2n



Tagged: , , , , ,

Comments (4)

  1. emkay

    Hi there – How do we test multicasting works? I have done this with three EC2 nodes and I can’t seem to get replies when I try to ping them.

    • cloudar

      Hi emkay,

      Thanks for you reply. You can use MINT (http://sourceforge.net/projects/mc-mint/) or iperf to test if multicasting works.

      iperf example:

      Client; iperf -c 224.0.0.10 -b 50K -t 300 -T 5 -u 1234 -i 1 -l 136

      Server : iperf -s -B 224.0.0.10 -u -i 1

      Br,

      Senne Vaeyens

  2. Peter

    Is it possible to run both the supernode and the edge reliably on one of the instances?

    • Ben Bridts

      Hey Peter,

      The supernode is part of the n2n tunnel by default, so it’s not needed that you run both on the same instance.

Leave a Reply

Your email address will not be published. Required fields are marked *