forked from troglobit/pimd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.config
121 lines (85 loc) · 4.41 KB
/
README.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
$Id: README.config,v 1.4 2002/06/13 17:39:19 pavlin Exp $
This is README.config for pimd, the PIM multicast daemon.
PIM-SM version: 2
Check http://netweb.usc.edu/pim/pimd/ for lastest pimd version.
This file describes the pimd configuration.
For a Japanese version of this file, see README.config.jp
XXX: currently, this file is very incomplete. If something is missing and/or
is unclear, send email to the current maintainer of pimd
(see file README for email address).
1. Configuring GRE tunnels for multicast routing
(based on information contributed by Hiroyuki Komatsu <komatsu@taiyaki.org>)
On Linux (Debian) try the following:
(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")
1.1 GRE tunnel between two machines (host 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
1.2 GRE tunnels with three machines
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
2. Configuring pimd
For a complete list of all available options, see pimd.conf
2.1. How to disable pimd being Cand-RP?
Comment-out the "cand_rp" and "group_prefix" lines
2.2. How to disable pimd being Cand-BSR?
Comment-out the "cand_bootstrap_router" line
2.3. 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
2.4. 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