return CMD_SUCCESS;
}
+DEFPY (bgp_def_originate_eval,
+ bgp_def_originate_eval_cmd,
+ "[no$no] bgp default-originate timer (0-3600)$timer",
+ NO_STR
+ BGP_STR
+ "Control default-originate\n"
+ "Set period to rescan BGP table to check if default-originate condition is met\n"
+ "Period between BGP table scans, in seconds; default 5\n")
+{
+ VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+ bgp->rmap_def_originate_eval_timer =
+ no ? RMAP_DEFAULT_ORIGINATE_EVAL_TIMER : timer;
+
+ if (bgp->t_rmap_def_originate_eval)
+ EVENT_OFF(bgp->t_rmap_def_originate_eval);
+
+ return CMD_SUCCESS;
+}
+
DEFPY (neighbor_advertise_map,
neighbor_advertise_map_cmd,
"[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor advertise-map RMAP_NAME$advertise_str <exist-map|non-exist-map>$exist RMAP_NAME$condition_str",
" bgp conditional-advertisement timer %u\n",
bgp->condition_check_period);
+ /* default-originate timer configuration */
+ if (bgp->rmap_def_originate_eval_timer !=
+ RMAP_DEFAULT_ORIGINATE_EVAL_TIMER)
+ vty_out(vty, " bgp default-originate timer %u\n",
+ bgp->rmap_def_originate_eval_timer);
+
/* peer-group */
for (ALL_LIST_ELEMENTS(bgp->group, node, nnode, group)) {
bgp_config_write_peer_global(vty, bgp, group->conf);
install_element(BGP_VPNV4_NODE, &neighbor_advertise_map_cmd);
install_element(BGP_VPNV6_NODE, &neighbor_advertise_map_cmd);
+ /* bgp default-originate timer */
+ install_element(BGP_NODE, &bgp_def_originate_eval_cmd);
+
/* neighbor maximum-prefix-out commands. */
install_element(BGP_NODE, &neighbor_maximum_prefix_out_cmd);
install_element(BGP_NODE, &no_neighbor_maximum_prefix_out_cmd);
and will not be displayed as part of a `show run`. The no form
of the command turns off this ability.
+.. clicmd:: bgp default-originate timer (0-3600)
+
+ Set the period to rerun the default-originate route-map scanner process. The
+ default is 5 seconds. With a full routing table, it might be useful to increase
+ this setting to avoid scanning the whole BGP table aggressively.
+
.. clicmd:: bgp default ipv4-unicast
This command allows the user to specify that the IPv4 Unicast address