Understanding Basics of Multicast RPF
Understanding Basics of Multicast RPF
Understanding Basics of Multicast RPF
Introduction:
In normal routing i.e. in Unicast routing packet forwarding decisions are
typically based on the destination address of the packet arriving at a
router. The unicast routing table is organized by destination subnet and
mainly set up to forward the packet toward the destination.
In IP multicast routing, the router forwards the packet away from the
source to make progress along the distribution tree and prevent routing
loops. 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. This process is known as reverse-path
forwarding (RPF).
In short, Incoming multicast packet will not be accepted/forwarded unless
it is received on an interface that is the outgoing interface for unicast
route to the source of the packet.
Configuration Example:
In below example multicast server S1 sends a multicast packet, with R1
flooding it to R2 and R3.R2 received its copy, and floods it as well. As a
result R3 receives the same packet from two routers:
a) On its interface fa0/0 from R1.
b) On its interface s0/0 from R2.
Topology Diagram:
Without the RPF check, R3 would forward the packet it got from R1 to R2,
and vice versa, and begin the process of looping packets also with the
same logic, R1 and R2 also keep repeating the process. This duplication
creates multicast routing loops and generates multicast storms that waste
bandwidth and router resources.
Before I dive into multicast configuration, let me share with you the
initial configuration of our network. All relevant configurations are
below.
R1 R2 R3
hostname R3
hostname R1 !
! ip cef
ip cef !
hostname R2
! ip multicast-routing
!
ip multicast-routing !
ip multicast-routing
! interface
!
interface FastEthernet0/0
interface
FastEthernet1/0 ip address 10.1.1.6
FastEthernet0/0
ip address 1.1.1.1 255.255.255.252
ip address 10.1.1.2
255.255.255.0 ip pim dense-mode
255.255.255.252
ip pim dense-mode no ip route-cache
ip pim dense-mode
! no ip mroute-cache
speed 100
interface speed 100
full-duplex
FastEthernet0/0 full-duplex
!
ip address 10.1.1.1 !
interface Serial0/0
255.255.255.252 interface
ip address 10.1.1.9
ip pim dense-mode FastEthernet0/1
255.255.255.252
speed 100 ip address 3.3.3.3
ip pim dense-mode
full-duplex 255.255.255.0
clock rate 2000000
! ip pim dense-mode
!
interface ip igmp join-group
router eigrp 1
FastEthernet0/1 239.1.1.1
network 10.1.1.0
ip address 10.1.1.5 !
0.0.0.255
255.255.255.252 interface Serial0/0
no auto-summary
ip pim dense-mode ip address 10.1.1.10
speed 100 255.255.255.252
full-duplex ip pim dense-mode
! no ip route-cache
router eigrp 1 no ip mroute-cache
network 1.1.1.1 0.0.0.0 clock rate 2000000
network 10.1.1.0 !
0.0.0.255 router eigrp 1
no auto-summary network 3.3.3.3 0.0.0.0
network 10.1.1.0
0.0.0.255
no auto-summary
When R3 performs the RPF check the following things will happen:
1) R3 examines the Source address of each incoming packet, which is
1.1.1.1.
2) R3 determines the reverse path interface based on its route used to
forward packets to 1.1.1.1
In our case R3's route to 1.1.1.1/24 is matched, and it is lists an
outgoing interface fa0/0, making fa0/0 R3's RPF interface for IP address
1.1.1.1
R3#sh ip route | beg Gate
Gateway of last resort is not set
On R3’s interface fa0/0 we capture trace route query and request as mark
in black box below diagram:
Let's open the traceroute request packet to get more detail inside view.
As show in above figure “FORWORDING CODE: NO_ERROR” field shows that after
the router receives a multicast packet it performed an RPF check as the
RPF check succeeds, the packet is forwarded.
Now let’s view capture taken on interface S0/0:
It is only showing trace route query not request as packets are drop due
to RPF check failure.
Hence conclusion is the RPF check is a strategy by which router accept
packets that arrives over the shortest path and discard those that arrive
over longer routes and thereby avoid routing loops and duplication.