-
-
Notifications
You must be signed in to change notification settings - Fork 90
Configuration Help
This text is taken from README.config for pimd, the PIM multicast daemon.
Based on information contributed by Hiroyuki Komatsu mailto:[email protected]
If you are configuring the particular gre interfaces for first time,
ignore the errors after ip link set gre1 down
and ip tunnel del gre1
On Debian GNU/Linux try the following:
This sets up a GRE tunnel between hosts 11.11.11.11 and 33.33.33.33.
Physical interfaces: [11.11.11.11] [33.33.33.33]
GRE tunnel: 22.22.22.11 <-------> 22.22.22.33
==== host 11.11.11.11 (GRE interface 22.22.22.11)
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
ip link set gre1 down
ip tunnel del gre1
ip tunnel add gre1 mode gre remote 33.33.33.33 local 11.11.11.11 ttl 127
ip addr add 22.22.22.11/24 peer 22.22.22.33/24 dev gre1
ip link set gre1 up multicast on
==== host 33.33.33.33 (GRE interface 22.22.22.33)
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
ip link set gre1 down
ip tunnel del gre1
ip tunnel add gre1 mode gre remote 11.11.11.11 local 33.33.33.33 ttl 127
ip addr add 22.22.22.33/24 peer 22.22.22.11/24 dev gre1
ip link set gre1 up multicast on
STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!STOP!!!
IF YOU ADD MORE THAN TWO GRE TUNNELS IN A CHAIN, IT IS VERY EASY TO CREATE UNICAST ROUTING LOOPS, AND THIS MAY LEAD TO MULTICAST ROUTING LOOPS. MULTICAST ROUTING LOOP IS A DISASTER THAT MAY BRING YOUR WHOLE NETWORK DOWN. BEFORE ATTEMPTING THIS CONFIGURATION, MAKE SURE YOU UNDERSTAND VERY WELL WHAT YOU ARE DOING, AND WHAT MAY HAPPEN. IF YOU ARE READING THIS, THE CHANCES ARE THAT YOU DON'T KNOW, SO THINK AGAIN!!
THINK!!!THINK!!!THINK!!!THINK!!!THINK!!!THINK!!!THINK!!!THINK!!!THINK!!!
Physical interfaces: [11.11.11.11] [33.33.33.33] [55.55.55.55]
GRE tunnels: 22.22.22.11 <--> 22.22.22.33
44.44.44.33 <--> 44.44.44.55
==== host 33.33.33.33 (GRE interfaces 22.22.22.33 and 44.44.44.33)
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
ip tunnel add gre1 mode gre remote 11.11.11.11 local 33.33.33.33 ttl 127
ip addr add 22.22.22.33/24 peer 22.22.22.11/24 dev gre1
ip link set gre1 up multicast on
ip tunnel add gre2 mode gre remote 55.55.55.55 local 33.33.33.33 ttl 127
ip addr add 44.44.44.33/24 peer 44.44.44.55/24 dev gre2
ip link set gre2 up multicast on
==== host 55.55.55.55 (GRE interface 44.44.44.55)
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
ip tunnel add gre1 mode gre remote 33.33.33.33 local 55.55.55.55 ttl 127
ip addr add 44.44.44.55/24 peer 44.44.44.33/24 dev gre1
ip link set gre1 up multicast on
route add -net 22.22.22.0 netmask 255.255.255.0 gw 44.44.44.33 gre1
==== host 11.11.11.11 (GRE interface 22.22.22.11)
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
ip tunnel add gre1 mode gre remote 33.33.33.33 local 11.11.11.11 ttl 127
ip addr add 22.22.22.11/24 peer 22.22.22.33/24 dev gre1
ip link set gre1 up multicast on
route add -net 44.44.44.0 netmask 255.255.255.0 gw 22.22.22.33 gre1
For a complete list of all available options, see pimd.conf
and the man page.
-
How to disable pimd being Cand-RP?
Comment-out the
rp-candidate
andgroup-prefix
lines inpimd.conf
-
How to disable pimd being Cand-BSR?
Comment-out the
bsr-candidate
line inpimd.conf
-
How to prevent a prefix of multicast addresses being routed through my multicast router?
If you want to scope, say, prefixes 238.0.0.0/8 and 239.0.0.0/8, add the following lines to
pimd.conf
:phyint eth1 scoped 238.0.0.0 masklen 8 phyint eth1 scoped 239.0.0.0 masklen 8
-
How to create a scope zone and stop multicast packets for some multicast prefix being propagated beyond the boundary of my network?
Add scoping filters on your border routers for each prefix you want to scope. E.g.:
phyint eth1 scoped 239.0.0.0 masklen 8