IP AS-Path Lists
You can specify an as-path list filter on BGP routes. Each filter is an access-list (ACL) based on regular expressions.
Example:
Create a BGP as-path list using a regular expression.
switch# configure terminalswitch(config)# ip as-path access-list AllowAS permit 64510switch(config)# ip as-path access-list AllowAll permit .*switch(config)# ip as-path access-list AllowFrom_AS_100 permit ^100_[0-9]*$
switch(config)# router bgp 65000switch(config-router)# neighbor 192.0.2.1 remote-as 65535switch(config-router-neighbor)# address-family ipv4 unicastswitch(config-router-neighbor-af)# filter-list AllowAS inDiagram
Section titled “Diagram”Classes
Section titled “Classes”route_control (vxlan.overlay_extensions)
Section titled “route_control (vxlan.overlay_extensions)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip_as_path_access_lists | List | [ip_as_path_access_lists] | No |
ip_as_path_access_lists (vxlan.overlay_extensions.route_control)
Section titled “ip_as_path_access_lists (vxlan.overlay_extensions.route_control)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Regex: ^[A-Za-z0-9-_]{1,63}$ | Yes | |
| entries | List | [entries] | Yes |
entries (vxlan.overlay_extensions.route_control.ip_as_path_access_lists)
Section titled “entries (vxlan.overlay_extensions.route_control.ip_as_path_access_lists)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| seq_number | Integer | min: 1, max: 4294967294 | Yes | |
| operation | Choice | permit, deny | Yes | |
| bgp_as_paths_regex | String | Yes |
Examples
Section titled “Examples”Example-1
Section titled “Example-1”This example will create an IP as-path named AllowAS with an entry 10 which permit BGP routes with the AS number 64510.
This IP as-path list will be used in the group named ipaspath_RCtrlGrp. This group is consumed by one switch named netascode-leaf1.
ip as-path access-list AllowAS seq 10 permit "64510"---vxlan: overlay_extensions: route_control: ip_as_path_access_lists: - name: AllowAS entries: - seq_number: 10 operation: permit bgp_as_paths_regex: '64510' groups: - name: ipaspath_RCtrlGrp ip_as_path_access_lists: - name: AllowAS switches: - name: netascode-leaf1 groups: - ipaspath_RCtrlGrpExample-2
Section titled “Example-2”This example will create an IP as-path named AllowAll with an entry 10 which permit all BGP routes.
This IP as-path list will be used in the group named ipaspath_RCtrlGrp. This group is consumed by one switch named netascode-leaf1
ip as-path access-list AllowAll seq 10 permit ".*"---vxlan: overlay_extensions: route_control: ip_as_path_access_lists: - name: AllowAll entries: - seq_number: 10 operation: permit bgp_as_paths_regex: '.*' groups: - name: ipaspath_RCtrlGrp ip_as_path_access_lists: - name: AllowAll switches: - name: netascode-leaf1 groups: - ipaspath_RCtrlGrpExample-3
Section titled “Example-3”This example will create an IP as-path named AllowFrom_AS_100 with an entry 10 which permit all BGP routes.
This IP as-path list will be used in the group named ipaspath_RCtrlGrp. This group is consumed by one switch named netascode-leaf1
ip as-path access-list AllowFrom_AS_100 seq 10 permit "^100_[0-9]*$"---vxlan: overlay_extensions: route_control: ip_as_path_access_lists: - name: AllowFrom_AS_100 entries: - seq_number: 10 operation: permit bgp_as_paths_regex: '^100_[0-9]*$' groups: - name: ipaspath_RCtrlGrp ip_as_path_access_lists: - name: AllowFrom_AS_100 switches: - name: netascode-leaf1 groups: - ipaspath_RCtrlGrp