IP Prefix Lists

IP Prefix Lists

IP prefix lists accommodate mechanisms to bout two apparatus of an IP route:

■ The avenue prefix (the subnet number)

■ The prefix breadth (the subnet mask)

The redistribute command cannot anon advertence a prefix list, but a avenue map can accredit to a

prefix account by application the bout command.

A prefix account itself has agnate characteristics to a avenue map. The account consists of one or more

statements with the aforementioned argument name. Anniversary account has a arrangement cardinal to acquiesce abatement of

individual commands, and admittance of commands into a accurate arrangement position. Each

command has a admittance or abjure action—but because it is acclimated alone for analogous packets, the

permit or abjure keyword aloof implies whether a avenue is akin (permit) or not (deny). The

generic command syntax is as follows:

ip prefix-list list-name [seq seq-value] {deny network/length | admittance network/

length}[ge ge-value] [le le-value]

The sometimes catchy and absorbing allotment of alive with prefix lists is that the acceptation of the

network/length, ge-value, and le-value ambit changes depending on the syntax. The network/

length ambit ascertain the ethics to use to bout the avenue prefix. For example, a network/length

of 10.0.0.0/8 agency “any avenue that begins with a 10 in the aboriginal octet.” The ge and le options are

used for allegory to the prefix length—in added words, to the cardinal of bifold 1s in the subnet

mask. For instance, ge 20 le 22 matches alone routes whose masks are /20, /21, or /22. So, prefix

list argumentation can be abbreviated into a two-step allegory action for anniversary route:

1. The route’s prefix charge be aural the ambit of addresses adumbrated by the prefix-list command’s

network/length parameters.

2. The route’s prefix breadth charge bout the ambit of prefixes adumbrated by the prefix-list

command.

The potentially catchy allotment of the argumentation relates to alive the ambit of prefix lengths arrested by

this logic. The ambit is authentic by the ge-value and le-value parameters, which angle for greaterthan-

or-equal-to and less-than-or-equal-to. Table 10-4 formalizes the logic, including the default

values for ge-value and le-value. In the table, agenda that conf-length refers to the prefix length

configured in the network/prefix (required) parameter, and route-length refers to the prefix length

of a avenue actuality advised by the prefix list.

306 Affiliate 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing

Several examples can absolutely advice attach bottomward prefix account logic. The afterward routes will be examined

by a array of prefix lists, with the routes numbered for easier reference:

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

Next, Table 10-5 shows the after-effects of seven altered one-line prefix lists activated to these six

example routes. The table lists the analogous ambit in the prefix-list commands, abbreviating the

first allotment of the commands. The table explains which of the six routes would bout the listed prefix

list, and why.

Table 10-4 LE and GE Ambit on IP Prefix List, and the Adumbrated Ambit of Prefix Lengths

Prefix Account Ambit Ambit of Prefix Lengths

Neither conf-length = route-length

Only le conf-length <= route-length <= le-value

Only ge ge-value <= route-length <= 32

Both ge and le ge-value <= route-length <= le-value

Table 10-5 Archetype Prefix Lists Activated to the Account of Routes

prefix-list Command

Parameters

Routes

Matched Results

10.0.0.0/8 1 Without ge or le configured, both the prefix (10.0.0.0)

and breadth (8) charge be an exact match.

10.128.0.0/9 None Without ge or le configured, the prefix (10.128.0.0)

and breadth (9) charge be an exact match, alone the second

route in the account is akin by this prefix list.

10.0.0.0/8 ge 9 2–6 The 10.0.0.0/8 agency “all routes whose aboriginal octet is

10,” finer apery an abode range. The

prefix breadth charge be amid 9 and 32, inclusive.

10.0.0.0/8 ge 24 le 24 3, 4 The 10.0.0.0/8 agency “all routes whose aboriginal octet is

10,” and the prefix ambit is 24 to 24—meaning only

routes with prefix breadth 24.

Route Maps, Prefix Lists, and Authoritative Ambit 307

Administrative Distance

A distinct router can apprentice routes application assorted IP acquisition protocols, as able-bodied as via affiliated and

static routes. When a router learns a accurate avenue from assorted sources, the router cannot use

the metrics to actuate the best route, because the metrics are based on altered units. So, the

router uses anniversary route’s authoritative ambit (AD) to actuate which is best, with the lower

number actuality better. Table 10-6 lists the absence AD ethics for the assorted acquisition sources.

prefix-list Command

Parameters

Routes

Matched Results

10.0.0.0/8 le 28 1–4 The prefix breadth needs to be amid 8 and 28,

inclusive.

0.0.0.0/0 None 0.0.0.0/0 agency “match all prefixes, with prefix length

of absolutely 0.” So, it would bout all routes’ prefixes,

but none of their prefix lengths. Alone a absence route

would bout this prefix list.

0.0.0.0/0 le 32 All The ambit adumbrated by 0.0.0.0/0 is all IPv4 addresses.

The le 32 again implies any prefix breadth amid 0 and

32, inclusive. This is the syntax for “match all” prefix

list logic.

Table 10-6 Authoritative Distances

Route Blazon Authoritative Distance

Connected 0

Static 1

EIGRP arbitrary avenue 5

EBGP 20

EIGRP (internal) 90

IGRP 100

OSPF 110

IS-IS 115

RIP 120

EIGRP (external) 170

iBGP 200

Unreachable 255

Table 10-5 Archetype Prefix Lists Activated to the Account of Routes (Continued)

The defaults can be afflicted by application the ambit command. The command differs amidst all

three IGPs covered in this book. The all-encompassing versions of the ambit router subcommand for RIP,

EIGRP, and OSPF, respectively, are as follows:

distance distance

distance eigrp internal-distance external-distance

distance ospf {[intra-area dist1] [inter-area dist2] [external dist3]}

As you can see, EIGRP and OSPF can set a altered AD depending on the blazon of avenue as well,

whereas RIP cannot. You can additionally use the ambit command to set a router’s appearance of the AD per

route, as is covered after in this chapter.