Home > Kernel, OpenSource, Tech.Notes > IGMPv3 Multicasting Linux MRouter with XORP How-to on Ubuntu

IGMPv3 Multicasting Linux MRouter with XORP How-to on Ubuntu

今天在wikipedia看IGMP的时候,无意中发现了XORP, 简单适用了一下非常好用,并且官方的资料真理的比较全,使用也比较方便,还提供了一个基本的shell xorpsh 来配置管理信息。刚好可以省去买支持IGMP的路由器,支持IGMP的路由器最少也要1.5W…

XORP, or Extensible Open Router Platform, is an open source routing software suite, aimed at being both stable and fully featured enough for production use and also extensible to support networking research.

Request:
OS: ubuntu 9.04 (Linux Kernel 2.6.28-11-generic) with GCC 4.3.3
SW: XORP (multicast routing daemon)
HW: PC with 2 or 3 ethernet card (default gw is itself) !

Step 1: Check Linux Kernel Functions!
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MROUTE=y
After this configurations, the linux kernel support IGMP, DVMRP and MOSPF. If want support PIM-SM , do below settings
CONFIG_IP_PIMSM_V2=y
PS: you can use vi view /boot/CONFIG-(kernel version) to confirm !

Step 2: edit /etc/sysctl.conf to enable ip_forward
net.ipv4.conf.default.forwarding=1
PS: reboot or use command “sysctl -p” to enable !

Step 3: Install XORP(To compile XORP requires nearly 1.4GB of free disk space)
Step 3.1: Download xorp-1.6.tar.gz
Step 3.2: untar the xorp-1.6.tar.gz
Step 3.3: ./configure
Step 3.4: make
Step 3.4-1: make check (just to check)(it is not necessary)

Step 4: run  rtrmgr/xorp_rtrmgr  rtrmgr/xorpsh (A sample xorp command shell)
Step 4.1: create user group named “xorp”

sudo addgroup xorp

Step 4.2: cp or edit config.boot in xorp-1.6/rtrmgr/config.boot
config.boot for our environment

protocols {
fib2mrib {
disable: false
}
igmp {
disable: false
interface eth0 {
vif eth0 {
disable: false
version: 3
enable-ip-router-alert-option-check: false
query-interval: 125
query-last-member-interval: 1
query-response-interval: 10
robust-count: 2
}
}
}
}
fea {
unicast-forwarding4 {
disable: false
}
}
interfaces {
restore-original-config-on-shutdown: false
interface eth0 {
disable: false
discard: false
description: “”
default-system-config {
}
}
}

Step 4.3: xorp-1.6/rtrmgr/xorp_rtrmgr -b xorp-1.6/rtrmgr/config.boot

Step 5: Check Mrouter work OK
Step 5.1: Connect eth0 to VLC Player server PC and connect eth1 to VLC Player client PC
Step 5.2: Use VLC Player server PC run multicast streaming
Step 5.3: Use VLC Player client PC to play multicast streaming by multicast URL

Step6: run rtrmgr/xorpsh (A sample xorp command shell)

xorp-1.6$ rtrmgr/xorpsh
Welcome to XORP on wifihack

border@wifihack> show igmp ?
Possible completions:
group                Display information about IGMP group membership
interface            Display information about IGMP interfaces

border@wifihack> show igmp group
Interface    Group           Source          LastReported Timeout V State
eth0         224.0.0.2       0.0.0.0         192.168.1.134     240 3     E
eth0         224.0.0.22      0.0.0.0         192.168.1.134     240 3     E
eth0         224.0.0.251     0.0.0.0         192.168.1.134     232 3     E
eth0         224.0.0.252     0.0.0.0         192.168.1.30     232 3     E
eth0         239.255.255.250 0.0.0.0         192.168.1.104     240 3     E

参考:
1. http://www.linuxdiyf.com/bbs/redirect.php?fid=55&tid=69157&goto=nextnewset
2. http://www.xorp.org/getting_started.html
3. “User Manual” http://www.xorp.org/releases/current/docs/user_manual/user_manual.pdf
4. http://en.wikipedia.org/wiki/XORP
5. http://en.wikipedia.org/wiki/IGMP

Categories: Kernel, OpenSource, Tech.Notes Tags: , , ,
  1. January 28th, 2010 at 02:53 | #1

    Hi,
    I’m newby with multicast and i’m trying to run xorp with ubuntu 8.04. I have a PC with 2 ethernet cards. I’m following your instructions but i have a doubt in the step 4.2 (config.boot file). Don’t you forget the PIM and MFEA parameters in “config.boot” file?

    thanks.

  2. January 28th, 2010 at 08:07 | #2

    @Macoseta
    This config.boot file don’t support PIM and MFEA. More information about PIM and MFEA you can see from http://www.xorp.org/getting_started.html#configuring

  3. XORP beginner
    February 8th, 2010 at 03:05 | #3

    Hi,
    first of all thanks for this great post and step by step configuration,
    but if you could only more precisely explane me step 3.4.
    I followed first two steps, downloaded xorp-1.6.tar.gz, then with tar xvfz xorp-1.6.tar.gz untared and ungzipped it..(all that in command line) and after that gone to xorp directory (where is file VERSION) and typed ./configure and after that started “something” and after that i tried with gmake (but it doesn’t exist) and also with make but command make require some more attributes…?! what should I do next?!
    Thank you very much!

  4. February 24th, 2010 at 20:55 | #4

    Hello XORP beginner!

    step 3.4 works fine for me, but maybe you need to install some xorp dependencies before compile it. I follow the steps mencioned in section 3.5 (Linux Ubuntu 8.04) of this file:

    http://www.xorp.org/releases/current/docs/BUILD_NOTES

    have a nice xorp installation!

  5. November 10th, 2011 at 19:35 | #5

    I simply wanted to thank you so much again. I am not sure the things I might have taken care of in the absence of the thoughts revealed by you concerning such industry. It absolutely was a frightening matter in my view, nevertheless being able to view your skilled fashion you managed that forced me to leap for happiness. I am just grateful for this work and thus wish you know what an amazing job that you’re putting in instructing some other people by way of a web site. I’m certain you haven’t got to know any of us.

  6. May 4th, 2012 at 19:26 | #6

    This unique short article is rather good created and We’re joyful to come across such an abundance of invaluable info on the subject here in the article, thank you for posting it here. Simply put i believe you might add considerably more.

  1. No trackbacks yet.