efa policy extcommunity-list

Extended community list commands

Syntax

efa policy extcommunity-list create [ --name string | --type { standard | extended } | --rule stringArray ]
efa policy extcommunity-list update [ --name string | --type { standard | extended } | --rule stringArray | --operation string | --ip string ]
efa policy extcommunity-list delete [ --name string | --type { standard | extended } | --seq string ]
efa policy extcommunity-list list [ --ip string | --name string | --type { standard | extended } ]

Parameters

--name string
The name of the extended community list.
--type { standard | extended }
The type of extended community list. Valid options are standard, extended.
--rule stringArray
Rule in format seq[seq-num], action[permit/deny], rt[ASN:NN | IpAddress:NN, ASN and NN is 2 or 4 bytes], soo[ASN:NN|IpAddress:NN, ASN and NN is 2 or 4 bytes] OR seq[num], action[permit/deny], ext-value[regular expression].
--operation string
Valid options are update-rule, add-device, remove-device.
--ip string
Specifies comma-separated range of device IP addresses. Example: 10.1.1.13,10.1.1.50,10.1.1.101.
--seq string
Sequence numbers. For example 5,10,20 or all.

Examples

This example creates an extcommunity-list of type standard.

efa policy extcommunity-list create --name excommlist-1 --type standard
 --rule "seq[4],action[permit],soo[10.11.2.3:22]"
+------------------------------+---------+--------+----+--------------+-----------+ 

| Extended community list name | Seq num | Action | Rt |     Soo      | Ext Value | 

+------------------------------+---------+--------+----+--------------+-----------+ 

| excommlist-1                 | 4       | permit |    | 10.11.2.3:22 |           | 

+------------------------------+---------+--------+----+--------------+-----------+ 

Extended community list details 

+------------+--------+--------+-----------------+ 

| IP Address | Result | Reason | Rollback reason | 

+------------+--------+--------+-----------------+ 

Device Results 

This example adds a device to an extcommunity-list.

efa policy extcommunity-list update --name excommlist-1 --type standard
 --operation add-device --ip 10.20.246.29,10.20.246.30  
+------------------------------+---------+--------+-------+--------------+-----------+ 

| Extended community list name | Seq num | Action |  Rt   |     Soo      | Ext Value | 

+------------------------------+---------+--------+-------+--------------+-----------+ 

| excommlist-1                 | 4       | permit |       | 10.11.2.3:22 |           | 

+------------------------------+---------+--------+-------+--------------+-----------+ 

| excommlist-1                 | 5       | deny   | 1:345 |              |           | 

+------------------------------+---------+--------+-------+--------------+-----------+ 

| excommlist-1                 | 6       | permit | 1:45  | 10.11.2.3:22 |           | 

+------------------------------+---------+--------+-------+--------------+-----------+ 

Extended community list details 

+--------------+---------+--------+-----------------+ 

|  IP Address  | Result  | Reason | Rollback reason | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.29 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.30 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

Device Results

This example deletes a device from an extcommunity-list.

efa policy extcommunity-list update --name excommlist-2 --type extended
 --operation remove-device --ip 10.20.246.29,10.20.246.30 
+------------------------------+---------+--------+----+-----+-----------+ 

| Extended community list name | Seq num | Action | Rt | Soo | Ext Value | 

+------------------------------+---------+--------+----+-----+-----------+ 

| excommlist-2                 | 2       | permit |    |     | _15000_   | 

+------------------------------+---------+--------+----+-----+-----------+ 

| excommlist-2                 | 5       | deny   |    |     | _25000_   | 

+------------------------------+---------+--------+----+-----+-----------+ 

Extended community list details 

+--------------+---------+--------+-----------------+ 

|  IP Address  | Result  | Reason | Rollback reason | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.29 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.30 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

Device Results  

These examples update rules on an extcommunity-list.

efa policy extcommunity-list update –-name excommlist-1 –-type standard
 –-operation update-rule –-rule "seq[5],action[permit],rt[0:123],soo[0:12]"
+------------------------------+---------+--------+-------+------+-----------+ 

| Extended community list name | Seq num | Action |  Rt   | Soo  | Ext Value | 

+------------------------------+---------+--------+-------+------+-----------+ 

| excommlist-1                 | 5       | permit | 0:123 | 0:12 |           | 

+------------------------------+---------+--------+-------+------+-----------+ 

Extended community list details 

+--------------+--------+--------------------------------------------------------------+-----------------+ 

|  IP Address  | Result |                            Reason                            | Rollback reason | 

+--------------+--------+--------------------------------------------------------------+-----------------+ 

| 10.20.246.29 | Failed | Reason: For seq 5: netconf rpc [error] '"rt 0:123 soo 0:12"  |                 | 

|              |        | is an invalid value.'                                        |                 | 

+--------------+--------+--------------------------------------------------------------+-----------------+ 

| 10.20.246.30 | Failed | Reason: For seq 5: netconf rpc [error] '"rt 0:123 soo 0:12"  |                 | 

|              |        | is an invalid value.'                                        |                 | 

+--------------+--------+--------------------------------------------------------------+-----------------+ 

Device Results 

This example deletes the extcommunity-list rules on all devices for the name, type, and seq provided.

efa policy extcommunity-list delete --name excommlist-2 --type extended --seq all
+------------------------------+---------+--------+----+-----+-----------+ 

| Extended community list name | Seq num | Action | Rt | Soo | Ext Value | 

+------------------------------+---------+--------+----+-----+-----------+ 

| excommlist-2                 | 2       | permit |    |     | _15000_   | 

+------------------------------+---------+--------+----+-----+-----------+ 

| excommlist-2                 | 5       | deny   |    |     | _25000_   | 

+------------------------------+---------+--------+----+-----+-----------+ 

Extended community list details 

+--------------+---------+--------+-----------------+ 

|  IP Address  | Result  | Reason | Rollback reason | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.29 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

| 10.20.246.30 | Success |        |                 | 

+--------------+---------+--------+-----------------+ 

Device Results 

This example lists extcommunity-list details.

efa policy extcommunity-list list
Extended community list details:
Name: excommlist-1
Seq: 5 
Action: permit
Route Target: 1:100 2:200 3:145 4:123
Site of Origin: 1.2.3.4:12 5:400 10.11.12.13:22
ExtValue:     

Name: excommlist-1
Seq: 6
Action: permit
Route Target: 1:45
Site of Origin: 10.11.2.3:22
ExtValue:

Name: excommlist-1
Seq: 9
Action: deny
Route Target: 1:345
Site of Origin: 6:12
ExtValue:

Name: excommlist-2
Seq: 2
Action: permit
Route Target:
Site of Origin:
ExtValue: _15000_