Content deleted Content added
promote a sentence to lead. multicast clarifications. combine short related paragraphs. rm unpromising empty section. rm distant See also entry. |
Link suggestions feature: 3 links added. |
||
(41 intermediate revisions by 17 users not shown) | |||
Line 1:
{{short description|Multicast routing technique to minimize loops and enhance security}}
{{No footnotes|date=May 2019}}
'''Reverse path forwarding (RPF)''' is a technique used in modern [[router (computing)|router]]s for the purposes of ensuring loop-free forwarding of [[multicast]] packets in multicast [[routing]] and to help prevent [[IP address spoofing]] in [[unicast]] routing.▼
▲'''Reverse
In standard unicast IP routing, the router forwards the packet away from the source to make progress along the distribution tree and prevent routing loops. In contrast, the router's multicast forwarding state runs more logically by organizing tables based on the reverse path, from the receiver back to the root of the distribution tree at the source of the multicast. This process is known as reverse-path forwarding (RPF).▼
| title=Reverse Path Forwarding
| date=2010
| publisher=[[Juniper Networks]]
| access-date=2021-05-12}}</ref>
▲In standard unicast [[IP routing]], the router forwards the packet away from the source to make progress along the distribution tree and prevent routing loops. In contrast, the router's multicast forwarding state runs more logically by organizing tables based on the reverse path, from the receiver back to the root of the distribution tree at the source of the multicast. This
== Multicast RPF ==
Multicast RPF, typically denoted simply as RPF, is used in conjunction with a multicast [[routing protocol]] such as [[Multicast Source Discovery Protocol
When a multicast packet enters a router's interface, the router looks up the list of networks that are reachable via that interface (i.e., it checks
This is critically important in redundant multicast topologies. Because the same multicast packet could reach the same router via multiple interfaces, RPF checking is integral in the decision to forward packets or not. If the router forwarded all packets that come in interface A to interface B and it also forwarded all packets coming in interface B to interface A and both interfaces receive the same packet, this will create a
The underlying assumptions of an RPF check are that
If the first assumption is
▲If the first assumption is not true, the RPF check will fail because it depends upon the router's unicast routing table as a fallback. If the second assumption is not true, the RPF check would reject multicast traffic on all but the shortest path from the sender to the router and would eventually lead to non-optimal multicast tree. In cases where the links are unidirectional, the reverse path approach can fail altogether.
'''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
| url=https://tools.cisco.com/security/center/resources/unicast_reverse_path_forwarding
| title=Understanding Unicast Reverse Path Forwarding
| publisher=[[Cisco Systems]]
| access-date=2021-05-12}}</ref>
uRPF extends this idea by utilizing the knowledge all routers must have
▲== Unicast RPF (uRPF) ==
▲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 they 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 [[denial of service|DoS]], [[distributed denial of service|DDoS]], and network scanning to obfuscate the source of the scan.
In cases of symmetric routing, routing where packets flow
▲uRPF extends this idea by utilizing the knowledge all routers must have to do their jobs using their [[routing information base]] (RIB) or [[forwarding information base]] (FIB) to help further restrict the possible sources 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, ensuring that:
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.
▲In cases of symmetric routing, routing where packets flow forward and reverse down the same path, and terminal networks with only one link, this is a safe assumption and uRPF can be implemented without many anticipated problems. It is particularly useful to implement RPF on routers' interfaces that are connected to singly homed networks and terminal subnets as symmetric routing is guaranteed. 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 which is not configured for RPF and thus inappropriately forwarded.
RFC 3704 gives more details on how to extend
▲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. Because of this asymmetry it is important when implementing uRPF to be aware of the potential for asymmetry to exist to prevent accidental filtering of legitimate traffic.
▲RFC 3704 gives more details on how to extend the most basic "this source address must be seen in the routing table for the input interface" concept known as '''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
===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.{{efn|name=command}}
== {{anchor|Filtering}}
RPF is often
Reverse path filters are typically used to disable asymmetric routing where an IP application has a different incoming and outgoing routing path. Its intent is to prevent a packet entering one interface from leaving via the other interfaces. Reverse-path Filtering is a feature of the [[Linux Kernel]].<ref>{{cite web
| url=https://www.theurbanpenguin.com/rp_filter-and-lpic-3-linux-security/
| title=rp_filter and LPIC-3 Linux Security
| date=2020-08-27
| website=theurbanpenguin.com
| access-date=2021-05-12}}</ref>
== See also ==
* [[Flooding (computer networking)]]
==Notes==
== External links ==▼
{{Notelist}}
▲* [http://www.juniper.net/techpubs/software/erx/erx50x/swconfig-routing-vol1/html/ip-multicast-config7.html#120398 Juniper Networks on multicast RPF]
==References==
{{Reflist}}
▲== External links ==
* {{cite IETF |RFC=2827 |title=Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing}}
* {{cite IETF |RFC=3704 |title=Ingress Filtering for Multihomed Networks}}
[[Category:Routing]]
|