<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>multicast Archives | Cloudar</title>
	<atom:link href="https://cloudar.be/tag/multicast/feed/" rel="self" type="application/rss+xml" />
	<link>https://cloudar.be/tag/multicast/</link>
	<description>100% Focus On AWS // 100% Customer Obsession</description>
	<lastBuildDate>Fri, 18 Jul 2014 20:46:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Multicast on AWS</title>
		<link>https://cloudar.be/awsblog/multicast-on-aws/</link>
					<comments>https://cloudar.be/awsblog/multicast-on-aws/#comments</comments>
		
		<dc:creator><![CDATA[Senne Vaeyens]]></dc:creator>
		<pubDate>Fri, 18 Jul 2014 20:46:09 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[intershop]]></category>
		<category><![CDATA[multicast]]></category>
		<category><![CDATA[n2n]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=323</guid>

					<description><![CDATA[<p>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 [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/multicast-on-aws/">Multicast on AWS</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></br><br />
Recently, for an <a href="http://www.intershop.com/" target="_blank" rel="noopener noreferrer">Intershop</a> 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, <a href="http://aws.amazon.com/vpc/faqs/" target="_blank" rel="noopener noreferrer">multicast traffic is natively not supported </a> on AWS VPC, not in an availability zone nor between availability zones.</p>
<p>This article explains how to enable multicast traffic between two (or more) hosts using an <a href="http://www.ntop.org/products/n2n/" target="_blank" rel="noopener noreferrer">n2n</a> L2 tunnel (we use CentOS 6.5).</p>
<p>&nbsp;</p>
<pre>#First; install compile tools &amp; s3cmd
yum -y install svn make gcc s3cmd

#Download the code
svn co https://svn.ntop.org/svn/ntop/trunk/n2n

#Disable encryption and compression before compiling the binaries; this should improve performance
cd n2n/n2n_v2
sed -i "s/#N2N_OPTION_AES=no/N2N_OPTION_AES=no/g" Makefile
sed -i "s/#define N2N_COMPRESSION_ENABLED 1/#define N2N_COMPRESSION_ENABLED 0/g" n2n.h
make
</pre>
<p>&nbsp;</p>
<p>The make process should now have created two binaries:</p>
<ul>
<li>supernode -&gt; to be run on the supernode, used for connection setup and VPN tunnel registration</li>
<li>edge -&gt; to be run on the nodes that will participate in multicast traffic</li>
</ul>
<p>&nbsp;</p>
<pre>#Install the supernode binary on this host
cp ./supernode /usr/bin/

#store binaries in s3

s3cmd put supernode s3://bucketname/files/supernode
s3cmd put edge s3://bucketname/files/edge

# on the edge servers, install the edge binary

s3cmd get s3://bucketname/files/edge /usr/bin/edge
chmod +x /usr/bin/edge
</pre>
<p>&nbsp;</p>
<p>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&#8217;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).</p>
<p>&nbsp;</p>
<pre>#start the supernode and automatically start it on reboot 

supernode -l 1200
echo "supernode -l 1200" &gt;&gt; /etc/rc.local
</pre>
<p>&nbsp;</p>
<p>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&#8217;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:</p>
<p>&nbsp;</p>
<pre>#App server 1

edge -l n2na1:1200 -c Intershop -a 192.168.1.1 -E
echo "edge -l n2na1:1200 -c Intershop -a 192.168.1.1" &gt;&gt; /etc/rc.local

#App server 2

edge -l n2na1:1200 -c Intershop -a 192.168.1.2 -E
echo "edge -l n2na1:1200 -c Intershop -a 192.168.1.2" &gt;&gt; /etc/rc.local
</pre>
<p>&nbsp;</p>
<p>We can verify if edge was started correctly by checking if the edge0 interface was created:</p>
<p>&nbsp;</p>
<pre>root@Appa1 $ ifconfig edge0
edge0     Link encap:Ethernet  HWaddr c7:5a:4b:ba:34:21
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1400  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:816 (816.0 B)
</pre>
<p>&nbsp;</p>
<p>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:</p>
<p>&nbsp;</p>
<pre>#route multicast trough n2n, but during startup, wait 10 secs for the edge0 interface to become available 
route add -net 224.0.0.0 netmask 240.0.0.0 dev edge0
echo "sleep 10" &gt;&gt; /etc/rc.local
echo "route add -net 224.0.0.0 netmask 240.0.0.0 dev edge0" &gt;&gt; /etc/rc.local
</pre>
<p>&nbsp;</p>
<p>Tx to <a href="https://www.buckhill.co.uk/blog/how-to-enable-broadcast-and-multicast-on-amazon-aws-ec2/2#.U8tL9I2Symd" target="_blank" rel="noopener noreferrer">buckhill</a> for their post on n2n<br />
</br></br></br></p>
<p>The post <a href="https://cloudar.be/awsblog/multicast-on-aws/">Multicast on AWS</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cloudar.be/awsblog/multicast-on-aws/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
