Prefix Lists EcoRouter Documentation / Routing / Prefix Lists
Prefix-list (prefix-list)
A prefix-list is an alternative ro policy-filter lists used in many filtration commands and have a number of advantages. Prefix-lists load a CPU less what increases a router performance.
Prefix Lists Configuration
Prefix-lists are checked in order row by row until matching to any clause is found. Just after the matching is found a packet processing starts. By default all packets not allowed directly in the prefix-list, are denied (an implicit operator deny all for all packets having no matches).
Use the ip prefix-list command to create prefix-list. The prefix-list name must be specified after. The command supports statement enumerating what the key word seq with a number after is used for. The statement can have any number from range <1-4294967295> (the smaller is a number the earlier a statement will be checked for matching). If the first statement has a number 10 and the last one has 15 the statements with a 11, 12, 13, 14 numbers can be added into the prefix-list at any time. If in the new prefix-list the first statement's number is not specifyed manually it will be assigned automatically to 5. The following statements will be enumerated automatically with a step equal 5. To disable the auto-enumerating mode use the no ip prefix-list sequence-number command. To define the subnet which information should be transmitted about to other routers use the permit key word, to restrict use the deny key word. The whole command is following:
ip prefix-list <prefix-list-name> seq <sequense-number> (permit | deny) <subnet/mask> (ge | le | eq <value>).
Use the ip prefix-list <prefix-list-name> description <text> command to specify description (up to 80 symbols).
In addition to direct specifying a subnet and a mask, prefix-list allows to select subnets by specifying the mask's length in operators ge, le, eq. Use the ge parameter to select specific prefixes which length is bigger than specified by <value>. Use the le parameter to select specific prefixes which length is smaller than specified by <value>. Use the eq parameter to select specific prefixes which length is equal to <value>. If all the ge, le, eq key word are omitted it means that an exact matching to the prefix-list statement is required. The following example explains on a 6 specified subnets:
1. 10.0.0.0/8
2. 10.128.0.0/9
3. 10.1.1.0/24
4. 10.1.2.0/24
5. 10.128.10.4/30
6. 10.128.10.8/30
Prefix-list matching
Command | Subnets' IDs matching to a statemint |
---|---|
ip prefix-list permit 10.0.0.0/8 | 1 |
ip prefix-list permit 10.128.0.0/9 | 2 |
ip prefix-list permit 10.0.0.0/8 ge 9 | 2,3,4,5,6 |
ip prefix-list permit 10.0.0.0/8 eq 24 | 3,4 |
ip prefix-list permit 10.0.0.0/8 le 28 | 1,2,3,4 |
ip prefix-list permit 0.0.0.0/0 | No match |
ip prefix-list permit 0.0.0.0/0 le 32 | All subnets. In this case instead of the 0.0.0.0/0 le 32 command it's possible to specify the any parameter when prefix-list configuring. |
The following command demonstrates an advertizing of subnets 10.0.0.0 with a masks from 10 to 20:
ip prefix-list TEST seq 5 permit 10.0.0.0/8 ge 10 le 20
ip prefix-list TEST seq 10 deny all
ATTENTION:
No tags_en
In the current version when using the prefix lists for BRAS configuration the ge, le, eq conditions are ignored.Use the no ip prefix-list <name> command to delete a specifyied prefix-list.
Prefix lists show commands
The show ip prefix-list <name> and show ip prefix-list summary commands display general prefix-list information. The show ip prefix-list detail <name> command displays statistics on prefix-list matching (hit count) and on application matching (route-map) where a prefix-list is used (refcount).
Command | Description |
---|---|
show ip prefix-list <name> | Displays specific prefix-list |
show ip prefix-list summary | Displays all prefix-lists |
show ip prefix-list detail <name> | Displays statistics on prefix-list matching (hit count), on application matching (route-map) where a prefix-list is used (refcount) |