<s>
Reverse-path	B-Protocol
forwarding	I-Protocol
(	O
RPF	O
)	O
is	O
a	O
technique	O
used	O
in	O
modern	O
routers	B-Protocol
for	O
the	O
purposes	O
of	O
ensuring	O
loop-free	O
forwarding	O
of	O
multicast	O
packets	O
in	O
multicast	O
routing	O
and	O
to	O
help	O
prevent	O
IP	O
address	O
spoofing	O
in	O
unicast	B-Protocol
routing	O
.	O
</s>
<s>
In	O
standard	O
unicast	B-Protocol
IP	O
routing	O
,	O
the	O
router	B-Protocol
forwards	O
the	O
packet	O
away	O
from	O
the	O
source	O
to	O
make	O
progress	O
along	O
the	O
distribution	O
tree	O
and	O
prevent	O
routing	B-Protocol
loops	I-Protocol
.	O
</s>
<s>
In	O
contrast	O
,	O
the	O
router	B-Protocol
's	O
multicast	O
forwarding	O
state	O
runs	O
more	O
logically	O
by	O
organizing	O
tables	O
based	O
on	O
the	O
reverse	O
path	O
,	O
from	O
the	O
receiver	O
back	O
to	O
the	O
root	O
of	O
the	O
distribution	O
tree	O
at	O
the	O
source	O
of	O
the	O
multicast	O
.	O
</s>
<s>
This	O
approach	O
is	O
known	O
as	O
reverse-path	B-Protocol
forwarding	I-Protocol
.	O
</s>
<s>
Multicast	O
RPF	O
,	O
typically	O
denoted	O
simply	O
as	O
RPF	O
,	O
is	O
used	O
in	O
conjunction	O
with	O
a	O
multicast	O
routing	O
protocol	O
such	O
as	O
Multicast	B-Protocol
Source	I-Protocol
Discovery	I-Protocol
Protocol	I-Protocol
or	O
Protocol	B-Protocol
Independent	I-Protocol
Multicast	I-Protocol
to	O
ensure	O
loop-free	O
forwarding	O
of	O
multicast	O
packets	O
.	O
</s>
<s>
In	O
multicast	O
routing	O
,	O
the	O
decision	O
to	O
forward	O
traffic	O
is	O
based	O
upon	O
source	O
address	O
and	O
not	O
on	O
destination	O
address	O
as	O
in	O
unicast	B-Protocol
routing	O
.	O
</s>
<s>
It	O
does	O
this	O
by	O
utilizing	O
either	O
a	O
dedicated	O
multicast	O
routing	B-Protocol
table	I-Protocol
or	O
,	O
alternatively	O
,	O
the	O
router	B-Protocol
's	O
unicast	B-Protocol
routing	B-Protocol
table	I-Protocol
.	O
</s>
<s>
When	O
a	O
multicast	O
packet	O
enters	O
a	O
router	B-Protocol
's	O
interface	O
,	O
the	O
router	B-Protocol
looks	O
up	O
the	O
list	O
of	O
networks	O
that	O
are	O
reachable	O
via	O
that	O
interface	O
(	O
i.e.	O
,	O
it	O
checks	O
the	O
paths	O
by	O
which	O
the	O
packet	O
could	O
have	O
arrived	O
)	O
.	O
</s>
<s>
If	O
the	O
router	B-Protocol
finds	O
a	O
matching	O
routing	O
entry	O
for	O
the	O
source	O
IP	O
address	O
of	O
the	O
multicast	O
packet	O
,	O
the	O
RPF	O
check	O
passes	O
and	O
the	O
packet	O
is	O
forwarded	O
to	O
all	O
other	O
interfaces	O
that	O
are	O
participating	O
in	O
that	O
multicast	O
group	O
.	O
</s>
<s>
Because	O
the	O
same	O
multicast	O
packet	O
could	O
reach	O
the	O
same	O
router	B-Protocol
via	O
multiple	O
interfaces	O
,	O
RPF	O
checking	O
is	O
integral	O
in	O
the	O
decision	O
to	O
forward	O
packets	O
or	O
not	O
.	O
</s>
<s>
If	O
the	O
router	B-Protocol
forwarded	O
all	O
packets	O
that	O
come	O
in	O
interface	O
A	O
to	O
interface	O
B	O
and	O
it	O
also	O
forwarded	O
all	O
packets	O
coming	O
in	O
interface	O
B	O
to	O
interface	O
A	O
and	O
both	O
interfaces	O
receive	O
the	O
same	O
packet	O
,	O
this	O
will	O
create	O
a	O
routing	B-Protocol
loop	I-Protocol
where	O
packets	O
will	O
be	O
forwarded	O
in	O
both	O
directions	O
until	O
their	O
IP	O
TTLs	O
expire	O
.	O
</s>
<s>
Routing	B-Protocol
loops	I-Protocol
are	O
best	O
avoided	O
as	O
they	O
unnecessarily	O
consume	O
network	O
resources	O
.	O
</s>
<s>
the	O
unicast	B-Protocol
routing	B-Protocol
table	I-Protocol
is	O
correct	O
and	O
stable	O
and	O
,	O
</s>
<s>
the	O
path	O
used	O
from	O
a	O
sender	O
to	O
a	O
router	B-Protocol
and	O
the	O
reverse	O
path	O
from	O
the	O
router	B-Protocol
back	O
to	O
the	O
sender	O
are	O
symmetric	O
.	O
</s>
<s>
If	O
the	O
first	O
assumption	O
is	O
false	O
,	O
the	O
RPF	O
check	O
will	O
fail	O
because	O
it	O
depends	O
upon	O
the	O
router	B-Protocol
's	O
unicast	B-Protocol
routing	B-Protocol
table	I-Protocol
as	O
a	O
fallback	O
.	O
</s>
<s>
If	O
the	O
second	O
assumption	O
is	O
false	O
,	O
the	O
RPF	O
check	O
would	O
reject	O
multicast	O
traffic	O
on	O
all	O
but	O
the	O
shortest	O
path	O
from	O
the	O
sender	O
to	O
the	O
router	B-Protocol
which	O
would	O
lead	O
to	O
a	O
non-optimal	O
multicast	O
tree	O
.	O
</s>
<s>
Unicast	B-Protocol
RPF	O
(	O
uRPF	O
)	O
,	O
as	O
defined	O
in	O
RFC	O
3704	O
,	O
is	O
an	O
evolution	O
of	O
the	O
concept	O
that	O
traffic	O
from	O
known	O
invalid	O
networks	O
should	O
not	O
be	O
accepted	O
on	O
interfaces	O
from	O
which	O
it	O
should	O
never	O
have	O
originated	O
.	O
</s>
<s>
uRPF	O
extends	O
this	O
idea	O
by	O
utilizing	O
the	O
knowledge	O
all	O
routers	B-Protocol
must	O
have	O
in	O
their	O
routing	B-Protocol
information	I-Protocol
base	I-Protocol
(	O
RIB	O
)	O
or	O
forwarding	B-Protocol
information	I-Protocol
base	I-Protocol
(	O
FIB	O
)	O
to	O
do	O
their	O
primary	O
job	O
,	O
to	O
help	O
further	O
restrict	O
the	O
possible	O
source	O
addresses	O
that	O
should	O
be	O
seen	O
on	O
an	O
interface	O
.	O
</s>
<s>
Packets	O
are	O
only	O
forwarded	O
if	O
they	O
come	O
from	O
a	O
router	B-Protocol
's	O
best	O
route	O
to	O
the	O
source	O
of	O
a	O
packet	O
.	O
</s>
<s>
Packets	O
coming	O
into	O
an	O
interface	O
come	O
from	O
valid	O
subnetworks	O
,	O
as	O
indicated	O
by	O
the	O
corresponding	O
entry	O
in	O
the	O
routing	B-Protocol
table	I-Protocol
are	O
forwarded	O
.	O
</s>
<s>
Using	O
uRPF	O
as	O
close	O
as	O
possible	O
to	O
the	O
real	O
source	O
of	O
traffic	O
also	O
stops	O
spoofed	O
traffic	O
before	O
it	O
has	O
any	O
chance	O
of	O
using	O
bandwidth	O
or	O
reaching	O
a	O
router	B-Protocol
that	O
is	O
not	O
configured	O
for	O
RPF	O
and	O
thus	O
inappropriately	O
forwarded	O
.	O
</s>
<s>
Unfortunately	O
,	O
it	O
is	O
often	O
the	O
case	O
on	O
the	O
larger	O
Internet	O
backbone	O
that	O
routing	O
is	O
asymmetric	O
and	O
the	O
routing	B-Protocol
tables	I-Protocol
cannot	O
be	O
relied	O
upon	O
to	O
point	O
to	O
the	O
best	O
route	O
for	O
a	O
source	O
to	O
get	O
to	O
a	O
router	B-Protocol
.	O
</s>
<s>
Routing	B-Protocol
tables	I-Protocol
specify	O
the	O
best	O
forward	O
path	O
and	O
only	O
in	O
the	O
symmetric	O
case	O
does	O
that	O
equate	O
to	O
the	O
best	O
reverse	O
path	O
.	O
</s>
<s>
RFC	O
3704	O
gives	O
more	O
details	O
on	O
how	O
to	O
extend	O
strict	O
reverse-path	B-Protocol
forwarding	I-Protocol
to	O
include	O
some	O
more	O
relaxed	O
cases	O
that	O
can	O
still	O
be	O
of	O
benefit	O
while	O
allowing	O
for	O
at	O
least	O
some	O
asymmetry	O
.	O
</s>
<s>
The	O
packet	O
is	O
dropped	O
only	O
if	O
the	O
source	O
address	O
is	O
not	O
reachable	O
via	O
any	O
interface	O
on	O
that	O
router	B-Protocol
.	O
</s>
<s>
RPF	O
is	O
often	O
interpreted	O
as	O
reverse-path	O
filtering	O
,	O
particularly	O
when	O
it	O
comes	O
to	O
unicast	B-Protocol
routing	O
.	O
</s>
<s>
This	O
is	O
an	O
understandable	O
alternate	O
interpretation	O
of	O
the	O
acronym	O
in	O
that	O
when	O
RPF	O
is	O
used	O
with	O
unicast	B-Protocol
routing	O
as	O
in	O
RFC	O
3704	O
,	O
traffic	O
is	O
either	O
permitted	O
or	O
denied	O
based	O
upon	O
the	O
RPF	O
check	O
passing	O
or	O
failing	O
.	O
</s>
<s>
While	O
uRPF	O
is	O
used	O
as	O
an	O
ingress	O
filtering	O
mechanism	O
,	O
it	O
is	O
affected	O
by	O
reverse-path	B-Protocol
forwarding	I-Protocol
.	O
</s>
<s>
Reverse-path	O
Filtering	O
is	O
a	O
feature	O
of	O
the	O
Linux	B-Operating_System
Kernel	I-Operating_System
.	O
</s>
