Configuring Linux to Support Multicast IP

Most Linux systems have multicast IP capability turned off by default. In order to use multicast sockets on my Linux system, I had to reconfigure and build my kernel, and then run the following command as root after re-booting:
route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
Make sure that this route has been added by typing
route -e
You should see output like this:
markw@colossus:/home/markw > su
Password:
markw # route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
colossus:/home/markw # route -e
Kernel IP routing table
Destination   Gateway   Genmask    Flags   MSS Windowirtt Iface
loopback      *         255.0.0.0  U      3584 0          0 lo
224.0.0.0     *         240.0.0.0  U      3584 0          0 lo
markw #
Please note that I ran the route commands as root. I don’t permanently add this route for multicasting to my Linux development system; rather, I manually add the route (as root) when I need to use multicast IP. Re-configuring and building the kernel is also fairly simple. On my Linux system, I use the following steps to configure and build a new kernel with multicast IP support:
1. cd /usr/src/linux
2. make menuconfig
select networking options
check the box labeled “enable multicast IP”
save and exit from menuconfig
3. make dep; make clean; make zImage
4. cp /vmlinux /vmlinux_good
5. cp arch/i386/boot/zImage /vmlinux
6. cd /etc
7. edit lilo.conf, adding a new entry for the /vmlinux_good kernel
8. lilo
發佈了35 篇原創文章 · 獲贊 7 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章