Border Gateway Protocol (BGP) is the de facto standard path-vector protocol used to exchange routing information between autonomous systems, supporting multi-address-family deployments including IPv4 unicast, IPv6 unicast, and L2VPN EVPN on NX-OS. It provides extensive policy control through peer templates, route maps, prefix lists, and per-neighbor address-family configuration with granular route filtering, community manipulation, and next-hop processing for both eBGP and iBGP sessions. BGP supports advanced features including enhanced error handling, graceful restart, route reflector functionality, maximum prefix limits, policy batching control, and fabric SOO for VXLAN EVPN deployments.
Name Type Constraint Mandatory Default Value bgp Class [bgp]No
Name Type Constraint Mandatory Default Value asn String No shutdown Boolean true, falseNo disable_policy_batching Boolean true, falseNo disable_policy_batching_nexthop Boolean true, falseNo disable_policy_batching_ipv4_prefix_list String No disable_policy_batching_ipv6_prefix_list String No fabric_soo String No flush_routes Boolean true, falseNo isolate Choice enabled, disabled, include-local, customNo isolate_route_map String No med_dampening_interval Integer min: 60, max: 4294967295 No nexthop_suppress_default_resolution Boolean true, falseNo rd_dual Boolean true, falseNo rd_dual_id Integer min: 1, max: 65535 No peer_templates List [peer_templates]No router_id String No allocate_index Integer min: 1, max: 8000 No bestpath_limit_always Boolean true, falseNo bestpath_limit Integer min: 1, max: 3600 No bandwidth_reference Integer min: 0, max: 4294967295 No bandwidth_reference_unit Choice mbps, gbpsNo cluster_id String No hold_time Integer min: 3, max: 3600 No keepalive_interval Integer min: 0, max: 3600 No local_as String No maxas_limit Integer min: 1, max: 512 No mode Choice fabric, external, proxyNo prefix_peer_timeout Integer min: 0, max: 1200 No prefix_peer_wait Integer min: 0, max: 1200 No reconnect_interval Integer min: 1, max: 60 No router_id_auto Boolean true, falseNo log_neighbor_changes Boolean true, falseNo enforce_first_as Boolean true, falseNo neighbor_down_fib_accelerate Boolean true, falseNo suppress_fib_pending Boolean true, falseNo graceful_restart Choice helper, completeNo graceful_restart_restart_time Integer min: 1, max: 3600 No graceful_restart_stalepath_time Integer min: 1, max: 3600 No neighbors List [neighbors]No address_families List [address_families]No vrfs List [vrfs]No
Name Type Constraint Mandatory Default Value name String Yes remote_as String No description String No peer_type Choice fabric-internal, fabric-external, fabric-border-leafNo update_source_interface_type Choice ethernet, loopback, mgmt, port-channel, vlan, vniNo update_source_interface_id String No shutdown Boolean true, falseNo affinity_group Integer min: 0, max: 65535 No remote_as_type Choice none, external, internalNo bfd_type Choice none, singlehop, multihopNo bmp_activate_server_1 Boolean true, falseNo bmp_activate_server_2 Boolean true, falseNo capability_suppress_4_byte_asn Boolean true, falseNo connection_mode Choice passiveNo bfd Boolean true, falseNo disable_connected_check Boolean true, falseNo dont_capability_negotiate Boolean true, falseNo dynamic_capability Boolean true, falseNo hold_time Integer min: 3, max: 3600 No keepalive_interval Integer min: 0, max: 3600 No log_neighbor_changes Boolean true, falseNo low_memory_exempt Boolean true, falseNo maximum_peers Integer min: 1, max: 1000 No password_type Choice 0, 3, line, 6, 7No password String No remove_private_as Choice none, remove-exclusive, remove-all, replace-asNo inherit_peer_session String No ebgp_multihop_ttl Integer min: 2, max: 255 No ttl_security_hops Integer min: 1, max: 254 No address_families List [address_families]No
Name Type Constraint Mandatory Default Value ip IP Yes remote_as String No description String No inherit_peer String No peer_type Choice fabric-internal, fabric-external, fabric-border-leafNo update_source_interface_type Choice ethernet, loopback, mgmt, port-channel, vlan, vniNo update_source_interface_id String No hold_time Integer min: 3, max: 3600 No keepalive_interval Integer min: 0, max: 3600 No ebgp_multihop_ttl Integer min: 2, max: 255 No bfd Boolean true, falseNo disable_connected_check Boolean true, falseNo dont_capability_negotiate Boolean true, falseNo dynamic_capability Boolean true, falseNo password_type Choice 0, 3, line, 6, 7No password String No shutdown Boolean true, falseNo affinity_group Integer min: 0, max: 65535 No remote_as_type Choice none, external, internalNo bfd_type Choice none, singlehop, multihopNo bmp_activate_server_1 Boolean true, falseNo bmp_activate_server_2 Boolean true, falseNo capability_suppress_4_byte_asn Boolean true, falseNo connection_mode Choice passiveNo log_neighbor_changes Boolean true, falseNo low_memory_exempt Boolean true, falseNo maximum_peers Integer min: 1, max: 1000 No remove_private_as Choice none, remove-exclusive, remove-all, replace-asNo inherit_peer_session String No ttl_security_hops Integer min: 1, max: 254 No local_as String No local_as_propagation Choice none, no-prepend, replace-as, dual-asNo address_families List [address_families]No
Name Type Constraint Mandatory Default Value address_family Choice ipv4-unicast, ipv4-multicast, vpnv4-unicast, ipv6-unicast, ipv6-multicast, vpnv6-unicast, vpnv6-multicast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdtYes advertise_l2vpn_evpn Boolean true, falseNo advertise_only_active_routes Boolean true, falseNo advertise_pip Boolean true, falseNo advertise_system_mac Boolean true, falseNo allocate_label_all Boolean true, falseNo allocate_label_option_b Boolean true, falseNo allocate_label_route_map String No bestpath_origin_as_allow_invalid Boolean true, falseNo bestpath_origin_as_use_validity Boolean true, falseNo client_to_client_reflection Boolean true, falseNo nexthop_trigger_delay_critical Integer min: 1, max: 4294967295 No default_information_originate Boolean true, falseNo default_metric String No export_gateway_ip Boolean true, falseNo dampen_igp_metric Integer min: 0, max: 3600 No label_allocation_mode Boolean true, falseNo maximum_paths Integer min: 1, max: 512 No maximum_paths_eibgp Integer min: 1, max: 512 No maximum_paths_eibgp_ibgp Integer min: 1, max: 512 No maximum_paths_local Integer min: 1, max: 512 No maximum_paths_mixed Integer min: 1, max: 512 No maximum_paths_unequal_cost Boolean true, falseNo nexthop_route_map String No nexthop_load_balance_egress_multisite Boolean true, falseNo nexthop_trigger_delay_non_critical Integer min: 1, max: 4294967295 No originate_map String No origin_as_validate Boolean true, falseNo origin_as_validate_signal_ibgp Boolean true, falseNo prefix_priority Choice none, highNo retain_route_target_all Boolean true, falseNo retain_route_target_route_map String No table_map String No table_map_filter Boolean true, falseNo timers_bestpath_defer Integer min: 100, max: 3000 No timers_bestpath_defer_maximum Integer min: 300, max: 300000 No allow_vni_in_ethertag Boolean true, falseNo wait_igp_convergence Boolean true, falseNo networks List [networks]No redistributions List [redistributions]No
Name Type Constraint Mandatory Default Value vrf String Yes router_id String No allocate_index Integer min: 1, max: 8000 No bestpath_limit_always Boolean true, falseNo bestpath_limit Integer min: 1, max: 3600 No bandwidth_reference Integer min: 0, max: 4294967295 No bandwidth_reference_unit Choice mbps, gbpsNo cluster_id String No hold_time Integer min: 3, max: 3600 No keepalive_interval Integer min: 0, max: 3600 No local_as String No maxas_limit Integer min: 1, max: 512 No mode Choice fabric, external, proxyNo prefix_peer_timeout Integer min: 0, max: 1200 No prefix_peer_wait Integer min: 0, max: 1200 No reconnect_interval Integer min: 1, max: 60 No router_id_auto Boolean true, falseNo log_neighbor_changes Boolean true, falseNo enforce_first_as Boolean true, falseNo neighbor_down_fib_accelerate Boolean true, falseNo suppress_fib_pending Boolean true, falseNo graceful_restart Choice helper, completeNo graceful_restart_restart_time Integer min: 1, max: 3600 No graceful_restart_stalepath_time Integer min: 1, max: 3600 No neighbors List [neighbors]No address_families List [address_families]No
Name Type Constraint Mandatory Default Value address_family Choice ipv4-unicast, ipv6-unicast, vpnv4-unicast, vpnv6-unicast, l2vpn-evpn, lnkstateYes send_community_standard Boolean true, falseNo send_community_extended Boolean true, falseNo route_reflector_client Boolean true, falseNo next_hop_self Boolean true, falseNo next_hop_self_all Boolean true, falseNo disable_peer_as_check Boolean true, falseNo allowas_in Boolean true, falseNo default_originate Boolean true, falseNo suppress_inactive Boolean true, falseNo advertisement_interval Integer min: 1, max: 600 No advertise_gateway_ip Boolean true, falseNo advertise_local_labeled_route Boolean true, falseNo aigp Boolean true, falseNo allowas_in_count Integer min: 0, max: 10 No as_override Boolean true, falseNo default_originate_route_map String No dmz_link_bandwidth Boolean true, falseNo encapsulation_mpls Boolean true, falseNo link_bandwidth_cumulative Boolean true, falseNo next_hop_third_party Boolean true, falseNo rewrite_evpn_rt_asn Boolean true, falseNo soft_reconfiguration_inbound Choice none, inbound, inbound-alwaysNo site_of_origin String No unsuppress_map String No weight String No maximum_prefix Class [maximum_prefix]No
Name Type Constraint Mandatory Default Value address_family Choice ipv4-unicast, ipv4-mvpn, vpnv4-unicast, ipv6-unicast, vpnv6-unicast, l2vpn-evpn, lnkstateYes send_community_standard Boolean true, falseNo send_community_extended Boolean true, falseNo route_reflector_client Boolean true, falseNo next_hop_self Boolean true, falseNo next_hop_self_all Boolean true, falseNo disable_peer_as_check Boolean true, falseNo allowas_in Boolean true, falseNo default_originate Boolean true, falseNo suppress_inactive Boolean true, falseNo advertisement_interval Integer min: 1, max: 600 No advertise_gateway_ip Boolean true, falseNo advertise_local_labeled_route Boolean true, falseNo aigp Boolean true, falseNo allowas_in_count Integer min: 0, max: 10 No as_override Boolean true, falseNo default_originate_route_map String No dmz_link_bandwidth Boolean true, falseNo encapsulation_mpls Boolean true, falseNo link_bandwidth_cumulative Boolean true, falseNo next_hop_third_party Boolean true, falseNo rewrite_evpn_rt_asn Boolean true, falseNo soft_reconfiguration_inbound Choice none, inbound, inbound-alwaysNo site_of_origin String No unsuppress_map String No weight String No maximum_prefix Class [maximum_prefix]No route_map_in String No route_map_out String No prefix_list_in String No prefix_list_out String No
Name Type Constraint Mandatory Default Value prefix String Yes evpn Boolean true, falseNo route_map String No
Name Type Constraint Mandatory Default Value protocol Choice srv6, unspecified, static, direct, bgp, isis, ospf, ospfv3, eigrp, host, rip, amt, lisp, hmm, am, dhcpv6, icmpv6Yes protocol_instance String No route_map String No scope Choice intra, inter, defrtNo srv6_prefix_type Choice unspecified, locatorNo asn String No
Name Type Constraint Mandatory Default Value number Integer min: 0, max: 4294967295 No action Choice log, shut, restartNo restart_time Integer min: 1, max: 65535 No threshold Integer min: 1, max: 100 No
Example 1: Basic iBGP spine-leaf peering with peer template for underlay
update_source_interface_type : loopback
update_source_interface_id : " 0 "
- address_family : ipv4-unicast
send_community_standard : true
send_community_extended : true
route_reflector_client : true
Example 2: EVPN address family on a leaf switch peering to spines
update_source_interface_type : loopback
update_source_interface_id : " 0 "
- address_family : l2vpn-evpn
send_community_standard : true
send_community_extended : true
inherit_peer : SPINE-PEERS
inherit_peer : SPINE-PEERS
Example 3: VRF-aware BGP with route targets for tenant routing
log_neighbor_changes : true
- address_family : ipv4-unicast
advertise_l2vpn_evpn : true
route_map : PERMIT-CONNECTED
- address_family : ipv4-unicast
advertise_l2vpn_evpn : true
route_map : PERMIT-CONNECTED
Example 4: Advanced peer template with route maps, BFD, and prefix limits
update_source_interface_type : loopback
update_source_interface_id : " 0 "
log_neighbor_changes : true
- address_family : l2vpn-evpn
send_community_standard : true
send_community_extended : true
peer_type : fabric-external
- address_family : ipv4-unicast
send_community_standard : true
inherit_peer : SPINE-PEERS
inherit_peer : SPINE-PEERS
inherit_peer : EXTERNAL-PEERS
description : " DC-Interconnect-Router "
- address_family : ipv4-unicast
route_map_in : INBOUND-FILTER
route_map_out : OUTBOUND-FILTER
Example 5: Full multi-VRF leaf with EVPN overlay, redistribute, and graceful restart
update_source_interface_type : loopback
update_source_interface_id : " 0 "
- address_family : l2vpn-evpn
send_community_standard : true
send_community_extended : true
graceful_restart : complete
graceful_restart_restart_time : 120
graceful_restart_stalepath_time : 300
log_neighbor_changes : true
inherit_peer : SPINE-PEERS
inherit_peer : SPINE-PEERS
- address_family : l2vpn-evpn
retain_route_target_all : true
- address_family : ipv4-unicast
advertise_l2vpn_evpn : true
route_map : REDISTRIBUTE-STATIC
route_map : PERMIT-CONNECTED
- address_family : ipv4-unicast
advertise_l2vpn_evpn : true
route_map : PERMIT-CONNECTED
- address_family : ipv6-unicast
advertise_l2vpn_evpn : true
- prefix : 2001:db8:2::/64