/
set routing prefix-list

set routing prefix-list


The set routing prefix-list command creates an IPv4 prefix list or an entry in an IPv4 prefix list.

The delete routing prefix-list command deletes an IPv4 prefix list or an entry from an IPv4 prefix list.


Command Syntax

set routing prefix-list {ipv4-family <ipv4-prefix-name> | ipv6-family <ipv6-prefix-name>} [seq <sequence-number>] {deny|permit} {prefix <ipv4/prefixlen> [ge <greater-equal-value>] [le <less-equal-value>prefix-any}

delete routing prefix-list {ipv4-family <ipv4-prefix-name> | ipv6-family <ipv6-prefix-name>} [seq <sequence-number>]deny|permit} {prefix <ipv4/prefixlen> [ge <greater-equal-value>] [le <less-equal-value>prefix-any}


Parameter

Parameter

Description

<ip4-prefix-name>

Specifies the name of an IPv4 prefix list.
<ip6-prefix-name>Specifies the name of an IPv6 prefix list.

seq <sequence-number>

Optional. Specifies the sequence number of an entry in the IPv4 prefix list. The value is an integer that ranges from 1 to 4294967295.
{deny|permit}

Specifies whether the route is available for further processing when there is a match. The value could be deny or permit.

  • deny: In deny mode, if the IP address to be filtered is within the defined prefix range, the IP address fails to match the routing policy and cannot match the next entry.
  • permit:  In permit mode, if the IP address to be filtered is within the defined prefix range, the IP address matches the routing policy and does not continue to match the next entry. 

{prefix <ipv4/prefixlen> | prefix-any}

Specifies an IP address/prefix length or all addresses. The value of prefix length is an integer that ranges from 0 to 32.

When prefix-any is specified, it creates a prefix-list that matches all addresses.

ge <greater-equal-value>

Optional. Specifies the lower threshold of the mask length. It can be used when an IP address/prefix length is specified.

If ge greater-equal-value and le less-equal-value are not specified, the value of mask-length is the mask length.

greater-equal-value must meet the following requirement: prefixlengreater-equal-value ≤ less-equal-value ≤ 32.

If only ge is configured, the mask ranges from greater-equal-value to 32.

le <less-equal-value>

Optional. Specifies the upper threshold of the mask length. It can be used when an IP address/prefix length is specified.

If ge greater-equal-value and le less-equal-value are not specified, the value of mask-length is the mask length.

less-equal-value must meet the following requirement: prefixlengreater-equal-value ≤ less-equal-value ≤ 32.

If only le is configured, the mask ranges from prefixlen to less-equal-value.


Example

  • Configure the IP prefix list named p1 to permit only the routes with the mask length ranging from 8 to 16 on the network segment 35.0.0.0/8.

admin@Xorplus# set routing prefix-list ipv4-family p1 seq 1 permit prefix 35.0.0.0/8 ge 16
admin@Xorplus# commit

Related content

Copyright © 2025 Pica8 Inc. All Rights Reserved.