Name
Configure address family under BGP on the designated router
Description
This playbook adds or removes a BGP address family on a router. If the operation is "add" and a VRF is specified on a router, the address family is created under the VRF of BGP. If not, the address family is created under BGP. If the operation is "remove" and a VRF is specified, the address family is deleted under the VRF of BGP. If not, the address family is deleted under BGP. This playbook can be used to create or delete a route policy on a router, which will be used in subsequent address family configuration.
MopID
router_config_bgp_address_family
Software Platform
IOS XR
Limitations
None
Prerequisites
If the address family is being created under VRF, the corresponding address family should be initialized under BGP. For example: If the IPv4 address family is being created under VRF, the IPv4 and VPNv4 of the parent address families should be present. If not, the playbook fails. If the address family is being deleted, the corresponding address family should be initialized under BGP (or VRF if VRF is specified).
Params
| Input Parameter | Parent | Description | Required | Type | Default | Example | Used How? |
|---|---|---|---|---|---|---|---|
| bgp_id | BGP instance | Yes | string | 7922 | Addition or removal of the address family will be performed on the BGP instance specified using this parameter. | ||
| address_family | The type of address family to be added or removed | Yes | string | ipv4 | The kind of address family to be added or removed. Available options are "ipv4", "ipv6", "vpnv4" and "vpnv6". | ||
| sub_address_family | The type of sub address family to be added or removed | Yes | string | unicast | The kind of sub address family to be added or removed. Available options are "unicast", "multicast", "mdt", "rt_filter". | ||
| configs | Configs to check on router: route policy and address family | No | array | [] | Example given checks that BGP instance 7922 is configured and there is no IPv4 unicast address family configured under that BGP instance | ||
| vrf_name | The name of the VRF under which the address family is to be added or removed. Empty string for global. | No | string | green | Name of VRF under which address family is to be added or removed. Empty string for global. | ||
| operation_address_family | Operation to be performed on the router: Add or remove the address family | Yes | string | add | add/remove | Operation to be performed on the router - 'add' or 'remove' the address family | |
| rp_name | Name of the route policy to be created | Yes | string | rp_net1 | A route policy can be created to be used in the address family. The play can delete a route policy as well. | ||
| address_family_config | Configuration of the address family to be added on router. If you do not want to specify a sub-configuration, delete the key:value pair from the raw JSON above. | Yes | object | ||||
| rp_string | Route policy string of the route policy to be created | Yes | string | done | Config of the route policy to be added. If operation is not 'add', this parameter is unused. | ||
| operation_route_policy | Operation to be performed on the router: Add or remove the route policy | Yes | string | add | add/remove/NO_ACTION | Operation to be performed for the route policy. | |
| send | additional_paths | Should additional paths be sent | No | boolean | false | ||
| selection | additional_paths | No | object | ||||
| receive | additional_paths | Should additional paths be received | No | boolean | false | ||
| additional_paths | address_family_config | No | object | ||||
| network | address_family_config | No | array | ||||
| redistribute | address_family_config | No | array | ||||
| aggregate_address | address_family_config | No | array | ||||
| nexthop | address_family_config | No | array | ||||
| allocate_label | address_family_config | No | object | ||||
| maximum_paths | address_family_config | No | object | ||||
| route_policy | allocate_label | Route policy name | No | string | |||
| all | allocate_label | Whether all nets should be labeled | No | boolean | false | ||
| config | configs | The path of config to verify | No | string | |||
| presence | configs | Type of verification to be done: Presence or absence. | No | boolean | false | ||
| maximum | ebgp | Maximum paths for eBGP | No | integer | 2 | ||
| maximum | ibgp | Maximum paths for iBGP | No | integer | 2 | ||
| ebgp | maximum_paths | No | object | ||||
| ibgp | maximum_paths | No | object | ||||
| net | network | The network | No | string | |||
| route_policy | network | An existing route policy to use for this network | No | string | |||
| resolution | nexthop | No | object | ||||
| trigger_delay | nexthop | No | object | ||||
| minimum | prefix_length | Minimum prefix-length for nexthop resolution | No | integer | 0 | ||
| prefix_length | resolution | No | object | ||||
| route_policy | selection | No | array | ||||
| non_critical | trigger_delay | No | number | ||||
| critical | trigger_delay | No | number |