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 toward the top of the list. The sequence values are generated in the sequence of 5.

Use the parameters ge and le to 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 the le value.

Use the no parameter with this command to delete the prefix-list entry.

When an empty prefix list is configured, each FECClosed FEC is a technique that detects and corrects errors during data transmission to maintain the reliability of the communication system. label is advertised (if the advertise-labels command is enabled) and installed (if the install-labels command is enabled). However, if the list is non-empty, the FEC not present in the list will be denied.

Command Syntax

Copy
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

None

Command Mode

Configure mode and IP prefix-list mode

Applicability

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.

Copy
#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