Name

ip local policy route-map — global

Synopsis

ip local policy route-map map
no ip local policy route-map map
            

Configures

Policy routing

Default

None

Description

This command enables local policy routing. In brief, policy routing means using criteria other than the shortest path to the destination (as computed by a routing protocol) for route selection. The map parameter is the name of a route map that specifies the routing policy. Unlike the ip policy command, which applies a routing policy to a single interface, this command applies the policy to traffic originating on the router.

Example

In this example, a route map named map1 states that any traffic that matching access list 101 will be routed to the 10.1.1.1 router. Access list 101 matches all IP traffic destined for network 10.1.5.0/24. The ip local policy command is used to apply this route map, effectively routing all traffic for 10.1.5.0 through 10.1.1.1 regardless of what the routing protocols might tell the router to do. There are many possible reasons for this policy—for example, the traffic for 10.1.5.0 might be highly confidential, and we want to make sure that it passes only through trusted routers.

access-list 101 permit ip 10.1.5.0 0.0.0.255 any
!
ip local policy route-map map1
!
route-map map1
  match ip address 101
  set ip next-hop 10.1.1.1

Get CISCO IOS in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.