5 FRR provides many very flexible filtering features. Filtering is used
6 for both input and output of the routing information. Once filtering is
7 defined, it can be applied in any direction.
12 .. clicmd:: access-list NAME [seq (1-4294967295)] permit IPV4-NETWORK
14 .. clicmd:: access-list NAME [seq (1-4294967295)] deny IPV4-NETWORK
17 seq `number` can be set either automatically or manually. In the
18 case that sequential numbers are set manually, the user may pick any
19 number less than 4294967295. In the case that sequential number are set
20 automatically, the sequential number will increase by a unit of five (5)
21 per list. If a list with no specified sequential number is created
22 after a list with a specified sequential number, the list will
23 automatically pick the next multiple of five (5) as the list number.
24 For example, if a list with number 2 already exists and a new list with
25 no specified number is created, the next list will be numbered 5. If
26 lists 2 and 7 already exist and a new list with no specified number is
27 created, the new list will be numbered 10.
29 Basic filtering is done by `access-list` as shown in the
34 access-list filter deny 10.0.0.0/9
35 access-list filter permit 10.0.0.0/8
36 access-list filter seq 13 permit 10.0.0.0/7
42 *ip prefix-list* provides the most powerful prefix based
43 filtering mechanism. In addition to *access-list* functionality,
44 *ip prefix-list* has prefix length range specification and
45 sequential number specification. You can add or delete prefix based
46 filters to arbitrary points of prefix-list using sequential number specification.
48 If no ip prefix-list is specified, it acts as permit. If *ip prefix-list*
49 is defined, and no match is found, default deny is applied.
51 .. clicmd:: ip prefix-list NAME (permit|deny) PREFIX [le LEN] [ge LEN]
53 .. clicmd:: ip prefix-list NAME seq NUMBER (permit|deny) PREFIX [le LEN] [ge LEN]
55 You can create *ip prefix-list* using above commands.
58 seq `number` can be set either automatically or manually. In the
59 case that sequential numbers are set manually, the user may pick any
60 number less than 4294967295. In the case that sequential number are set
61 automatically, the sequential number will increase by a unit of five (5)
62 per list. If a list with no specified sequential number is created
63 after a list with a specified sequential number, the list will
64 automatically pick the next multiple of five (5) as the list number.
65 For example, if a list with number 2 already exists and a new list with
66 no specified number is created, the next list will be numbered 5. If
67 lists 2 and 7 already exist and a new list with no specified number is
68 created, the new list will be numbered 10.
71 Specifies prefix length. The prefix list will be applied if the prefix
72 length is less than or equal to the le prefix length.
75 Specifies prefix length. The prefix list will be applied if the prefix
76 length is greater than or equal to the ge prefix length.
79 Less than or equal to prefix numbers and greater than or equal to
80 prefix numbers can be used together. The order of the le and ge
81 commands does not matter.
83 If a prefix list with a different sequential number but with the exact
84 same rules as a previous list is created, an error will result.
85 However, in the case that the sequential number and the rules are
86 exactly similar, no error will result.
88 If a list with the same sequential number as a previous list is created,
89 the new list will overwrite the old list.
91 Matching of IP Prefix is performed from the smaller sequential number to the
92 larger. The matching will stop once any rule has been applied.
94 In the case of no le or ge command, the prefix length must match exactly the
95 length specified in the prefix list.
98 .. _ip-prefix-list-description:
100 ip prefix-list description
101 --------------------------
103 .. clicmd:: ip prefix-list NAME description DESC
105 Descriptions may be added to prefix lists. This command adds a
106 description to the prefix list.
109 .. _showing-ip-prefix-list:
111 Showing ip prefix-list
112 ----------------------
114 .. clicmd:: show ip prefix-list
116 Display all IP prefix lists.
118 .. clicmd:: show ip prefix-list NAME
120 Show IP prefix list can be used with a prefix list name.
122 .. clicmd:: show ip prefix-list NAME seq NUM
124 Show IP prefix list can be used with a prefix list name and sequential
127 .. clicmd:: show ip prefix-list NAME A.B.C.D/M
129 If the command longer is used, all prefix lists with prefix lengths equal to
130 or longer than the specified length will be displayed. If the command first
131 match is used, the first prefix length match will be displayed.
133 .. clicmd:: show ip prefix-list NAME A.B.C.D/M longer
134 .. clicmd:: show ip prefix-list NAME A.B.C.D/M first-match
135 .. clicmd:: show ip prefix-list summary
136 .. clicmd:: show ip prefix-list summary NAME
137 .. clicmd:: show ip prefix-list detail
138 .. clicmd:: show ip prefix-list detail NAME
140 Clear counter of ip prefix-list
141 -------------------------------
143 .. clicmd:: clear ip prefix-list [NAME [A.B.C.D/M]]
145 Clears the counters of all IP prefix lists. Clear IP Prefix List can be used
146 with a specified NAME or NAME and prefix.