Unicast RPF (uRPF), as defined in RFC 3704, is an evolution of the concept that traffic from known invalid networks should not be accepted on interfaces from which it should never have originated. The original idea as seen in RFC 2827 was to block traffic on an interface if it is sourced from forged IP addresses. It is a reasonable assumption for many organizations to simply disallow propagation of private addresses on their networks unless they are explicitly in use. This is a great benefit to the
Internet backbone as blocking packets from obviously bogus source addresses helps to cut down on IP address spoofing, which is commonly used in
DoS,
DDoS, and network scanning to obfuscate the source of the scan.{{cite web uRPF extends this idea by utilizing the knowledge all routers must have in their
routing information base (RIB) or
forwarding information base (FIB) to do their primary job, to help further restrict the possible source addresses that should be seen on an interface. Packets are only forwarded if they come from a router's best route to the source of a packet. Packets coming into an interface from valid subnetworks, as indicated by the corresponding entry in the routing table, are forwarded. Packets with source addresses that can
not be reached via the input interface can be dropped without disruption to normal use, as they are probably from a misconfigured or malicious source. In cases of symmetric routing, routing where packets flow in both directions through the same path, and terminal networks connected via a single link, this is a safe assumption and uRPF can be implemented without many anticipated problems. Using uRPF as close as possible to the real source of traffic also stops spoofed traffic before it has any chance of using bandwidth or reaching a router that is not configured for RPF and thus inappropriately forwarded. Unfortunately, it is often the case on the larger Internet backbone that routing is asymmetric and the routing tables cannot be relied upon to point to the best route for a source to get to a router. Routing tables specify the best forward path and only in the symmetric case does that equate to the best reverse path. It is important when implementing uRPF to be aware of the potential for asymmetry to prevent accidental filtering of legitimate traffic. RFC 3704 gives more details on how to extend strict reverse-path forwarding to include some more relaxed cases that can still be of benefit while allowing for at least some asymmetry.
Strict mode In strict mode, each incoming packet is tested against the FIB and, if the
incoming interface is not the best reverse path, the packet check will fail. By default, failed packets are discarded.{{efn|name=command|Example command on Cisco devices: ip verify unicast source reachable-via {rx} - Strict mode, {any} - loose mode}}
Feasible mode In feasible mode, the FIB maintains alternate routes to a given IP address. If the
incoming interface matches any of the routes associated with the IP address, then the packet is forwarded. Otherwise, the packet is dropped.
Loose mode In loose mode each incoming packet's source address is tested against the FIB. The packet is dropped only if the source address is not reachable via
any interface on that router. == Filtering vs. forwarding ==