<div dir="ltr">On Tue, Nov 8, 2022 at 9:08 PM Grant Taylor via NANOG <<a href="mailto:nanog@nanog.org">nanog@nanog.org</a>> wrote:<br>> This thread has made me wonder if there isn't a need for a 3rd type of<br>> uRPF or comparable filtering wherein the incoming interface is a viable<br>> route in the RIB even if it's not the best route in the FIB.<br><div><br></div><div>Hi Grant,</div><div><br></div><div>Two problems here:</div><div><br></div><div>1. uRPF reuses the existing FIB. Either the next hop matches the source (strict) or some entry in the FIB matches the source (loose). The hardware "fast path" to implement the per-packet FIB is already there; all it takes is a second lookup. Unless someone comes up with a really clever idea, that's basically all the filtering you can squeeze out of the FIB. To do something more, you'd have to implement an additional "fast path" in the router that can act on every packet. That's kinda expensive. <br></div><div><br></div><div>2. BGP is a distance-vector protocol, not a link-state protocol. The significance for filtering is that the BGP RIB on a given router does not describe the complete state of the network. It only knows about itself and its immediate neighbors. That's not algorithmically guaranteed to be enough knowledge about the network to determine that a packet with a given source address can't reasonably come from a particular interface. <br></div><div><br></div><div>Consider the following scenario:</div><div><br></div><div><span style="font-family:monospace">A - B - C - D - E - A</span></div><div><span style="font-family:monospace">    |</span></div><div><span style="font-family:monospace">    F<br></span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">B receives a packet from A to F via C. Is the packet legitimate? B can't know because the only route to A in B's RIB is the direct connection to A. C didn't pass E's route to A back to B because it was a longer, unpreferred path. C might not even have received the route from D. <br></span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">So even if you go to the expense of building a fast path that can consider what's in the RIB instead of just the FIB, you don't have the information you need in the RIB either.<br></span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">Regards,</span></div><div><span style="font-family:arial,sans-serif">Bill Herrin<br></span></div><div><span style="font-family:arial,sans-serif"><br></span></div><span style="font-family:arial,sans-serif">-- <br>For hire. <a href="https://bill.herrin.us/resume/">https://bill.herrin.us/resume/</a></span></div>