@@ -1259,6 +1259,62 @@ DEFPY (no_ipv6_pim_ucast_bsm,
12591259 return pim_process_no_unicast_bsm_cmd (vty );
12601260}
12611261
1262+ DEFPY (pim6_bsr_candidate_bsr ,
1263+ pim6_bsr_candidate_bsr_cmd ,
1264+ "[no] bsr candidate-bsr [{priority (0-255)|source <address X:X::X:X|interface IFNAME|loopback$loopback|any$any>}]" ,
1265+ NO_STR
1266+ BSR_STR
1267+ "Make this router a Candidate BSR\n"
1268+ "BSR Priority (higher wins)\n"
1269+ "BSR Priority (higher wins)\n"
1270+ "Specify IP address for BSR operation\n"
1271+ "Local address to use\n"
1272+ "Local address to use\n"
1273+ "Interface to pick address from\n"
1274+ "Interface to pick address from\n"
1275+ "Pick highest loopback address (default)\n"
1276+ "Pick highest address from any interface\n" )
1277+ {
1278+ return pim_process_bsr_candidate_cmd (vty , FRR_PIM_CAND_BSR_XPATH , no ,
1279+ false, any , ifname , address_str ,
1280+ priority_str , NULL );
1281+ }
1282+
1283+ DEFPY (pim6_bsr_candidate_rp ,
1284+ pim6_bsr_candidate_rp_cmd ,
1285+ "[no] bsr candidate-rp [{priority (0-255)|interval (1-4294967295)|source <address X:X::X:X|interface IFNAME|loopback$loopback|any$any>}]" ,
1286+ NO_STR
1287+ "Bootstrap Router configuration\n"
1288+ "Make this router a Candidate RP\n"
1289+ "RP Priority (lower wins)\n"
1290+ "RP Priority (lower wins)\n"
1291+ "Advertisement interval (seconds)\n"
1292+ "Advertisement interval (seconds)\n"
1293+ "Specify IP address for RP operation\n"
1294+ "Local address to use\n"
1295+ "Local address to use\n"
1296+ "Interface to pick address from\n"
1297+ "Interface to pick address from\n"
1298+ "Pick highest loopback address (default)\n"
1299+ "Pick highest address from any interface\n" )
1300+ {
1301+ return pim_process_bsr_candidate_cmd (vty , FRR_PIM_CAND_RP_XPATH , no ,
1302+ true, any , ifname , address_str ,
1303+ priority_str , interval_str );
1304+ }
1305+
1306+ DEFPY (pim6_bsr_candidate_rp_group ,
1307+ pim6_bsr_candidate_rp_group_cmd ,
1308+ "[no] bsr candidate-rp group X:X::X:X/M" ,
1309+ NO_STR
1310+ "Bootstrap Router configuration\n"
1311+ "Make this router a Candidate RP\n"
1312+ "Configure groups to become candidate RP for\n"
1313+ "Multicast group prefix\n" )
1314+ {
1315+ return pim_process_bsr_crp_grp_cmd (vty , group_str , no );
1316+ }
1317+
12621318DEFPY (pim6_ssmpingd ,
12631319 pim6_ssmpingd_cmd ,
12641320 "ssmpingd [X:X::X:X]$source" ,
@@ -1719,6 +1775,90 @@ DEFPY (show_ipv6_pim_secondary,
17191775 return pim_show_secondary_helper (vrf , vty );
17201776}
17211777
1778+ DEFPY (show_ipv6_pim_bsr_cand_bsr ,
1779+ show_ipv6_pim_bsr_cand_bsr_cmd ,
1780+ "show ipv6 pim bsr candidate-bsr [vrf NAME$vrfname] [json$json]" ,
1781+ SHOW_STR
1782+ IPV6_STR
1783+ PIM_STR
1784+ BSR_STR
1785+ "Current PIM router candidate BSR state\n"
1786+ VRF_CMD_HELP_STR
1787+ JSON_STR )
1788+ {
1789+ int idx = 2 ;
1790+ struct vrf * vrf = pim_cmd_lookup_vrf (vty , argv , argc , & idx , !!json );
1791+
1792+ if (!vrf || !vrf -> info )
1793+ return CMD_WARNING ;
1794+
1795+ return pim_show_bsr_cand_bsr (vrf , vty , !!json );
1796+ }
1797+
1798+ DEFPY (show_ipv6_pim_bsr_cand_rp ,
1799+ show_ipv6_pim_bsr_cand_rp_cmd ,
1800+ "show ipv6 pim bsr candidate-rp [vrf VRF_NAME] [json$json]" ,
1801+ SHOW_STR
1802+ IPV6_STR
1803+ PIM_STR
1804+ BSR_STR
1805+ "Current PIM router candidate RP state\n"
1806+ VRF_CMD_HELP_STR
1807+ JSON_STR )
1808+ {
1809+ struct vrf * vrf = pim_cmd_lookup (vty , vrf_name );
1810+
1811+ if (!vrf || !vrf -> info )
1812+ return CMD_WARNING ;
1813+
1814+ return pim_show_bsr_cand_rp (vrf , vty , !!json );
1815+ }
1816+
1817+ DEFPY (show_ipv6_pim_bsr_rpdb ,
1818+ show_ipv6_pim_bsr_rpdb_cmd ,
1819+ "show ipv6 pim bsr candidate-rp-database [vrf VRF_NAME] [json$json]" ,
1820+ SHOW_STR
1821+ IPV6_STR
1822+ PIM_STR
1823+ BSR_STR
1824+ "Candidate RPs database on this router (if it is the BSR)\n"
1825+ VRF_CMD_HELP_STR
1826+ JSON_STR )
1827+ {
1828+ struct vrf * vrf = pim_cmd_lookup (vty , vrf_name );
1829+
1830+ if (!vrf || !vrf -> info )
1831+ return CMD_WARNING ;
1832+
1833+ struct pim_instance * pim = vrf -> info ;
1834+ struct bsm_scope * scope = & pim -> global_scope ;
1835+
1836+ return pim_crp_db_show (vty , scope , !!json );
1837+ }
1838+
1839+ DEFPY (show_ipv6_pim_bsr_groups ,
1840+ show_ipv6_pim_bsr_groups_cmd ,
1841+ "show ipv6 pim bsr groups [vrf VRF_NAME] [json$json]" ,
1842+ SHOW_STR
1843+ IPV6_STR
1844+ PIM_STR
1845+ "boot-strap router information\n"
1846+ "Candidate RP groups\n"
1847+ VRF_CMD_HELP_STR
1848+ JSON_STR )
1849+ {
1850+ struct vrf * vrf = pim_cmd_lookup (vty , vrf_name );
1851+
1852+ if (!vrf || !vrf -> info )
1853+ return CMD_WARNING ;
1854+
1855+ struct pim_instance * pim = vrf -> info ;
1856+ struct bsm_scope * scope = & pim -> global_scope ;
1857+
1858+ return pim_crp_groups_show (vty , scope , !!json );
1859+ }
1860+
1861+
17221862DEFPY (show_ipv6_pim_statistics ,
17231863 show_ipv6_pim_statistics_cmd ,
17241864 "show ipv6 pim [vrf NAME] statistics [interface WORD$word] [json$json]" ,
@@ -2650,6 +2790,9 @@ void pim_cmd_init(void)
26502790 install_element (PIM6_NODE , & no_pim6_rp_prefix_list_cmd );
26512791 install_element (PIM6_NODE , & pim6_ssmpingd_cmd );
26522792 install_element (PIM6_NODE , & no_pim6_ssmpingd_cmd );
2793+ install_element (PIM6_NODE , & pim6_bsr_candidate_rp_cmd );
2794+ install_element (PIM6_NODE , & pim6_bsr_candidate_rp_group_cmd );
2795+ install_element (PIM6_NODE , & pim6_bsr_candidate_bsr_cmd );
26532796
26542797 install_element (CONFIG_NODE , & ipv6_mld_group_watermark_cmd );
26552798 install_element (VRF_NODE , & ipv6_mld_group_watermark_cmd );
@@ -2705,6 +2848,10 @@ void pim_cmd_init(void)
27052848 install_element (VIEW_NODE , & show_ipv6_pim_rpf_cmd );
27062849 install_element (VIEW_NODE , & show_ipv6_pim_rpf_vrf_all_cmd );
27072850 install_element (VIEW_NODE , & show_ipv6_pim_secondary_cmd );
2851+ install_element (VIEW_NODE , & show_ipv6_pim_bsr_cand_bsr_cmd );
2852+ install_element (VIEW_NODE , & show_ipv6_pim_bsr_cand_rp_cmd );
2853+ install_element (VIEW_NODE , & show_ipv6_pim_bsr_rpdb_cmd );
2854+ install_element (VIEW_NODE , & show_ipv6_pim_bsr_groups_cmd );
27082855 install_element (VIEW_NODE , & show_ipv6_pim_statistics_cmd );
27092856 install_element (VIEW_NODE , & show_ipv6_pim_upstream_cmd );
27102857 install_element (VIEW_NODE , & show_ipv6_pim_upstream_vrf_all_cmd );
0 commit comments