Import Upstream version 1.2.2
[quagga-debian.git] / pimd / TODO
1 # $QuaggaId: $Format:%an, %ai, %h$ $
2
3 T1 DONE Implement debug command
4    test pim receive join
5
6 T2 DONE Implement debug command
7    test pim receive prune
8
9 T3 DONE Per-interface Downstream (S,G) state machine
10    (RFC 4601 4.5.3. Receiving (S,G) Join/Prune Messages)
11
12 T4 DONE Upstream (S,G) state machine
13    (RFC 4601 4.5.7. Sending (S,G) Join/Prune Messages)
14
15 T5 DONE Verify Data Packet Forwarding Rules
16    RFC 4601 4.2.  Data Packet Forwarding Rules
17    RFC 4601 4.8.2.  PIM-SSM-Only Routers
18
19    Additionally, the Packet forwarding rules of Section 4.2 can be
20    simplified in a PIM-SSM-only router:
21
22      iif is the incoming interface of the packet.
23      oiflist = NULL
24      if (iif == RPF_interface(S) AND UpstreamJPState(S,G) == Joined) {
25        oiflist = inherited_olist(S,G)
26      } else if (iif is in inherited_olist(S,G)) {
27        send Assert(S,G) on iif
28      }
29      oiflist = oiflist (-) iif
30      forward packet on all interfaces in oiflist
31
32    Macro:
33      inherited_olist(S,G) =
34        joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
35
36 T6 DONE Implement (S,G) Assert state machine (RFC 4601, section 4.6.1).
37    Changes in pim_ifchannel.ifassert_winner should trigger
38    pim_upstream_update_join_desired().
39    Depends on TODO T27.
40    Depends on TODO T33.
41    See also CAVEAT C7.
42    See also: RFC 4601 4.5.7. Sending (S,G) Join/Prune Messages
43     Transitions from Joined State
44      RPF'(S,G) changes due to an Assert
45
46    http://www.hep.ucl.ac.uk/~ytl/multi-cast/pim-dm_01.html:
47
48      The PIM Assert mechanism is used to shutoff duplicate flows onto
49      the same multiaccess network. Routers detect this condiction when
50      they receive an (S,G) packet via a multi-access interface that is
51      in the (S,G) OIL. This causes the routers to send Assert
52      Messages.
53
54    Note that neighbors will not accept Join/Prune or Assert messages
55    from a router unless they have first heard a Hello message from that
56    router.  Thus, if a router needs to send a Join/Prune or Assert
57    message on an interface on which it has not yet sent a Hello message
58    with the currently configured IP address, then it MUST immediately
59    send the relevant Hello message without waiting for the Hello Timer
60    to expire, followed by the Join/Prune or Assert message.
61
62 T7 DONE Implement hello option: LAN Prune Delay
63
64 T8 DONE Implement J/P_Override_Interval(I)
65    Depends on TODO T7.
66    See pim_ifchannel.c, pim_ifchannel_prune(), jp_override_interval.
67
68 T9 DONE Detect change in IGMPv3 RPF interface/next-hop for S and update.
69    channel_oil vif index accordingly ?
70    Beware accidentaly adding looped MFC entries (IIF=OIF).
71
72 T10 DONE React to (S,G) join directed to another upstream address. See
73     also:
74     
75     RFC 4601: 4.5.7.  Sending (S,G) Join/Prune Messages
76
77     If a router wishes to propagate a Join(S,G) upstream, it must also
78     watch for messages on its upstream interface from other routers on
79     that subnet, and these may modify its behavior.  If it sees a
80     Join(S,G) to the correct upstream neighbor, it should suppress its
81     own Join(S,G).  If it sees a Prune(S,G), Prune(S,G,rpt), or
82     Prune(*,G) to the correct upstream neighbor towards S, it should
83     be prepared to override that prune by scheduling a Join(S,G) to be
84     sent almost immediately.
85
86 T11 DONE Review protocol modifications for SSM
87     (RFC 4601 4.8.1.  Protocol Modifications for SSM Destination
88     Addresses)
89
90 T12 DONE Review updates of RPF entries.
91     FIXME pim_upstream.c send_join():
92     Currently only one upstream state is affected by detection of RPF change.
93     RPF change should affect all upstream states sharing the RPF cache.
94
95 T13 DONE Check that RFC macros using S,G,RPF_interface(S) are actually
96     implemented with this strategy:
97     rpf_ifch=find_ifch(up->rpf->interface).
98     See pim_rpf.c pim_rpf_find_rpf_addr() for a correct example.
99
100     $ grep -i macro pimd/*.c
101     pimd/pim_iface.c:  RFC 4601: 4.1.6.  State Summarization Macros
102     pimd/pim_ifchannel.c:    RFC 4601: 4.6.5.  Assert State Macros
103     pimd/pim_ifchannel.c:  RFC 4601: 4.1.6.  State Summarization Macros
104     pimd/pim_ifchannel.c:  RFC 4601: 4.1.6.  State Summarization Macros
105     pimd/pim_ifchannel.c:  RFC 4601: 4.6.5.  Assert State Macros
106     pimd/pim_ifchannel.c:  Macro:
107     pimd/pim_rpf.c:  RFC 4601: 4.1.6.  State Summarization Macros
108
109 T14 DONE Send Assert(S,G) on iif as response to WRONGVIF kernel upcall.
110     See pim_mroute.c mroute_msg().
111
112 T15 DONE Interface command to statically join (S,G).
113     interface eth0
114      ip igmp join-group 239.1.1.1 source 1.1.1.1
115
116 T16 DONE RPF'(S,G) lookup is not working for S reachable with default route.
117     See "RPF'(S,G) not found" in pim_rpf_update() from pim_rpf.c.
118     Zebra daemon RIB is not reflecting changes in kernel routes
119     accurately?
120
121 T17 DONE Prevent CLI from creating bogus interfaces.
122     Example:
123     conf t
124      interface xxx
125
126 T18 Consider reliable pim solution (refresh reduction)
127     A Reliable Transport Mechanism for PIM
128     http://tools.ietf.org/wg/pim/draft-ietf-pim-port/
129     PORT=PIM-Over-Reliable-Transport
130
131 T19 DONE Fix self as neighbor 
132     See mailing list post:
133     http://lists.gnu.org/archive/html/qpimd-users/2009-04/msg00000.html
134
135 T20 DONE Fix debug message: "pim_neighbor_update: internal error:
136     trying to replace same prefix list"
137     See mailing list post:
138     http://lists.gnu.org/archive/html/qpimd-users/2009-04/msg00000.html
139
140 T21 DONE Clean-up PIM/IGMP interface mismatch debugging
141     See option PIM_CHECK_RECV_IFINDEX_SANITY in pimd/Makefile.am
142     See mailing list post:
143     http://lists.nongnu.org/archive/html/qpimd-users/2009-04/msg00003.html
144
145 T22 DONE IGMP must be protected against adding looped MFC entries
146     created by both source and receiver attached to the same
147     interface.
148
149 T23 DONE libzebra crash after zclient_lookup_nexthop.
150     See mailing list post:
151     http://lists.nongnu.org/archive/html/qpimd-users/2009-04/msg00008.html
152
153 T24 DONE zserv may return recursive routes:
154      - nexthop type is set to ZEBRA_NEXTHOP_IPV4
155      - ifindex is not reported
156      - calls expecting ifindex (fib_lookup_if_vif_index) are disrupted
157     See also this mailing list post:
158     [PATCH 21/21] Link detect and recursive routes
159     http://www.gossamer-threads.com/lists/quagga/dev/17564
160
161 T25 DONE Zclient nexthop lookup missing OSPF route to 1.1.1.1/32
162     See also:
163     pim_zlookup.c zclient_lookup_nexthop misses OSPF 1.1.1.1/32
164     zebra/zebra_vty.c show_ip_route_addr_cmd hits OSPF 1.1.1.1/32
165
166 T26 DONE Zebra daemon is marking recursive static route as inactive.
167
168     FIXED: zebra daemon was incorrectly marking recursive routes
169     pointing to kernel routes as inactive:
170       zebra/zebra_rib.c nexthop_active_ipv4:
171         -- Original:
172           else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
173         -- Fixed:
174           else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL) ||
175                    match->type == ZEBRA_ROUTE_KERNEL)
176
177     Old problem description:
178
179     This prevents rib_match_ipv4 from returning its nexthop:
180     client: pim_zlookup.c zclient_read_nexthop
181     server: zebra/zserv.c zsend_ipv4_nexthop_lookup_v2 -> rib_match_ipv4
182
183     Kernel route is injected into zebra in zebra_rib.c rib_add_ipv4
184     Examples:
185     rt_netlink.c:726: rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, src, index, table, metric, 0);
186     rt_netlink.c:864: rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, src, index, table, 0, 0);
187
188     This patch didn't fix the issue:
189     [PATCH 21/21] Link detect and recursive routes
190     http://www.gossamer-threads.com/lists/quagga/dev/17564
191
192     See the example below for the route 2.2.2.2.
193
194 bash# route add -host 1.1.1.1 gw 127.0.0.1
195 bash# route add -host 2.2.2.2 gw 1.1.1.1
196 bash# netstat -nvr
197 Kernel IP routing table
198 Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
199 2.2.2.2         1.1.1.1         255.255.255.255 UGH       0 0          0 lo
200 1.1.1.1         127.0.0.1       255.255.255.255 UGH       0 0          0 lo
201 192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
202 0.0.0.0         192.168.0.2     0.0.0.0         UG        0 0          0 eth0
203 bash# 
204
205 zebra# sh ip route         
206 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
207        I - ISIS, B - BGP, > - selected route, * - FIB route
208
209 K>* 0.0.0.0/0 via 192.168.0.2, eth0
210 K>* 1.1.1.1/32 via 127.0.0.1, lo
211 K * 2.2.2.2/32 via 1.1.1.1, lo inactive
212 C>* 127.0.0.0/8 is directly connected, lo
213 C>* 192.168.0.0/24 is directly connected, eth0
214
215 quagga-pimd-router# sh ip route 1.1.1.1
216 Address         NextHop         Interface Metric Preference
217 1.1.1.1         127.0.0.1       lo             0          0
218 quagga-pimd-router# 
219 quagga-pimd-router# sh ip route 2.2.2.2
220 Address         NextHop         Interface Metric Preference
221 2.2.2.2         192.168.0.2     eth0           0          0
222 quagga-pimd-router# 
223
224 T27 DONE Implement debug command
225     test pim receive assert
226     See also TODO T6: (S,G) Assert state machine.
227
228 T28 DONE Bad IPv4 address family=02 in Join/Prune dump
229     Reported by Andrew Lunn <andrew.lunn@ascom.ch>
230     
231     # 58-byte pim v2 Join/Prune dump
232     # ------------------------------
233     # IPv4 address family=02 is wrong, correct IPv4 address family is 01
234     # See http://www.iana.org/assignments/address-family-numbers
235     #
236     c8XX YY03 : ip src 200.xx.yy.3
237     e000 000d : ip dst 224.0.0.13
238     9404 0000 : ip router alert option 148.4.0.0
239     2300 ab13 : pimv2,type=3 res=00 checksum=ab13
240     0200      : upstream family=02, encoding=00
241     c8XX YY08 : upstream 200.xx.yy.8
242     0001 00d2 : res=00 groups=01 holdtime=00d2
243     0200 0020 : group family=02, encoding=00, res=00, mask_len=20
244     ef01 0101 : group address 239.1.1.1
245     0001 0000 : joined=0001 pruned=0000
246     0200 0020 : source family=02, encoding=00, res=00, mask_len=20
247     0101 0101 : source address 1.1.1.1
248
249 T29 DONE Reset interface PIM-hello-sent counter when primary address changes
250     See pim_ifp->pim_ifstat_hello_sent
251
252     RFC 4601: 4.3.1.  Sending Hello Messages
253
254     Thus, if a router needs to send a Join/Prune or Assert message on
255     an interface on which it has not yet sent a Hello message with the
256     currently configured IP address, then it MUST immediately send the
257     relevant Hello message without waiting for the Hello Timer to
258     expire, followed by the Join/Prune or Assert message.
259
260 T30 DONE Run interface DR election when primary address changes
261     Reported by Andrew Lunn <andrew.lunn@ascom.ch>
262     See pim_if_dr_election().
263
264 T31 If an interface changes one of its secondary IP addresses, a Hello
265     message with an updated Address_List option and a non-zero
266     HoldTime should be sent immediately.
267     See also detect_secondary_address_change
268     See also CAVEAT C15.
269     See also RFC 4601: 4.3.1.  Sending Hello Messages
270
271 T32 FIXED Detection of interface primary address changes may fail when
272     there are multiple addresses.
273     See also CAVEAT C14.
274
275     pim_find_primary_addr() should return interface primary address
276     from connected list. Currently it returns the first address.
277
278     Zebra daemon "show int" is able to keep the primary address as
279     first address.
280
281 T33 DONE Implement debug command: test pim receive upcall
282     See also TODO T6: (S,G) Assert state machine.
283
284 T34 DONE assert_action_a1
285
286 T35 DONE Review macros depending on interface I.
287
288     See also: grep ,I\) pimd/*.c
289
290     For the case (S,G,I) check if I is either
291     1) interface attached to this per-interface S,G state (don't think so)
292     or
293     2) an arbitrary interface (most probably)
294
295     For the arbitrary interface case (2), consider representing
296     interface ifp as its primary address (struct in_addr ifaddr).  The
297     benefit is in_addr does not need to be dereferenced, so it does
298     not demand protection against crashes.
299
300 T36 DONE React to zebra daemon link-detect up/down notification.
301     pim_ifp->primary_address is managed by detect_primary_address_change()
302     depending on to ifp->connected (managed by zebra_interface_address_read()).
303
304 T37 DONE Review list of variables which may affect pim_upstream.c
305     pim_upstream_evaluate_join_desired().
306     Call pim_upstream_update_join_desired() accordingly.
307
308     See the order of invokation:
309       pim_if_dr_election(ifp);
310       pim_if_update_join_desired(pim_ifp); /* depends on DR */
311       pim_if_update_could_assert(ifp); /* depends on DR */
312       pim_if_update_my_assert_metric(ifp); /* depends on could_assert */
313
314     join_desired depends on:
315       pim_ifp->primary_address
316       pim_ifp->pim_dr_addr
317       ch->ifassert_winner_metric
318       ch->ifassert_winner
319       ch->local_ifmembership 
320       ch->ifjoin_state
321       ch->upstream->rpf.source_nexthop.mrib_metric_preference
322       ch->upstream->rpf.source_nexthop.mrib_route_metric
323       ch->upstream->rpf.source_nexthop.interface
324
325 T38 DONE Detect change in AssertTrackingDesired(S,G,I)
326
327     See the order of invokation:
328       dr_election: none
329       update_join_desired: depends on DR
330       update_tracking_desired: depends on DR, join_desired
331
332     AssertTrackingDesired(S,G,I) depends on:
333       pim_ifp->primary_address
334       pim_ifp->pim_dr_addr
335       ch->local_ifmembership
336       ch->ifassert_winner
337       ch->ifjoin_state
338       ch->upstream->rpf.source_nexthop.interface
339       PIM_UPSTREAM_FLAG_TEST_DR_JOIN_DESIRED(ch->upstream->flags)
340
341 T39 DONE AssertTrackingDesired: flags is not matching evaluation
342     
343     # show ip pim assert-internal 
344     CA:   CouldAssert
345     ECA:  Evaluate CouldAssert
346     ATD:  AssertTrackingDesired
347     eATD: Evaluate AssertTrackingDesired
348
349     Interface Address         Source          Group           CA  eCA ATD eATD
350     eth0      192.168.1.100   1.1.1.1         239.1.1.1       no  no  no  yes 
351     # 
352
353 T40 Lightweight MLDv2
354     http://tools.ietf.org/html/draft-ietf-mboned-lightweight-igmpv3-mldv2-05
355     http://www.ietf.org/internet-drafts/draft-ietf-mboned-lightweight-igmpv3-mldv2-05.txt
356     http://www.ietf.org/html.charters/mboned-charter.html
357
358 T41 DONE ssmping support
359
360     See also:
361       http://www.venaas.no/multicast/ssmping/
362       draft-ietf-mboned-ssmping-07
363       http://tools.ietf.org/html/draft-ietf-mboned-ssmping-07
364
365     Example:
366
367     debug ssmpingd
368     
369     conf t
370      ip ssmpingd 1.1.1.1
371     
372     show ip ssmpingd
373
374 T42 Static igmp join fails when loading config at boot time
375
376     ! Wrong behavior seen at boot time:
377     !
378     2010/02/22 08:59:00 PIM: igmp_source_forward_start: ignoring request for
379     looped MFC entry (S,G)=(3.3.3.3,239.3.3.3): igmp_sock=12 oif=eth0 vif_index=2
380
381     ! Correct behavior seen later:
382     !
383     2010/02/22 09:03:16 PIM: igmp_source_forward_start: ignoring request for
384     looped MFC entry (S,G)=(2.2.2.2,239.2.2.2): igmp_sock=17 oif=lo vif_index=1
385
386     ! To see the wrong message at boot:    
387     !
388     debug igmp trace
389     !
390     interface lo
391      ip igmp
392      ip igmp join 239.2.2.2 2.2.2.2
393      ip igmp join 239.3.3.3 3.3.3.3
394     !
395
396     ! Interfaces indexes:
397     Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut
398     eth0      200.202.112.3     2   2       0       0          0          0
399     lo        127.0.0.1         1   1       0       0          0          0
400
401 T43 PIM Neighbor Reduction
402     https://datatracker.ietf.org/doc/draft-wijnands-pim-neighbor-reduction/
403     
404     "In a transit LAN (no directly connected source or receiver), many
405     of the PIM procedures don't apply. (...) This proposal describes
406     a procedure to reduce the amount of neighbors established over a
407     transit LAN."
408
409 T44 Single Stream Multicast Fast Reroute (SMFR) Method
410     https://datatracker.ietf.org/doc/draft-liu-pim-single-stream-multicast-frr/
411
412     "This document proposes an IP multicast fast convergence method
413     based on differentiating primary and backup PIM join."
414
415 T45 RFC5384 - The Join Attribute Format
416     "This document describes a modification of the Join message that
417     allows a node to associate attributes with a particular tree."
418
419 T46 PIM Multi-Topology ID (MT-ID) Join-Attribute
420     http://tools.ietf.org/html/draft-cai-pim-mtid-00
421     Depends on T45.
422
423     "This draft introduces a new type of PIM Join Attribute used to
424     encode the identity of the topology PIM uses for RPF."
425     
426 -x-