Configuring IP Routing Protocol-Independent Features

Enabling Policy Routing (PBR)

To define the criteria by which packets are examined to learn if they will be policy-routed, use either one or both of the following commands in route-map configuration mode. No match clause in the route map indicates all packets.

Command

Purpose

 

 

Router(config-route-map)# match length minimum-length

Matches the Level 3 length of the packet.

maximum-length

 

 

 

Router(config-route-map)# match ip address

Matches the destination IP address that is permitted by

{access-list-number access-list-name}

one or more standard or extended access lists.

[access-list-number access-list-name]

 

 

 

To set the precedence and specify where the packets that pass the match criteria are output, use the following commands in route-map configuration mode:

 

Command

Purpose

Step 1

 

 

Router(config-route-map)# set ip precedence number name

Sets the precedence value in the IP header.

Step 2

 

 

Router(config-route-map)# set ip next-hopip-address

Specifies the next hop to which to route the

 

[ip-address]

packet.

 

 

 

(It must be an adjacent router).

Step 3

 

 

Router(config-route-map)# set interface interface-type

Specifies the output interface for the packet.

 

interface-number [... interface-type interface-number]

 

 

Step 4

 

 

Router(config-route-map)# set ip default next-hop

Specifies the next hop to which to route the

 

ip-address [ip-address]

packet, if there is no explicit route for this

 

 

destination.

 

 

Note

Like the set ip next-hopcommand, the

 

 

 

set ip default next-hop command needs

 

 

 

to specify an adjacent router.

Step 5

 

 

Router(config-route-map)# set default interface

Specifies the output interface for the packet, if

 

interface-type interface-number [... interface-type

there is no explicit route for this destination.

 

interface-number]

 

 

 

 

 

 

Note The set ip next-hopand set ip default next-hopare similar commands but have a different order of operations. Configuring the set ip next-hopcommand causes the system to use policy routing first and then use the routing table. Configuring the set ip default next-hopcauses the system to use the routing table first and then policy route the specified next hop.

The precedence setting in the IP header determines whether, during times of high traffic, the packets will be treated with more or less precedence than other packets. By default, the Cisco IOS software leaves this value untouched; the header remains with the precedence value it had.

The precedence bits in the IP header can be set in the router when policy routing is enabled. When the packets containing those headers arrive at another router, the packets are ordered for transmission according to the precedence set, if the queueing feature is enabled. The router does not honor the precedence bits if queueing is not enabled; the packets are sent in FIFO order.

You can change the precedence setting, using either a number or name. The names came from RFC 791, but are evolving. You can enable other features that use the values in the set ip precedence route-map configuration command to determine precedence. Table 10 lists the possible numbers and their corresponding name, from least important to most important.

Cisco IOS IP Configuration Guide

IPC-374

Page 420
Image 420
Cisco Systems 78-11741-02 manual IPC-374