User Tools

Site Tools


doc:howto:udp_multicast

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:udp_multicast [2013/04/20 06:47]
gatak
doc:howto:udp_multicast [2014/07/08 12:19] (current)
theoradicus add ipv6
Line 9: Line 9:
 ===== Solutions ===== ===== Solutions =====
 Thanks to IGMP snooping, igmpproxy should no longer cause wifi hogging and so you can have both igmpproxy and udpxy configured and running, accessing IPTV over wifi with udpxy when needed. Thanks to IGMP snooping, igmpproxy should no longer cause wifi hogging and so you can have both igmpproxy and udpxy configured and running, accessing IPTV over wifi with udpxy when needed.
 +
 +Please note, that IGMP snooping is only available when **kmod-bridge** package is installed.
  
 ==== IGMP proxy ==== ==== IGMP proxy ====
-If your client is behind NAT, it can't subscribe to multicast directly, so it needs some kind of proxy to do it for him. OpenWrt comes with [[http://​sourceforge.net/​projects/​igmpproxy|igmpproxy utility]] to do that automatically. You need to edit ''/​etc/​igmpproxy.conf''​ according to your setup:+If your client is behind NAT, it can't subscribe to multicast directly, so it needs some kind of proxy to do it for him. OpenWrt comes with [[http://​sourceforge.net/​projects/​igmpproxy|igmpproxy utility]] to do that automatically. ​ 
 + 
 +First you need to install package - opkg install igmpproxy 
 + 
 + 
 +You need to edit ''/​etc/config/​igmpproxy''​ according to your setup:
 <​code>​ <​code>​
-quickleave +config igmpproxy 
-# eth1 is the WAN interface +        option ​quickleave ​1 
-# 10.254.0.0/​16 is the ip range your ISP sends multicast from + 
-phyint eth1 upstream ​ ​ratelimit 0  threshold 1 +config phyint 
-        altnet 10.254.0.0/​16 +        ​option network wan 
-# br-lan is LAN bridge +        option direction ​upstream 
-phyint ​br-lan downstream ​ ​ratelimit 0  threshold 1+        ​list altnet 10.254.0.0/​16 
 + 
 +config ​phyint 
 +        option network ​lan 
 +        option direction ​downstream
 </​code>​ </​code>​
  
-If you're not sure what to specify for altnet, comment it out and look for the igmpproxy output in the log (or on stdout if you start it in debug mode), it'll say something like ''​Warn:​ The source address 10.254.16.66 for group 233.32.240.222,​ is not in any valid net for upstream VIF.''​ and so you'll learn the multicast source address for your ISP.+If you're not sure what to specify for altnet, comment it out and look for the igmpproxy output in the log (or on stdout if you start it in debug mode - you can simply test by igmpproxy -d /​etc/​igmpproxy.conf), it'll say something like ''​Warn:​ The source address 10.254.16.66 for group 233.32.240.222,​ is not in any valid net for upstream VIF.''​ and so you'll learn the multicast source address for your ISP. 
 + 
 + 
 +=== Network interface settings === 
 + 
 +You need to enable IGMP snooping on your LAN interface:​ 
 + 
 +<​code>​ 
 +config interface lan 
 +        option type bridge 
 +        option igmp_snooping 1 
 +        ... 
 +</​code>​
  
 === Firewall settings === === Firewall settings ===
Line 37: Line 60:
         option dest_ip ​ 224.0.0.0/4         option dest_ip ​ 224.0.0.0/4
         option target ​  ​ACCEPT         option target ​  ​ACCEPT
 +        option family ​  ipv4
 </​code>​ </​code>​
  
Line 83: Line 107:
 </​code>​ </​code>​
  
 +
 +=== Using igmpproxy and udpxy together ===
 +When using igmpproxy together with udpxy, firewall rules must be combined. ​ You need three firewall rules:
 +<​code>​
 +config rule
 +        option src      wan
 +        option proto    igmp
 +        option target ​  ​ACCEPT
 +config rule
 +        option src      wan
 +        option proto    udp
 +        option dest     lan
 +        option dest_ip ​ 224.0.0.0/4
 +        option target ​  ​ACCEPT
 +config rule
 +        option src      wan
 +        option proto    udp
 +        option dest_ip ​ 224.0.0.0/4
 +        option target ​  ​ACCEPT
 +</​code>​
  
 ==== Multicast forwading ==== ==== Multicast forwading ====
Line 91: Line 135:
 This will forward all multicast packets to all ports on your bridge, making igmpproxy or udpxy unnecessary. In large networks, this may not be desirable. This will forward all multicast packets to all ports on your bridge, making igmpproxy or udpxy unnecessary. In large networks, this may not be desirable.
  
 +===== IPv6 ======
 +
 +IPv6 uses MLD see [[wp>​Multicast_Listener_Discovery]]
doc/howto/udp_multicast.1366433264.txt.bz2 · Last modified: 2013/04/20 06:47 by gatak