ip prefix-list configuration command directory

clear ip prefix-list

ip prefix-list

ip prefix-list description

ip prefix-list sequence-number

show ip prefix-list

 

clear ip prefix-list

Clear statistic information ofdesignated prefix-list.

clear ip prefix-list [<name>  [<prefix>]]

Parameter:

<name>         name of Prefix-list

<prefix>       network prefix with format: A.B.C.D/nn is the length of the mask

Default:

none

Command mode:

Supervisor mode

Explanation:

If no prefix is designated, all statistic information in prefix-listwill be cleared.

Example:

none

Relevant command:

ip prefix-list description 错误!未定义书签。

ip prefix-list sequence-number 错误!未定义书签。

show ip prefix-list 错误!未定义书签。

clear ip prefix-list 错误!未定义书签。

 

ip prefix-list

Create a prefix-list or add a prefix-list rule. Use “no” command to delete the configuration.

ip prefix-list <name>  [<seq> <seq_number>]  <deny | permit> <prefix | any> [<ge> <value>] [<le> <value>]

no ip prefix-list <name>  [<seq> <seq_number>]  [<deny | permit> <prefix | any>  [<ge> <value>] [<le> <value>] ]

Parameter:

<name>         Name of prefix-list

<seq>          Designate sequence-number

<seq_number>     Value of sequence-number

<deny | permit>   Property of prefix-list rule.

<prefix | any>     Designated prefix or any prefix..

<ge>           Smallest length of prefix, i.e. lower limit, with designated matching.

<value>        Length of prefix, 0-32.

<le>           Biggest length of prefix (higher limit) with designated matching.

<value>        Length of prefix: 0-32.

Default:

none

Command mode:

global configuration mode

Explanation:

Prefix-list is a collection of rules used to filter network prefix. Each rule contains 5 elements: sequence number, property (deny/permit), prefix and length (a.b.c.d/n), lower limit (gex) and higher limit (ley). All rules are ranged from small to large with sequence number. When prefix list is applied, begin to check it from the rule of the smallest number. If the matching is done successfully, stop matching other rules and return property (deny/permit) of the rule.

To check whether the given network prefix is matched, it is necessary not only to check the length of the network prefix but also to check whether the network prefixes within a specific length are completely the same. For a given network a.b.c.d/n, to check the matching by using a rule of prefix list ip prefix-list test seq 5  A.B.C.D/M ge X le Y, the following process must be executed:

The first thing to check is whether the mask length (n) of the network meets the expression: X <= n <= Y (If ge X is not designated, the expression should beM <= n<= Y; if le Y is not designated, the expression should be: X <=n <= 32; if both ge X and le Y are not designated, the expression should be: n == M). If the expression is met, continue to the next process. If the rule is not met, execute the comparison of the next rule.

Check whether the network a.b.c.d/n is the same to the first M bitsof  A.B.C.D. If it’s the same, it meets the rule. Return to the property (deny/permit) of this rule. Otherwise it doesn’t matchthe rule, execute the comparison of the next rule.

If all rules are not matched, return  deny.

For the seqencenumber of prefix-list, there is another command: ip prefix-list sequence-number. Use this command to control whether the prefix uses the seqencenumber. For details, please refer to the description of this command.

Designate only the command “no of the name to delete whole prefix list.

Example:

If there is the following matching object and prefix list definition, the result of matching will be as follows.

Target route 1: 120.120.0.0/14

Target route 2:    120.120.0.0/16

Target route 3:    120.120.0.0/25

Target route 4:    130.130.0.0/16

Target route 5:    130.130.0.0/8

Target route 6:    130.130.0.0/24

Target route 7:    12.0.0.0/8

Prefix-list  

ip prefix-list sample permit 120.120.0.0/8 ge 16 le 24

ip prefix-list sample deny 130.130.0.0/16

The result of matching all target routes with prefix-list sample:

Target route 1: Matching fails. Deny.

Target route 2: Matching succeeds. Permit.

Target route 3: Matching fails. Deny.

Target route 4: Matching succeeds. Deny.

Target route 5: Matching succeeds. Deny.

Target route 6: Matching succeeds. Deny.

Target route 7: Matching succeeds. Deny.

Relevant command:

ip prefix-list description 错误!未定义书签。

ip prefix-list sequence-number 错误!未定义书签。

show ip prefix-list 错误!未定义书签。

clear ip prefix-list 错误!未定义书签。

ip prefix-list description

Configure description of prefix list. Use “no” command to delete the configuration.

ip prefix-list <name>  <description> <strings>

no ip prefix-list <name>  <description>

Parameter:

<name>         Name of prefix-list.

<description>  Designate description information of prefix list.

<strings>       Description information.

Default::

none

Command mode:

global configuration mode

Explanation:

none

Example:

The following example adds description information to prefix-list hard to make configuration easy to read:

ip prefix-list hard deny any

ip prefix-list hard description This prefix-list is used to filter routes from neighbor hard

Relevant command:

ip prefix-list description 错误!未定义书签。

ip prefix-list sequence-number 错误!未定义书签。

show ip prefix-list 错误!未定义书签。

clear ip prefix-list 错误!未定义书签。

ip prefix-list sequence-number

Set prefix-list using /not usingseqence number. Use “no” command to delete the setting.

ip prefix-list sequence-number

no ip prefix-list sequence-number

Parameter:

none

Default:

Default seqencenumber for use.

Command mode:

global configuration mode

Explanation:

This command is used to control whether to use seqencenumber for each ruleof prefix-list. After using serial number, only one rule will exist for one serial number. Thus newly configured rule for one serial number will indicate to delete the old one. If no serial number is used, command should be used to delete the rule clearly. If configured without designating serial number, the system conceals serial numbers allocated to all rules, beginning from 5 and increases 5 by degrees.

Example:

none

Relevant command:

ip prefix-list description 错误!未定义书签。

ip prefix-list sequence-number 错误!未定义书签。

show ip prefix-list 错误!未定义书签。

clear ip prefix-list 错误!未定义书签。

show ip prefix-list

display relevant information of designated prefix-lists or all prefix-lists including configuration and statistics of the prefix-lists.

show ip prefix-list [<summary | detail> <name>]

Parameter:

<summary>     Summarized information

<detail>      Detailed information

name           Name of prefix-list

Default:

none

Command mode:

Supervisor mode

Explanation:

If no name of prefix-list is designated, information of all prefix-list will be diplayed.

Example:

In the following example, a prefix-list is configured:

ip prefix-list yell permit 130.12.19.0/24

ip prefix-list yell permit 140.20.0.0/16 ge 16 le 24

Information diplayed.by “show ip prefix-list detail is as follows:

Prefix-list with the last deletion/insertion: yell

 ip prefix-list yell: 2 entries

count: 2, range entries: 1, sequences: 5 - 10

seq 5 permit 130.12.19.0/24 (hit count: 0, refcount: 10)

seq 10 permit 140.20.0.0/16 ge 16 le 24 (hit count: 0, refcount: 10)

The first line means that the prefix-list with latest revised configuration is yell.

List all prefix-list information from the second line. Only one prefix-list is configured here. Its name is yell. It contains 2 parts.

Count: 2, meaning that this prefix-list has 2 parts;

range entries: 1, meaning that network range number defined in this prefix-list is 1 one part corresponding to seq 10);

sequences: 5 10, meaning the range of serial number of each part in this refix-list.

There are definition and statistics of each part.

Hit count: 0, meaning the times to match this part is 0;

Ref count: 10, meaning that the time to try to match this part is 10.

Relevant command:

ip prefix-list description 错误!未定义书签。

ip prefix-list sequence-number 错误!未定义书签。

show ip prefix-list 错误!未定义书签。

clear ip prefix-list 错误!未定义书签。