efa policy prefix-list create

Creates an IPv4 prefix list.

Syntax

efa policy prefix-list create [ --type string | --name string | --rule stringArray ]

Parameters

--type string
Specifies the type of prefix list. The only valid value is ipv4.
--name string
Specifies the name of the prefix list.
--rule stringArray
Specifies the rule of the prefix list, in the following format: seq[seq-num],action[permit/deny],prefix[IPv4 prefix],ge[prefix-len],le[prefix-len]. For example: seq[5],action[permit],prefix[10.0.0.0/8],ge[10],le[24].

Usage Guidelines

Execute efa policy prefix-list update --operation add-device to push the configuration on to the device.

Examples

This example creates an IPv4 prefix list.

$ efa policy prefix-list create –-name prefix_v4 
–-type ipv4 –-rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16]

This example creates an IPv4 prefix list with two rules.

efa policy prefix-list create --type ipv4 
--name test1 --rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16],le[24] 
--rule seq[10],action[deny],prefix[20.0.0.0/8],ge[14],le[24]
Name: test1
+------+---------+--------+------------+----+----+---------+
| Type | Seq num | Action |   Prefix   | Ge | Le | Status  |
+------+---------+--------+------------+----+----+---------+
| ipv4 | 5       | permit | 10.0.0.0/8 | 16 | 24 | Success |
+------+---------+--------+------------+----+----+---------+
| ipv4 | 10      | deny   | 20.0.0.0/8 | 14 | 24 | Success |
+------+---------+--------+------------+----+----+---------+
Prefix-list details
--- Time Elapsed: 597.965605ms ---