http://kb.linuxvirtualserver.org/api.php?action=feedcontributions&user=James&feedformat=atomLVSKB - User contributions [en]2024-03-29T07:31:52ZUser contributionsMediaWiki 1.26.2http://kb.linuxvirtualserver.org/wiki?title=Building_Windows_Media_Service_Cluster_using_LVS&diff=3884Building Windows Media Service Cluster using LVS2006-12-06T22:52:15Z<p>James: /* Configuration Example */</p>
<hr />
<div>== Introduction ==<br />
<br />
Microsoft Windows Media Service uses uses two streaming media protocols to deliver content as a unicast stream to clients:<br />
* Real Time Streaming Protocol ([[RTSP]])<br />
* Microsoft Media Server (MMS) protocol<br />
<br />
<br />
== Architecture ==<br />
<br />
<br />
== Configuration Example ==<br />
In order for us to get this to work, we need to allow the following ports in:<br/><br />
<br />
<ul><li>80 tcp (<em>ONLY NEEDED IF YOU ARE SERVING STREAMS THROUGH HTTP</em>)</li><br />
<li>554 tcp/udp</li><br />
<li>1755 tcp/udp</li><br />
<li>1024-5000 udp</li></ul><br />
<br />
<br/>This can be done like so, replacing <b>$EXT_IF</b> and <b>$EXT_IP</b> with your appropriate interface and IP:<br/><br/><br />
<br />
<ul><li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j ACCEPT</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -A INPUT -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 1755 -j ACCEPT)<br/><br/><br />
<br />
<br/>Next, we need to take a group the packets by using the MANGLE table in iptables. To do that you would do the following, replacing <b>$EXT_IF</b>, <b>$EXT_IP</b> and <b>$WMS_MARK</b> with your appropriate interface, IP and mark that you would like to tag the packets with:<br/><br/><br />
<br />
<ul><li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j MARK --set-mark $WMS_MARK</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 554 -j MARK --set-mark 1)<br/><br/><br />
<br />
<br/>Next, we need to tell LVS to do the load balancing. This can be done by doing the following, replacing <b>$WMS_MARK</b> and <b>$RSx_IP</b> with the appropriate mark that you chose above and your real server IPs:<br/><br/><br />
<br />
<ul><li>ipvsadm -D -f $WMS_MARK</li><br />
<li>ipvsadm -A -f $WMS_MARK -s rr -p 600</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> ipvsadm -A -f WMSLVS1 -s rr -p 600)<br />
<br/>(<b><em>example:</em></b> ipvsadm -a -f WMSLVS1 -r 10.10.10.1:0 -m)<br />
<br />
<br/><br/>Once you have completed these steps, you should have a working Windows Media Streaming Server LVS! Enjoy!<br />
<br />
== Conclusion ==<br />
In the above configuration example you see that I am using Round-Robin (rr). This is not necessary, you can use any type you want. I have switched my personal LVS setup to use Weighted Least Connections (wlc).<br />
<br />
== References ==<br />
<br />
* http://archive.linuxvirtualserver.org/html/lvs-users/2004-03/msg00176.html<br />
* [http://www.microsoft.com/windows/windowsmedia/forpros/serve/firewall.aspx Firewall Information for Windows Media Services 9 Series]<br />
* http://archive.linuxvirtualserver.org/html/lvs-users/2004-03/msg00176.html<br />
<br />
<br />
{{lvs-example-stub}}<br />
<br />
<br />
[[Category:LVS Examples|Media]]</div>Jameshttp://kb.linuxvirtualserver.org/wiki?title=Building_Windows_Media_Service_Cluster_using_LVS&diff=3405Building Windows Media Service Cluster using LVS2006-07-13T17:35:59Z<p>James: /* Conclusion */</p>
<hr />
<div>== Introduction ==<br />
<br />
Microsoft Windows Media Service uses uses two streaming media protocols to deliver content as a unicast stream to clients:<br />
* Real Time Streaming Protocol ([[RTSP]])<br />
* Microsoft Media Server (MMS) protocol<br />
<br />
<br />
== Architecture ==<br />
<br />
<br />
== Configuration Example ==<br />
In order for us to get this to work, we need to allow the following ports in:<br/><br />
<br />
<ul><li>80 tcp (<em>ONLY NEEDED IF YOU ARE SERVING STREAMS THROUGH HTTP</em>)</li><br />
<li>554 tcp/udp</li><br />
<li>1755 tcp/udp</li><br />
<li>1024-5000 udp</li></ul><br />
<br />
<br/>This can be done like so, replacing <b>$EXT_IF</b> and <b>$EXT_IP</b> with your appropriate interface and IP:<br/><br/><br />
<br />
<ul><li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j ACCEPT</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -A INPUT -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 1755 -j ACCEPT)<br/><br/><br />
<br />
<br/>Next, we need to take a group the packets by using the MANGLE table in iptables. To do that you would do the following, replacing <b>$EXT_IF</b>, <b>$EXT_IP</b> and <b>$WMS_MARK</b> with your appropriate interface, IP and mark that you would like to tag the packets with:<br/><br/><br />
<br />
<ul><li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j MARK --set-mark $WMS_MARK</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 554 -j MARK --set-mark WMSLVS1)<br/><br/><br />
<br />
<br/>Next, we need to tell LVS to do the load balancing. This can be done by doing the following, replacing <b>$WMS_MARK</b> and <b>$RSx_IP</b> with the appropriate mark that you chose above and your real server IPs:<br/><br/><br />
<br />
<ul><li>ipvsadm -D -f $WMS_MARK</li><br />
<li>ipvsadm -A -f $WMS_MARK -s rr -p 600</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> ipvsadm -A -f WMSLVS1 -s rr -p 600)<br />
<br/>(<b><em>example:</em></b> ipvsadm -a -f WMSLVS1 -r 10.10.10.1:0 -m)<br />
<br />
<br/><br/>Once you have completed these steps, you should have a working Windows Media Streaming Server LVS! Enjoy!<br />
<br />
== Conclusion ==<br />
In the above configuration example you see that I am using Round-Robin (rr). This is not necessary, you can use any type you want. I have switched my personal LVS setup to use Weighted Least Connections (wlc).<br />
<br />
== References ==<br />
<br />
* http://archive.linuxvirtualserver.org/html/lvs-users/2004-03/msg00176.html<br />
* [http://www.microsoft.com/windows/windowsmedia/forpros/serve/firewall.aspx Firewall Information for Windows Media Services 9 Series]<br />
<br />
<br />
{{lvs-example-stub}}<br />
<br />
<br />
[[Category:LVS Examples|Media]]</div>Jameshttp://kb.linuxvirtualserver.org/wiki?title=Building_Windows_Media_Service_Cluster_using_LVS&diff=3404Building Windows Media Service Cluster using LVS2006-07-13T17:21:14Z<p>James: /* Configuration Example */</p>
<hr />
<div>== Introduction ==<br />
<br />
Microsoft Windows Media Service uses uses two streaming media protocols to deliver content as a unicast stream to clients:<br />
* Real Time Streaming Protocol ([[RTSP]])<br />
* Microsoft Media Server (MMS) protocol<br />
<br />
<br />
== Architecture ==<br />
<br />
<br />
== Configuration Example ==<br />
In order for us to get this to work, we need to allow the following ports in:<br/><br />
<br />
<ul><li>80 tcp (<em>ONLY NEEDED IF YOU ARE SERVING STREAMS THROUGH HTTP</em>)</li><br />
<li>554 tcp/udp</li><br />
<li>1755 tcp/udp</li><br />
<li>1024-5000 udp</li></ul><br />
<br />
<br/>This can be done like so, replacing <b>$EXT_IF</b> and <b>$EXT_IP</b> with your appropriate interface and IP:<br/><br/><br />
<br />
<ul><li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j ACCEPT</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -A INPUT -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 1755 -j ACCEPT)<br/><br/><br />
<br />
<br/>Next, we need to take a group the packets by using the MANGLE table in iptables. To do that you would do the following, replacing <b>$EXT_IF</b>, <b>$EXT_IP</b> and <b>$WMS_MARK</b> with your appropriate interface, IP and mark that you would like to tag the packets with:<br/><br/><br />
<br />
<ul><li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j MARK --set-mark $WMS_MARK</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 554 -j MARK --set-mark WMSLVS1)<br/><br/><br />
<br />
<br/>Next, we need to tell LVS to do the load balancing. This can be done by doing the following, replacing <b>$WMS_MARK</b> and <b>$RSx_IP</b> with the appropriate mark that you chose above and your real server IPs:<br/><br/><br />
<br />
<ul><li>ipvsadm -D -f $WMS_MARK</li><br />
<li>ipvsadm -A -f $WMS_MARK -s rr -p 600</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> ipvsadm -A -f WMSLVS1 -s rr -p 600)<br />
<br/>(<b><em>example:</em></b> ipvsadm -a -f WMSLVS1 -r 10.10.10.1:0 -m)<br />
<br />
<br/><br/>Once you have completed these steps, you should have a working Windows Media Streaming Server LVS! Enjoy!<br />
<br />
== Conclusion ==<br />
<br />
<br />
== References ==<br />
<br />
* http://archive.linuxvirtualserver.org/html/lvs-users/2004-03/msg00176.html<br />
* [http://www.microsoft.com/windows/windowsmedia/forpros/serve/firewall.aspx Firewall Information for Windows Media Services 9 Series]<br />
<br />
<br />
{{lvs-example-stub}}<br />
<br />
<br />
[[Category:LVS Examples|Media]]</div>Jameshttp://kb.linuxvirtualserver.org/wiki?title=Building_Windows_Media_Service_Cluster_using_LVS&diff=3403Building Windows Media Service Cluster using LVS2006-07-13T17:17:54Z<p>James: /* Configuration Example */</p>
<hr />
<div>== Introduction ==<br />
<br />
Microsoft Windows Media Service uses uses two streaming media protocols to deliver content as a unicast stream to clients:<br />
* Real Time Streaming Protocol ([[RTSP]])<br />
* Microsoft Media Server (MMS) protocol<br />
<br />
<br />
== Architecture ==<br />
<br />
<br />
== Configuration Example ==<br />
In order for us to get this to work, we need to allow the following ports in:<br/><br />
<br />
<ul><li>80 tcp (<em>ONLY NEEDED IF YOU ARE SERVING STREAMS THROUGH HTTP</em>)</li><br />
<li>554 tcp/udp</li><br />
<li>1755 tcp/udp</li><br />
<li>1024-5000 udp</li></ul><br />
<br />
<br/>This can be done like so, replacing <b>$EXT_IF</b> and <b>$EXT_IP</b> with your appropriate interface and IP:<br/><br/><br />
<br />
<ul><li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j ACCEPT</li><br />
<li>iptables -A INPUT -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j ACCEPT</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -A INPUT -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 1755 -j ACCEPT)<br/><br/><br />
<br />
<br/>Next, we need to take a group the packets by using the MANGLE table in iptables. To do that you would do the following, replacing <b>$EXT_IF</b>, <b>$EXT_IP</b> and <b>$WMS_MARK</b> with your appropriate interface, IP and mark that you would like to tag the packets with:<br/><br/><br />
<br />
<ul><li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 554 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p tcp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1755 -j MARK --set-mark $WMS_MARK</li><br />
<li>iptables -t mangle -A PREROUTING -i $EXT_IF -p udp -s 0/0 -d $EXT_IP --dport 1024:5000 -j MARK --set-mark $WMS_MARK</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 0/0 -d 1.2.3.4 --dport 554 -j MARK --set-mark WMSLVS1)<br/><br/><br />
<br />
<br/>Next, we need to tell LVS to do the load balancing. This can be done by doing the following, replacing <b>$WMS_MARK</b> and <b>$RSx_IP</b> with the appropriate mark that you chose above and your real server IPs:<br/><br/><br />
<br />
<ul><li>ipvsadm -D -f $WMS_MARK</li><br />
<li>ipvsadm -A -f $WMS_MARK -s rr -p 600</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_IP:0 -m</li><br />
<li>ipvsadm -a -f $WMS_MARK -r $RS1_2P:0 -m</li></ul><br />
<br />
<br/>(<b><em>example:</em></b> ipvsadm -A -f WMSLVS1 -s rr -p 600)<br />
<br/>(<b><em>example:</em></b> ipvsadm -a -f WMSLVS1 -r 10.10.10.1:0 -m)<br />
<br />
<br/><br/>Once you have completed these steps, you should have a working Windows Media Streaming Server LVS! Enjoy!<br />
<br />
== Conclusion ==<br />
<br />
<br />
== References ==<br />
<br />
* http://archive.linuxvirtualserver.org/html/lvs-users/2004-03/msg00176.html<br />
* [http://www.microsoft.com/windows/windowsmedia/forpros/serve/firewall.aspx Firewall Information for Windows Media Services 9 Series]<br />
<br />
<br />
{{lvs-example-stub}}<br />
<br />
<br />
[[Category:LVS Examples|Media]]</div>James