BGP
Border Gateway Protocol (BGP) is the de facto standard exterior gateway protocol used to exchange routing information between autonomous systems (AS) on the Internet and in large enterprise networks. It’s a path-vector protocol that makes routing decisions based on network policies, rules, and path attributes rather than just metrics, enabling fine-grained control over traffic flows and routing policies. BGP supports multiple address families including IPv4 unicast, IPv6 unicast, and L2VPN EVPN, making it essential for modern multi-service networks and MPLS VPN deployments.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”routing (iosxe.devices.configuration)
Section titled “routing (iosxe.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| bgp | Class | [bgp] | No |
bgp (iosxe.devices.configuration.routing)
Section titled “bgp (iosxe.devices.configuration.routing)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| as_number | Integer | Yes | ||
| router_id | IP | No | ||
| router_id_interface_type | Choice | Loopback | No | |
| router_id_interface_id | Any | String or Integer[min: 0] | No | |
| template_peer_policies | List | [template_peer_policies] | No | |
| default_ipv4_unicast | Boolean | true, false | No | |
| log_neighbor_changes | Boolean | true, false | No | |
| address_family | Class | [address_family] | No | |
| neighbors | List | [neighbors] | No | |
| peer_session_templates | List | [peer_session_templates] | No | |
| graceful_restart | Boolean | true, false | No | |
| update_delay | Integer | min: 1, max: 3600 | No |
template_peer_policies (iosxe.devices.configuration.routing.bgp)
Section titled “template_peer_policies (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| send_community | Choice | both, extended, standard | No | |
| route_maps | List | [route_maps] | No | |
| route_reflector_client | Boolean | true, false | No | |
| allowas_in_as_number | Integer | min: 1, max: 10 | No | |
| as_override_split_horizon | Boolean | true, false | No |
address_family (iosxe.devices.configuration.routing.bgp)
Section titled “address_family (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ipv4_unicast | Class | [ipv4_unicast] | No | |
| ipv4_mvpn | Class | [ipv4_mvpn] | No | |
| ipv6_unicast | Class | [ipv6_unicast] | No | |
| vpnv4_unicast | Class | [vpnv4_unicast] | No | |
| vpnv6_unicast | Class | [vpnv6_unicast] | No | |
| l2vpn_evpn | Class | [l2vpn_evpn] | No |
neighbors (iosxe.devices.configuration.routing.bgp)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| remote_as | Integer | No | ||
| description | String | No | ||
| shutdown | Boolean | true, false | No | |
| cluster_id | IP | No | ||
| disable_connected_check | Boolean | true, false | No | |
| fall_over_default_enable | Boolean | true, false | No | |
| fall_over_default_route_map | String | No | ||
| fall_over_bfd | Boolean | true, false | No | |
| fall_over_bfd_multi_hop | Boolean | true, false | No | |
| fall_over_bfd_single_hop | Boolean | true, false | No | |
| fall_over_bfd_check_control_plane_failure | Boolean | true, false | No | |
| fall_over_bfd_strict_mode | Boolean | true, false | No | |
| fall_over_maximum_metric_route_map | String | No | ||
| local_as | Integer | No | ||
| local_as_no_prepend | Boolean | true, false | No | |
| local_as_replace_as | Boolean | true, false | No | |
| local_as_dual_as | Boolean | true, false | No | |
| log_neighbor_changes | Boolean | true, false | No | |
| password_type | Integer | min: 0, max: 7 | No | |
| password | String | No | ||
| peer_group | String | No | ||
| timers_keepalive | Integer | min: 0, max: 3600 | No | |
| timers_holdtime | Integer | min: 0, max: 3600 | No | |
| timers_minimum_neighbor_holdtime | Integer | min: 0, max: 3600 | No | |
| ttl_security_hops | Integer | min: 0, max: 254 | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| inherit_peer_session | String | Regex: ^[a-zA-Z0-9_-]+$ | No | |
| ao_keychain | String | No | ||
| ao_include_tcp_options | Boolean | true, false | No | |
| ao_accept_mismatch_connections | Boolean | true, false | No |
peer_session_templates (iosxe.devices.configuration.routing.bgp)
Section titled “peer_session_templates (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| template_name | String | Regex: ^[a-zA-Z0-9_-]+$ | Yes | |
| remote_as | Integer | No | ||
| description | String | No | ||
| disable_connected_check | Boolean | true, false | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| inherit_peer_session | String | Regex: ^[a-zA-Z0-9_-]+$ | No | |
| ao_keychain | String | No | ||
| ao_include_tcp_options | Boolean | true, false | No | |
| ao_accept_mismatch_connections | Boolean | true, false | No |
route_maps (iosxe.devices.configuration.routing.bgp.template_peer_policies)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.template_peer_policies)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| route_map_name | String | Yes |
ipv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “ipv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| aggregate_addresses | List | [aggregate_addresses] | No | |
| networks | List | [networks] | No | |
| neighbors | List | [neighbors] | No | |
| vrfs | List | [vrfs] | No | |
| redistribute | Class | [redistribute] | No | |
| admin_distances | List | [admin_distances] | No | |
| distance_bgp_external | Integer | min: 1, max: 255 | No | |
| distance_bgp_internal | Integer | min: 1, max: 255 | No | |
| distance_bgp_local | Integer | min: 1, max: 255 | No | |
| maximum_paths_ebgp | Integer | min: 1, max: 32 | No | |
| maximum_paths_ibgp | Integer | min: 1, max: 32 | No |
ipv4_mvpn (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “ipv4_mvpn (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| neighbors | List | [neighbors] | No |
ipv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “ipv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| networks | List | [networks] | No | |
| vrfs | List | [vrfs] | No | |
| neighbors | List | [neighbors] | No | |
| redistribute | Class | [redistribute] | No |
vpnv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “vpnv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| enable | Boolean | true, false | No |
vpnv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “vpnv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| enable | Boolean | true, false | No |
l2vpn_evpn (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “l2vpn_evpn (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| rewrite_evpn_rt_asn | Boolean | true, false | No | |
| bgp_nexthop_trigger_delay | Integer | min: 0, max: 100 | No | |
| neighbors | List | [neighbors] | No |
aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | IP | Yes | ||
| mask | IP | Yes |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| mask | IP | No | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No | ||
| route_maps | List | [route_maps] | No |
vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrf | String | Yes | ||
| advertise_l2vpn_evpn | Boolean | true, false | No | |
| router_id | IP | No | ||
| router_id_interface_type | Choice | Loopback | No | |
| router_id_interface_id | Any | String or Integer[min: 0] | No | |
| aggregate_addresses | List | [aggregate_addresses] | No | |
| networks | List | [networks] | No | |
| neighbors | List | [neighbors] | No | |
| redistribute | Class | [redistribute] | No | |
| admin_distances | List | [admin_distances] | No | |
| distance_bgp_external | Integer | min: 1, max: 255 | No | |
| distance_bgp_internal | Integer | min: 1, max: 255 | No | |
| distance_bgp_local | Integer | min: 1, max: 255 | No | |
| maximum_paths_ebgp | Integer | min: 1, max: 32 | No | |
| maximum_paths_ibgp | Integer | min: 1, max: 32 | No | |
| import_path_selection_all | Boolean | true, false | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| connected_route_map | String | No | ||
| connected_metric | Integer | min: 0, max: 4294967295 | No | |
| static | Boolean | true, false | No | |
| static_route_map | String | No | ||
| static_metric | Integer | min: 0, max: 4294967295 | No |
admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| distance | Integer | min: 1, max: 255 | Yes | |
| source_ip | IP | Yes | ||
| wildcard | IP | Yes | ||
| acl | String | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_mvpn)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_mvpn)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrf | String | Yes | ||
| advertise_l2vpn_evpn | Boolean | true, false | No | |
| networks | List | [networks] | No | |
| redistribute | Class | [redistribute] | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No | ||
| route_maps | List | [route_maps] | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| connected_route_map | String | No | ||
| connected_metric | Integer | min: 0, max: 4294967295 | No | |
| static | Boolean | true, false | No | |
| static_route_map | String | No | ||
| static_metric | Integer | min: 0, max: 4294967295 | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| route_maps | List | [route_maps] | No |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| name | String | Yes |
aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | IP | Yes | ||
| mask | IP | Yes | ||
| summary_only | Boolean | true, false | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| mask | IP | No | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| remote_as | Integer | Yes | ||
| description | String | No | ||
| shutdown | Boolean | true, false | No | |
| cluster_id | IP | No | ||
| log_neighbor_changes | Boolean | true, false | No | |
| password_type | Integer | min: 0, max: 7 | No | |
| password | String | No | ||
| timers_keepalive | Integer | min: 0, max: 3600 | No | |
| timers_holdtime | Integer | min: 0, max: 3600 | No | |
| timers_minimum_holdtime | Integer | min: 0, max: 3600 | No | |
| fall_over_default_route_map | String | No | ||
| fall_over_bfd | Boolean | true, false | No | |
| fall_over_bfd_multi_hop | Boolean | true, false | No | |
| fall_over_bfd_single_hop | Boolean | true, false | No | |
| fall_over_bfd_check_control_plane_failure | Boolean | true, false | No | |
| fall_over_bfd_strict_mode | Boolean | true, false | No | |
| fall_over_maximum_metric_route_map | String | No | ||
| disable_connected_check | Boolean | true, false | No | |
| ttl_security_hops | Integer | min: 0, max: 254 | No | |
| local_as | Integer | No | ||
| local_as_no_prepend | Boolean | true, false | No | |
| local_as_replace_as | Boolean | true, false | No | |
| local_as_dual_as | Boolean | true, false | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No | ||
| route_maps | List | [route_maps] | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| ha_mode_graceful_restart | Boolean | true, false | No | |
| next_hop_self | Boolean | true, false | No | |
| next_hop_self_all | Boolean | true, false | No | |
| advertisement_interval | Integer | min: 0, max: 600 | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| connected_route_map | String | No | ||
| connected_metric | Integer | min: 0, max: 4294967295 | No | |
| static | Boolean | true, false | No | |
| static_route_map | String | No | ||
| static_metric | Integer | min: 0, max: 4294967295 | No |
admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| distance | Integer | min: 1, max: 255 | Yes | |
| source_ip | IP | Yes | ||
| wildcard | IP | Yes | ||
| acl | String | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No | |
| evpn | Boolean | true, false | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| connected_route_map | String | No | ||
| connected_metric | Integer | min: 0, max: 4294967295 | No | |
| static | Boolean | true, false | No | |
| static_route_map | String | No | ||
| static_metric | Integer | min: 0, max: 4294967295 | No |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| name | String | Yes |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| in_out | Choice | in, out | Yes | |
| name | String | Yes |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| name | String | Yes |
Examples
Section titled “Examples”Example 1: The example below shows basic BGP configuration to bring up an IPv4 Unicast Neighbor and includes basic attributes such as Password protected session, aggregate adderesses, redistribution, network advertisement and applying a route-map to the neighbor.
iosxe: devices: - name: device1 configuration: routing: bgp: as_number: 65000 default_ipv4_unicast: true log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 0 neighbors: - ip: 192.168.1.1 remote_as: 65001 password: 045802150C2E1D1C5A password_type: 7 address_family: ipv4_unicast: redistribute_connected: true redistribute_static: true aggregate_addresses: - address: 192.168.0.0 mask: 255.255.0.0 - address: 10.0.0.0 mask: 255.255.255.0 networks: - network: 10.0.0.0 mask: 255.255.255.0 route_map: RM1 backdoor: false - network: 172.16.12.0 mask: 255.255.255.0 - network: 192.168.12.0 route_map: RM2 backdoor: true - network: 172.16.19.0 neighbors: - ip: 192.168.1.1 route_maps: - direction: in name: RM3Example 2: The example below shows basic BGP configuration to bring up a VRF aware IPv4 Unicast Neighbor and includes basic attributes such as Password protected session, aggregate addresses, redistribution, network advertisement and applying a route-map to the neighbor. The base BGP process includes configurations for an IP address for a Router-ID as well as enabling graceful-restart and setting an update delay timer.
iosxe: devices: - name: device1 configuration: routing: bgp: as_number: 65000 log_neighbor_changes: true router_id: 10.1.1.1 graceful_restart: true update_delay: 200 address_family: ipv4_unicast: vrfs: - vrf: MY_VRF redistribute_connected: true redistribute_static: false aggregate_addresses: - address: 192.168.17.0 mask: 255.255.255.0 - address: 192.168.18.0 mask: 255.255.255.0 networks: - network: 10.0.0.0 mask: 255.255.255.0 route_map: RM1 backdoor: false - network: 172.16.12.0 mask: 255.255.255.0 - network: 192.168.12.0 route_map: RM2 backdoor: true - network: 172.16.19.0 neighbors: - ip: 192.168.1.1 remote_as: 65001 description: "REMOTE_ROUTER" shutdown: false log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A activate: true send_community: both soft_reconfiguration: inbound route_maps: - direction: in name: RM2Example 3: The Example below is a full blank data model for IPv4 address-family of BGP - VRF and non-VRF aware.
iosxe: devices: - name: router1 configuration: routing: bgp: as_number: 65001 default_ipv4_unicast: true log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 100 neighbors: - ip: 10.0.0.1 remote_as: 65000 description: "router2" shutdown: false cluster_id: 2.2.2.2 version: 4 disable_connected_check: false fall_over_default_enable: false fall_over_default_route_map: RM1 fall_over_bfd_multi_hop: false fall_over_bfd_single_hop: false fall_over_bfd_check_control_plane_failure: false fall_over_bfd_strict_mode: false fall_over_maximum_metric_route_map: RM2 local_as: 65003 local_as_no_prepend: false local_as_replace_as: false local_as_dual_as: false log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A peer_group: PEER1 timers_keepalive: 60 timers_holdtime: 180 timers_minimum_neighbor_holdtime: 30 ttl_security_hops: 1 update_source_interface_type: Loopback update_source_interface_id: 100 ebgp_multihop: false ebgp_multihop_max_hop: 5 address_family: ipv4_unicast: redistribute_connected: true redistribute_static: false aggregate_addresses: - address: 192.168.0.0 mask: 255.255.0.0 networks: - network: 10.10.10.0 mask: 255.255.255.0 route_map: RM3 backdoor: false - network: 192.168.0.0 route_map: RM4 backdoor: false neighbors: - ip: 10.0.01 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound default_originate: false default_originate_route_map: route_maps: - direction: in name: RM5 vrfs: - vrf: redistribute_connected: true redistribute_static: true router_id_interface_type: Loopback router_id_interface_id: 200 aggregate_addresses: - address: 172.16.0.0 mask: 255.255.0.0 networks: - network: 10.10.20.0 mask: 255.255.0.0 route_map: RM6 backdoor: false - network: 192.168.32.0 route_map: RM7 backdoor: false neighbors: - ip: 20.20.20.1 remote_as: 65003 description: "router3" shutdown: false cluster_id: 2.2.2.2 log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A timers_keepalive: 60 timers_holdtime: 180 timers_minimum_holdtime: 30 fall_over_default_route_map: RM8 fall_over_bfd_multi_hop: false fall_over_bfd_single_hop: false fall_over_bfd_check_control_plane_failure: false fall_over_bfd_strict_mode: false fall_over_maximum_metric_route_map: RM9 disable_connected_check: false ttl_security_hops: 1 local_as: 65000 local_as_no_prepend: false local_as_replace_as: false local_as_dual_as: false update_source_interface_type: Loopback update_source_interface_id: 200 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound default_originate: false default_originate_route_map: RM10 route_maps: - direction: out name: RM11 ebgp_multihop: false ebgp_multihop_max_hop: 5 ha_mode_graceful_restart: false next_hop_self: false next_hop_self_all: false advertisement_interval: 60Example 4: The example below shows BGP IPv6 unicast configuration including network advertisement, redistribution, neighbor activation, default-originate with route-map, and VRF-aware IPv6 networks.
iosxe: devices: - name: router1 configuration: system: ip_routing: true ipv6_unicast_routing: true vrfs: - name: VRF1 address_family_ipv4: enable: true address_family_ipv6: enable: true routing: bgp: as_number: 65100 default_ipv4_unicast: false log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 0 neighbors: - ip: 2001:db8::1 remote_as: 65200 address_family: ipv6_unicast: networks: - network: 2001:db8:1::/64 route_map: RM-IPV6 backdoor: false - network: 2001:db8:2::/64 neighbors: - ip: 2001:db8::1 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound default_originate: true default_originate_route_map: RM-IPV6 redistribute: connected: true static: false vrfs: - vrf: VRF1 advertise_l2vpn_evpn: true networks: - network: 2001:db8:100::/48 evpn: true - network: 2001:db8:200::/48 route_map: RM-VRF backdoor: false redistribute: connected: true static: trueSample Configuration:
! IPv6 unicast routing (required)ipv6 unicast-routing
router bgp 65100 bgp log-neighbor-changes bgp router-id interface Loopback0 no bgp default ipv4-unicast neighbor 2001:DB8::1 remote-as 65200 ! address-family ipv6 network 2001:DB8:1::/64 route-map RM-IPV6 network 2001:DB8:2::/64 redistribute connected neighbor 2001:DB8::1 activate neighbor 2001:DB8::1 send-community both neighbor 2001:DB8::1 soft-reconfiguration inbound neighbor 2001:DB8::1 default-originate route-map RM-IPV6 exit-address-family ! address-family ipv6 vrf VRF1 network 2001:DB8:100::/48 evpn network 2001:DB8:200::/48 route-map RM-VRF redistribute connected redistribute static advertise l2vpn evpn exit-address-family!Example 5: The example below shows how bgp maximum-paths configuration for the ipv4 unicast address family
iosxe: devices: - name: router configuration: vrfs: - name: VRF1 route_distinguisher: 65000:1 address_family_ipv4: enable: true interfaces: loopbacks: - id: 101 vrf_forwarding: VRF1 ipv4: address: 22.22.22.22 address_mask: 255.255.255.255 routing: bgp: as_number: 65000 router_id_interface_type: Loopback router_id_interface_id: "101" address_family: ipv4_unicast: maximum_paths_ebgp: 2 maximum_paths_ibgp: 2 vrfs: - vrf: VRF1 maximum_paths_ebgp: 2 maximum_paths_ibgp: 2Example 6: The example below demonstrates BGP router-ID configuration using direct IP addresses. This method provides an alternative to the interface-based router-ID configuration shown in previous examples. Both methods are supported and can be used based on your network design requirements.
iosxe: devices: - name: router1 configuration: system: ip_routing: true vrfs: - name: VRF_DIRECT_IP route_distinguisher: "65000:100" address_family_ipv4: enable: true routing: bgp: as_number: 65000 router_id: 172.16.255.1 # Direct IP router-ID default_ipv4_unicast: false log_neighbor_changes: true neighbors: - ip: 10.1.1.2 remote_as: 65001 description: "eBGP_Peer" address_family: ipv4_unicast: redistribute_connected: true networks: - network: 10.0.0.0 mask: 255.255.255.0 neighbors: - ip: 10.1.1.2 activate: true send_community: bothNote on router-ID configuration methods:
- Direct IP method (shown in Example 6): Use
router_id: <IP address>for explicit router-ID specification - Interface-based method (shown in Examples 1-4): Use
router_id_interface_type: Loopbackandrouter_id_interface_id: <number>to derive router-ID from interface IP - Both methods are mutually exclusive - use one or the other, not both on the same device
Example 7: The example below demonstrates BGP L2VPN EVPN advanced configuration attributes for multi-AS EVPN deployments and nexthop tracking optimization. These attributes provide fine-grained control over EVPN routing behavior and route convergence in large-scale EVPN fabrics.
Sample Configuration:
router bgp 65000 bgp router-id 192.168.255.1 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.1.1.2 remote-as 65000 neighbor 10.1.1.2 description EVPN_Leaf1 neighbor 10.1.1.2 update-source Loopback0 neighbor 10.1.1.3 remote-as 65000 neighbor 10.1.1.3 description EVPN_Leaf2 neighbor 10.1.1.3 update-source Loopback0 ! address-family l2vpn evpn bgp nexthop trigger-delay critical 10 non-critical 10 neighbor 10.1.1.2 activate neighbor 10.1.1.2 send-community both neighbor 10.1.1.2 route-reflector-client neighbor 10.1.1.2 soft-reconfiguration inbound neighbor 10.1.1.3 activate neighbor 10.1.1.3 send-community both neighbor 10.1.1.3 route-reflector-client neighbor 10.1.1.3 soft-reconfiguration inbound exit-address-family!Example YAML Code:
iosxe: devices: - name: evpn-spine1 configuration: routing: bgp: as_number: 65000 router_id: 192.168.255.1 default_ipv4_unicast: false log_neighbor_changes: true neighbors: - ip: 10.1.1.2 remote_as: 65000 description: "EVPN_Leaf1" update_source_interface_type: Loopback update_source_interface_id: 0 - ip: 10.1.1.3 remote_as: 65000 description: "EVPN_Leaf2" update_source_interface_type: Loopback update_source_interface_id: 0 address_family: l2vpn_evpn: # EVPN Advanced Configuration rewrite_evpn_rt_asn: true # Enable Route Target ASN rewriting for multi-AS EVPN bgp_nexthop_trigger_delay: 10 # Set 10-second delay for nexthop tracking updates neighbors: - ip: 10.1.1.2 activate: true send_community: both route_reflector_client: true soft_reconfiguration: inbound - ip: 10.1.1.3 activate: true send_community: both route_reflector_client: true soft_reconfiguration: inbound ipv4_mvpn: # MVPN Address Family Configuration neighbors: - ip: 172.16.255.4 activate: true # Enable MVPN neighbor send_community: extended # Send extended community attributes vpnv4_unicast: enable: true vpnv6_unicast: enable: trueExample 8: BGP Peer-Session Templates and Template Inheritance
This example demonstrates how to use peer-session templates to reduce configuration repetition and implement template-based inheritance for BGP neighbors. Peer-session templates allow you to define common session parameters once and apply them to multiple neighbors, simplifying configuration management in large-scale BGP deployments.
iosxe: devices: - name: router1 configuration: interfaces: loopbacks: - id: 5 ipv4: address: 192.168.5.1 address_mask: 255.255.255.255 - id: 100 ipv4: address: 192.168.1.100 address_mask: 255.255.255.255 routing: bgp: as_number: 65000 log_neighbor_changes: true # Define peer-session templates with common parameters peer_session_templates: - template_name: PEER_TEMPLATE_A remote_as: 65001 description: "EBGP Peer Template for AS 65001" update_source_interface_type: Loopback update_source_interface_id: 5 disable_connected_check: true ebgp_multihop: true ebgp_multihop_max_hop: 3 - template_name: PEER_TEMPLATE_B remote_as: 65002 description: "EBGP Peer Template for AS 65002" update_source_interface_type: Loopback update_source_interface_id: 100 ebgp_multihop: true ebgp_multihop_max_hop: 2 # Template-to-template inheritance - template_name: PEER_TEMPLATE_C description: "Inherits settings from Template A" inherit_peer_session: PEER_TEMPLATE_A # Neighbors inherit settings from templates neighbors: - ip: 10.1.1.1 inherit_peer_session: PEER_TEMPLATE_A - ip: 10.2.2.2 inherit_peer_session: PEER_TEMPLATE_B - ip: 10.3.3.3 description: "Neighbor with custom description" inherit_peer_session: PEER_TEMPLATE_CExample 9: VRF Advanced Features with L2VPN EVPN Route Maps
This example demonstrates VRF-level advanced features including import_path_selection_all for BGP best path selection, summary_only aggregate addresses, and L2VPN EVPN neighbor route-maps for inbound policy control.
iosxe: devices: - name: router configuration: vrfs: - name: VRF1 route_distinguisher: 65000:1 address_family_ipv4: enable: true interfaces: loopbacks: - id: 101 vrf_forwarding: VRF1 ipv4: address: 22.22.22.22 address_mask: 255.255.255.255 route_maps: - name: RM1 routing: bgp: as_number: 65000 neighbors: - ip: 3.3.3.3 remote_as: 65001 router_id_interface_type: Loopback router_id_interface_id: "101" address_family: ipv4_unicast: vrfs: - vrf: VRF1 import_path_selection_all: true router_id_interface_type: Loopback router_id_interface_id: 101 aggregate_addresses: - address: 22.22.22.0 mask: 255.255.255.0 summary_only: true l2vpn_evpn: neighbors: - ip: 3.3.3.3 route_maps: - in_out: in name: RM1Example 10: This example includes configuration of a peer-policy template.
iosxe: devices: - name: router configuration: routing: bgp: as_number: 65000 template_peer_policies: - name: "PEERPOLICY_1" route_reflector_client: true send_community: "both" route_maps: - direction: "in" route_map_name: "RM1" - direction: "out" route_map_name: "RM2" allowas_in_as_number: 2 as_override_split_horizon: true route_maps: - name: RM1 - name: RM2CLI Equivalent:
router bgp 65000 template peer-policy PEERPOLICY_1 route-reflector-client send-community both route-map RM1 in route-map RM2 out allowas-in 2 as-override split-horizon exit-peer-policy!route-map RM1 permit 10!route-map RM2 permit 10Example 11: Administrative Distance with Access List Filtering
This example demonstrates how to configure administrative distance for BGP routes with optional access list filtering. The admin_distances list allows you to set specific administrative distance values for routes from particular sources, with the optional acl parameter providing additional filtering through an access control list.
Sample Configuration:
router bgp 65000 bgp log-neighbor-changes ! address-family ipv4 distance 150 10.1.0.0 0.0.255.255 PERMIT_SPECIFIC_ROUTES exit-address-family!Example YAML Code:
iosxe: devices: - name: router1 configuration: routing: bgp: as_number: 65000 address_family: ipv4_unicast: admin_distances: - source_ip: 10.1.0.0 wildcard: 0.0.255.255 distance: 150 acl: PERMIT_SPECIFIC_ROUTESExample 12: VRF-Aware Administrative Distance Configuration
This example demonstrates how to configure administrative distance for BGP routes within a VRF context. The admin_distances list allows you to set specific administrative distance values for routes from particular source networks using the source_ip and wildcard attributes.
Sample Configuration:
vrf definition TEST_VRF rd 65000:100 ! address-family ipv4 exit-address-family!router bgp 65000 bgp log-neighbor-changes ! address-family ipv4 vrf TEST_VRF distance 200 192.168.0.0 0.0.255.255 exit-address-family!Example YAML Code:
iosxe: devices: - name: router1 configuration: vrfs: - name: TEST_VRF route_distinguisher: "65000:100" address_family_ipv4: enable: true routing: bgp: as_number: 65000 address_family: ipv4_unicast: vrfs: - vrf: TEST_VRF admin_distances: - source_ip: 192.168.0.0 wildcard: 0.0.255.255 distance: 200Example 13: BGP Administrative Distance Configuration
This example demonstrates how to configure administrative distances for different BGP route types using distance_bgp_external, distance_bgp_internal, and distance_bgp_local attributes.
Sample Configuration:
router bgp 65000 bgp log-neighbor-changes ! address-family ipv4 distance bgp 25 175 185 exit-address-family!Example YAML Code:
iosxe: devices: - name: router1 configuration: routing: bgp: as_number: 65000 address_family: ipv4_unicast: distance_bgp_external: 25 distance_bgp_internal: 175 distance_bgp_local: 185Example 14: VRF-Aware BGP Administrative Distance Configuration
This example demonstrates how to configure administrative distances for different BGP route types within a VRF context.
Sample Configuration:
vrf definition TEST_VRF rd 65000:100 ! address-family ipv4 exit-address-family!router bgp 65000 bgp log-neighbor-changes ! address-family ipv4 vrf TEST_VRF distance bgp 25 175 185 exit-address-family!Example YAML Code:
iosxe: devices: - name: router1 configuration: vrfs: - name: TEST_VRF route_distinguisher: "65000:100" address_family_ipv4: enable: true routing: bgp: as_number: 65000 address_family: ipv4_unicast: vrfs: - vrf: TEST_VRF distance_bgp_external: 25 distance_bgp_internal: 175 distance_bgp_local: 185Example 15: BGP BFD Fall-Over Configuration
BFD (Bidirectional Forwarding Detection) fall-over enables fast failure detection for BGP sessions. Three modes are available:
fall_over_bfdalone for basic BFD without specifying hop modefall_over_bfd+fall_over_bfd_multi_hopfor eBGP neighbors multiple hops awayfall_over_bfd+fall_over_bfd_single_hopfor directly connected neighbors
Sample Configuration:
router bgp 65000 neighbor 10.1.1.1 remote-as 65001 neighbor 10.1.1.1 fall-over bfd neighbor 10.1.1.2 remote-as 65002 neighbor 10.1.1.2 fall-over bfd multi-hop neighbor 10.2.2.2 remote-as 65000 neighbor 10.2.2.2 fall-over bfd single-hopExample YAML Code:
iosxe: devices: - name: router1 configuration: routing: bgp: as_number: 65000 neighbors: - ip: 10.1.1.1 remote_as: 65001 fall_over_bfd: true - ip: 10.1.1.2 remote_as: 65002 fall_over_bfd: true fall_over_bfd_multi_hop: true - ip: 10.2.2.2 remote_as: 65000 fall_over_bfd: true fall_over_bfd_single_hop: trueExample 11: BGP redistribution with route-maps and metrics. This shows how to attach route-maps and set metrics on redistribute connected and redistribute static for both IPv4 and IPv6 address families.
iosxe: devices: - name: ROUTER1 url: https://192.0.2.1 configuration: routing: bgp: as_number: 65100 address_family: ipv4_unicast: redistribute: connected: true connected_route_map: RM_CONNECTED_V4 connected_metric: 100 static: true static_route_map: RM_STATIC_V4 static_metric: 200 ipv6_unicast: redistribute: connected: true connected_route_map: RM_CONNECTED_V6 static: true static_route_map: RM_STATIC_V6 static_metric: 150Sample Configuration:
router bgp 65100 ! address-family ipv4 redistribute connected metric 100 route-map RM_CONNECTED_V4 redistribute static metric 200 route-map RM_STATIC_V4 exit-address-family ! address-family ipv6 redistribute connected route-map RM_CONNECTED_V6 redistribute static metric 150 route-map RM_STATIC_V6 exit-address-family!Example: BGP TCP Authentication Option (TCP-AO)
Section titled “Example: BGP TCP Authentication Option (TCP-AO)”The example below secures BGP sessions with the TCP Authentication Option by
referencing a TCP-enabled key chain (see the Key Chains feature) from both a
peer-session template and an individual neighbor. ao_include_tcp_options
includes the TCP options in the MAC computation, and
ao_accept_mismatch_connections allows connections that do not carry AO.
iosxe: devices: - name: ROUTER-1 configuration: key_chains: - name: TCP-AO-BGP tcp: true keys: - id: 1 key_string_key: tcpAoKey123 cryptographic_algorithm_tcp: aes-128-cmac send_id: 10 recv_id: 20 routing: bgp: as_number: 65000 peer_session_templates: - template_name: AO-TEMPLATE ao_keychain: TCP-AO-BGP ao_include_tcp_options: true ao_accept_mismatch_connections: true neighbors: - ip: 192.0.2.10 remote_as: 65001 ao_keychain: TCP-AO-BGP ao_include_tcp_options: true ao_accept_mismatch_connections: trueSample Configuration:
Section titled “Sample Configuration:”router bgp 65000 template peer-session AO-TEMPLATE ao TCP-AO-BGP include-tcp-options accept-ao-mismatch-connections exit-peer-session ! neighbor 192.0.2.10 remote-as 65001 neighbor 192.0.2.10 ao TCP-AO-BGP include-tcp-options accept-ao-mismatch-connections!Border Gateway Protocol (BGP) is the de facto standard exterior gateway protocol used to exchange routing information between autonomous systems (AS) on the Internet and in large enterprise networks. It’s a path-vector protocol that makes routing decisions based on network policies, rules, and path attributes rather than just metrics, enabling fine-grained control over traffic flows and routing policies. BGP supports multiple address families including IPv4 unicast, IPv6 unicast, and L2VPN EVPN, making it essential for modern multi-service networks and MPLS VPN deployments.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”routing (iosxe.devices.configuration)
Section titled “routing (iosxe.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| bgp | Class | [bgp] | No |
bgp (iosxe.devices.configuration.routing)
Section titled “bgp (iosxe.devices.configuration.routing)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| as_number | Integer | Yes | ||
| router_id | IP | No | ||
| router_id_interface_type | Choice | Loopback | No | |
| router_id_interface_id | Any | String or Integer[min: 0] | No | |
| default_ipv4_unicast | Boolean | true, false | No | |
| log_neighbor_changes | Boolean | true, false | No | |
| address_family | Class | [address_family] | No | |
| neighbors | List | [neighbors] | No | |
| peer_session_templates | List | [peer_session_templates] | No | |
| graceful_restart | Boolean | true, false | No | |
| update_delay | Integer | min: 1, max: 3600 | No |
address_family (iosxe.devices.configuration.routing.bgp)
Section titled “address_family (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ipv4_unicast | Class | [ipv4_unicast] | No | |
| ipv6_unicast | Class | [ipv6_unicast] | No | |
| l2vpn_evpn | Class | [l2vpn_evpn] | No |
neighbors (iosxe.devices.configuration.routing.bgp)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| remote_as | Integer | No | ||
| description | String | No | ||
| shutdown | Boolean | true, false | No | |
| cluster_id | IP | No | ||
| disable_connected_check | Boolean | true, false | No | |
| fall_over_default_enable | Boolean | true, false | No | |
| fall_over_default_route_map | String | No | ||
| fall_over_bfd | Boolean | true, false | No | |
| fall_over_bfd_multi_hop | Boolean | true, false | No | |
| fall_over_bfd_single_hop | Boolean | true, false | No | |
| fall_over_bfd_check_control_plane_failure | Boolean | true, false | No | |
| fall_over_bfd_strict_mode | Boolean | true, false | No | |
| fall_over_maximum_metric_route_map | String | No | ||
| local_as | Integer | No | ||
| local_as_no_prepend | Boolean | true, false | No | |
| local_as_replace_as | Boolean | true, false | No | |
| local_as_dual_as | Boolean | true, false | No | |
| log_neighbor_changes | Boolean | true, false | No | |
| password_type | Integer | min: 0, max: 7 | No | |
| password | String | No | ||
| peer_group | String | No | ||
| timers_keepalive | Integer | min: 0, max: 3600 | No | |
| timers_holdtime | Integer | min: 0, max: 3600 | No | |
| timers_minimum_neighbor_holdtime | Integer | min: 0, max: 3600 | No | |
| ttl_security_hops | Integer | min: 0, max: 254 | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| inherit_peer_session | String | Regex: ^[a-zA-Z0-9_-]+$ | No |
peer_session_templates (iosxe.devices.configuration.routing.bgp)
Section titled “peer_session_templates (iosxe.devices.configuration.routing.bgp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| template_name | String | Regex: ^[a-zA-Z0-9_-]+$ | Yes | |
| remote_as | Integer | No | ||
| description | String | No | ||
| disable_connected_check | Boolean | true, false | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| inherit_peer_session | String | Regex: ^[a-zA-Z0-9_-]+$ | No |
ipv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “ipv4_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| aggregate_addresses | List | [aggregate_addresses] | No | |
| networks | List | [networks] | No | |
| neighbors | List | [neighbors] | No | |
| vrfs | List | [vrfs] | No | |
| redistribute | Class | [redistribute] | No | |
| admin_distances | List | [admin_distances] | No | |
| distance_bgp_external | Integer | min: 1, max: 255 | No | |
| distance_bgp_internal | Integer | min: 1, max: 255 | No | |
| distance_bgp_local | Integer | min: 1, max: 255 | No | |
| maximum_paths_ebgp | Integer | min: 1, max: 32 | No | |
| maximum_paths_ibgp | Integer | min: 1, max: 32 | No |
ipv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “ipv6_unicast (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| networks | List | [networks] | No | |
| vrfs | List | [vrfs] | No | |
| neighbors | List | [neighbors] | No | |
| redistribute | Class | [redistribute] | No |
l2vpn_evpn (iosxe.devices.configuration.routing.bgp.address_family)
Section titled “l2vpn_evpn (iosxe.devices.configuration.routing.bgp.address_family)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| rewrite_evpn_rt_asn | Boolean | true, false | No | |
| bgp_nexthop_trigger_delay | Integer | min: 0, max: 100 | No | |
| neighbors | List | [neighbors] | No |
aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | IP | Yes | ||
| mask | IP | Yes |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| mask | IP | No | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No | ||
| route_maps | List | [route_maps] | No |
vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrf | String | Yes | ||
| advertise_l2vpn_evpn | Boolean | true, false | No | |
| router_id | IP | No | ||
| router_id_interface_type | Choice | Loopback | No | |
| router_id_interface_id | Any | String or Integer[min: 0] | No | |
| aggregate_addresses | List | [aggregate_addresses] | No | |
| networks | List | [networks] | No | |
| neighbors | List | [neighbors] | No | |
| redistribute | Class | [redistribute] | No | |
| admin_distances | List | [admin_distances] | No | |
| distance_bgp_external | Integer | min: 1, max: 255 | No | |
| distance_bgp_internal | Integer | min: 1, max: 255 | No | |
| distance_bgp_local | Integer | min: 1, max: 255 | No | |
| maximum_paths_ebgp | Integer | min: 1, max: 32 | No | |
| maximum_paths_ibgp | Integer | min: 1, max: 32 | No | |
| import_path_selection_all | Boolean | true, false | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| static | Boolean | true, false | No |
admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)
Section titled “admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| distance | Integer | min: 1, max: 255 | Yes | |
| source_ip | IP | Yes | ||
| wildcard | IP | Yes | ||
| acl | String | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “vrfs (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrf | String | Yes | ||
| advertise_l2vpn_evpn | Boolean | true, false | No | |
| networks | List | [networks] | No | |
| redistribute | Class | [redistribute] | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| static | Boolean | true, false | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| route_maps | List | [route_maps] | No |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| name | String | Yes |
aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “aggregate_addresses (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | IP | Yes | ||
| mask | IP | Yes | ||
| summary_only | Boolean | true, false | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| mask | IP | No | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No |
neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “neighbors (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | IP | Yes | ||
| remote_as | Integer | Yes | ||
| description | String | No | ||
| shutdown | Boolean | true, false | No | |
| cluster_id | IP | No | ||
| log_neighbor_changes | Boolean | true, false | No | |
| password_type | Integer | min: 0, max: 7 | No | |
| password | String | No | ||
| timers_keepalive | Integer | min: 0, max: 3600 | No | |
| timers_holdtime | Integer | min: 0, max: 3600 | No | |
| timers_minimum_holdtime | Integer | min: 0, max: 3600 | No | |
| fall_over_default_route_map | String | No | ||
| fall_over_bfd | Boolean | true, false | No | |
| fall_over_bfd_multi_hop | Boolean | true, false | No | |
| fall_over_bfd_single_hop | Boolean | true, false | No | |
| fall_over_bfd_check_control_plane_failure | Boolean | true, false | No | |
| fall_over_bfd_strict_mode | Boolean | true, false | No | |
| fall_over_maximum_metric_route_map | String | No | ||
| disable_connected_check | Boolean | true, false | No | |
| ttl_security_hops | Integer | min: 0, max: 254 | No | |
| local_as | Integer | No | ||
| local_as_no_prepend | Boolean | true, false | No | |
| local_as_replace_as | Boolean | true, false | No | |
| local_as_dual_as | Boolean | true, false | No | |
| update_source_interface_type | Choice | Loopback | No | |
| update_source_interface_id | Any | String or Integer[min: 0] | No | |
| activate | Boolean | true, false | No | |
| send_community | Choice | both, extended, standard | No | |
| route_reflector_client | Boolean | true, false | No | |
| soft_reconfiguration | Choice | inbound | No | |
| default_originate | Boolean | true, false | No | |
| default_originate_route_map | String | No | ||
| route_maps | List | [route_maps] | No | |
| ebgp_multihop | Boolean | true, false | No | |
| ebgp_multihop_max_hop | Integer | min: 1, max: 255 | No | |
| ha_mode_graceful_restart | Boolean | true, false | No | |
| next_hop_self | Boolean | true, false | No | |
| next_hop_self_all | Boolean | true, false | No | |
| advertisement_interval | Integer | min: 0, max: 600 | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| static | Boolean | true, false | No |
admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)
Section titled “admin_distances (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| distance | Integer | min: 1, max: 255 | Yes | |
| source_ip | IP | Yes | ||
| wildcard | IP | Yes | ||
| acl | String | No |
networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)
Section titled “networks (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| network | IP | Yes | ||
| route_map | String | No | ||
| backdoor | Boolean | true, false | No | |
| evpn | Boolean | true, false | No |
redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)
Section titled “redistribute (iosxe.devices.configuration.routing.bgp.address_family.ipv6_unicast.vrfs)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| connected | Boolean | true, false | No | |
| static | Boolean | true, false | No |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.l2vpn_evpn.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| in_out | Choice | in, out | Yes | |
| name | String | Yes |
route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs.neighbors)
Section titled “route_maps (iosxe.devices.configuration.routing.bgp.address_family.ipv4_unicast.vrfs.neighbors)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| direction | Choice | in, out | Yes | |
| name | String | Yes |
Examples
Section titled “Examples”Example 1: The example below shows basic BGP configuration to bring up an IPv4 Unicast Neighbor and includes basic attributes such as Password protected session, aggregate adderesses, redistribution, network advertisement and applying a route-map to the neighbor.
iosxe: devices: - name: device1 configuration: routing: bgp: as_number: 65000 default_ipv4_unicast: true log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 0 neighbors: - ip: 192.168.1.1 remote_as: 65001 password: 045802150C2E1D1C5A password_type: 7 address_family: ipv4_unicast: redistribute_connected: true redistribute_static: true aggregate_addresses: - address: 192.168.0.0 mask: 255.255.0.0 - address: 10.0.0.0 mask: 255.255.255.0 networks: - network: 10.0.0.0 mask: 255.255.255.0 route_map: RM1 backdoor: false - network: 172.16.12.0 mask: 255.255.255.0 - network: 192.168.12.0 route_map: RM2 backdoor: true - network: 172.16.19.0 neighbors: - ip: 192.168.1.1 route_maps: - direction: in name: RM3Example 2: The example below shows basic BGP configuration to bring up a VRF aware IPv4 Unicast Neighbor and includes basic attributes such as Password protected session, aggregate addresses, redistribution, network advertisement and applying a route-map to the neighbor. The base BGP process includes configurations for an IP address for a Router-ID as well as enabling graceful-restart and setting an update delay timer.
iosxe: devices: - name: device1 configuration: routing: bgp: as_number: 65000 log_neighbor_changes: true router_id: 10.1.1.1 graceful_restart: true update_delay: 200 address_family: ipv4_unicast: vrfs: - vrf: MY_VRF redistribute_connected: true redistribute_static: false aggregate_addresses: - address: 192.168.17.0 mask: 255.255.255.0 - address: 192.168.18.0 mask: 255.255.255.0 networks: - network: 10.0.0.0 mask: 255.255.255.0 route_map: RM1 backdoor: false - network: 172.16.12.0 mask: 255.255.255.0 - network: 192.168.12.0 route_map: RM2 backdoor: true - network: 172.16.19.0 neighbors: - ip: 192.168.1.1 remote_as: 65001 description: "REMOTE_ROUTER" shutdown: false log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A activate: true send_community: both soft_reconfiguration: inbound route_maps: - direction: in name: RM2Example 3: The Example below is a full blank data model for IPv4 address-family of BGP - VRF and non-VRF aware.
iosxe: devices: - name: router1 configuration: routing: bgp: as_number: 65001 default_ipv4_unicast: true log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 100 neighbors: - ip: 10.0.0.1 remote_as: 65000 description: "router2" shutdown: false cluster_id: 2.2.2.2 version: 4 disable_connected_check: false fall_over_default_enable: false fall_over_default_route_map: RM1 fall_over_bfd_multi_hop: false fall_over_bfd_single_hop: false fall_over_bfd_check_control_plane_failure: false fall_over_bfd_strict_mode: false fall_over_maximum_metric_route_map: RM2 local_as: 65003 local_as_no_prepend: false local_as_replace_as: false local_as_dual_as: false log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A peer_group: PEER1 timers_keepalive: 60 timers_holdtime: 180 timers_minimum_neighbor_holdtime: 30 ttl_security_hops: 1 update_source_interface_type: Loopback update_source_interface_id: 100 ebgp_multihop: false ebgp_multihop_max_hop: 5 address_family: ipv4_unicast: redistribute_connected: true redistribute_static: false aggregate_addresses: - address: 192.168.0.0 mask: 255.255.0.0 networks: - network: 10.10.10.0 mask: 255.255.255.0 route_map: RM3 backdoor: false - network: 192.168.0.0 route_map: RM4 backdoor: false neighbors: - ip: 10.0.01 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound default_originate: false default_originate_route_map: route_maps: - direction: in name: RM5 vrfs: - vrf: redistribute_connected: true redistribute_static: true router_id_interface_type: Loopback router_id_interface_id: 200 aggregate_addresses: - address: 172.16.0.0 mask: 255.255.0.0 networks: - network: 10.10.20.0 mask: 255.255.0.0 route_map: RM6 backdoor: false - network: 192.168.32.0 route_map: RM7 backdoor: false neighbors: - ip: 20.20.20.1 remote_as: 65003 description: "router3" shutdown: false cluster_id: 2.2.2.2 log_neighbor_changes: true password_type: 7 password: 045802150C2E1D1C5A timers_keepalive: 60 timers_holdtime: 180 timers_minimum_holdtime: 30 fall_over_default_route_map: RM8 fall_over_bfd_multi_hop: false fall_over_bfd_single_hop: false fall_over_bfd_check_control_plane_failure: false fall_over_bfd_strict_mode: false fall_over_maximum_metric_route_map: RM9 disable_connected_check: false ttl_security_hops: 1 local_as: 65000 local_as_no_prepend: false local_as_replace_as: false local_as_dual_as: false update_source_interface_type: Loopback update_source_interface_id: 200 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound default_originate: false default_originate_route_map: RM10 route_maps: - direction: out name: RM11 ebgp_multihop: false ebgp_multihop_max_hop: 5 ha_mode_graceful_restart: false next_hop_self: false next_hop_self_all: false advertisement_interval: 60Example 4: The example below shows BGP IPv6 unicast configuration including network advertisement, redistribution, neighbor activation, and VRF-aware IPv6 networks.
iosxe: devices: - name: router1 configuration: system: ip_routing: true ipv6_unicast_routing: true vrfs: - name: VRF1 address_family_ipv4: enable: true address_family_ipv6: enable: true routing: bgp: as_number: 65100 default_ipv4_unicast: false log_neighbor_changes: true router_id_interface_type: Loopback router_id_interface_id: 0 neighbors: - ip: 2001:db8::1 remote_as: 65200 address_family: ipv6_unicast: networks: - network: 2001:db8:1::/64 route_map: RM-IPV6 backdoor: false - network: 2001:db8:2::/64 neighbors: - ip: 2001:db8::1 activate: true send_community: both route_reflector_client: false soft_reconfiguration: inbound redistribute: connected: true static: false vrfs: - vrf: VRF1 advertise_l2vpn_evpn: true networks: - network: 2001:db8:100::/48 evpn: true - network: 2001:db8:200::/48 route_map: RM-VRF backdoor: false redistribute: connected: true static: trueExample 5: The example below shows how bgp maximum-paths configuration for the ipv4 unicast address family
iosxe: devices: - name: router configuration: vrfs: - name: VRF1 route_distinguisher: 65000:1 address_family_ipv4: enable: true interfaces: loopbacks: - id: 101 vrf_forwarding: VRF1 ipv4: address: 22.22.22.22 address_mask: 255.255.255.255 routing: bgp: as_number: 65000 router_id_interface_type: Loopback router_id_interface_id: "101" address_family: ipv4_unicast: maximum_paths_ebgp: 2 maximum_paths_ibgp: 2 vrfs: - vrf: VRF1 maximum_paths_ebgp: 2 maximum_paths_ibgp: 2Example 6: The example below demonstrates BGP router-ID configuration using direct IP addresses. This method provides an alternative to the interface-based router-ID configuration shown in previous examples. Both methods are supported and can be used based on your network design requirements.
iosxe: devices: - name: router1 configuration: system: ip_routing: true vrfs: - name: VRF_DIRECT_IP route_distinguisher: "65000:100" address_family_ipv4: enable: true routing: bgp: as_number: 65000 router_id: 172.16.255.1 # Direct IP router-ID default_ipv4_unicast: false log_neighbor_changes: true neighbors: - ip: 10.1.1.2 remote_as: 65001 description: "eBGP_Peer" address_family: ipv4_unicast: redistribute_connected: true networks: - network: 10.0.0.0 mask: 255.255.255.0 neighbors: - ip: 10.1.1.2 activate: true send_community: bothNote on router-ID configuration methods:
- Direct IP method (shown in Example 6): Use
router_id: <IP address>for explicit router-ID specification - Interface-based method (shown in Examples 1-4): Use
router_id_interface_type: Loopbackandrouter_id_interface_id: <number>to derive router-ID from interface IP - Both methods are mutually exclusive - use one or the other, not both on the same device
Example 7: The example below demonstrates BGP L2VPN EVPN advanced configuration attributes for multi-AS EVPN deployments and nexthop tracking optimization. These attributes provide fine-grained control over EVPN routing behavior and route convergence in large-scale EVPN fabrics.
iosxe: devices: - name: evpn-spine1 configuration: routing: bgp: as_number: 65000 router_id: 192.168.255.1 default_ipv4_unicast: false log_neighbor_changes: true neighbors: - ip: 10.1.1.2 remote_as: 65000 description: "EVPN_Leaf1" update_source_interface_type: Loopback update_source_interface_id: 0 - ip: 10.1.1.3 remote_as: 65000 description: "EVPN_Leaf2" update_source_interface_type: Loopback update_source_interface_id: 0 address_family: l2vpn_evpn: # EVPN Advanced Configuration rewrite_evpn_rt_asn: true # Enable Route Target ASN rewriting for multi-AS EVPN bgp_nexthop_trigger_delay: 10 # Set 10-second delay for nexthop tracking updates neighbors: - ip: 10.1.1.2 activate: true send_community: both route_reflector_client: true - ip: 10.1.1.3 activate: true send_community: both route_reflector_client: trueExample 8: BGP Peer-Session Templates and Template Inheritance
This example demonstrates how to use peer-session templates to reduce configuration repetition and implement template-based inheritance for BGP neighbors. Peer-session templates allow you to define common session parameters once and apply them to multiple neighbors, simplifying configuration management in large-scale BGP deployments.
iosxe: devices: - name: router1 configuration: interfaces: loopbacks: - id: 5 ipv4: address: 192.168.5.1 address_mask: 255.255.255.255 - id: 100 ipv4: address: 192.168.1.100 address_mask: 255.255.255.255 routing: bgp: as_number: 65000 log_neighbor_changes: true # Define peer-session templates with common parameters peer_session_templates: - template_name: PEER_TEMPLATE_A remote_as: 65001 description: "EBGP Peer Template for AS 65001" update_source_interface_type: Loopback update_source_interface_id: 5 disable_connected_check: true ebgp_multihop: true ebgp_multihop_max_hop: 3 - template_name: PEER_TEMPLATE_B remote_as: 65002 description: "EBGP Peer Template for AS 65002" update_source_interface_type: Loopback update_source_interface_id: 100 ebgp_multihop: true ebgp_multihop_max_hop: 2 # Template-to-template inheritance - template_name: PEER_TEMPLATE_C description: "Inherits settings from Template A" inherit_peer_session: PEER_TEMPLATE_A # Neighbors inherit settings from templates neighbors: - ip: 10.1.1.1 inherit_peer_session: PEER_TEMPLATE_A - ip: 10.2.2.2 inherit_peer_session: PEER_TEMPLATE_B - ip: 10.3.3.3 description: "Neighbor with custom description" inherit_peer_session: PEER_TEMPLATE_CExample 9: VRF Advanced Features with L2VPN EVPN Route Maps
This example demonstrates VRF-level advanced features including import_path_selection_all for BGP best path selection, summary_only aggregate addresses, and L2VPN EVPN neighbor route-maps for inbound policy control.
iosxe: devices: - name: router configuration: vrfs: - name: VRF1 route_distinguisher: 65000:1 address_family_ipv4: enable: true interfaces: loopbacks: - id: 101 vrf_forwarding: VRF1 ipv4: address: 22.22.22.22 address_mask: 255.255.255.255 route_maps: - name: RM1 routing: bgp: as_number: 65000 neighbors: - ip: 3.3.3.3 remote_as: 65001 router_id_interface_type: Loopback router_id_interface_id: "101" address_family: ipv4_unicast: vrfs: - vrf: VRF1 import_path_selection_all: true router_id_interface_type: Loopback router_id_interface_id: 101 aggregate_addresses: - address: 22.22.22.0 mask: 255.255.255.0 summary_only: true l2vpn_evpn: neighbors: - ip: 3.3.3.3 route_maps: - in_out: in name: RM1