Wednesday, March 24, 2010

Watching UDP Multicast Stream on Linux

  1. Configure a network interface to use a proper version of IGMP.
  2. Add a routing entry to the routing table:
    # ip route add 224.0.0.0/4 dev eth0
    

    You can add a routing entry by initsctipts:
    $ cat /etc/sysconfig/network-scripts/route-eth0
    224.0.0.0/4 dev eth0
    
    # ifup eth0
    
    # ip route show | grep 224
    224.0.0.0/4 dev eth0  scope link
    
  3. Configure iptables:
    # iptables -A INPUT -i eth0 -d 224.0.0.0/4 -j ACCEPT
    # iptables -A OUTPUT -o eth0 -d 224.0.0.0/4 -j ACCEPT
    
  4. Watch an UDP multicast stream:
    $ mplayer udp://239.255.128.1:1234
    $ vlc udp://@239.255.128.1:1234
    

0 comments:

Post a Comment