Skip to content

BGP

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.

Diagram
NameTypeConstraintMandatoryDefault Value
bgpClass[bgp]No

NameTypeConstraintMandatoryDefault Value
asnAnyString or Integer[min: 0, max: 4294967295]No
shutdownBooleantrue, falseNo
disable_policy_batchingBooleantrue, falseNo
disable_policy_batching_nexthopBooleantrue, falseNo
disable_policy_batching_ipv4_prefix_listStringNo
disable_policy_batching_ipv6_prefix_listStringNo
fabric_sooStringNo
flush_routesBooleantrue, falseNo
isolateChoiceenabled, disabled, include-local, customNo
isolate_route_mapStringNo
med_dampening_intervalIntegermin: 60, max: 4294967295No
nexthop_suppress_default_resolutionBooleantrue, falseNo
rd_dualBooleantrue, falseNo
rd_dual_idIntegermin: 1, max: 65535No
peer_templatesList[peer_templates]No
router_idIPNo
allocate_indexIntegermin: 1, max: 8000No
bestpath_limit_alwaysBooleantrue, falseNo
bestpath_limitIntegermin: 1, max: 3600No
bandwidth_referenceIntegermin: 0, max: 4294967295No
bandwidth_reference_unitChoicembps, gbpsNo
cluster_idAnyIP or Integer[min: 0, max: 4294967295] or String[Regex: ^.*[$%]\{.*$]No
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
local_asAnyString or Integer[min: 0, max: 4294967295]No
maxas_limitIntegermin: 1, max: 512No
modeChoicefabric, external, proxyNo
prefix_peer_timeoutIntegermin: 0, max: 1200No
prefix_peer_waitIntegermin: 0, max: 1200No
reconnect_intervalIntegermin: 1, max: 60No
router_id_autoBooleantrue, falseNo
log_neighbor_changesBooleantrue, falseNo
enforce_first_asBooleantrue, falseNo
neighbor_down_fib_accelerateBooleantrue, falseNo
suppress_fib_pendingBooleantrue, falseNo
graceful_restartChoicehelper, completeNo
graceful_restart_restart_timeIntegermin: 1, max: 3600No
graceful_restart_stalepath_timeIntegermin: 1, max: 3600No
neighborsList[neighbors]No
address_familiesList[address_families]No
vrfsList[vrfs]No

peer_templates (nxos.devices.configuration.routing.bgp)

Section titled “peer_templates (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
remote_asAnyString or Integer[min: 0, max: 4294967295]No
descriptionStringNo
peer_typeChoicefabric-internal, fabric-external, fabric-border-leafNo
update_source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
update_source_interface_idAnyString or Integer[min: 0]No
shutdownBooleantrue, falseNo
affinity_groupIntegermin: 0, max: 65535No
bfd_multihopBooleantrue, falseNo
bmp_activate_server_1Booleantrue, falseNo
bmp_activate_server_2Booleantrue, falseNo
capability_suppress_4_byte_asBooleantrue, falseNo
connection_modeChoicepassiveNo
bfdBooleantrue, falseNo
disable_connected_checkBooleantrue, falseNo
dont_capability_negotiateBooleantrue, falseNo
dynamic_capabilityBooleantrue, falseNo
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
log_neighbor_changesBooleantrue, falseNo
low_memory_exemptBooleantrue, falseNo
maximum_peersIntegermin: 1, max: 1000No
password_typeChoice0, 3, line, 6, 7No
passwordStringNo
remove_private_asChoicenone, enabled, all, replace-asNo
inherit_peer_sessionStringNo
ebgp_multihop_ttlIntegermin: 2, max: 255No
ttl_security_hopsIntegermin: 1, max: 254No
address_familiesList[address_families]No

neighbors (nxos.devices.configuration.routing.bgp)

Section titled “neighbors (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
ipIPNo
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
interface_idAnyString or Integer[min: 0]No
remote_asAnyString or Integer[min: 0, max: 4294967295]No
descriptionStringNo
inherit_peerStringNo
peer_typeChoicefabric-internal, fabric-external, fabric-border-leafNo
update_source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
update_source_interface_idAnyString or Integer[min: 0]No
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
ebgp_multihop_ttlIntegermin: 2, max: 255No
bfdBooleantrue, falseNo
disable_connected_checkBooleantrue, falseNo
dont_capability_negotiateBooleantrue, falseNo
dynamic_capabilityBooleantrue, falseNo
password_typeChoice0, 3, line, 6, 7No
passwordStringNo
shutdownBooleantrue, falseNo
affinity_groupIntegermin: 0, max: 65535No
bfd_multihopBooleantrue, falseNo
bmp_activate_server_1Booleantrue, falseNo
bmp_activate_server_2Booleantrue, falseNo
capability_suppress_4_byte_asBooleantrue, falseNo
transport_connection_modeChoicepassiveNo
log_neighbor_changesBooleantrue, falseNo
low_memory_exemptBooleantrue, falseNo
maximum_peersIntegermin: 1, max: 1000No
remove_private_asChoicenone, enabled, all, replace-asNo
inherit_peer_sessionStringNo
ttl_security_hopsIntegermin: 1, max: 254No
local_asAnyString or Integer[min: 0, max: 4294967295]No
local_as_propagationChoicenone, no-prepend, replace-as, dual-asNo
dscpIntegermin: 0, max: 63No
dynamic_route_mapStringNo
egress_engineeringBooleantrue, falseNo
egress_engineering_peer_setStringNo
internal_vpn_clientBooleantrue, falseNo
address_familiesList[address_families]No

address_families (nxos.devices.configuration.routing.bgp)

Section titled “address_families (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
address_familyChoiceipv4-unicast, ipv4-multicast, vpnv4-unicast, ipv6-unicast, ipv6-multicast, vpnv6-unicast, vpnv6-multicast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, link-state, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdtYes
advertise_l2vpn_evpnBooleantrue, falseNo
advertise_only_active_routesBooleantrue, falseNo
advertise_pipBooleantrue, falseNo
advertise_system_macBooleantrue, falseNo
allocate_label_allBooleantrue, falseNo
allocate_label_option_bBooleantrue, falseNo
allocate_label_route_mapStringNo
bestpath_origin_as_allow_invalidBooleantrue, falseNo
bestpath_origin_as_use_validityBooleantrue, falseNo
client_to_client_reflectionBooleantrue, falseNo
nexthop_trigger_delay_criticalIntegermin: 1, max: 4294967295No
default_information_originateBooleantrue, falseNo
default_information_originate_always_rdStringNo
default_information_originate_always_route_targetStringNo
default_metricIntegermin: 0, max: 4294967295No
export_gateway_ipBooleantrue, falseNo
dampen_igp_metricIntegermin: 0, max: 3600No
label_allocation_modeBooleantrue, falseNo
load_balance_egress_filter_policy_route_mapStringNo
load_balance_egress_multipath_auto_policy_route_mapStringNo
maximum_pathsIntegermin: 1, max: 512No
maximum_paths_eibgpIntegermin: 1, max: 512No
maximum_paths_ibgpIntegermin: 1, max: 512No
maximum_paths_localIntegermin: 1, max: 512No
maximum_paths_mixedIntegermin: 1, max: 512No
maximum_paths_unequal_costBooleantrue, falseNo
nexthop_route_mapStringNo
nexthop_load_balance_egress_multisiteBooleantrue, falseNo
nexthop_trigger_delay_non_criticalIntegermin: 1, max: 4294967295No
originate_mapStringNo
origin_as_validateBooleantrue, falseNo
origin_as_validate_signal_ibgpBooleantrue, falseNo
prefix_priorityChoicenone, highNo
retain_route_target_allBooleantrue, falseNo
retain_route_target_route_mapStringNo
table_mapStringNo
table_map_filterBooleantrue, falseNo
timers_bestpath_deferIntegermin: 100, max: 3000No
timers_bestpath_defer_maximumIntegermin: 300, max: 300000No
allow_vni_in_ethertagBooleantrue, falseNo
wait_igp_convergenceBooleantrue, falseNo
additional_paths_sendBooleantrue, falseNo
additional_paths_receiveBooleantrue, falseNo
additional_paths_install_backupBooleantrue, falseNo
additional_paths_selection_route_mapStringNo
networksList[networks]No
redistributionsList[redistributions]No
aggregate_addressesList[aggregate_addresses]No

vrfs (nxos.devices.configuration.routing.bgp)

Section titled “vrfs (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
vrfStringYes
router_idIPNo
allocate_indexIntegermin: 1, max: 8000No
bestpath_limit_alwaysBooleantrue, falseNo
bestpath_limitIntegermin: 1, max: 3600No
reference_bandwidthIntegermin: 0, max: 4294967295No
reference_bandwidth_unitChoicembps, gbpsNo
cluster_idAnyIP or Integer[min: 0, max: 4294967295] or String[Regex: ^.*[$%]\{.*$]No
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
local_asAnyString or Integer[min: 0, max: 4294967295]No
maxas_limitIntegermin: 1, max: 512No
modeChoicefabric, external, proxyNo
prefix_peer_timeoutIntegermin: 0, max: 1200No
prefix_peer_waitIntegermin: 0, max: 1200No
reconnect_intervalIntegermin: 1, max: 60No
router_id_autoBooleantrue, falseNo
log_neighbor_changesBooleantrue, falseNo
enforce_first_asBooleantrue, falseNo
neighbor_down_fib_accelerateBooleantrue, falseNo
suppress_fib_pendingBooleantrue, falseNo
graceful_restartChoicehelper, completeNo
graceful_restart_restart_timeIntegermin: 1, max: 3600No
graceful_restart_stalepath_timeIntegermin: 1, max: 3600No
neighborsList[neighbors]No
address_familiesList[address_families]No

networks (nxos.devices.configuration.routing.bgp.address_families)

Section titled “networks (nxos.devices.configuration.routing.bgp.address_families)”
NameTypeConstraintMandatoryDefault Value
prefixStringYes
evpnBooleantrue, falseNo
route_mapStringNo

redistributions (nxos.devices.configuration.routing.bgp.address_families)

Section titled “redistributions (nxos.devices.configuration.routing.bgp.address_families)”
NameTypeConstraintMandatoryDefault Value
protocolChoicesrv6, unspecified, static, direct, bgp, isis, ospf, ospfv3, eigrp, host, rip, amt, lisp, hmm, am, dhcpv6, icmpv6Yes
protocol_instanceStringNo
route_mapStringNo
asnAnyString or Integer[min: 0, max: 4294967295]No

aggregate_addresses (nxos.devices.configuration.routing.bgp.address_families)

Section titled “aggregate_addresses (nxos.devices.configuration.routing.bgp.address_families)”
NameTypeConstraintMandatoryDefault Value
prefixStringYes
as_setBooleantrue, falseNo
summary_onlyBooleantrue, falseNo
advertise_mapStringNo
attribute_mapStringNo
suppress_mapStringNo

maximum_prefix (nxos.devices.configuration.routing.bgp.peer_templates.address_families)

Section titled “maximum_prefix (nxos.devices.configuration.routing.bgp.peer_templates.address_families)”
NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 4294967295No
actionChoicelog, shut, restartNo
restart_timeIntegermin: 1, max: 65535No
thresholdIntegermin: 1, max: 100No

Example 1: Basic iBGP spine-leaf peering with peer template for underlay

nxos:
devices:
- name: SPINE1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: LEAF-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: ipv4-unicast
send_community_standard: true
send_community_extended: true
route_reflector_client: true
router_id: 10.1.100.1
neighbors:
- ip: 10.1.100.3
inherit_peer: LEAF-PEERS
- ip: 10.1.100.4
inherit_peer: LEAF-PEERS

Example 2: EVPN address family on a leaf switch peering to spines

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
router_id: 10.1.100.3
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS

Example 3: VRF-aware BGP with route targets for tenant routing

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
vrfs:
- vrf: BLUE
router_id: 10.1.100.3
log_neighbor_changes: true
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
networks:
- prefix: 192.168.1.0/24
- vrf: GREEN
router_id: 10.1.100.3
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
networks:
- prefix: 192.168.2.0/24

Example 4: Advanced peer template with route maps, BFD, and prefix limits

nxos:
devices:
- name: BORDER-LEAF1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
bfd: true
hold_time: 30
keepalive_interval: 10
log_neighbor_changes: true
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
- name: EXTERNAL-PEERS
remote_as: "65100"
peer_type: fabric-external
ebgp_multihop_ttl: 2
address_families:
- address_family: ipv4-unicast
send_community_standard: true
maximum_prefix:
number: 10000
action: log
threshold: 80
router_id: 10.1.100.3
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS
- ip: 172.17.1.1
inherit_peer: EXTERNAL-PEERS
description: "DC-Interconnect-Router"
address_families:
- 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

nxos:
devices:
- name: LEAF2
configuration:
routing:
bgp:
asn: "65000"
flush_routes: true
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
router_id: 10.1.100.4
graceful_restart: complete
graceful_restart_restart_time: 120
graceful_restart_stalepath_time: 300
log_neighbor_changes: true
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS
address_families:
- address_family: l2vpn-evpn
retain_route_target_all: true
vrfs:
- vrf: BLUE
router_id: 10.1.100.4
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
networks:
- prefix: 192.168.1.0/24
redistributions:
- protocol: static
route_map: REDISTRIBUTE-STATIC
- protocol: direct
route_map: PERMIT-CONNECTED
- vrf: GREEN
router_id: 10.1.100.4
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
networks:
- prefix: 192.168.2.0/24
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
- address_family: ipv6-unicast
advertise_l2vpn_evpn: true
networks:
- prefix: 2001:db8:2::/64

Example 6: BGP address family with load-balance egress policies and default-information originate RD/RT

nxos:
devices:
- name: BORDER-GW1
configuration:
routing:
bgp:
asn: "65000"
router_id: 10.1.100.5
address_families:
- address_family: ipv4-unicast
default_information_originate: true
default_information_originate_always_rd: "rd:as2-nn2:1:1"
default_information_originate_always_route_target: "route-target:as2-nn2:1:1"
load_balance_egress_filter_policy_route_map: LB-EGRESS-FILTER
load_balance_egress_multipath_auto_policy_route_map: LB-EGRESS-MPATH

Example 7: BGP additional paths and aggregate addresses

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
router_id: 10.1.100.3
address_families:
- address_family: ipv4-unicast
additional_paths_send: true
additional_paths_receive: true
additional_paths_install_backup: true
additional_paths_selection_route_map: ADD-PATH-SELECT
aggregate_addresses:
- prefix: 10.0.0.0/8
summary_only: true
- prefix: 172.16.0.0/12
as_set: true
advertise_map: AGG-ADV-MAP
attribute_map: AGG-ATTR-MAP
suppress_map: AGG-SUPPR-MAP

Example 8: BGP interface peers for unnumbered peering

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
router_id: 10.1.100.3
neighbors:
- interface_type: ethernet
interface_id: "1/1"
inherit_peer: SPINE-PEERS
description: "Spine1-Uplink"
bfd: true
- interface_type: ethernet
interface_id: "1/2"
inherit_peer: SPINE-PEERS
description: "Spine2-Uplink"
bfd: true
vrfs:
- vrf: BLUE
neighbors:
- interface_type: ethernet
interface_id: "1/3"
remote_as: "65100"
description: "CE-Router"

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.

Diagram
NameTypeConstraintMandatoryDefault Value
bgpClass[bgp]No

NameTypeConstraintMandatoryDefault Value
asnStringNo
shutdownBooleantrue, falseNo
disable_policy_batchingBooleantrue, falseNo
disable_policy_batching_nexthopBooleantrue, falseNo
disable_policy_batching_ipv4_prefix_listStringNo
disable_policy_batching_ipv6_prefix_listStringNo
fabric_sooStringNo
flush_routesBooleantrue, falseNo
isolateChoiceenabled, disabled, include-local, customNo
isolate_route_mapStringNo
med_dampening_intervalIntegermin: 60, max: 4294967295No
nexthop_suppress_default_resolutionBooleantrue, falseNo
rd_dualBooleantrue, falseNo
rd_dual_idIntegermin: 1, max: 65535No
peer_templatesList[peer_templates]No
router_idStringNo
allocate_indexIntegermin: 1, max: 8000No
bestpath_limit_alwaysBooleantrue, falseNo
bestpath_limitIntegermin: 1, max: 3600No
bandwidth_referenceIntegermin: 0, max: 4294967295No
bandwidth_reference_unitChoicembps, gbpsNo
cluster_idStringNo
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
local_asStringNo
maxas_limitIntegermin: 1, max: 512No
modeChoicefabric, external, proxyNo
prefix_peer_timeoutIntegermin: 0, max: 1200No
prefix_peer_waitIntegermin: 0, max: 1200No
reconnect_intervalIntegermin: 1, max: 60No
router_id_autoBooleantrue, falseNo
log_neighbor_changesBooleantrue, falseNo
enforce_first_asBooleantrue, falseNo
neighbor_down_fib_accelerateBooleantrue, falseNo
suppress_fib_pendingBooleantrue, falseNo
graceful_restartChoicehelper, completeNo
graceful_restart_restart_timeIntegermin: 1, max: 3600No
graceful_restart_stalepath_timeIntegermin: 1, max: 3600No
neighborsList[neighbors]No
address_familiesList[address_families]No
vrfsList[vrfs]No

peer_templates (nxos.devices.configuration.routing.bgp)

Section titled “peer_templates (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
remote_asStringNo
descriptionStringNo
peer_typeChoicefabric-internal, fabric-external, fabric-border-leafNo
update_source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
update_source_interface_idStringNo
shutdownBooleantrue, falseNo
affinity_groupIntegermin: 0, max: 65535No
remote_as_typeChoicenone, external, internalNo
bfd_typeChoicenone, singlehop, multihopNo
bmp_activate_server_1Booleantrue, falseNo
bmp_activate_server_2Booleantrue, falseNo
capability_suppress_4_byte_asnBooleantrue, falseNo
connection_modeChoicepassiveNo
bfdBooleantrue, falseNo
disable_connected_checkBooleantrue, falseNo
dont_capability_negotiateBooleantrue, falseNo
dynamic_capabilityBooleantrue, falseNo
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
log_neighbor_changesBooleantrue, falseNo
low_memory_exemptBooleantrue, falseNo
maximum_peersIntegermin: 1, max: 1000No
password_typeChoice0, 3, line, 6, 7No
passwordStringNo
remove_private_asChoicenone, remove-exclusive, remove-all, replace-asNo
inherit_peer_sessionStringNo
ebgp_multihop_ttlIntegermin: 2, max: 255No
ttl_security_hopsIntegermin: 1, max: 254No
address_familiesList[address_families]No

neighbors (nxos.devices.configuration.routing.bgp)

Section titled “neighbors (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
ipIPYes
remote_asStringNo
descriptionStringNo
inherit_peerStringNo
peer_typeChoicefabric-internal, fabric-external, fabric-border-leafNo
update_source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
update_source_interface_idStringNo
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
ebgp_multihop_ttlIntegermin: 2, max: 255No
bfdBooleantrue, falseNo
disable_connected_checkBooleantrue, falseNo
dont_capability_negotiateBooleantrue, falseNo
dynamic_capabilityBooleantrue, falseNo
password_typeChoice0, 3, line, 6, 7No
passwordStringNo
shutdownBooleantrue, falseNo
affinity_groupIntegermin: 0, max: 65535No
remote_as_typeChoicenone, external, internalNo
bfd_typeChoicenone, singlehop, multihopNo
bmp_activate_server_1Booleantrue, falseNo
bmp_activate_server_2Booleantrue, falseNo
capability_suppress_4_byte_asnBooleantrue, falseNo
connection_modeChoicepassiveNo
log_neighbor_changesBooleantrue, falseNo
low_memory_exemptBooleantrue, falseNo
maximum_peersIntegermin: 1, max: 1000No
remove_private_asChoicenone, remove-exclusive, remove-all, replace-asNo
inherit_peer_sessionStringNo
ttl_security_hopsIntegermin: 1, max: 254No
local_asStringNo
local_as_propagationChoicenone, no-prepend, replace-as, dual-asNo
address_familiesList[address_families]No

address_families (nxos.devices.configuration.routing.bgp)

Section titled “address_families (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
address_familyChoiceipv4-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_evpnBooleantrue, falseNo
advertise_only_active_routesBooleantrue, falseNo
advertise_pipBooleantrue, falseNo
advertise_system_macBooleantrue, falseNo
allocate_label_allBooleantrue, falseNo
allocate_label_option_bBooleantrue, falseNo
allocate_label_route_mapStringNo
bestpath_origin_as_allow_invalidBooleantrue, falseNo
bestpath_origin_as_use_validityBooleantrue, falseNo
client_to_client_reflectionBooleantrue, falseNo
nexthop_trigger_delay_criticalIntegermin: 1, max: 4294967295No
default_information_originateBooleantrue, falseNo
default_metricStringNo
export_gateway_ipBooleantrue, falseNo
dampen_igp_metricIntegermin: 0, max: 3600No
label_allocation_modeBooleantrue, falseNo
maximum_pathsIntegermin: 1, max: 512No
maximum_paths_eibgpIntegermin: 1, max: 512No
maximum_paths_eibgp_ibgpIntegermin: 1, max: 512No
maximum_paths_localIntegermin: 1, max: 512No
maximum_paths_mixedIntegermin: 1, max: 512No
maximum_paths_unequal_costBooleantrue, falseNo
nexthop_route_mapStringNo
nexthop_load_balance_egress_multisiteBooleantrue, falseNo
nexthop_trigger_delay_non_criticalIntegermin: 1, max: 4294967295No
originate_mapStringNo
origin_as_validateBooleantrue, falseNo
origin_as_validate_signal_ibgpBooleantrue, falseNo
prefix_priorityChoicenone, highNo
retain_route_target_allBooleantrue, falseNo
retain_route_target_route_mapStringNo
table_mapStringNo
table_map_filterBooleantrue, falseNo
timers_bestpath_deferIntegermin: 100, max: 3000No
timers_bestpath_defer_maximumIntegermin: 300, max: 300000No
allow_vni_in_ethertagBooleantrue, falseNo
wait_igp_convergenceBooleantrue, falseNo
networksList[networks]No
redistributionsList[redistributions]No

vrfs (nxos.devices.configuration.routing.bgp)

Section titled “vrfs (nxos.devices.configuration.routing.bgp)”
NameTypeConstraintMandatoryDefault Value
vrfStringYes
router_idStringNo
allocate_indexIntegermin: 1, max: 8000No
bestpath_limit_alwaysBooleantrue, falseNo
bestpath_limitIntegermin: 1, max: 3600No
bandwidth_referenceIntegermin: 0, max: 4294967295No
bandwidth_reference_unitChoicembps, gbpsNo
cluster_idStringNo
hold_timeIntegermin: 3, max: 3600No
keepalive_intervalIntegermin: 0, max: 3600No
local_asStringNo
maxas_limitIntegermin: 1, max: 512No
modeChoicefabric, external, proxyNo
prefix_peer_timeoutIntegermin: 0, max: 1200No
prefix_peer_waitIntegermin: 0, max: 1200No
reconnect_intervalIntegermin: 1, max: 60No
router_id_autoBooleantrue, falseNo
log_neighbor_changesBooleantrue, falseNo
enforce_first_asBooleantrue, falseNo
neighbor_down_fib_accelerateBooleantrue, falseNo
suppress_fib_pendingBooleantrue, falseNo
graceful_restartChoicehelper, completeNo
graceful_restart_restart_timeIntegermin: 1, max: 3600No
graceful_restart_stalepath_timeIntegermin: 1, max: 3600No
neighborsList[neighbors]No
address_familiesList[address_families]No

networks (nxos.devices.configuration.routing.bgp.address_families)

Section titled “networks (nxos.devices.configuration.routing.bgp.address_families)”
NameTypeConstraintMandatoryDefault Value
prefixStringYes
evpnBooleantrue, falseNo
route_mapStringNo

redistributions (nxos.devices.configuration.routing.bgp.address_families)

Section titled “redistributions (nxos.devices.configuration.routing.bgp.address_families)”
NameTypeConstraintMandatoryDefault Value
protocolChoicesrv6, unspecified, static, direct, bgp, isis, ospf, ospfv3, eigrp, host, rip, amt, lisp, hmm, am, dhcpv6, icmpv6Yes
protocol_instanceStringNo
route_mapStringNo
scopeChoiceintra, inter, defrtNo
srv6_prefix_typeChoiceunspecified, locatorNo
asnStringNo

maximum_prefix (nxos.devices.configuration.routing.bgp.peer_templates.address_families)

Section titled “maximum_prefix (nxos.devices.configuration.routing.bgp.peer_templates.address_families)”
NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 4294967295No
actionChoicelog, shut, restartNo
restart_timeIntegermin: 1, max: 65535No
thresholdIntegermin: 1, max: 100No

Example 1: Basic iBGP spine-leaf peering with peer template for underlay

nxos:
devices:
- name: SPINE1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: LEAF-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: ipv4-unicast
send_community_standard: true
send_community_extended: true
route_reflector_client: true
router_id: 10.1.100.1
neighbors:
- ip: 10.1.100.3
inherit_peer: LEAF-PEERS
- ip: 10.1.100.4
inherit_peer: LEAF-PEERS

Example 2: EVPN address family on a leaf switch peering to spines

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
router_id: 10.1.100.3
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS

Example 3: VRF-aware BGP with route targets for tenant routing

nxos:
devices:
- name: LEAF1
configuration:
routing:
bgp:
asn: "65000"
vrfs:
- vrf: BLUE
router_id: 10.1.100.3
log_neighbor_changes: true
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
networks:
- prefix: 192.168.1.0/24
- vrf: GREEN
router_id: 10.1.100.3
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
networks:
- prefix: 192.168.2.0/24

Example 4: Advanced peer template with route maps, BFD, and prefix limits

nxos:
devices:
- name: BORDER-LEAF1
configuration:
routing:
bgp:
asn: "65000"
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
bfd: true
hold_time: 30
keepalive_interval: 10
log_neighbor_changes: true
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
- name: EXTERNAL-PEERS
remote_as: "65100"
peer_type: fabric-external
ebgp_multihop_ttl: 2
address_families:
- address_family: ipv4-unicast
send_community_standard: true
maximum_prefix:
number: 10000
action: log
threshold: 80
router_id: 10.1.100.3
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS
- ip: 172.17.1.1
inherit_peer: EXTERNAL-PEERS
description: "DC-Interconnect-Router"
address_families:
- 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

nxos:
devices:
- name: LEAF2
configuration:
routing:
bgp:
asn: "65000"
flush_routes: true
peer_templates:
- name: SPINE-PEERS
remote_as: "65000"
update_source_interface_type: loopback
update_source_interface_id: "0"
address_families:
- address_family: l2vpn-evpn
send_community_standard: true
send_community_extended: true
router_id: 10.1.100.4
graceful_restart: complete
graceful_restart_restart_time: 120
graceful_restart_stalepath_time: 300
log_neighbor_changes: true
neighbors:
- ip: 10.1.100.1
inherit_peer: SPINE-PEERS
- ip: 10.1.100.2
inherit_peer: SPINE-PEERS
address_families:
- address_family: l2vpn-evpn
retain_route_target_all: true
vrfs:
- vrf: BLUE
router_id: 10.1.100.4
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
networks:
- prefix: 192.168.1.0/24
redistributions:
- protocol: static
route_map: REDISTRIBUTE-STATIC
- protocol: direct
route_map: PERMIT-CONNECTED
- vrf: GREEN
router_id: 10.1.100.4
address_families:
- address_family: ipv4-unicast
advertise_l2vpn_evpn: true
maximum_paths: 2
networks:
- prefix: 192.168.2.0/24
redistributions:
- protocol: direct
route_map: PERMIT-CONNECTED
- address_family: ipv6-unicast
advertise_l2vpn_evpn: true
networks:
- prefix: 2001:db8:2::/64