Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1237227
  • 博文数量: 389
  • 博客积分: 2874
  • 博客等级: 少校
  • 技术积分: 3577
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-24 10:34













2012-08-03 14:17:09

Multicast Setup and Configuration

Multicast Troubleshooting Tools
  • (used to receive multicast traffic from iperf traffic)
  • (install ssmpingd and use asmping as client)
  • (Hit or miss troubleshooting tool)
  • (Webcam Multicast Application)
  • (Diagnoses Multicast Group Connectivity)
Router Multicast Command References
Iperf Troubleshooting Commands
  • Start a multicast iperf traffic stream (On computer A):

    iperf -u -c -p -b 1 -i 5 -T 10 -t 1000

  • Capture with rtpqual or iperf (On computer B):

    rtpqual @
    iperf -s -i 1 -u -B -p

Creating a Real Multicast Stream with WebCam
  • Use the following (on linux machine):

    vic /

  • Select type of webcam in vic settings
  • On the client machine use the same command to receive the multicast video

    vic /

  • (vic is the same application used by the AccessGrid)
Using SSMping to Test Multicast

Installing SSMping

  • Grab the latest tarball from
  • Install it to your local pkgs directory tree, assuming the tarball is located in /local/dl

    mkdir /local/pkgs/ssmping
    cd /local/pkgs/ssmping
    tar -zxf /local/dl/ssmping-0.8.tar.gz
    mv ssmping-0.8 0.8
    ln -s 0.8 std
    cd std

  • Create some symbolic links to the executables, so anyone can run the commands

    ln -s /local/pkgs/ssmping/std/asmping /usr/local/bin/asmping
    ln -s /local/pkgs/ssmping/std/ssmping /usr/local/bin/ssmping
    ln -s /local/pkgs/ssmping/std/ssmpingd /usr/local/bin/ssmpingd

  • Add the following to the iptables file in /etc/sysconfig/iptables
    1. Allow Connections to the SSMping daemon
      -A RH-Firewall-1-INPUT -p udp -m udp -s --dport 4321 -j ACCEPT
      -A RH-Firewall-1-INPUT -p udp -m udp -s --sport 4321 -j ACCEPT
  • Restart your iptables

    service iptables restart

    Running SSMping
  • In the following example SSMping has been installed on machines megamon and orko
  • First start up the daemon on one machine (in this case

    ssmpingd &

  • Next, send an asmping to megamon from orko with a dummy multicast group


  • The output you should expect is the following

    ssmping joined (S,G) = (,
    pinging S from
    unicast from, seq=1 dist=1 time=1.108 ms
    unicast from, seq=2 dist=1 time=0.349 ms
    multicast from, seq=2 dist=1 time=0.800 ms
    unicast from, seq=3 dist=1 time=0.280 ms
    multicast from, seq=3 dist=1 time=0.430 ms

Installing the Beacon Software on Redhat/Fedora Linux
  • First download the tarball (version 1.3) from
  • Create the proper directory tree

    mkdir /local/src/beacon
    mkdir -p /local/pkgs/beacon/1.3

  • Unpack the tarball (assuming it's in /local/dl)

    cd /local/src/beacon
    tar -zxf /local/dl/beacon-1.3.tar.gz
    mv beacon-1.3 1.3

  • Install the perl module Time::HiRes

    perl -MCPAN -e shell

  • At the cpan> prompt type

    install Time::HiRes

  • After the install, quit cpan


  • Create a user for the beacon process to use (other linux distro may require more - adding the group, etc)

    adduser beacon

  • Edit the main beacon configuration file in
    • Add/Change the following in /local/src/beacon/1.3/src/beacon.conf

      CONTACTLOCATION = University of Utah

RUNASUSER = beacon



  • Configure and make the package

    cd /local/src/beacon/1.3
    ./configure --prefix=/local/pkgs/beacon/1.3
    make install

  • Edit the beacon executable to include the proper location of the beacon perl module
    • Add the following to /local/pkgs/beacon/1.3/bin/beacon (in amongst similar "use lib" lines)
    • Keep in mind that this is an example (look in the /local/pkgs/beacon/1.3/lib directory for similar perl path to use)

      use lib "/local/pkgs/beacon/1.3/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi";

  • Create a directory in /home/beacon for the process to use (otherwise PID file creation will fail)

    mkdir /home/beacon/outputfiles
    chown beacon.beacon /home/beacon/outputfiles

  • Create a symbolic link for beacon

    ln -s /local/pkgs/beacon/1.3/bin/beacon /usr/local/bin/beacon

  • Edit the /etc/hosts file to include an entry for your correct hostname
    • Something like the following localhost localhost.localdomain megatron

  • Edit your iptables to something similar as below
    1. Allow Mulicast Beacon to talk
      -A RH-Firewall-1-INPUT -p udp -m udp -s 0/0 -d 0/0 --dport 10002 -j ACCEPT
      -A RH-Firewall-1-INPUT -p udp -m udp -s 0/0 -d 0/0 --dport 10003 -j ACCEPT
      -A RH-Firewall-1-INPUT -p tcp -m tcp -s 0/0 -d 0/0 --dport 10004 --syn -j ACCEPT
  • Restart your iptables

    service iptables restart

  • Before starting, make sure you have a valid hostname that will resolve (also add to your /etc/hosts file)
  • Test out the software by firing off the executable

    beacon &

  • Go to the listed webpage () to verify that you're talking to the main server
  • Create a startup script for beacon
    • Uncomment the background line in /local/pkgs/beacon/1.3/etc/beacon.conf
      1. Move the Beacon process to background processing automatically at startup?
        BACKGROUND = 1
  • Create a script file named beacon in /etc/rc.d/init.d/ that includes the following


    1. Start/stop/restart the multicast beacons
    2. Assume backgrounding has been enabled in configuration file
    3. chkconfig: 345 90 10
    4. description: Beacon Multicast daemon


beacon_start() {
cd $

Unknown macro: {BEACON_HOME}

&& /local/pkgs/beacon/1.3/bin/beacon

beacon_stop() {
cd $

Unknown macro: {BEACON_HOME}

&& kill -HUP `cat multicastbeacon.PID`


Unknown macro: { beacon_stop sleep 1 beacon_start }

case "$1" in
echo "usage $0 start|stop|restart"

  • Make the file world executable

    chmod a+x /etc/rc.d/init.d/beacon

  • Add beacon to the chkconfig list

    chkconfig --level 345 beacon on

  • Kill any existing beacon processes if necessary

    ps -eaf |grep beacon

  • Then fire up beacon with the script

    service beacon start


阅读(10138) | 评论(0) | 转发(0) |