Merge pull request #9218 from LabNConsulting/chopps/pim-timers

Improve pim timers
This commit is contained in:
Donald Sharp 2021-08-19 07:35:45 -04:00 committed by GitHub
commit 2cb694ba13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 349 additions and 335 deletions

View File

@ -93,7 +93,7 @@ Certain signals have special meanings to *pimd*.
down. This command is vrf aware, to configure for a vrf, enter the vrf down. This command is vrf aware, to configure for a vrf, enter the vrf
submode. submode.
.. clicmd:: ip pim join-prune-interval (5-600) .. clicmd:: ip pim join-prune-interval (1-65535)
Modify the join/prune interval that pim uses to the new value. Time is Modify the join/prune interval that pim uses to the new value. Time is
specified in seconds. This command is vrf aware, to configure for a vrf, specified in seconds. This command is vrf aware, to configure for a vrf,
@ -101,14 +101,14 @@ Certain signals have special meanings to *pimd*.
a value smaller than 60 seconds be aware that this can and will affect a value smaller than 60 seconds be aware that this can and will affect
convergence at scale. convergence at scale.
.. clicmd:: ip pim keep-alive-timer (31-60000) .. clicmd:: ip pim keep-alive-timer (1-65535)
Modify the time out value for a S,G flow from 31-60000 seconds. 31 seconds Modify the time out value for a S,G flow from 1-60000 seconds. If choosing
is chosen for a lower bound because some hardware platforms cannot see data a value below 31 seconds be aware that some hardware platforms cannot see data
flowing in better than 30 second chunks. This command is vrf aware, to flowing in better than 30 second chunks. This command is vrf aware, to
configure for a vrf, enter the vrf submode. configure for a vrf, enter the vrf submode.
.. clicmd:: ip pim packets (1-100) .. clicmd:: ip pim packets (1-255)
When processing packets from a neighbor process the number of packets When processing packets from a neighbor process the number of packets
incoming at one time before moving on to the next task. The default value is incoming at one time before moving on to the next task. The default value is
@ -116,7 +116,7 @@ Certain signals have special meanings to *pimd*.
a large number of pim control packets flowing. This command is vrf aware, to a large number of pim control packets flowing. This command is vrf aware, to
configure for a vrf, enter the vrf submode. configure for a vrf, enter the vrf submode.
.. clicmd:: ip pim register-suppress-time (5-60000) .. clicmd:: ip pim register-suppress-time (1-65535)
Modify the time that pim will register suppress a FHR will send register Modify the time that pim will register suppress a FHR will send register
notifications to the kernel. This command is vrf aware, to configure for a notifications to the kernel. This command is vrf aware, to configure for a
@ -162,7 +162,7 @@ Certain signals have special meanings to *pimd*.
the existing IGMP general query timer.If no version is provided in the cli, the existing IGMP general query timer.If no version is provided in the cli,
it will be considered as default v2 query.This is a hidden command. it will be considered as default v2 query.This is a hidden command.
.. clicmd:: ip igmp watermark-warn (10-60000) .. clicmd:: ip igmp watermark-warn (1-65535)
Configure watermark warning generation for an igmp group limit. Generates Configure watermark warning generation for an igmp group limit. Generates
warning once the configured group limit is reached while adding new groups. warning once the configured group limit is reached while adding new groups.
@ -201,7 +201,7 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
Set the DR Priority for the interface. This command is useful to allow the Set the DR Priority for the interface. This command is useful to allow the
user to influence what node becomes the DR for a lan segment. user to influence what node becomes the DR for a lan segment.
.. clicmd:: ip pim hello (1-180) (1-630) .. clicmd:: ip pim hello (1-65535) (1-65535)
Set the pim hello and hold interval for a interface. Set the pim hello and hold interval for a interface.
@ -227,11 +227,11 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
Join multicast group or source-group on an interface. Join multicast group or source-group on an interface.
.. clicmd:: ip igmp query-interval (1-1800) .. clicmd:: ip igmp query-interval (1-65535)
Set the IGMP query interval that PIM will use. Set the IGMP query interval that PIM will use.
.. clicmd:: ip igmp query-max-response-time (10-250) .. clicmd:: ip igmp query-max-response-time (1-65535)
Set the IGMP query response timeout value. If an report is not returned in Set the IGMP query response timeout value. If an report is not returned in
the specified time we will assume the S,G or \*,G has timed out. the specified time we will assume the S,G or \*,G has timed out.
@ -246,12 +246,12 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
or IGMP report is received on this interface and the Group is denied by the or IGMP report is received on this interface and the Group is denied by the
prefix-list, PIM will ignore the join or report. prefix-list, PIM will ignore the join or report.
.. clicmd:: ip igmp last-member-query-count (1-7) .. clicmd:: ip igmp last-member-query-count (1-255)
Set the IGMP last member query count. The default value is 2. 'no' form of Set the IGMP last member query count. The default value is 2. 'no' form of
this command is used to to configure back to the default value. this command is used to to configure back to the default value.
.. clicmd:: ip igmp last-member-query-interval (1-255) .. clicmd:: ip igmp last-member-query-interval (1-65535)
Set the IGMP last member query interval in deciseconds. The default value is Set the IGMP last member query interval in deciseconds. The default value is
10 deciseconds. 'no' form of this command is used to to configure back to the 10 deciseconds. 'no' form of this command is used to to configure back to the
@ -319,17 +319,17 @@ MSDP can be setup in different ways:
Commands available for MSDP: Commands available for MSDP:
.. clicmd:: ip msdp timers (2-600) (3-600) [(1-600)] .. clicmd:: ip msdp timers (1-65535) (1-65535) [(1-65535)]
Configure global MSDP timers. Configure global MSDP timers.
First value is the keep-alive interval and it must be less than the First value is the keep-alive interval. This configures the interval in
second value which is hold-time. This configures the interval in seconds between keep-alive messages. The default value is 60 seconds. It
seconds between keep-alive messages. The default value is 60 seconds. should be less than the remote hold time.
Second value is the hold-time and it must be greater than the keep-alive Second value is the hold-time. This configures the interval in seconds before
interval. This configures the interval in seconds before closing a non closing a non responding connection. The default value is 75. This value
responding connection. The default value is 75. should be greater than the remote keep alive time.
Third value is the connection retry interval and it is optional. This Third value is the connection retry interval and it is optional. This
configures the interval between connection attempts. The default value configures the interval between connection attempts. The default value

View File

@ -389,6 +389,7 @@ struct cmd_node {
#define SRTE_STR "SR-TE information\n" #define SRTE_STR "SR-TE information\n"
#define SRTE_COLOR_STR "SR-TE Color information\n" #define SRTE_COLOR_STR "SR-TE Color information\n"
#define NO_STR "Negate a command or set its defaults\n" #define NO_STR "Negate a command or set its defaults\n"
#define IGNORED_IN_NO_STR "Ignored value in no form\n"
#define REDIST_STR "Redistribute information from another routing protocol\n" #define REDIST_STR "Redistribute information from another routing protocol\n"
#define CLEAR_STR "Reset functions\n" #define CLEAR_STR "Reset functions\n"
#define RIP_STR "RIP information\n" #define RIP_STR "RIP information\n"

View File

@ -7179,7 +7179,7 @@ DEFPY (pim_register_accept_list,
DEFUN (ip_pim_joinprune_time, DEFUN (ip_pim_joinprune_time,
ip_pim_joinprune_time_cmd, ip_pim_joinprune_time_cmd,
"ip pim join-prune-interval (5-600)", "ip pim join-prune-interval (1-65535)",
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Join Prune Send Interval\n" "Join Prune Send Interval\n"
@ -7193,27 +7193,22 @@ DEFUN (ip_pim_joinprune_time,
DEFUN (no_ip_pim_joinprune_time, DEFUN (no_ip_pim_joinprune_time,
no_ip_pim_joinprune_time_cmd, no_ip_pim_joinprune_time_cmd,
"no ip pim join-prune-interval (5-600)", "no ip pim join-prune-interval [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Join Prune Send Interval\n" "Join Prune Send Interval\n"
"Seconds\n") IGNORED_IN_NO_STR)
{ {
char jp_default_timer[5];
snprintf(jp_default_timer, sizeof(jp_default_timer), "%d",
PIM_DEFAULT_T_PERIODIC);
nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval", nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
NB_OP_MODIFY, jp_default_timer); NB_OP_DESTROY, NULL);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFUN (ip_pim_register_suppress, DEFUN (ip_pim_register_suppress,
ip_pim_register_suppress_cmd, ip_pim_register_suppress_cmd,
"ip pim register-suppress-time (5-60000)", "ip pim register-suppress-time (1-65535)",
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Register Suppress Timer\n" "Register Suppress Timer\n"
@ -7227,27 +7222,22 @@ DEFUN (ip_pim_register_suppress,
DEFUN (no_ip_pim_register_suppress, DEFUN (no_ip_pim_register_suppress,
no_ip_pim_register_suppress_cmd, no_ip_pim_register_suppress_cmd,
"no ip pim register-suppress-time (5-60000)", "no ip pim register-suppress-time [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Register Suppress Timer\n" "Register Suppress Timer\n"
"Seconds\n") IGNORED_IN_NO_STR)
{ {
char rs_default_timer[5];
snprintf(rs_default_timer, sizeof(rs_default_timer), "%d",
PIM_REGISTER_SUPPRESSION_TIME_DEFAULT);
nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time", nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
NB_OP_MODIFY, rs_default_timer); NB_OP_DESTROY, NULL);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFUN (ip_pim_rp_keep_alive, DEFUN (ip_pim_rp_keep_alive,
ip_pim_rp_keep_alive_cmd, ip_pim_rp_keep_alive_cmd,
"ip pim rp keep-alive-timer (31-60000)", "ip pim rp keep-alive-timer (1-65535)",
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Rendevous Point\n" "Rendevous Point\n"
@ -7274,20 +7264,26 @@ DEFUN (ip_pim_rp_keep_alive,
DEFUN (no_ip_pim_rp_keep_alive, DEFUN (no_ip_pim_rp_keep_alive,
no_ip_pim_rp_keep_alive_cmd, no_ip_pim_rp_keep_alive_cmd,
"no ip pim rp keep-alive-timer (31-60000)", "no ip pim rp keep-alive-timer [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Rendevous Point\n" "Rendevous Point\n"
"Keep alive Timer\n" "Keep alive Timer\n"
"Seconds\n") IGNORED_IN_NO_STR)
{ {
const char *vrfname; const char *vrfname;
char rp_ka_timer[5]; char rp_ka_timer[6];
char rp_ka_timer_xpath[XPATH_MAXLEN]; char rp_ka_timer_xpath[XPATH_MAXLEN];
uint v;
snprintf(rp_ka_timer, sizeof(rp_ka_timer), "%d", /* RFC4601 */
PIM_RP_KEEPALIVE_PERIOD); v = yang_dnode_get_uint16(vty->candidate_config->dnode,
"/frr-pim:pim/register-suppress-time");
v = 3 * v + PIM_REGISTER_PROBE_TIME_DEFAULT;
if (v > UINT16_MAX)
v = UINT16_MAX;
snprintf(rp_ka_timer, sizeof(rp_ka_timer), "%u", v);
vrfname = pim_cli_get_vrf_name(vty); vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL) if (vrfname == NULL)
@ -7306,7 +7302,7 @@ DEFUN (no_ip_pim_rp_keep_alive,
DEFUN (ip_pim_keep_alive, DEFUN (ip_pim_keep_alive,
ip_pim_keep_alive_cmd, ip_pim_keep_alive_cmd,
"ip pim keep-alive-timer (31-60000)", "ip pim keep-alive-timer (1-65535)",
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Keep alive Timer\n" "Keep alive Timer\n"
@ -7331,19 +7327,16 @@ DEFUN (ip_pim_keep_alive,
DEFUN (no_ip_pim_keep_alive, DEFUN (no_ip_pim_keep_alive,
no_ip_pim_keep_alive_cmd, no_ip_pim_keep_alive_cmd,
"no ip pim keep-alive-timer (31-60000)", "no ip pim keep-alive-timer [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"Keep alive Timer\n" "Keep alive Timer\n"
"Seconds\n") IGNORED_IN_NO_STR)
{ {
const char *vrfname; const char *vrfname;
char ka_timer[5];
char ka_timer_xpath[XPATH_MAXLEN]; char ka_timer_xpath[XPATH_MAXLEN];
snprintf(ka_timer, sizeof(ka_timer), "%d", PIM_KEEPALIVE_PERIOD);
vrfname = pim_cli_get_vrf_name(vty); vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL) if (vrfname == NULL)
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
@ -7352,15 +7345,14 @@ DEFUN (no_ip_pim_keep_alive,
"frr-pim:pimd", "pim", vrfname); "frr-pim:pimd", "pim", vrfname);
strlcat(ka_timer_xpath, "/keep-alive-timer", sizeof(ka_timer_xpath)); strlcat(ka_timer_xpath, "/keep-alive-timer", sizeof(ka_timer_xpath));
nb_cli_enqueue_change(vty, ka_timer_xpath, NB_OP_MODIFY, nb_cli_enqueue_change(vty, ka_timer_xpath, NB_OP_DESTROY, NULL);
ka_timer);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFUN (ip_pim_packets, DEFUN (ip_pim_packets,
ip_pim_packets_cmd, ip_pim_packets_cmd,
"ip pim packets (1-100)", "ip pim packets (1-255)",
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"packets to process at one time per fd\n" "packets to process at one time per fd\n"
@ -7374,27 +7366,21 @@ DEFUN (ip_pim_packets,
DEFUN (no_ip_pim_packets, DEFUN (no_ip_pim_packets,
no_ip_pim_packets_cmd, no_ip_pim_packets_cmd,
"no ip pim packets (1-100)", "no ip pim packets [(1-255)]",
NO_STR NO_STR
IP_STR IP_STR
"pim multicast routing\n" "pim multicast routing\n"
"packets to process at one time per fd\n" "packets to process at one time per fd\n"
"Number of packets\n") IGNORED_IN_NO_STR)
{ {
char default_packet[3]; nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_DESTROY, NULL);
snprintf(default_packet, sizeof(default_packet), "%d",
PIM_DEFAULT_PACKET_PROCESS);
nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
default_packet);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (igmp_group_watermark, DEFPY (igmp_group_watermark,
igmp_group_watermark_cmd, igmp_group_watermark_cmd,
"ip igmp watermark-warn (10-60000)$limit", "ip igmp watermark-warn (1-65535)$limit",
IP_STR IP_STR
IGMP_STR IGMP_STR
"Configure group limit for watermark warning\n" "Configure group limit for watermark warning\n"
@ -7408,12 +7394,12 @@ DEFPY (igmp_group_watermark,
DEFPY (no_igmp_group_watermark, DEFPY (no_igmp_group_watermark,
no_igmp_group_watermark_cmd, no_igmp_group_watermark_cmd,
"no ip igmp watermark-warn [(10-60000)$limit]", "no ip igmp watermark-warn [(1-65535)$limit]",
NO_STR NO_STR
IP_STR IP_STR
IGMP_STR IGMP_STR
"Unconfigure group limit for watermark warning\n" "Unconfigure group limit for watermark warning\n"
"Group count to generate watermark warning\n") IGNORED_IN_NO_STR)
{ {
PIM_DECLVAR_CONTEXT(vrf, pim); PIM_DECLVAR_CONTEXT(vrf, pim);
pim->igmp_watermark_limit = 0; pim->igmp_watermark_limit = 0;
@ -8146,7 +8132,7 @@ DEFUN (interface_no_ip_igmp_join,
DEFUN (interface_ip_igmp_query_interval, DEFUN (interface_ip_igmp_query_interval,
interface_ip_igmp_query_interval_cmd, interface_ip_igmp_query_interval_cmd,
"ip igmp query-interval (1-1800)", "ip igmp query-interval (1-65535)",
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_INTERVAL_STR IFACE_IGMP_QUERY_INTERVAL_STR
@ -8174,19 +8160,14 @@ DEFUN (interface_ip_igmp_query_interval,
DEFUN (interface_no_ip_igmp_query_interval, DEFUN (interface_no_ip_igmp_query_interval,
interface_no_ip_igmp_query_interval_cmd, interface_no_ip_igmp_query_interval_cmd,
"no ip igmp query-interval", "no ip igmp query-interval [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_INTERVAL_STR) IFACE_IGMP_QUERY_INTERVAL_STR
IGNORED_IN_NO_STR)
{ {
char default_query_interval[5]; nb_cli_enqueue_change(vty, "./query-interval", NB_OP_DESTROY, NULL);
snprintf(default_query_interval, sizeof(default_query_interval), "%d",
IGMP_GENERAL_QUERY_INTERVAL);
nb_cli_enqueue_change(vty, "./query-interval", NB_OP_MODIFY,
default_query_interval);
return nb_cli_apply_changes(vty, "./frr-igmp:igmp"); return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
} }
@ -8222,7 +8203,7 @@ DEFUN (interface_no_ip_igmp_version,
DEFUN (interface_ip_igmp_query_max_response_time, DEFUN (interface_ip_igmp_query_max_response_time,
interface_ip_igmp_query_max_response_time_cmd, interface_ip_igmp_query_max_response_time_cmd,
"ip igmp query-max-response-time (10-250)", "ip igmp query-max-response-time (1-65535)",
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR
@ -8251,27 +8232,21 @@ DEFUN (interface_ip_igmp_query_max_response_time,
DEFUN (interface_no_ip_igmp_query_max_response_time, DEFUN (interface_no_ip_igmp_query_max_response_time,
interface_no_ip_igmp_query_max_response_time_cmd, interface_no_ip_igmp_query_max_response_time_cmd,
"no ip igmp query-max-response-time (10-250)", "no ip igmp query-max-response-time [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR
"Time for response in deci-seconds\n") IGNORED_IN_NO_STR)
{ {
char default_query_max_response_time[4]; nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_DESTROY,
NULL);
snprintf(default_query_max_response_time,
sizeof(default_query_max_response_time),
"%d", IGMP_QUERY_MAX_RESPONSE_TIME_DSEC);
nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_MODIFY,
default_query_max_response_time);
return nb_cli_apply_changes(vty, "./frr-igmp:igmp"); return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
} }
DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec, DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,
interface_ip_igmp_query_max_response_time_dsec_cmd, interface_ip_igmp_query_max_response_time_dsec_cmd,
"ip igmp query-max-response-time-dsec (10-250)", "ip igmp query-max-response-time-dsec (1-65535)",
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR
@ -8299,27 +8274,22 @@ DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,
DEFUN_HIDDEN (interface_no_ip_igmp_query_max_response_time_dsec, DEFUN_HIDDEN (interface_no_ip_igmp_query_max_response_time_dsec,
interface_no_ip_igmp_query_max_response_time_dsec_cmd, interface_no_ip_igmp_query_max_response_time_dsec_cmd,
"no ip igmp query-max-response-time-dsec", "no ip igmp query-max-response-time-dsec [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR) IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR
IGNORED_IN_NO_STR)
{ {
char default_query_max_response_time[4]; nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_DESTROY,
NULL);
snprintf(default_query_max_response_time,
sizeof(default_query_max_response_time),
"%d", IGMP_QUERY_MAX_RESPONSE_TIME_DSEC);
nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_MODIFY,
default_query_max_response_time);
return nb_cli_apply_changes(vty, "./frr-igmp:igmp"); return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
} }
DEFUN (interface_ip_igmp_last_member_query_count, DEFUN (interface_ip_igmp_last_member_query_count,
interface_ip_igmp_last_member_query_count_cmd, interface_ip_igmp_last_member_query_count_cmd,
"ip igmp last-member-query-count (1-7)", "ip igmp last-member-query-count (1-255)",
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
@ -8347,27 +8317,22 @@ DEFUN (interface_ip_igmp_last_member_query_count,
DEFUN (interface_no_ip_igmp_last_member_query_count, DEFUN (interface_no_ip_igmp_last_member_query_count,
interface_no_ip_igmp_last_member_query_count_cmd, interface_no_ip_igmp_last_member_query_count_cmd,
"no ip igmp last-member-query-count [(1-7)]", "no ip igmp last-member-query-count [(1-255)]",
NO_STR NO_STR
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
"Last member query count\n") IGNORED_IN_NO_STR)
{ {
char default_robustness[2]; nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_DESTROY,
NULL);
snprintf(default_robustness, sizeof(default_robustness), "%d",
IGMP_DEFAULT_ROBUSTNESS_VARIABLE);
nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_MODIFY,
default_robustness);
return nb_cli_apply_changes(vty, "./frr-igmp:igmp"); return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
} }
DEFUN (interface_ip_igmp_last_member_query_interval, DEFUN (interface_ip_igmp_last_member_query_interval,
interface_ip_igmp_last_member_query_interval_cmd, interface_ip_igmp_last_member_query_interval_cmd,
"ip igmp last-member-query-interval (1-255)", "ip igmp last-member-query-interval (1-65535)",
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR
@ -8395,21 +8360,15 @@ DEFUN (interface_ip_igmp_last_member_query_interval,
DEFUN (interface_no_ip_igmp_last_member_query_interval, DEFUN (interface_no_ip_igmp_last_member_query_interval,
interface_no_ip_igmp_last_member_query_interval_cmd, interface_no_ip_igmp_last_member_query_interval_cmd,
"no ip igmp last-member-query-interval [(1-255)]", "no ip igmp last-member-query-interval [(1-65535)]",
NO_STR NO_STR
IP_STR IP_STR
IFACE_IGMP_STR IFACE_IGMP_STR
IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR
"Last member query interval in deciseconds\n") IGNORED_IN_NO_STR)
{ {
char default_last_member_query_count[4]; nb_cli_enqueue_change(vty, "./last-member-query-interval",
NB_OP_DESTROY, NULL);
snprintf(default_last_member_query_count,
sizeof(default_last_member_query_count),
"%d", IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC);
nb_cli_enqueue_change(vty, "./last-member-query-interval", NB_OP_MODIFY,
default_last_member_query_count);
return nb_cli_apply_changes(vty, "./frr-igmp:igmp"); return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
} }
@ -8439,13 +8398,7 @@ DEFUN (interface_no_ip_pim_drprio,
"Revert the Designated Router Priority to default\n" "Revert the Designated Router Priority to default\n"
"Old Value of the Priority\n") "Old Value of the Priority\n")
{ {
char default_priority[10]; nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_DESTROY, NULL);
snprintf(default_priority, sizeof(default_priority), "%d",
PIM_DEFAULT_DR_PRIORITY);
nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_MODIFY,
default_priority);
return nb_cli_apply_changes(vty, "./frr-pim:pim"); return nb_cli_apply_changes(vty, "./frr-pim:pim");
} }
@ -8780,7 +8733,7 @@ DEFUN (interface_no_ip_mroute,
DEFUN (interface_ip_pim_hello, DEFUN (interface_ip_pim_hello,
interface_ip_pim_hello_cmd, interface_ip_pim_hello_cmd,
"ip pim hello (1-180) [(1-630)]", "ip pim hello (1-65535) [(1-65535)]",
IP_STR IP_STR
PIM_STR PIM_STR
IFACE_PIM_HELLO_STR IFACE_PIM_HELLO_STR
@ -8815,21 +8768,15 @@ DEFUN (interface_ip_pim_hello,
DEFUN (interface_no_ip_pim_hello, DEFUN (interface_no_ip_pim_hello,
interface_no_ip_pim_hello_cmd, interface_no_ip_pim_hello_cmd,
"no ip pim hello [(1-180) [(1-630)]]", "no ip pim hello [(1-65535) [(1-65535)]]",
NO_STR NO_STR
IP_STR IP_STR
PIM_STR PIM_STR
IFACE_PIM_HELLO_STR IFACE_PIM_HELLO_STR
IFACE_PIM_HELLO_TIME_STR IGNORED_IN_NO_STR
IFACE_PIM_HELLO_HOLD_STR) IGNORED_IN_NO_STR)
{ {
char hello_default_timer[3]; nb_cli_enqueue_change(vty, "./hello-interval", NB_OP_DESTROY, NULL);
snprintf(hello_default_timer, sizeof(hello_default_timer), "%d",
PIM_DEFAULT_HELLO_PERIOD);
nb_cli_enqueue_change(vty, "./hello-interval", NB_OP_MODIFY,
hello_default_timer);
nb_cli_enqueue_change(vty, "./hello-holdtime", NB_OP_DESTROY, NULL); nb_cli_enqueue_change(vty, "./hello-holdtime", NB_OP_DESTROY, NULL);
return nb_cli_apply_changes(vty, "./frr-pim:pim"); return nb_cli_apply_changes(vty, "./frr-pim:pim");
@ -9636,10 +9583,10 @@ DEFUN (no_ip_pim_ucast_bsm,
} }
#if HAVE_BFDD > 0 #if HAVE_BFDD > 0
DEFUN_HIDDEN( DEFUN_HIDDEN (
ip_pim_bfd_param, ip_pim_bfd_param,
ip_pim_bfd_param_cmd, ip_pim_bfd_param_cmd,
"ip pim bfd (2-255) (50-60000) (50-60000)", "ip pim bfd (2-255) (1-65535) (1-65535)",
IP_STR IP_STR
PIM_STR PIM_STR
"Enables BFD support\n" "Enables BFD support\n"
@ -9650,7 +9597,7 @@ DEFUN_HIDDEN(
DEFUN( DEFUN(
ip_pim_bfd_param, ip_pim_bfd_param,
ip_pim_bfd_param_cmd, ip_pim_bfd_param_cmd,
"ip pim bfd (2-255) (50-60000) (50-60000)", "ip pim bfd (2-255) (1-65535) (1-65535)",
IP_STR IP_STR
PIM_STR PIM_STR
"Enables BFD support\n" "Enables BFD support\n"
@ -9689,7 +9636,10 @@ DEFUN_HIDDEN(
#if HAVE_BFDD == 0 #if HAVE_BFDD == 0
ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd, ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd,
"no ip pim bfd (2-255) (50-60000) (50-60000)", NO_STR IP_STR PIM_STR "no ip pim bfd (2-255) (1-65535) (1-65535)",
NO_STR
IP_STR
PIM_STR
"Enables BFD support\n" "Enables BFD support\n"
"Detect Multiplier\n" "Detect Multiplier\n"
"Required min receive interval\n" "Required min receive interval\n"
@ -9728,7 +9678,7 @@ DEFPY(ip_msdp_peer, ip_msdp_peer_cmd,
} }
DEFPY(ip_msdp_timers, ip_msdp_timers_cmd, DEFPY(ip_msdp_timers, ip_msdp_timers_cmd,
"ip msdp timers (2-600)$keepalive (3-600)$holdtime [(1-600)$connretry]", "ip msdp timers (1-65535)$keepalive (1-65535)$holdtime [(1-65535)$connretry]",
IP_STR IP_STR
CFG_MSDP_STR CFG_MSDP_STR
"MSDP timers configuration\n" "MSDP timers configuration\n"
@ -9759,6 +9709,35 @@ DEFPY(ip_msdp_timers, ip_msdp_timers_cmd,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFPY(no_ip_msdp_timers, no_ip_msdp_timers_cmd,
"no ip msdp timers [(1-65535) (1-65535) [(1-65535)]]",
NO_STR
IP_STR
CFG_MSDP_STR
"MSDP timers configuration\n"
IGNORED_IN_NO_STR
IGNORED_IN_NO_STR
IGNORED_IN_NO_STR)
{
const char *vrfname;
char xpath[XPATH_MAXLEN];
vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL)
return CMD_WARNING_CONFIG_FAILED;
snprintf(xpath, sizeof(xpath), FRR_PIM_MSDP_XPATH, "frr-pim:pimd",
"pim", vrfname, "frr-routing:ipv4");
nb_cli_enqueue_change(vty, "./hold-time", NB_OP_DESTROY, NULL);
nb_cli_enqueue_change(vty, "./keep-alive", NB_OP_DESTROY, NULL);
nb_cli_enqueue_change(vty, "./connection-retry", NB_OP_DESTROY, NULL);
nb_cli_apply_changes(vty, xpath);
return CMD_SUCCESS;
}
DEFUN (no_ip_msdp_peer, DEFUN (no_ip_msdp_peer,
no_ip_msdp_peer_cmd, no_ip_msdp_peer_cmd,
"no ip msdp peer A.B.C.D", "no ip msdp peer A.B.C.D",
@ -11383,6 +11362,8 @@ void pim_cmd_init(void)
install_element(CONFIG_NODE, &ip_msdp_timers_cmd); install_element(CONFIG_NODE, &ip_msdp_timers_cmd);
install_element(VRF_NODE, &ip_msdp_timers_cmd); install_element(VRF_NODE, &ip_msdp_timers_cmd);
install_element(CONFIG_NODE, &no_ip_msdp_timers_cmd);
install_element(VRF_NODE, &no_ip_msdp_timers_cmd);
install_element(CONFIG_NODE, &ip_msdp_mesh_group_member_cmd); install_element(CONFIG_NODE, &ip_msdp_mesh_group_member_cmd);
install_element(VRF_NODE, &ip_msdp_mesh_group_member_cmd); install_element(VRF_NODE, &ip_msdp_mesh_group_member_cmd);
install_element(CONFIG_NODE, &no_ip_msdp_mesh_group_member_cmd); install_element(CONFIG_NODE, &no_ip_msdp_mesh_group_member_cmd);

View File

@ -96,9 +96,9 @@ struct pim_router {
int t_periodic; int t_periodic;
struct pim_assert_metric infinite_assert_metric; struct pim_assert_metric infinite_assert_metric;
long rpf_cache_refresh_delay_msec; long rpf_cache_refresh_delay_msec;
int32_t register_suppress_time; uint32_t register_suppress_time;
int packet_process; int packet_process;
int32_t register_probe_time; uint32_t register_probe_time;
/* /*
* What is the default vrf that we work in * What is the default vrf that we work in

View File

@ -556,8 +556,27 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
*/ */
int pim_register_suppress_time_modify(struct nb_cb_modify_args *args) int pim_register_suppress_time_modify(struct nb_cb_modify_args *args)
{ {
uint16_t value;
switch (args->event) { switch (args->event) {
case NB_EV_VALIDATE: case NB_EV_VALIDATE:
value = yang_dnode_get_uint16(args->dnode, NULL);
/*
* As soon as this is non-constant it needs to be replaced with
* a yang_dnode_get to lookup the candidate value, *not* the
* operational value. Since the code has a field assigned and
* used for this value it should have YANG/CLI to set it too,
* otherwise just use the #define!
*/
/* RFC7761: 4.11. Timer Values */
if (value <= router->register_probe_time * 2) {
snprintf(
args->errmsg, args->errmsg_len,
"Register suppress time (%u) must be more than "
"twice the register probe time (%u).",
value, router->register_probe_time);
return NB_ERR_VALIDATION;
}
break;
case NB_EV_PREPARE: case NB_EV_PREPARE:
case NB_EV_ABORT: case NB_EV_ABORT:
break; break;
@ -956,21 +975,13 @@ int pim_msdp_hold_time_modify(struct nb_cb_modify_args *args)
switch (args->event) { switch (args->event) {
case NB_EV_VALIDATE: case NB_EV_VALIDATE:
if (yang_dnode_get_uint32(args->dnode, NULL)
<= yang_dnode_get_uint32(args->dnode, "../keep-alive")) {
snprintf(
args->errmsg, args->errmsg_len,
"Hold time must be greater than keep alive interval");
return NB_ERR_VALIDATION;
}
break;
case NB_EV_PREPARE: case NB_EV_PREPARE:
case NB_EV_ABORT: case NB_EV_ABORT:
break; break;
case NB_EV_APPLY: case NB_EV_APPLY:
vrf = nb_running_get_entry(args->dnode, NULL, true); vrf = nb_running_get_entry(args->dnode, NULL, true);
pim = vrf->info; pim = vrf->info;
pim->msdp.hold_time = yang_dnode_get_uint32(args->dnode, NULL); pim->msdp.hold_time = yang_dnode_get_uint16(args->dnode, NULL);
break; break;
} }
@ -988,21 +999,13 @@ int pim_msdp_keep_alive_modify(struct nb_cb_modify_args *args)
switch (args->event) { switch (args->event) {
case NB_EV_VALIDATE: case NB_EV_VALIDATE:
if (yang_dnode_get_uint32(args->dnode, NULL)
>= yang_dnode_get_uint32(args->dnode, "../hold-time")) {
snprintf(
args->errmsg, args->errmsg_len,
"Keep alive must be less than hold time interval");
return NB_ERR_VALIDATION;
}
break;
case NB_EV_PREPARE: case NB_EV_PREPARE:
case NB_EV_ABORT: case NB_EV_ABORT:
break; break;
case NB_EV_APPLY: case NB_EV_APPLY:
vrf = nb_running_get_entry(args->dnode, NULL, true); vrf = nb_running_get_entry(args->dnode, NULL, true);
pim = vrf->info; pim = vrf->info;
pim->msdp.keep_alive = yang_dnode_get_uint32(args->dnode, NULL); pim->msdp.keep_alive = yang_dnode_get_uint16(args->dnode, NULL);
break; break;
} }
@ -1027,7 +1030,7 @@ int pim_msdp_connection_retry_modify(struct nb_cb_modify_args *args)
vrf = nb_running_get_entry(args->dnode, NULL, true); vrf = nb_running_get_entry(args->dnode, NULL, true);
pim = vrf->info; pim = vrf->info;
pim->msdp.connection_retry = pim->msdp.connection_retry =
yang_dnode_get_uint32(args->dnode, NULL); yang_dnode_get_uint16(args->dnode, NULL);
break; break;
} }
@ -2636,9 +2639,7 @@ int lib_interface_igmp_version_destroy(struct nb_cb_destroy_args *args)
int lib_interface_igmp_query_interval_modify(struct nb_cb_modify_args *args) int lib_interface_igmp_query_interval_modify(struct nb_cb_modify_args *args)
{ {
struct interface *ifp; struct interface *ifp;
struct pim_interface *pim_ifp;
int query_interval; int query_interval;
int query_interval_dsec;
switch (args->event) { switch (args->event) {
case NB_EV_VALIDATE: case NB_EV_VALIDATE:
@ -2647,18 +2648,8 @@ int lib_interface_igmp_query_interval_modify(struct nb_cb_modify_args *args)
break; break;
case NB_EV_APPLY: case NB_EV_APPLY:
ifp = nb_running_get_entry(args->dnode, NULL, true); ifp = nb_running_get_entry(args->dnode, NULL, true);
pim_ifp = ifp->info;
query_interval = yang_dnode_get_uint16(args->dnode, NULL); query_interval = yang_dnode_get_uint16(args->dnode, NULL);
query_interval_dsec = 10 * query_interval; change_query_interval(ifp->info, query_interval);
if (query_interval_dsec <=
pim_ifp->igmp_query_max_response_time_dsec) {
snprintf(args->errmsg, args->errmsg_len,
"Can't set general query interval %d dsec <= query max response time %d dsec.",
query_interval_dsec,
pim_ifp->igmp_query_max_response_time_dsec);
return NB_ERR_INCONSISTENCY;
}
change_query_interval(pim_ifp, query_interval);
} }
return NB_OK; return NB_OK;
@ -2671,9 +2662,7 @@ int lib_interface_igmp_query_max_response_time_modify(
struct nb_cb_modify_args *args) struct nb_cb_modify_args *args)
{ {
struct interface *ifp; struct interface *ifp;
struct pim_interface *pim_ifp;
int query_max_response_time_dsec; int query_max_response_time_dsec;
int default_query_interval_dsec;
switch (args->event) { switch (args->event) {
case NB_EV_VALIDATE: case NB_EV_VALIDATE:
@ -2682,22 +2671,9 @@ int lib_interface_igmp_query_max_response_time_modify(
break; break;
case NB_EV_APPLY: case NB_EV_APPLY:
ifp = nb_running_get_entry(args->dnode, NULL, true); ifp = nb_running_get_entry(args->dnode, NULL, true);
pim_ifp = ifp->info;
query_max_response_time_dsec = query_max_response_time_dsec =
yang_dnode_get_uint8(args->dnode, NULL); yang_dnode_get_uint16(args->dnode, NULL);
default_query_interval_dsec = change_query_max_response_time(ifp->info,
10 * pim_ifp->igmp_default_query_interval;
if (query_max_response_time_dsec
>= default_query_interval_dsec) {
snprintf(args->errmsg, args->errmsg_len,
"Can't set query max response time %d sec >= general query interval %d sec",
query_max_response_time_dsec,
pim_ifp->igmp_default_query_interval);
return NB_ERR_INCONSISTENCY;
}
change_query_max_response_time(pim_ifp,
query_max_response_time_dsec); query_max_response_time_dsec);
} }
@ -2722,8 +2698,8 @@ int lib_interface_igmp_last_member_query_interval_modify(
case NB_EV_APPLY: case NB_EV_APPLY:
ifp = nb_running_get_entry(args->dnode, NULL, true); ifp = nb_running_get_entry(args->dnode, NULL, true);
pim_ifp = ifp->info; pim_ifp = ifp->info;
last_member_query_interval = yang_dnode_get_uint8(args->dnode, last_member_query_interval =
NULL); yang_dnode_get_uint16(args->dnode, NULL);
pim_ifp->igmp_specific_query_max_response_time_dsec = pim_ifp->igmp_specific_query_max_response_time_dsec =
last_member_query_interval; last_member_query_interval;

View File

@ -1800,12 +1800,16 @@ void pim_upstream_start_register_stop_timer(struct pim_upstream *up,
THREAD_OFF(up->t_rs_timer); THREAD_OFF(up->t_rs_timer);
if (!null_register) { if (!null_register) {
uint32_t lower = (0.5 * PIM_REGISTER_SUPPRESSION_PERIOD); uint32_t lower = (0.5 * router->register_suppress_time);
uint32_t upper = (1.5 * PIM_REGISTER_SUPPRESSION_PERIOD); uint32_t upper = (1.5 * router->register_suppress_time);
time = lower + (frr_weak_random() % (upper - lower + 1)) time = lower + (frr_weak_random() % (upper - lower + 1));
- PIM_REGISTER_PROBE_PERIOD; /* Make sure we don't wrap around */
if (time >= router->register_probe_time)
time -= router->register_probe_time;
else
time = 0;
} else } else
time = PIM_REGISTER_PROBE_PERIOD; time = router->register_probe_time;
if (PIM_DEBUG_PIM_TRACE) { if (PIM_DEBUG_PIM_TRACE) {
zlog_debug( zlog_debug(

View File

@ -55,7 +55,7 @@ def create_pim_config(tgen, topo, input_dict=None, build=False, load_config=True
input_dict = { input_dict = {
"r1": { "r1": {
"pim": { "pim": {
"disable" : ["l1-i1-eth1"], "join-prune-interval": "5",
"rp": [{ "rp": [{
"rp_addr" : "1.0.3.17". "rp_addr" : "1.0.3.17".
"keep-alive-timer": "100" "keep-alive-timer": "100"
@ -90,7 +90,7 @@ def create_pim_config(tgen, topo, input_dict=None, build=False, load_config=True
if "rp" not in input_dict[router]["pim"]: if "rp" not in input_dict[router]["pim"]:
continue continue
result = _create_pim_config( result = _create_pim_rp_config(
tgen, topo, input_dict, router, build, load_config tgen, topo, input_dict, router, build, load_config
) )
if result is not True: if result is not True:
@ -100,9 +100,9 @@ def create_pim_config(tgen, topo, input_dict=None, build=False, load_config=True
return result return result
def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=False): def _create_pim_rp_config(tgen, topo, input_dict, router, build=False, load_config=False):
""" """
Helper API to create pim configuration. Helper API to create pim RP configurations.
Parameters Parameters
---------- ----------
@ -119,22 +119,23 @@ def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=
result = False result = False
logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name)) logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
try:
pim_data = input_dict[router]["pim"] pim_data = input_dict[router]["pim"]
for dut in tgen.routers():
if "pim" not in input_dict[router]:
continue
for destLink, data in topo[dut]["links"].items():
if "pim" not in data:
continue
if "rp" in pim_data:
config_data = []
rp_data = pim_data["rp"] rp_data = pim_data["rp"]
# Configure this RP on every router.
for dut in tgen.routers():
# At least one interface must be enabled for PIM on the router
pim_if_enabled = False
for destLink, data in topo[dut]["links"].items():
if "pim" in data:
pim_if_enabled = True
if not pim_if_enabled:
continue
config_data = []
for rp_dict in deepcopy(rp_data): for rp_dict in deepcopy(rp_data):
# ip address of RP # ip address of RP
if "rp_addr" not in rp_dict and build: if "rp_addr" not in rp_dict and build:
@ -169,8 +170,6 @@ def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=
if keep_alive_timer: if keep_alive_timer:
cmd = "ip pim rp keep-alive-timer {}".format(keep_alive_timer) cmd = "ip pim rp keep-alive-timer {}".format(keep_alive_timer)
config_data.append(cmd)
if del_action: if del_action:
cmd = "no {}".format(cmd) cmd = "no {}".format(cmd)
config_data.append(cmd) config_data.append(cmd)
@ -182,8 +181,6 @@ def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=
for grp_addr in group_addr_range: for grp_addr in group_addr_range:
cmd = "ip pim rp {} {}".format(rp_addr, grp_addr) cmd = "ip pim rp {} {}".format(rp_addr, grp_addr)
config_data.append(cmd)
if del_action: if del_action:
cmd = "no {}".format(cmd) cmd = "no {}".format(cmd)
config_data.append(cmd) config_data.append(cmd)
@ -192,23 +189,23 @@ def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=
cmd = "ip pim rp {} prefix-list {}".format( cmd = "ip pim rp {} prefix-list {}".format(
rp_addr, prefix_list rp_addr, prefix_list
) )
config_data.append(cmd)
if del_action: if del_action:
cmd = "no {}".format(cmd) cmd = "no {}".format(cmd)
config_data.append(cmd) config_data.append(cmd)
try:
result = create_common_configuration( result = create_common_configuration(
tgen, dut, config_data, "pim", build, load_config tgen, dut, config_data, "pim", build, load_config
) )
if result is not True: if result is not True:
logger.error("Error applying PIM config", exc_info=True)
logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
return False return False
except InvalidCLIError: except InvalidCLIError as error:
# Traceback logger.error("Error applying PIM config: %s", error, exc_info=error)
errormsg = traceback.format_exc() logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
logger.error(errormsg) return False
return errormsg
logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name)) logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
return result return result
@ -338,23 +335,7 @@ def _enable_disable_pim(tgen, topo, input_dict, router, build=False):
try: try:
config_data = [] config_data = []
enable_flag = True # Enable pim on interfaces
# Disable pim on interface
if "pim" in input_dict[router]:
if "disable" in input_dict[router]["pim"]:
enable_flag = False
interfaces = input_dict[router]["pim"]["disable"]
if type(interfaces) is not list:
interfaces = [interfaces]
for interface in interfaces:
cmd = "interface {}".format(interface)
config_data.append(cmd)
config_data.append("no ip pim")
# Enable pim on interface
if enable_flag:
for destRouterLink, data in sorted(topo[router]["links"].items()): for destRouterLink, data in sorted(topo[router]["links"].items()):
if "pim" in data and data["pim"] == "enable": if "pim" in data and data["pim"] == "enable":
@ -374,6 +355,22 @@ def _enable_disable_pim(tgen, topo, input_dict, router, build=False):
if result is not True: if result is not True:
return False return False
config_data = []
if "pim" in input_dict[router]:
pim_data = input_dict[router]["pim"]
for t in [
"join-prune-interval",
"keep-alive-timer",
"register-suppress-time",
]:
if t in pim_data:
cmd = "ip pim {} {}".format(t, pim_data[t])
config_data.append(cmd)
if config_data:
result = create_common_configuration(
tgen, router, config_data, "pim", build=build
)
except InvalidCLIError: except InvalidCLIError:
# Traceback # Traceback
errormsg = traceback.format_exc() errormsg = traceback.format_exc()

View File

@ -13,10 +13,12 @@
"r2": {"ipv4": "auto", "pim": "enable"}, "r2": {"ipv4": "auto", "pim": "enable"},
"c1": {"ipv4": "auto", "pim": "enable"} "c1": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"igmp": { "igmp": {
"interfaces": { "interfaces": {
"l1-i1-eth1" :{ "l1-i1-eth1" :{
"igmp":{ "igmp":{
"query": {"query-max-response-time": 40, "query-interval": 5},
"version": "2" "version": "2"
} }
} }
@ -38,6 +40,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i3": {"ipv4": "auto", "pim": "enable"} "i3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"], "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"],
"next_hop": "10.0.7.1" "next_hop": "10.0.7.1"
@ -55,6 +58,7 @@
"i2": {"ipv4": "auto", "pim": "enable"}, "i2": {"ipv4": "auto", "pim": "enable"},
"i8": {"ipv4": "auto", "pim": "enable"} "i8": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"],
"next_hop": "10.0.7.2" "next_hop": "10.0.7.2"
@ -71,6 +75,7 @@
"l1": {"ipv4": "auto", "pim": "enable"}, "l1": {"ipv4": "auto", "pim": "enable"},
"i4": {"ipv4": "auto", "pim": "enable"} "i4": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.2.2" "next_hop": "10.0.2.2"
@ -87,6 +92,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i5": {"ipv4": "auto", "pim": "enable"} "i5": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.3.2" "next_hop": "10.0.3.2"

View File

@ -78,6 +78,7 @@ from lib.common_config import (
step, step,
iperfSendIGMPJoin, iperfSendIGMPJoin,
addKernelRoute, addKernelRoute,
apply_raw_config,
reset_config_on_routers, reset_config_on_routers,
iperfSendTraffic, iperfSendTraffic,
kill_iperf, kill_iperf,
@ -1553,8 +1554,10 @@ def test_modify_igmp_max_query_response_timer_p0(request):
assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result) assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result)
step("Delete the PIM and IGMP on FRR1") step("Delete the PIM and IGMP on FRR1")
input_dict_1 = {"l1": {"pim": {"disable": ["l1-i1-eth1"]}}} raw_config = {
result = create_pim_config(tgen, topo, input_dict_1) "l1": {"raw_config": ["interface l1-i1-eth1", "no ip pim"]}
}
result = apply_raw_config(tgen, raw_config)
assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result) assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result)
input_dict_2 = { input_dict_2 = {

View File

@ -13,10 +13,12 @@
"r2": {"ipv4": "auto", "pim": "enable"}, "r2": {"ipv4": "auto", "pim": "enable"},
"c1": {"ipv4": "auto", "pim": "enable"} "c1": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"igmp": { "igmp": {
"interfaces": { "interfaces": {
"l1-i1-eth1" :{ "l1-i1-eth1" :{
"igmp":{ "igmp":{
"query": {"query-max-response-time": 40, "query-interval": 5},
"version": "2" "version": "2"
} }
} }
@ -38,6 +40,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i3": {"ipv4": "auto", "pim": "enable"} "i3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"], "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"],
"next_hop": "10.0.7.1" "next_hop": "10.0.7.1"
@ -55,6 +58,7 @@
"i2": {"ipv4": "auto", "pim": "enable"}, "i2": {"ipv4": "auto", "pim": "enable"},
"i8": {"ipv4": "auto", "pim": "enable"} "i8": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"],
"next_hop": "10.0.7.2" "next_hop": "10.0.7.2"
@ -71,6 +75,7 @@
"l1": {"ipv4": "auto", "pim": "enable"}, "l1": {"ipv4": "auto", "pim": "enable"},
"i4": {"ipv4": "auto", "pim": "enable"} "i4": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.2.2" "next_hop": "10.0.2.2"
@ -87,6 +92,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i5": {"ipv4": "auto", "pim": "enable"} "i5": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.3.2" "next_hop": "10.0.3.2"

View File

@ -13,10 +13,12 @@
"r2": {"ipv4": "auto", "pim": "enable"}, "r2": {"ipv4": "auto", "pim": "enable"},
"c1": {"ipv4": "auto", "pim": "enable"} "c1": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"igmp": { "igmp": {
"interfaces": { "interfaces": {
"l1-i1-eth1" :{ "l1-i1-eth1" :{
"igmp":{ "igmp":{
"query": {"query-max-response-time": 40, "query-interval": 5},
"version": "2" "version": "2"
} }
} }
@ -38,6 +40,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i3": {"ipv4": "auto", "pim": "enable"} "i3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24", "1.0.3.5/32"], "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24", "1.0.3.5/32"],
"next_hop": "10.0.7.1" "next_hop": "10.0.7.1"
@ -55,6 +58,7 @@
"i2": {"ipv4": "auto", "pim": "enable"}, "i2": {"ipv4": "auto", "pim": "enable"},
"i8": {"ipv4": "auto", "pim": "enable"} "i8": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24", "10.0.12.0/24"], "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24", "10.0.12.0/24"],
"next_hop": "10.0.7.2" "next_hop": "10.0.7.2"
@ -71,6 +75,7 @@
"l1": {"ipv4": "auto", "pim": "enable"}, "l1": {"ipv4": "auto", "pim": "enable"},
"i4": {"ipv4": "auto", "pim": "enable"} "i4": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.2.2" "next_hop": "10.0.2.2"
@ -87,6 +92,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i5": {"ipv4": "auto", "pim": "enable"} "i5": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"], "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"],
"next_hop": "10.0.3.2" "next_hop": "10.0.3.2"

View File

@ -13,10 +13,12 @@
"r2": {"ipv4": "auto", "pim": "enable"}, "r2": {"ipv4": "auto", "pim": "enable"},
"c1": {"ipv4": "auto", "pim": "enable"} "c1": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"igmp": { "igmp": {
"interfaces": { "interfaces": {
"l1-i1-eth1" :{ "l1-i1-eth1" :{
"igmp":{ "igmp":{
"query": {"query-max-response-time": 40, "query-interval": 5},
"version": "2" "version": "2"
} }
} }
@ -40,6 +42,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i3": {"ipv4": "auto", "pim": "enable"} "i3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["10.0.4.0/24","10.0.3.1/24"], "network": ["10.0.4.0/24","10.0.3.1/24"],
"next_hop": "10.0.7.1" "next_hop": "10.0.7.1"
@ -57,6 +60,7 @@
"i2": {"ipv4": "auto", "pim": "enable"}, "i2": {"ipv4": "auto", "pim": "enable"},
"i8": {"ipv4": "auto", "pim": "enable"} "i8": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["10.0.4.0/24","10.0.3.1/24"], "network": ["10.0.4.0/24","10.0.3.1/24"],
"next_hop": "10.0.3.1" "next_hop": "10.0.3.1"
@ -73,6 +77,7 @@
"l1": {"ipv4": "auto", "pim": "enable"}, "l1": {"ipv4": "auto", "pim": "enable"},
"i4": {"ipv4": "auto", "pim": "enable"} "i4": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [{ "static_routes": [{
"network": ["1.0.4.11/32","10.0.4.2/24", "10.0.3.1/24"], "network": ["1.0.4.11/32","10.0.4.2/24", "10.0.3.1/24"],
"next_hop": "10.0.2.2" "next_hop": "10.0.2.2"
@ -87,6 +92,7 @@
"f1": {"ipv4": "auto", "pim": "enable"}, "f1": {"ipv4": "auto", "pim": "enable"},
"i5": {"ipv4": "auto", "pim": "enable"} "i5": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
"static_routes": [ "static_routes": [
{ {
"network": ["1.0.4.11/32", "10.0.2.1/24", "10.0.1.2/24"], "network": ["1.0.4.11/32", "10.0.2.1/24", "10.0.1.2/24"],

View File

@ -2014,7 +2014,7 @@ def test_verify_remove_add_igmp_commands_when_pim_configured_p0(request):
intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"] intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"]
input_dict_1 = { input_dict_1 = {
"l1": {"igmp": {"interfaces": {intf_l1_i1: {"igmp": {"version": "2"}}}}} "l1": {"igmp": {"interfaces": {intf_l1_i1: {"igmp": {"version": "2", "query": {"query-max-response-time": 40, "query-interval": 5}}}}}}
} }
result = verify_igmp_config(tgen, input_dict_1) result = verify_igmp_config(tgen, input_dict_1)
@ -2231,8 +2231,10 @@ def test_verify_remove_add_pim_commands_when_igmp_configured_p1(request):
step("Remove 'no ip pim' on receiver interface on FRR1") step("Remove 'no ip pim' on receiver interface on FRR1")
intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"] intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"]
input_dict_1 = {"l1": {"pim": {"disable": intf_l1_i1}}} raw_config = {
result = create_pim_config(tgen, topo, input_dict_1) "l1": {"raw_config": ["interface {}".format(intf_l1_i1), "no ip pim"]}
}
result = apply_raw_config(tgen, raw_config)
assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result) assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result)
step("Verify that no core is observed") step("Verify that no core is observed")

View File

@ -4,7 +4,11 @@
"link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24}, "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24},
"lo_prefix": {"ipv4": "1.0.", "v4mask": 32}, "lo_prefix": {"ipv4": "1.0.", "v4mask": 32},
"routers": { "routers": {
"r0": {"links": {"r1": {"ipv4": "auto"}}}, "r0": {
"links": {
"r1": {"ipv4": "auto"}
}
},
"r1": { "r1": {
"links": { "links": {
"lo": {"ipv4": "auto", "type": "loopback", "pim": "enable"}, "lo": {"ipv4": "auto", "type": "loopback", "pim": "enable"},
@ -14,9 +18,20 @@
"r4": {"ipv4": "auto", "pim": "enable"} "r4": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "pim": {
"rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}] "join-prune-interval": "5",
"keep-alive-timer": 15,
"register-suppress-time": 12
},
"igmp": {
"interfaces": {
"r1-r0-eth0": {
"igmp": {
"query": {"query-max-response-time": 40, "query-interval": 5},
"version": "2"
}
}
}
}, },
"igmp": {"interfaces": {"r1-r0-eth0": {"igmp": {"version": "2"}}}},
"static_routes": [ "static_routes": [
{"network": "10.0.4.0/24", "next_hop": "10.0.2.2"}, {"network": "10.0.4.0/24", "next_hop": "10.0.2.2"},
{"network": "10.0.5.0/24", "next_hop": "10.0.2.2"}, {"network": "10.0.5.0/24", "next_hop": "10.0.2.2"},
@ -35,6 +50,9 @@
"r3": {"ipv4": "auto", "pim": "enable"} "r3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "pim": {
"join-prune-interval": "5",
"keep-alive-timer": 15,
"register-suppress-time": 12,
"rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}] "rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}]
}, },
"static_routes": [ "static_routes": [
@ -57,7 +75,9 @@
"r5": {"ipv4": "auto", "pim": "enable"} "r5": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "pim": {
"rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}] "join-prune-interval": "5",
"keep-alive-timer": 15,
"register-suppress-time": 12
}, },
"static_routes": [ "static_routes": [
{"network": "10.0.0.0/24", "next_hop": "10.0.2.1"}, {"network": "10.0.0.0/24", "next_hop": "10.0.2.1"},
@ -75,7 +95,9 @@
"r3": {"ipv4": "auto", "pim": "enable"} "r3": {"ipv4": "auto", "pim": "enable"}
}, },
"pim": { "pim": {
"rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}] "join-prune-interval": "5",
"keep-alive-timer": 15,
"register-suppress-time": 12
}, },
"static_routes": [ "static_routes": [
{"network": "10.0.0.0/24", "next_hop": "10.0.3.1"}, {"network": "10.0.0.0/24", "next_hop": "10.0.3.1"},
@ -88,6 +110,10 @@
{"network": "1.0.3.17/32", "next_hop": "10.0.5.1"} {"network": "1.0.3.17/32", "next_hop": "10.0.5.1"}
] ]
}, },
"r5": {"links": {"r3": {"ipv4": "auto"}}} "r5": {
"links": {
"r3": {"ipv4": "auto"}
}
}
} }
} }

View File

@ -84,9 +84,10 @@ module frr-igmp {
leaf query-interval { leaf query-interval {
type uint16 { type uint16 {
range "1..1800"; range "1..max";
} }
units seconds; units seconds;
must ". * 10 >= ../query-max-response-time";
default "125"; default "125";
description description
"The Query Interval is the interval between General Queries "The Query Interval is the interval between General Queries
@ -94,10 +95,11 @@ module frr-igmp {
} }
leaf query-max-response-time { leaf query-max-response-time {
type uint8 { type uint16 {
range "10..250"; range "1..max";
} }
units deciseconds; units deciseconds;
must ". <= ../query-interval * 10";
default "100"; default "100";
description description
"Query maximum response time specifies the maximum time "Query maximum response time specifies the maximum time
@ -105,8 +107,8 @@ module frr-igmp {
} }
leaf last-member-query-interval { leaf last-member-query-interval {
type uint8 { type uint16 {
range "1..255"; range "1..max";
} }
units deciseconds; units deciseconds;
default "10"; default "10";
@ -117,7 +119,7 @@ module frr-igmp {
leaf robustness-variable { leaf robustness-variable {
type uint8 { type uint8 {
range "1..7"; range "1..max";
} }
default "2"; default "2";
description description

View File

@ -97,7 +97,7 @@ module frr-pim {
leaf keep-alive-timer { leaf keep-alive-timer {
type uint16 { type uint16 {
range "31..60000"; range "1..max";
} }
default "210"; default "210";
description description
@ -106,7 +106,7 @@ module frr-pim {
leaf rp-keep-alive-timer { leaf rp-keep-alive-timer {
type uint16 { type uint16 {
range "31..60000"; range "1..max";
} }
default "210"; default "210";
description description
@ -116,36 +116,34 @@ module frr-pim {
grouping msdp-timers { grouping msdp-timers {
leaf hold-time { leaf hold-time {
type uint32 { type uint16 {
range 3..600; range "1..max";
} }
units seconds; units seconds;
default 75; default 75;
description description
"Hold period is started at the MSDP peer connection establishment "Hold period is started at the MSDP peer connection establishment
and is reset every new message. When the period expires the and is reset every new message. When the period expires the
connection is closed. connection is closed. This value should be greater than the
remote keep-alive time.";
This value needs to be greater than `keep-alive-period`.";
} }
leaf keep-alive { leaf keep-alive {
type uint32 { type uint16 {
range 2..600; range "1..max";
} }
units seconds; units seconds;
default 60; default 60;
description description
"To maintain a connection established it is necessary to send "To maintain a connection established it is necessary to send
keep alive messages in a certain frequency and this allows its keep alive messages in a certain frequency and this allows its
configuration. configuration. This value should be less than the remote
hold time.";
This value needs to be lesser than `hold-time-period`.";
} }
leaf connection-retry { leaf connection-retry {
type uint32 { type uint16 {
range 1..600; range "1..max";
} }
units seconds; units seconds;
default 30; default 30;
@ -343,7 +341,7 @@ module frr-pim {
leaf hello-interval { leaf hello-interval {
type uint8 { type uint8 {
range "1..180"; range "1..max";
} }
default "30"; default "30";
description description
@ -352,7 +350,7 @@ module frr-pim {
leaf hello-holdtime { leaf hello-holdtime {
type uint16 { type uint16 {
range "1..630"; range "1..max";
} }
must ". > ./../hello-interval" { must ". > ./../hello-interval" {
error-message "HoldTime must be greater than Hello"; error-message "HoldTime must be greater than Hello";
@ -367,7 +365,7 @@ module frr-pim {
leaf min-rx-interval { leaf min-rx-interval {
type uint16 { type uint16 {
range "50..60000"; range "1..max";
} }
default "300"; default "300";
description description
@ -376,7 +374,7 @@ module frr-pim {
leaf min-tx-interval { leaf min-tx-interval {
type uint16 { type uint16 {
range "50..60000"; range "1..max";
} }
default "300"; default "300";
description description
@ -422,7 +420,7 @@ module frr-pim {
leaf dr-priority { leaf dr-priority {
type uint32 { type uint32 {
range "1..4294967295"; range "1..max";
} }
default 1; default 1;
description description
@ -521,7 +519,7 @@ module frr-pim {
"PIM router parameters."; "PIM router parameters.";
leaf packets { leaf packets {
type uint8 { type uint8 {
range "1..100"; range "1..max";
} }
default "3"; default "3";
description description
@ -529,7 +527,7 @@ module frr-pim {
} }
leaf join-prune-interval { leaf join-prune-interval {
type uint16 { type uint16 {
range "5..600"; range "1..max";
} }
default "60"; default "60";
description description
@ -537,7 +535,7 @@ module frr-pim {
} }
leaf register-suppress-time { leaf register-suppress-time {
type uint16 { type uint16 {
range "5..60000"; range "1..max";
} }
default "60"; default "60";
description description