Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2003, Cisco Systems, Inc. All rights reserved..

Similar presentations


Presentation on theme: "© 2003, Cisco Systems, Inc. All rights reserved.."— Presentation transcript:

1 © 2003, Cisco Systems, Inc. All rights reserved.

2 2 Building Scalable Cisco Internetworks (BSCI) Version 2.0 Instructor Name

3 Manipulating Routing Updates © 2003, Cisco Systems, Inc. All rights reserved. 3

4 Policy-Based Routing © 2003, Cisco Systems, Inc. All rights reserved. 4

5 BSCI 2.0—6-5 Objectives Upon completing this lesson, you will be able to: List the advantages of policy-based routing (PBR) Describe how PBR is implemented using route maps Configure PBR Use the show and debug commands to verify PBR

6 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-6 Policy-Based Routing PBR allows you to implement policies that selectively cause packets to take different paths. –IP routing is typically destination-based. –PBR allows for source-based routing. You can also mark traffic with different type of service (ToS) configurations. PBR requires a route map to implement policy.

7 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-7 Policy-Based Routing Benefits PBR has the following benefits: Source-based transit provider selection –Different users go different ways QoS –Sets precedence or ToS; used with queuing Load sharing –Force load sharing without regard to routing table

8 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-8 Defining Policies Using a Route Map Applied to incoming packets Implemented using route maps as follows: –Matching routes modified by set commands. –If match criteria is met and route map specifies permit, policy route as specified by the set command. –If match criteria is met and route map specifies deny, use normal (destination-based) routing. –If all sequences in the list have been checked and there are no matches, use normal (destination- based) routing.

9 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-9 match ip address {access-list-number | name} [...access-list-number | name] match ip address {access-list-number | name} [...access-list-number | name] Router(config-route-map)# Matches IP addresses for policy routing Policy Routing match Commands match length min max Router(config-route-map)# Matches layer 3 length of packet for policy routing

10 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-10 set ip next-hop ip-address [...ip-address] Router(config-route-map)# Defines next hop to output packets Policy Routing set Commands set interface type number [...type number] Router(config-route-map)# Defines interface to output packets that have an explicit route to the destination

11 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-11 set ip default next-hop ip-address [...ip-address] Router(config-route-map)# Defines next hop to output packets that have no explicit route to the destination Policy Routing set Commands (Cont.) set default interface type number [...type number] Router(config-route-map)# Defines interface to output packets that have no explicit route to the destination Recommended only for point-to-point links

12 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-12 ip policy route-map map-tag Router(config-if)# Specifies a route map to use for policy routing on an incoming interface that is receiving the packets that need to be policy-routed Configuring Policy-Based Routing ip route-cache policy Router(config-if)# Enables fast-switched policy routing

13 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-13 Example: PBR Equal Access All traffic using a default route and sourced from subnet 1.1.0.0 should go through ISP A. All traffic using a default route and sourced from subnet 1.2.0.0 should go through ISP B.

14 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-14 Example: PBR Equal Access (Cont.) RouterA(config)# access-list 1 permit ip 1.1.0.0 0.0.255.255 RouterA(config)# access-list 2 permit ip 1.2.0.0 0.0.255.255 RouterA(config)# route-map equal-access permit 10 RouterA(config-route-map)# match ip address 1 RouterA(config-route-map)# set ip default next-hop 6.6.6.6 RouterA(config-route-map)# route-map equal-access permit 20 RouterA(config-route-map)# match ip address 2 RouterA(config-route-map)# set ip default next-hop 7.7.7.7 RouterA(config-route-map)# route-map equal-access permit 30 RouterA(config-route-map)# set default interface null0 RouterA(config)# interface ethernet 0 RouterA(config-if)# ip address 1.1.1.1 255.255.255.0 RouterA(config-if)# ip policy route-map equal-access RouterA(config)# interface serial 0 RouterA(config-if)# ip address 6.6.6.5 255.255.255.0 RouterA(config)# interface serial 1 RouterA(config-if)# ip address 7.7.7.6 255.255.255.0

15 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-15 show ip policy Router# Displays route maps configured on interfaces Verifying Policy-Based Routing show route-map [map-name] Router# Displays a route map

16 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-16 debug ip policy Router# Enables display of IP policy routing events Verifying Policy-Based Routing (Cont.) traceroute Router# Extended traceroute allows specification of source address ping Router# Extended ping allows specification of source address

17 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-17 Verifying Policy-Based Routing Examples RouterA# show ip policy Interface Route map Ethernet0 equal-access RouterA# show route-map route-map equal-access, permit, sequence 10 Match clauses: ip address (access-lists): 1 Set clauses: ip default next-hop 6.6.6.6 Policy routing matches: 3 packets, 168 bytes route-map equal-access, permit, sequence 20 Match clauses: ip address (access-lists): 2 Set clauses: ip default next-hop 7.7.7.7 route-map equal-access, permit, sequence 30 Set clauses: default interface null0

18 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-18 Verifying Policy-Based Routing Examples (Cont.) RouterA# debug ip policy Policy routing debugging is on 11:51:25: IP: s=1.1.1.1 (Ethernet0), d=190.168.1.1, len 100, policy match 11:51:25: IP: route map equal-access, item 10, permit 11:51:25: IP: s=1.1.1.1 (Ethernet0), d=190.168.1.1 (Serial0), len 100, policy routed 11:51:25: IP: Ethernet0 to Serial0 6.6.6.6

19 © 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—6-19 Summary This lesson presented these key points: PBR offers significant benefits in terms of implementing user-defined policies to control traffic in the internetwork. The benefits achieved by implementing PBR in a network include source-based transit provider selection, QoS, cost savings, and load sharing. PBR uses route maps to implement routing policy. PBR match criteria are established using the match ip address and match length commands. Various set commands are used to specify the criteria for forwarding packets through the router. PBR is sometimes implemented on a router to manage traffic to ISPs. PBR is used to traffic shape or load balance traffic from routers to a number of ISPs. PBR show and debug commands are used to verify that a configured policy is working properly.

20


Download ppt "© 2003, Cisco Systems, Inc. All rights reserved.."

Similar presentations


Ads by Google