Using Cisco Auto-RP to learn RP address
Using Cisco Auto-RP to learn RP address
Homburg router:
ip multicast-routing
!
interface fastethernet 0/0
ip address 10.1.1.1 255.255.255.0
ip pim sparse-mode
ip ospf 1 area 0
!
interface serial 0/0
ip address 10.2.1.1 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/1
ip address 10.2.2.1 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
Fedora router:
ip multicast-routing
!
interface Loopback 0
ip address 10.224.1.2 255.255.255.255
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/0
ip address 10.2.1.2 255.255.255.252
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/1
ip address 10.2.4.1 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/2
ip address 10.2.5.1 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
access-list 1 permit 239.0.0.0 0.255.255.255
!
ip pim send-rp-announce Loopback 0 scope 10 group-list 1
!
!
Porkpie router:
ip multicast-routing
!
interface Loopback 0
ip address 10.224.1.3 255.255.255.255
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/0
ip address 10.2.3.2 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/1
ip address 10.2.4.2 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
interface fastethernet 0/0
ip address 172.16.1.2 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
standby 1 ip 172.16.1.1
standby 1 preempt
!
ip pim send-rp-discovery Loopback 0 scope 10
Bowler router:
ip multicast-routing
!
interface serial 0/0
ip address 10.2.5.2 255.255.255.252
ip ospf 1 area 0
ip pim sparse-mode
!
interface fastethernet 0/0
ip address 172.16.1.3 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
standby 1 ip 172.16.1.1
standby 1 preempt
standby 1 priority 105
standby 1 track serial 0/0 10
!
!
Stetson router:
ip multicast-routing
!
interface Loopback 0
ip address 10.224.1.1 255.255.255.255
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/0
ip address 10.2.2.2 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
interface serial 0/1
ip address 10.2.3.1 255.255.255.0
ip ospf 1 area 0
ip pim sparse-mode
!
access-list 1 permit 239.0.0.0 0.255.255.255
!
ip pim send-rp-announce Loopback 0 scope 10 group-list 1
!
Stetson and Fedora routers are configured as C-RPs and Porkpie router is configured as the RP Mapping Agent. The scope parameter (sets the TTL value) indicates the number of hops the RP-Announce and RP-Discovery messages are allowed to travel.
When Fedora and Stetson routers are configured as C-RPs, they start to advertise RP-Announce messages to the RP Mapping Agent 10.224.1.3.
Fedora# debug ip pim auto-rp
*Mar 1 01:39:47.895: Auto-RP(0): Build RP-Announce for 10.224.1.2, PIMv2/v1, ttl 10, ht 181
*Mar 1 01:39:47.899: Auto-RP(0): Build announce entry for (239.0.0.0/8)
*Mar 1 01:39:47.903: Auto-RP(0): Send RP-Announce packet of length 48 on Serial0/0
*Mar 1 01:39:47.907: Auto-RP(0): Send RP-Announce packet of length 48 on Serial0/1
*Mar 1 01:39:47.911: Auto-RP(0): Send RP-Announce packet of length 48 on Serial0/2
*Mar 1 01:39:47.911: Auto-RP(0): Send RP-Announce packet of length 48 on Loopback0(*)
Porkpie is configured as the RP Mapping Agent, listens for RP-Announce messages and hence elects the RP for the group range advertised by the C-RPs. It also starts to send RP-Discovery messages advertising the single entry of group-to-RP mapping i.e. (239.0.0.0/8, 10.224.1.2) to 224.0.1.40 which all PIM enabled routers listen to. In this way, all PIM routers learn about the elected RP.
Porkpie# debug ip pim auto-rp
*Mar 1 01:38:27.551: Auto-RP(0): Build RP-Discovery packet
*Mar 1 01:38:27.555: Auto-RP: Build mapping (239.0.0.0/8, RP:10.224.1.2), PIMv2 v1,
*Mar 1 01:38:27.559: Auto-RP(0): Send RP-discovery packet of length 48 on FastEthernet0/0 (1 RP entries)
*Mar 1 01:38:27.563: Auto-RP(0): Send RP-discovery packet of length 48 on Serial0/0 (1 RP entries)
*Mar 1 01:38:27.567: Auto-RP(0): Send RP-discovery packet of length 48 on Serial0/1 (1 RP entries)
*Mar 1 01:38:27.571: Auto-RP(0): Send RP-discovery packet of length 48 on Loopback0(*) (1 RP entries)
The below output shows the RP Mapping Agent in use for a particular range of group in case of multiple RP Mapping Agents configured.
Porkpie# show ip pim rp mapping in-use
PIM Group-to-RP Mappings
This system is an RP-mapping agent (Loopback0)
Group(s) 239.0.0.0/8
RP 10.224.1.2 (?), v2v1
Info source: 10.224.1.2 (?), elected via Auto-RP
Uptime: 01:11:32, expires: 00:02:28
RP 10.224.1.1 (?), v2v1
Info source: 10.224.1.1 (?), via Auto-RP
Uptime: 01:07:44, expires: 00:02:16
Dynamic (Auto-RP or BSR) RPs in cache that are in use:
Group(s): 239.0.0.0/8, RP: 10.224.1.2, expires: 00:00:52
Porkpie# show ip pim rp
Group: 239.10.1.1, RP: 10.224.1.2, v2, v1, uptime 00:29:08, expires 00:02:54
Porkpie# show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 239.10.1.1), 03:54:00/00:02:40, RP 10.224.1.2, flags: SP
Incoming interface: Serial0/0, RPF nbr 10.2.4.1
Outgoing interface list: Null
(*, 224.0.1.39), 03:53:07/stopped, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Loopback0, Forward/Sparse, 02:53:36/00:02:39
Serial0/1, Forward/Sparse, 02:55:17/00:00:00
Serial0/0, Forward/Sparse, 02:55:17/00:00:00
(10.224.1.1, 224.0.1.39), 02:56:05/00:02:37, flags: LT
Incoming interface: Serial0/1, RPF nbr 10.2.3.1
Outgoing interface list:
Loopback0, Forward/Sparse, 02:53:36/00:02:38
Serial0/0, Forward/Sparse, 02:55:17/00:00:00
(10.224.1.2, 224.0.1.39), 02:43:47/00:02:27, flags: LT
Incoming interface: Serial0/0, RPF nbr 10.2.4.1
Outgoing interface list:
Serial0/1, Forward/Sparse, 02:43:48/00:00:00
Loopback0, Forward/Sparse, 02:43:48/00:02:37
(*, 224.0.1.40), 03:54:12/stopped, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Loopback0, Forward/Sparse, 02:53:38/00:02:34
(10.224.1.3, 224.0.1.40), 02:53:37/00:02:48, flags: PLT
Incoming interface: Loopback0, RPF nbr 0.0.0.0
Outgoing interface list: Null
Using multiple RP Mapping Agents in a PIM domain:
Configuring multiple RP Mapping Agents in a PIM domain is good redundancy practice. However, each RP Mapping Agent functions independently. Their responsibility is to advertise Group-to-RP mapping periodically to all PIM routers in the domain.
As long as each RP Mapping Agent advertises same Group-to-RP mapping information, all routers in the domain still create only a single mapping cache entry.
The advantage of having multiple RP Mapping Agents is that it eliminates the need to maintain master-slave relationship and therefore the need for a failover protocol. If one RP Mapping Agent fails, other agents continue to work normally.