Multicast Routing

Aus xinux wiki
Wechseln zu: Navigation, Suche

Nutzbare Daemons

  • pimd - multicast routing daemon (PIMv2)
  • smcroute - static multicast router daemon
  • mrouted

pimd HowTo

  • Stelle sicher, das der Kernel die folgenden Optionen aktiviert hat. Siehe /boot/config-$(uname -r)
CONFIG_IP_MULTICAST
CONFIG_IP_PIMSM_V2
CONFIG_IP_MROUTE

sowie die NETLINK-bezogenen Optionen

  • Wenn nicht, aktiviere sie, recompile den Kernel und starte neu
  • Aktiviere IP forwarding
echo 1 >/proc/sys/net/ipv4/ip_forwarding
  • vorausgesetzt die Geräte sind eth0 und eth1, füge Multicast zur Routingtabelle hinzu
route add -net 224.0.0.0/4 dev eth0
route add -net 224.0.0.0/4 dev eth1
  • starte den pimd daemon
  • Test ob multicast forward aktiv ist
cat /proc/sys/net/ipv4/conf/all/mc_forwarding # = 1

smcroute HowTo

smcroute < options > < commands >

options

   -d - start daemon
   -v - verbose output

commands - common

   -h - print help
   -k - kill daemon

commands - multicast routing related

   -a <InputIntf> <OriginIpAdr> <McGroupAdr> <OutputIntf> [<OutputIntf>] ... - add route
   -r <InputIntf> <OriginIpAdr> <McGroupAdr> - remove route

commands - multicast signaling related

   -j <InputIntf> <McGroupAdr> - join MC group
   -l <InputIntf> <McGroupAdr> - leave MC group

igmpproxy

FILES
       /proc/net/ip_mr_cache
              - contains the active multicast routes

       /proc/net/ip_mr_vif
              - contains the 'virtual' interfaces used by the active multicast routing daemon

       /proc/sys/net/ipv4/conf/<ifname>/force_igmp_version
              -  can  be  set  to  control  what  IGMP   version   the   kernel   should   use   on   the   upstream   interface.    Ex.:   'echo   2   >
              /proc/sys/net/ipv4/conf/eth0/force_igmp_version' will force the kernel to use IGMPv2 on eth0 (provided this is the upstream interface).

mrouted

Compiling

Zuerst enfernen wir ein paar Compiler Parameter
# Respect user CFLAGS, remove upstream optimisation and -Werror
sed -i Makefile -e '/^CFLAGS/{s|[[:space:]]=| +=|g;s|-O2||g;s|-Werror||g}' || return 1

unter Debian Systemen

make build-deb

sonstige

make
make install

Links