SP-A BIDIR-PIM: a Phantom RP for 239.2.0.0/16 advertised by A-P2 and A-P4

Bidirectional PIM (BIDIR-PIM) is a PIM mode for groups with many senders and many receivers. Each group gets one shared tree, rooted at the RP, and traffic flows in both directions.

In BIDIR-PIM, the RP is only the root of the tree, so its address does not have to belong to any router, as long as it is routable. A phantom RP is an RP address that is configured nowhere. Two or more routers advertise subnets that contain it, each with a different mask length, and the IGP sends traffic toward the router with the longest prefix. If that router fails, its prefix is withdrawn, and traffic follows the next longest prefix without any additional RP failover protocol being involved.

In my lab, BIDIR-PIM covers 239.2.0.0/16 on SP-A, with RP 10.1.0.118. A-P2 advertises 10.1.0.116/30, and A-P4 advertises 10.1.0.112/29.

At the end of the stage, A-PE2 has an entry for the whole BIDIR range, 239.2.0.0/16, with the B flag and RP 10.1.0.118. The existing RP, 10.1.0.100, still serves 224.0.1.40:

! trimmed: the flags legend
A-PE2#show ip mroute
(*,239.2.0.0/16), 00:47:47/-, RP 10.1.0.118, flags: B
  Bidir-Upstream: GigabitEthernet2, RPF nbr: 10.1.1.29
  Incoming interface list:
    GigabitEthernet3, Accepting/Sparse
    Loopback0, Accepting/Sparse
    GigabitEthernet2, Accepting/Sparse

(*, 224.0.1.40), 5w3d/00:02:46, RP 10.1.0.100, flags: SJCL
  Incoming interface: GigabitEthernet2, RPF nbr 10.1.1.29
  Outgoing interface list:
    Loopback0, Forward/Sparse, 5w3d/00:02:46

Topology file: topology.clab.yml · Addressing: ipam.md · Stage configs, 6 nodes (A-P1, A-P2, A-P3, A-P4, A-PE1, A-PE2): stage_configs/lab06-s1-spa-bidir/

The Multicast Core Before This Stage

The multicast core post built PIM sparse mode on A-P1, A-P2, A-P3, A-P4, A-PE1, and A-PE2, with one static RP, 10.1.0.100, for 224.0.0.0/4. 10.1.0.100/32 is Loopback1 on both A-P1 and A-P3, with MSDP running between them.

SP-A PIM routers in OSPF areas 0, 1 and 2 before this stage, with the anycast RP 10.1.0.100/32 on A-P1 and A-P3 and MSDP between them

BIDIR on the Six PIM Routers

All six PIM routers will be configured with the lines below:

ip pim bidir-enable
access-list 21 permit 239.2.0.0 0.0.255.255
ip pim rp-address 10.1.0.118 21 bidir

ip pim bidir-enable turns BIDIR-PIM on. bidir at the end of the RP statement makes 10.1.0.118 a BIDIR RP for the groups in access list 21, which permits 239.2.0.0/16.

The Phantom RP Loopbacks

A-P2 advertises the primary prefix from Loopback1:

interface Loopback1
 description BIDIR PHANTOM-RP PRIMARY -- subnet covers RP 10.1.0.118
 ip address 10.1.0.117 255.255.255.252
 ip pim sparse-mode
 ip ospf network point-to-point
 ip ospf 1 area 0

A-P4 advertises the backup prefix, with a shorter mask:

interface Loopback1
 description BIDIR PHANTOM-RP BACKUP -- subnet covers RP 10.1.0.118
 ip address 10.1.0.114 255.255.255.248
 ip pim sparse-mode
 ip ospf network point-to-point
 ip ospf 1 area 0

By default, OSPF advertises a loopback as a /32 host route, even if the interface has a shorter mask. ip ospf network point-to-point makes IOS advertise the configured mask.

The same routers after this stage, with A-P2 advertising 10.1.0.116/30 and A-P4 advertising 10.1.0.112/29 for the BIDIR RP 10.1.0.118

A-PE1 is in area 1. Its two ABRs, A-P1 (10.1.0.1) and A-P2 (10.1.0.2), advertise both phantom prefixes into area 1 as Type-3 summary LSAs, with their /29 and /30 masks:

! trimmed to the three prefixes; the capture omits the LS age, Options, Checksum and Length lines
A-PE1#show ip ospf 1 database summary

            OSPF Router with ID (10.1.0.5) (Process ID 1)

                Summary Net Link States (Area 1)

  Link State ID: 10.1.0.100 (summary Network Number)
  Advertising Router: 10.1.0.1
  LS Seq Number: 80000694
  Network Mask: /32
        MTID: 0         Metric: 1

  Link State ID: 10.1.0.100 (summary Network Number)
  Advertising Router: 10.1.0.2
  LS Seq Number: 80000695
  Network Mask: /32
        MTID: 0         Metric: 2

  Link State ID: 10.1.0.112 (summary Network Number)
  Advertising Router: 10.1.0.1
  LS Seq Number: 80000002
  Network Mask: /29
        MTID: 0         Metric: 2

  Link State ID: 10.1.0.112 (summary Network Number)
  Advertising Router: 10.1.0.2
  LS Seq Number: 80000002
  Network Mask: /29
        MTID: 0         Metric: 3

  Link State ID: 10.1.0.116 (summary Network Number)
  Advertising Router: 10.1.0.1
  LS Seq Number: 80000002
  Network Mask: /30
        MTID: 0         Metric: 2

  Link State ID: 10.1.0.116 (summary Network Number)
  Advertising Router: 10.1.0.2
  LS Seq Number: 80000002
  Network Mask: /30
        MTID: 0         Metric: 1

A-PE1#

RP Mapping and RPF on A-P2 and A-P4

A-P2 has both mappings: the groups in access list 21 to 10.1.0.118 in BIDIR mode, and 224.0.0.0/4 to 10.1.0.100. It resolves the RP through its own Loopback1, with Metric Pref 0 and Metric 0:

A-P2#show ip pim rp mapp
PIM Group-to-RP Mappings

Group(s): 224.0.0.0/4, Static
    RP: 10.1.0.100 (?)
Acl: 21, Static, Bidir Mode
    RP: 10.1.0.118 (?)
A-P2#show ip pim rp metric
RP Address      Metric Pref    Metric         Flags RPF Type  Interface
10.1.0.118      0              0               C    multicast Loopback1
A-P2#

10.1.0.118 is also inside A-P4’s own 10.1.0.112/29. A-P4 still reaches the RP through OSPF, out GigabitEthernet2, because A-P2’s /30 is the longer match:

A-P4#show ip pim rp map
PIM Group-to-RP Mappings

Group(s): 224.0.0.0/4, Static
    RP: 10.1.0.100 (?)
Acl: 21, Static, Bidir Mode
    RP: 10.1.0.118 (?)
A-P4#show ip pim rp metric
RP Address      Metric Pref    Metric         Flags RPF Type  Interface
10.1.0.118      110            3               C    unicast   GigabitEthernet2
A-P4#

DF Election

On every link except the RP link, BIDIR-PIM elects one designated forwarder (DF). The RP link is the link that the RP address belongs to. The DF is the only router that forwards the group’s traffic onto the link and from the link toward the RP. It is the router with the best unicast metric to the RP. A-P2 is the DF on its links to A-P1, A-P3, and A-PE1, with metric 0:

A-P2#show ip pim interface df
* implies this system is the DF
Interface                RP               DF Winner        Metric     Uptime
GigabitEthernet2         10.1.0.118       *10.1.1.2         0          00:55:27
GigabitEthernet3         10.1.0.118       *10.1.1.5         0          00:55:27
GigabitEthernet4         10.1.0.118       *10.1.1.25        0          00:55:27
Loopback1                10.1.0.118        0.0.0.0          0          00:00:00
A-P2#

A-P2’s Loopback1 is the RP link for 10.1.0.118, so no DF is elected on it.

No (S,G) for the BIDIR Group

To compare the two modes, A-PE2’s Loopback0 joined one group from each range, 239.2.0.1 and 239.1.0.1:

A-PE2#show run int lo0
Building configuration...

Current configuration : 214 bytes
!
interface Loopback0
 ip address 10.1.0.6 255.255.255.255
 ip pim sparse-mode
 ip igmp join-group 239.2.0.1
 ip igmp join-group 239.1.0.1
 ip ospf 1 area 2
 ipv6 address 2001:DB8:1::6/128
 ipv6 ospf 1 area 2
end

A-PE1 pinged each group from its Loopback0, and A-PE2, 10.1.0.6, replied:

! trimmed to the replies to the first two requests of each ping
A-PE1#ping 239.2.0.1 source lo0 repeat 20
Type escape sequence to abort.
Sending 20, 100-byte ICMP Echos to 239.2.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.1.0.5

Reply to request 0 from 10.1.0.6, 4 ms
Reply to request 0 from 10.1.0.6, 5 ms
Reply to request 0 from 10.1.0.6, 5 ms
Reply to request 0 from 10.1.0.6, 5 ms
Reply to request 0 from 10.1.0.6, 4 ms
Reply to request 1 from 10.1.0.6, 4 ms
Reply to request 1 from 10.1.0.6, 5 ms
Reply to request 1 from 10.1.0.6, 5 ms
Reply to request 1 from 10.1.0.6, 5 ms
Reply to request 1 from 10.1.0.6, 5 ms
A-PE1#ping 239.1.0.1 source lo0 repeat 20
Type escape sequence to abort.
Sending 20, 100-byte ICMP Echos to 239.1.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.1.0.5

Reply to request 0 from 10.1.0.6, 3 ms
Reply to request 1 from 10.1.0.6, 6 ms
Reply to request 1 from 10.1.0.6, 43 ms
Reply to request 1 from 10.1.0.6, 37 ms
Reply to request 1 from 10.1.0.6, 7 ms
A-PE1#

The ASM group, 239.1.0.1, has an (S,G) entry for A-PE1’s Loopback0, 10.1.0.5. The BIDIR group, 239.2.0.1, has only a (*,G) entry:

! trimmed: the flags legend
A-PE2#show ip mroute
IP Multicast Routing Table

(*,239.2.0.0/16), 2w5d/-, RP 10.1.0.118, flags: B
  Bidir-Upstream: GigabitEthernet2, RPF nbr: 10.1.1.29
  Incoming interface list:
    GigabitEthernet3, Accepting/Sparse
    GigabitEthernet2, Accepting/Sparse
    Loopback0, Accepting/Sparse

(*, 239.1.0.1), 00:01:26/stopped, RP 10.1.0.100, flags: SJCL
  Incoming interface: GigabitEthernet2, RPF nbr 10.1.1.29
  Outgoing interface list:
    Loopback0, Forward/Sparse, 00:01:26/00:02:26

(10.1.0.5, 239.1.0.1), 00:00:36/00:02:22, flags: LJT
  Incoming interface: GigabitEthernet2, RPF nbr 10.1.1.29, Mroute
  Outgoing interface list:
    Loopback0, Forward/Sparse, 00:00:36/00:02:26

(*, 239.2.0.1), 00:01:30/00:02:26, RP 10.1.0.118, flags: BCL
  Bidir-Upstream: GigabitEthernet2, RPF nbr 10.1.1.29
  Outgoing interface list:
    Loopback0, Forward/Sparse, 00:01:30/00:02:26
    GigabitEthernet2, Bidir-Upstream/Sparse, 00:01:30/stopped

(*, 224.0.1.40), 2w5d/00:02:24, RP 10.1.0.100, flags: SJCL
  Incoming interface: GigabitEthernet2, RPF nbr 10.1.1.29
  Outgoing interface list:
    Loopback0, Forward/Sparse, 2w5d/00:02:24

After the test, the two join-group lines were removed from A-PE2:

A-PE2#show run int lo0
Building configuration...

Current configuration : 154 bytes
!
interface Loopback0
 ip address 10.1.0.6 255.255.255.255
 ip pim sparse-mode
 ip ospf 1 area 2
 ipv6 address 2001:DB8:1::6/128
 ipv6 ospf 1 area 2
end

Failover to A-P4

With A-P2’s Loopback1 shut, A-PE1 reached 10.1.0.118 through A-P4’s 10.1.0.112/29. The group-to-RP mapping stayed the same. The DFs on A-PE1’s two uplinks were elected again:

! trimmed to the static mappings
A-PE1#show ip route 10.1.0.118
Routing entry for 10.1.0.112/29
  Known via "ospf 1", distance 110, metric 3, type inter area
  Last update from 10.1.1.21 on GigabitEthernet2, 2w5d ago
  Routing Descriptor Blocks:
  * 10.1.1.21, from 10.1.0.1, 2w5d ago, via GigabitEthernet2
      Route metric is 3, traffic share count is 1
A-PE1#show ip pim rp mapping
PIM Group-to-RP Mappings
Group(s): 224.0.0.0/4, Static
    RP: 10.1.0.100 (?)
Acl: 21, Static, Bidir Mode
    RP: 10.1.0.118 (?)
A-PE1#show ip pim interface df
* implies this system is the DF
Interface                RP               DF Winner        Metric     Uptime
Loopback0                10.1.0.118       *10.1.0.5         3          2w5d
GigabitEthernet2         10.1.0.118        10.1.1.21        2          00:00:35
GigabitEthernet3         10.1.0.118       *10.1.1.26        3          00:00:35
A-PE1#

After no shutdown, A-PE1 reached 10.1.0.118 through A-P2’s /30 again:

A-PE1#show ip route 10.1.0.118
Routing entry for 10.1.0.116/30
  Known via "ospf 1", distance 110, metric 2, type inter area
  Last update from 10.1.1.25 on GigabitEthernet3, 00:00:11 ago
  Routing Descriptor Blocks:
  * 10.1.1.25, from 10.1.0.2, 00:00:11 ago, via GigabitEthernet3
      Route metric is 2, traffic share count is 1
A-PE1#

The Existing RP

Both PEs still reach the anycast RP as a /32. A-PE1 reaches it through A-P1, with a repair path through A-P2, and uses it for RPF:

A-PE1#show ip route 10.1.0.100
Routing entry for 10.1.0.100/32
  Known via "ospf 1", distance 110, metric 2, type inter area
  Last update from 10.1.1.21 on GigabitEthernet2, 00:00:12 ago
  Routing Descriptor Blocks:
  * 10.1.1.21, from 10.1.0.1, 00:00:12 ago, via GigabitEthernet2
      Route metric is 2, traffic share count is 1
      Repair Path: 10.1.1.25, via GigabitEthernet3
A-PE1#show ip rpf 10.1.0.100
RPF information for ? (10.1.0.100)
  RPF interface: GigabitEthernet2
  RPF neighbor: ? (10.1.1.21)
  RPF route/mask: 10.1.0.100/32
  RPF type: unicast (ospf 1)
  Doing distance-preferred lookups across tables
  RPF topology: ipv4 multicast base, originated from ipv4 unicast base
A-PE1#

A-PE2 reaches it through A-P3, with a repair path through A-P4:

A-PE2#show ip route 10.1.0.100
Routing entry for 10.1.0.100/32
  Known via "ospf 1", distance 110, metric 2, type inter area
  Last update from 10.1.1.29 on GigabitEthernet2, 00:03:12 ago
  Routing Descriptor Blocks:
  * 10.1.1.29, from 10.1.0.3, 00:03:12 ago, via GigabitEthernet2
      Route metric is 2, traffic share count is 1
      Repair Path: 10.1.1.33, via GigabitEthernet3
A-PE2#

The check runs on the PEs, because A-P1 and A-P3 have 10.1.0.100 as a connected route. Their MSDP session stayed up:

A-P1#show ip route 10.1.0.100
Routing entry for 10.1.0.100/32
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Loopback1
      Route metric is 0, traffic share count is 1
A-P1#ping 10.1.0.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
A-P1#show ip msdp sum
MSDP Peer Status Summary
Peer Address     AS    State    Uptime/  Reset SA    Peer Name
                                Downtime Count Count
10.1.0.3         ?     Up       5w3d     0     0     ?
A-P1#

What’s Next

The next post covers BSR on SP-A.

Leave a Reply