Wednesday, March 16, 2011

notes: Policy Base Routing (PBR)

enables you to implement policies that selectively cause packets to take different paths; this enables you to vary from the typical destination-based approach of IP. For example, you can easily configure routes to flow based on source address information. You can also mark traffic with different type of service (ToS) configurations. You implement PBR through the use of route maps to implement policy.


PBR (Policy-Based Routing) is a more flexible mechanism for routing packets than destination-based routing is.

- PBR allows control of traffic flow based on:
Source/Destination
Protocol type
Incoming interface

- Traffic that is denied by the policy-map will get routed normally.

PBR must be configured before PBR fast switching can be enabled. Fast switching of PBR is disabled by default. To configure fast-switched PBR, use the ip route-cache policy command in interface configuration mode.

- MATCH options:

as-path
community
extcommunity
interface
ip
length
local-preference
metric
route-type
source-protocol
tag


SET options:
as-path
community
dampening
extcommunity
interface
default interface
ip next-hop
ip default next-hop
ip next-hop verify-availability
local-preference
metric
metric-type
tag
weight

command:

incoming traffic:

interface:

ip policy route-map [route-map]


local Policy Routing

same as normal policy routing, excep it affects locally generated traffic from the router instead of traffic received inbound on an interface.

eventhough there is no route to the destination Local Policy routing can set it to using next-hop.

Pitfall:

normally the router uses the ip address of the outgoing interface in the routing table as the source IP address in its own packets. since routing table is not consulted for the lookup you may see inconsistencies in what the source address of the local traffic is.

config-set

ip local policy route-map LOCAL_POLICY
!
ip access-list extended TO_R4
permit ip any host 150.1.4.4
!
ip access-list extended TO_R5
permit ip any host 150.1.5.5
!
route-map LOCAL_POLICY permit 10
match ip address TO_R4
set ip next-hop 155.1.0.5
!
route-map LOCAL_POLICY permit 20
match ip address TO_R5
set ip next-hop 155.1.146.4

No comments:

Post a Comment