Community List
NX-OSCommunity lists define named collections of BGP community values used for route filtering and matching in route maps. NX-OS supports standard community lists (matching exact community values) and regex-based community lists (matching community strings using regular expressions). Community lists are referenced in route map match clauses to implement community-based routing policies.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No | |
| templates | List | templates | No |
devices (nxos)
Section titled “devices (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (nxos)
Section titled “device_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (nxos)
Section titled “global (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
templates (nxos)
Section titled “templates (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| community_lists | List | community_lists | No |
community_lists (nxos.devices.configuration)
Section titled “community_lists (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| mode | Choice | standard, expanded | No | |
| entries | List | entries | No |
entries (nxos.devices.configuration.community_lists)
Section titled “entries (nxos.devices.configuration.community_lists)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| seq | Integer | min: 1, max: 4294967294 | Yes | |
| action | Choice | permit, deny | No | |
| regex | String | No | ||
| communities | List | String | No |
Examples
Section titled “Examples”Example 1: Standard community list matching specific community values
nxos: devices: - name: LEAF1 configuration: community_lists: - name: CL-STANDARD-TENANT mode: standard entries: - seq: 10 action: permit communities: - "regular:as2-nn2:65000:100" - "regular:as2-nn2:65000:200" - seq: 20 action: denyExample 2: Regex-based community list for flexible pattern matching
nxos: devices: - name: SPINE1 configuration: community_lists: - name: CL-REGEX-DATACENTER mode: expanded entries: - seq: 10 action: permit regex: "65000:.*"Example 3: Multiple community lists for a multi-tenant EVPN fabric
nxos: devices: - name: BORDER-LEAF1 configuration: community_lists: - name: CL-TENANT-A mode: standard entries: - seq: 10 action: permit communities: - "regular:as2-nn2:65000:1010" - "regular:as2-nn2:65000:1020" - name: CL-TENANT-B mode: standard entries: - seq: 10 action: permit communities: - "regular:as2-nn2:65000:2010" - "regular:as2-nn2:65000:2020" - name: CL-NO-EXPORT mode: expanded entries: - seq: 10 action: permit regex: "no-export"