OcNOS-SP : System Management Guide : System Management Command Reference : Interface Commands : ip prefix-list
ip prefix-list
Use this command to create an entry for a prefix list.
A router starts to match prefixes from the top of the prefix list and stops whenever a match or deny occurs. To promote efficiency, use the seq parameter and place common matches or denials towards the top of the list. The sequence values are generated in the sequence of 5.
Use the parameters ge and le specify the range of the prefix length to be matched. When setting these parameters, set le to be less than 32 and ge to be less than le value.
Use the no parameter with this command to delete the prefix-list entry.
Command Syntax
ip prefix-list WORD
(deny|permit) (A.B.C.D/M|any)
(deny|permit) A.B.C.D/M eq <0-32>
(deny|permit) A.B.C.D/M ge <0-32>
(deny|permit) A.B.C.D/M ge <0-32> le <0-32>
(deny|permit) A.B.C.D/M le <0-32>
(deny|permit) A.B.C.D/M le <0-32> ge <0-32>
seq <1-4294967295> (deny|permit) (A.B.C.D/M|any)
seq <1-4294967295> (deny|permit) A.B.C.D/M eq <0-32>
seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32>
seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32> le <0-32>
seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32>
seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32> ge <0-32>
description LINE
no seq <1-4294967295> (deny|permit) (A.B.C.D/M|any)
no description LINE
no description
no ip prefix-list WORD
ip prefix-list sequence-number
no ip prefix-list sequence-number
Parameters
WORD
Name of the prefix list.
deny
Reject packets.
permit
Accept packets.
A.B.C.D/M
IP address mask and length of the prefix list mask.
eq
Exact prefix length to be matched
le
Maximum prefix length to be matched
ge
Minimum prefix length to be matched
<0-32>
Prefix length to match
<1-4294967295>
Sequence number of the prefix list.
any
Take all packets of any length. This parameter is the same as using 0.0.0.0/0 le 32 for A.B.C.D/M.
sequence-number
To suppress sequence number generation, give the no ip prefix-list sequence-number command. If you disable the generating sequence numbers, you must specify the sequence number for each entry using the sequence number parameter in the ip prefix-list command.
To enable sequence number generation, give the ip prefix-list sequence-number command.
LINE
Up to 80 characters describing this prefix-list.
Default
No default value is specified
Command Mode
Configure mode
IP prefix-list mode
Applicability
This command was introduced before OcNOS Version SP 4.0.
Examples
In this configuration, the ip prefix-list command matches all, but denies the IP address range, 76.2.2.0.
#conf t
(config)#router bgp 100
(config-router)#network 172.1.1.0
(config-router)#network 172.1.2.0
(config-router)#
(config-router)#neighbor 10.6.5.3 remote-as 300
(config-router)#neighbor 10.6.5.3 prefix-list mylist out
(config-router)#exit
(config)#ip prefix-list mylist
(config-ip-prefix-list)#seq 5 deny 76.2.2.0/24
(config-ip-prefix-list)#seq 10 permit 0.0.0.0/0
 
Last modified date: 10/19/2023