Configure IP Prefix List on Devices

  1. Run the following command to configure the IPv4 prefix list:
    efa policy prefix-list create ?
    Flags:
          --type string          Type of prefix-list. Valid types are ipv4
          --name string          Name of Prefix list
          --rule stringArray     Rule in format seq[seq-num],action[permit/deny],prefix[IPv4 prefix],ge[prefix-len],le[prefix-len]. Example: seq[5],action[permit],prefix[10.0.0.0/8],ge[10],le[24]
    Note

    Note

    Use the ge and le keywords to specify the range of the prefix length to be matched. Exact match is assumed when neither ge nor le is specified.

    Following is an example of IPv4 prefix list create:

    efa policy prefix-list create –-name prefix_v4 –-type ipv4 –-rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16]
  2. Run the following command to configure or delete prefix-list configuration on devices:
    You can also use this command to add or remove rules.
    efa policy prefix-list update ?
    Flags:
          --type string      Type of prefix-list. Valid types are ipv4
          --name string      Name of Prefix list
          --operation string Valid options are add-rule, remove-rule, add-device, remove-device
          --rule stringArray      Rule in format seq[seq-num],action[permit/deny],prefix[IPv4 prefix],ge[prefix-len],le[prefix-len]. Example: seq[5],action[permit],prefix[10.0.0.0/8],ge[10],le[24]
          --ip string        Comma separated range of device IP addresses. Example: 1.1.1.1-3,1.1.1.2,2.2.2.2
    
    Note

    Note

    • The add-device and remove-device operations configure or remove a prefix list rules on the specified devices.
    • The add-rule and remove-rule operations add or remove a prefix list rule on the specified devices. If the prefix list is configured on the device, the rule is added or removed from the device.

    Following is an example of IPv4 prefix list update:

    Add device: This example configures prefix list on the devices.

    efa policy prefix-list update –-name prefix_v4 –-type ipv4 –-operation add-device --ip 10.20.246.10-11

    Delete device: This example removes prefix list from the devices.

    efa policy prefix-list update –-name prefix_v4 –-type ipv4 –-operation remove-device --ip 10.20.246.10-11

    Add rule: This example adds rule to the already created prefix list.

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

    Delete rule: This example removes rule from the existing prefix list.

    efa policy prefix-list update –-name prefix_v4 –-type ipv4 –-operation remove-rule –-rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16]
    1. Verify the switch configuration on the SLX device.
      SLX# show running-config ip prefix-list
      ip prefix-list prefix_v4 seq 5 permit 10.0.0.0/8 ge 16
  3. Run the following command to show the IPv4 prefix list on a list of devices:
    efa policy prefix-list list ?
    Flags:
           --type string      Type of prefix-list. Valid types are ipv4
           --ip string        Comma separated range of device IP addresses. Example: 1.1.1.1-3,1.1.1.2,2.2.2.2
    

    Following is an example of IPv4 prefix list show:

    IPv4 prefix list show

    efa policy prefix-list list –-type ipv4 –-ip 10.20.246.10-11
    
    Name: prefix_v4
    +------+---------+--------+------------+----+----+--------------+-------------+
    | Type | Seq num | Action |   Prefix   | Ge | Le | DeviceIP     | AppState    |
    +------+---------+--------+------------+----+----+--------------+-------------+
    | ipv4 |    5    | permit | 10.0.0.0/8 | 16 |    | 10.20.246.10 | cfg-in-sync |
    +------+---------+--------+------------+----+----+---------------+------------+
    | ipv4 |    5    | permit | 10.0.0.0/8 | 16 |    | 10.20.246.11 | cfg-in-sync |
    +------+---------+--------+------------+----+----+--------------+-------------+
    
  4. Run the following command to delete the IPv4 prefix list on all devices:

    This step deletes the prefix list on all devices and EFA.

    efa policy prefix-list delete ?
    Flags:
          --type string   Type of prefix-list. Valid types are ipv4
          --name string      Name of Prefix list
    

    Following example deletes an IPv4 prefix list with name prefix_v4:

    efa policy prefix-list delete –-type ipv4 –-name prefix_v4
    Note

    Note

    For more information about commands and supported parameters, see Extreme Fabric Automation Command Reference, 2.7.0 .