SlideShare a Scribd company logo
1 of 6
Download to read offline
C H A P T E R
23-1
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
23
Configuring Policy-Based Routing
This chapter describes the tasks for configuring policy-based routing (PBR) on a router and includes
these major sections:
• Overview of Policy-Based Routing, page 23-1
• Policy-Based Routing Configuration Task List, page 23-3
• Policy-Based Routing Configuration Examples, page 23-5
Note For a complete description of the PBR commands in this chapter, refer to the Cisco IOS Quality of
Service Solutions Command Reference at:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tqr/
Note To identify the hardware platform or software image information associated with a feature, use the
Feature Navigator on Cisco.com to search for information about the feature or refer to the software
release notes for a specific release.
Overview of Policy-Based Routing
This section contains the following subsections:
• Understanding PBR, page 23-2
• Understanding PBR Flow Switching, page 23-2
• Using Policy-Based Routing, page 23-2
PBR gives you a flexible means of routing packets by allowing you to configure a defined policy for
traffic flows, lessening reliance on routes derived from routing protocols. To this end, PBR gives you
more control over routing by extending and complementing the existing mechanisms provided by routing
protocols. PBR allows you to specify a path for certain traffic, such as priority traffic over a high-cost
link.
You can set up PBR as a way to route packets based on configured policies. For example, you can
implement routing policies to allow or deny paths based on the identity of a particular end system, an
application protocol, or the size of packets.
23-2
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
Chapter 23 Configuring Policy-Based Routing
Overview of Policy-Based Routing
PBR allows you to perform the following tasks:
• Classify traffic based on extended access list criteria. Access lists, then establish the match criteria.
• Route packets to specific traffic-engineered paths.
Policies can be based on IP address, port numbers, or protocols. For a simple policy, you can use any
one of these descriptors; for a complicated policy, you can use all of them.
Understanding PBR
All packets received on an interface with PBR enabled are passed through enhanced packet filters known
as route maps. The route maps used by PBR dictate the policy, determining to where the packets are
forwarded.
Route maps are composed of statements. The route map statements can be marked as permit or deny, and
they are interpreted in the following ways:
• If a statement is marked as deny, the packets meeting the match criteria are sent back through the
normal forwarding channels and destination-based routing is performed.
• If the statement is marked as permit and a packet matches the access-lists, then the first valid set
clause is applied to that packet.
You specify PBR on the incoming interface (the interface on which packets are received), not outgoing
interface.
Understanding PBR Flow Switching
The Catalyst 4500 switching engine supports matching a “set next-hop” route-map action with a packet
on a permit ACL. All other route-map actions, as well as matches of deny ACLs, are supported by a flow
switching model. In this model, the first packet on a flow that matches a route-map will be delivered to
the software for forwarding. Software determines the correct destination for the packet and installs an
entry into the TCAM so that future packets on that flow are switched in hardware. The Catalyst 4500
switching engine supports a maximum of 4096 flows.
Using Policy-Based Routing
You can enable PBR to change the routing path of certain packets from the obvious shortest path. For
example, PBR can be used to provide the following functionality:
• equal access
• protocol-sensitive routing
• source-sensitive routing
• routing based on interactive versus batch traffic
• routing based on dedicated links
Some applications or traffic can benefit from source-specific routing; for example, you can transfer stock
records to a corporate office on a higher-bandwidth, higher-cost link for a short time while sending
routine application data, such as e-mail, over a lower-bandwidth, lower-cost link.
23-3
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
Chapter 23 Configuring Policy-Based Routing
Policy-Based Routing Configuration Task List
Policy-Based Routing Configuration Task List
To configure PBR, perform the tasks described in the following sections. The task in the first section is
required; the tasks in the remaining sections are optional. See the end of this chapter for the section
“Policy-Based Routing Configuration Examples.”
• Enabling PBR (Required)
• Enabling Local PBR (Optional)
Enabling PBR
To enable PBR, you must create a route map that specifies the match criteria and the resulting action if
all of the match clauses are met. Then you must enable PBR for that route map on a particular interface.
All packets arriving on the specified interface matching the match clauses will be subject to PBR.
To enable PBR on an interface, perform this task:
Command Purpose
Step 1 Switch(config)# route-map map-tag [permit |
deny] [sequence-number]
Defines a route map to control where packets are output. This
command puts the router into route-map configuration mode.
Step 2 Switch(config-route-map)# match ip address
{access-list-number | name}
[...access-list-number | name]
Specifies the match criteria. Matches the source and
destination IP address that is permitted by one or more
standard or extended access lists.
23-4
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
Chapter 23 Configuring Policy-Based Routing
Policy-Based Routing Configuration Task List
The set commands can be used in conjunction with each other. These commands are evaluated in the
order shown in Step 3 in the previous task table. A usable next hop implies an interface. Once the local
router finds a next hop and a usable interface, it routes the packet.
Step 3
Switch(config-route-map)# set ip next-hop
ip-address [... ip-address]
Switch(config-route-map)# set interface
interface-type interface-number
[... type number]
Switch(config-route-map)# set ip default
next-hop ip-address [... ip-address]
Switch(config-route-map)# set default
interface interface-type interface-number [...
type ...number]
Specifies the action or actions to take on the packets that
match the criteria. You can specify any or all of the following:
• Specifies the next hop for which to route the packet (the
next hop must be adjacent). This behavior is identical to
a next hop specified in the normal routing table.
• Sets output interface for the packet. This action specifies
that the packet is forwarded out of the local interface. The
interface must be a Layer 3 interface (no switchports),
and the destination address in the packet must lie within
the IP network assigned to that interface. If the
destination address for the packet does not lie within that
network, the packet is dropped.
• Sets next hop to which to route the packet if there is no
explicit route for this destination. Before forwarding the
packet to the next hop, the switch looks up the packet’s
destination address in the unicast routing table. If a match
is found, the packet is forwarded by way of the routing
table. If no match is found, the packet is forwarded to the
specified next hop.
• Sets output interface for the packet if there is no explicit
route for this destination. Before forwarding the packet to
the next hop, the switch looks up the packet’s destination
address in the unicast routing table. If a match is found,
the packet is forwarded via the routing table. If no match
is found, the packet is forwarded to the specified output
interface. If the destination address for the packet does
not lie within that network, the packet is dropped.
Step 4 Switch(config-route-map)# interface
interface-type interface-number
Specifies the interface. This command puts the router into
interface configuration mode.
Step 5 Switch(config-if)# ip policy route-map map-tag Identifies the route map to use for PBR. One interface can
only have one route map tag, but you can have multiple route
map entries with different sequence numbers. These entries
are evaluated in sequence number order until the first match.
If there is no match, packets will be routed as usual.
Command Purpose
23-5
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
Chapter 23 Configuring Policy-Based Routing
Policy-Based Routing Configuration Examples
Enabling Local PBR
Packets that are generated by the router are not normally policy-routed. To enable local PBR for such
packets, indicate which route map the router should use by performing this task:
All packets originating on the router will then be subject to local PBR.
Use the show ip local policy command to display the route map used for local PBR, if one exists.
Unsupported Commands
The following PBR commands in config-route-map mode are in the CLI but not supported in Cisco IOS
for the Catalyst 4500 series switches. If you attempt to use these commands, an error message displays.
• match-length
• set ip qos
• set ip tos
• set ip precedence
Policy-Based Routing Configuration Examples
The following sections provide PBR configuration examples:
• Equal Access Example, page 23-5
• Differing Next Hops Example, page 23-6
• Deny ACE Example, page 23-6
For information on how to configure policy-based routing, see the section “Policy-Based Routing
Configuration Task List” in this chapter.
Equal Access Example
The following example provides two sources with equal access to two different service providers.
Packets arriving on interface fastethernet 3/1 from the source 1.1.1.1 are sent to the router at 6.6.6.6 if
the router has no explicit route for the destination of the packet. Packets arriving from the source 2.2.2.2
are sent to the router at 7.7.7.7 if the router has no explicit route for the destination of the packet. All
other packets for which the router has no explicit route to the destination are discarded.
Switch (config)# access-list 1 permit ip 1.1.1.1
access-list 1 permit ip 1.1.1.1
!
interface fastethernet 3/1
ip policy route-map equal-access
Command Purpose
Switch(config)# ip local policy route-map map-tag Identifies the route map to use for local PBR.
23-6
Software Configuration Guide—Release 12.2(20)EW
78-16453-01 A1
Chapter 23 Configuring Policy-Based Routing
Policy-Based Routing Configuration Examples
!
route-map equal-access permit 10
match ip address 1
set ip default next-hop 6.6.6.6
route-map equal-access permit 20
match ip address 2
set ip default next-hop 7.7.7.7
route-map equal-access permit 30
set default interface null0
Note If the packets you want to drop do not match either of the first two route-map clauses, then change set
default interface null0 to set interface null0.
Differing Next Hops Example
The following example illustrates how to route traffic from different sources to different places (next
hops). Packets arriving from source 1.1.1.1 are sent to the next hop at 3.3.3.3; packets arriving from
source 2.2.2.2 are sent to the next hop at 3.3.3.5.
access-list 1 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5
Deny ACE Example
The following example illustrates how to stop processing a given route map sequence, and to jump to
the next sequence. Packets arriving from source 1.1.1.1 will skip sequence 10 and jump to sequence 20.
All other packets from subnet 1.1.1.0 will follow the set statement in sequence 10.
access-list 1 deny ip 1.1.1.1
access-list 1 permit ip 1.1.1.0 0.0.0.255
access-list 2 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5

More Related Content

What's hot

Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting Assim Mubder
 
Cellular network planning_and_optimization_part11
Cellular network planning_and_optimization_part11Cellular network planning_and_optimization_part11
Cellular network planning_and_optimization_part11Farzad Ramin
 
3g counter & timer
3g counter & timer3g counter & timer
3g counter & timerTABREZ KHAN
 
3 ip routing bgp-updated
3 ip routing bgp-updated3 ip routing bgp-updated
3 ip routing bgp-updatedSagarR24
 
BICC protocol and application
BICC protocol and applicationBICC protocol and application
BICC protocol and applicationIsybel Harto
 
2 g training optimization
2 g training optimization2 g training optimization
2 g training optimizationAhmed Gad
 
2G optimization_with_optima
2G optimization_with_optima2G optimization_with_optima
2G optimization_with_optimaZIZI Yahia
 
Energy efficiency in ieee 802.11 standard wlan through mwtdp
Energy efficiency in ieee 802.11 standard wlan through mwtdpEnergy efficiency in ieee 802.11 standard wlan through mwtdp
Energy efficiency in ieee 802.11 standard wlan through mwtdpeSAT Journals
 
Energy efficiency in ieee 802.11 standard wlan through
Energy efficiency in ieee 802.11 standard wlan throughEnergy efficiency in ieee 802.11 standard wlan through
Energy efficiency in ieee 802.11 standard wlan througheSAT Publishing House
 
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysis
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysisEMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysis
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysisEMERSON EDUARDO RODRIGUES
 

What's hot (20)

Harq
HarqHarq
Harq
 
Drive test final
Drive test  finalDrive test  final
Drive test final
 
Routing
RoutingRouting
Routing
 
Routing
RoutingRouting
Routing
 
TEMS PARAMETER (3G)
TEMS PARAMETER (3G)TEMS PARAMETER (3G)
TEMS PARAMETER (3G)
 
2 g data call flow
2 g data call flow2 g data call flow
2 g data call flow
 
Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting
 
Cellular network planning_and_optimization_part11
Cellular network planning_and_optimization_part11Cellular network planning_and_optimization_part11
Cellular network planning_and_optimization_part11
 
3g counter & timer
3g counter & timer3g counter & timer
3g counter & timer
 
11 routing
11 routing11 routing
11 routing
 
3 ip routing bgp-updated
3 ip routing bgp-updated3 ip routing bgp-updated
3 ip routing bgp-updated
 
BICC protocol and application
BICC protocol and applicationBICC protocol and application
BICC protocol and application
 
2 g training optimization
2 g training optimization2 g training optimization
2 g training optimization
 
2G optimization_with_optima
2G optimization_with_optima2G optimization_with_optima
2G optimization_with_optima
 
Energy efficiency in ieee 802.11 standard wlan through mwtdp
Energy efficiency in ieee 802.11 standard wlan through mwtdpEnergy efficiency in ieee 802.11 standard wlan through mwtdp
Energy efficiency in ieee 802.11 standard wlan through mwtdp
 
Energy efficiency in ieee 802.11 standard wlan through
Energy efficiency in ieee 802.11 standard wlan throughEnergy efficiency in ieee 802.11 standard wlan through
Energy efficiency in ieee 802.11 standard wlan through
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Ps call flow
Ps call flowPs call flow
Ps call flow
 
c1 & c2 values
c1 & c2 values c1 & c2 values
c1 & c2 values
 
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysis
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysisEMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysis
EMERSON EDUARDO RODRIGUES huawei-gsm-bss-kpi-analysis
 

Viewers also liked

Monday november 8, 2010
Monday november 8, 2010Monday november 8, 2010
Monday november 8, 2010Allison Meyer
 
Enfriamiento de reactor
Enfriamiento de reactorEnfriamiento de reactor
Enfriamiento de reactorBxxxn
 
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...fabio998
 
Monday november 8, 2010
Monday november 8, 2010Monday november 8, 2010
Monday november 8, 2010Allison Meyer
 
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...fabio998
 
POLIKI-POLIKI Youth Hostel
POLIKI-POLIKI Youth HostelPOLIKI-POLIKI Youth Hostel
POLIKI-POLIKI Youth HostelIsa Ruf
 
Best Man's Speech for Martin and Jodi's wedding
Best Man's Speech for Martin and Jodi's weddingBest Man's Speech for Martin and Jodi's wedding
Best Man's Speech for Martin and Jodi's weddingSqueeze Digital Marketing
 
Reading Typography—Writing Typography
Reading Typography—Writing TypographyReading Typography—Writing Typography
Reading Typography—Writing TypographyOliver Reichenstein
 
Vozeal publishers
Vozeal publishersVozeal publishers
Vozeal publishersManan Shah
 
The good, the bad, the pretty and the ugly
The good, the bad, the pretty and the uglyThe good, the bad, the pretty and the ugly
The good, the bad, the pretty and the uglyOliver Reichenstein
 
Design guidelines announced in I/O 2014. Material Design by Google by Betaglide
Design guidelines announced in I/O 2014. Material Design by Google by BetaglideDesign guidelines announced in I/O 2014. Material Design by Google by Betaglide
Design guidelines announced in I/O 2014. Material Design by Google by BetaglideManan Shah
 

Viewers also liked (18)

Monday november 8, 2010
Monday november 8, 2010Monday november 8, 2010
Monday november 8, 2010
 
Archeologia Virtuale: dalla carta allo schermo
Archeologia Virtuale: dalla carta allo schermoArcheologia Virtuale: dalla carta allo schermo
Archeologia Virtuale: dalla carta allo schermo
 
Ccna full
Ccna fullCcna full
Ccna full
 
Enfriamiento de reactor
Enfriamiento de reactorEnfriamiento de reactor
Enfriamiento de reactor
 
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...
Un simulatore in C++ basato su GEANT4 per lo studio di sensori nella Tomograf...
 
Test
TestTest
Test
 
The Art of Reduction
The Art of ReductionThe Art of Reduction
The Art of Reduction
 
Acquisition d'entreprise - enjeux et solutions
Acquisition d'entreprise  - enjeux et solutionsAcquisition d'entreprise  - enjeux et solutions
Acquisition d'entreprise - enjeux et solutions
 
Monday november 8, 2010
Monday november 8, 2010Monday november 8, 2010
Monday november 8, 2010
 
Norms for educational building
Norms for educational buildingNorms for educational building
Norms for educational building
 
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...
Presentazione tesi: "Un simulatore in C++ basato su GEANT4 per lo studio di s...
 
POLIKI-POLIKI Youth Hostel
POLIKI-POLIKI Youth HostelPOLIKI-POLIKI Youth Hostel
POLIKI-POLIKI Youth Hostel
 
Roma: il Colosseo
Roma: il ColosseoRoma: il Colosseo
Roma: il Colosseo
 
Best Man's Speech for Martin and Jodi's wedding
Best Man's Speech for Martin and Jodi's weddingBest Man's Speech for Martin and Jodi's wedding
Best Man's Speech for Martin and Jodi's wedding
 
Reading Typography—Writing Typography
Reading Typography—Writing TypographyReading Typography—Writing Typography
Reading Typography—Writing Typography
 
Vozeal publishers
Vozeal publishersVozeal publishers
Vozeal publishers
 
The good, the bad, the pretty and the ugly
The good, the bad, the pretty and the uglyThe good, the bad, the pretty and the ugly
The good, the bad, the pretty and the ugly
 
Design guidelines announced in I/O 2014. Material Design by Google by Betaglide
Design guidelines announced in I/O 2014. Material Design by Google by BetaglideDesign guidelines announced in I/O 2014. Material Design by Google by Betaglide
Design guidelines announced in I/O 2014. Material Design by Google by Betaglide
 

Similar to Configure Policy-Based Routing on Cisco Router

Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routingphanleson
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrpSagarR24
 
3 ip routing part b
3 ip routing part b3 ip routing part b
3 ip routing part bSagarR24
 
3 ip routing vrf lite - v2
3 ip routing   vrf lite - v23 ip routing   vrf lite - v2
3 ip routing vrf lite - v2SagarR24
 
3 ip routing pbr bfd -v2
3 ip routing   pbr bfd -v23 ip routing   pbr bfd -v2
3 ip routing pbr bfd -v2SagarR24
 
BSCI30S05 Redistribution, DHCP.pptx
BSCI30S05 Redistribution, DHCP.pptxBSCI30S05 Redistribution, DHCP.pptx
BSCI30S05 Redistribution, DHCP.pptxsumankumar770546
 
3a.Error detection provides for accurate data transfer. Indeed, if.pdf
3a.Error detection provides for accurate data transfer. Indeed, if.pdf3a.Error detection provides for accurate data transfer. Indeed, if.pdf
3a.Error detection provides for accurate data transfer. Indeed, if.pdfapexjaipur
 
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docx
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docxITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docx
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docxsleeperfindley
 
Routing table : Notes
Routing table : NotesRouting table : Notes
Routing table : NotesSubhajit Sahu
 
SRWE_Module_14.pptx
SRWE_Module_14.pptxSRWE_Module_14.pptx
SRWE_Module_14.pptxRobinRohit2
 
SRWE_Module_14.pptx
SRWE_Module_14.pptxSRWE_Module_14.pptx
SRWE_Module_14.pptxNguyenNM
 
Ccna 2 chapter 3 v4.0 answers 2011
Ccna 2 chapter 3 v4.0 answers 2011Ccna 2 chapter 3 v4.0 answers 2011
Ccna 2 chapter 3 v4.0 answers 2011Dân Chơi
 
Tcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptxTcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptxVINAYTANWAR18
 
Cisco routingtable2 lookup
Cisco routingtable2 lookupCisco routingtable2 lookup
Cisco routingtable2 lookupMakram Ghazzaoui
 
Policy Based Routing (PBR)
Policy Based Routing (PBR)Policy Based Routing (PBR)
Policy Based Routing (PBR)KHNOG
 

Similar to Configure Policy-Based Routing on Cisco Router (20)

Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
 
ENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptxENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptx
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrp
 
3 ip routing part b
3 ip routing part b3 ip routing part b
3 ip routing part b
 
Lec7
Lec7Lec7
Lec7
 
Group 1
Group 1Group 1
Group 1
 
3 ip routing vrf lite - v2
3 ip routing   vrf lite - v23 ip routing   vrf lite - v2
3 ip routing vrf lite - v2
 
3 ip routing pbr bfd -v2
3 ip routing   pbr bfd -v23 ip routing   pbr bfd -v2
3 ip routing pbr bfd -v2
 
BSCI30S05 Redistribution, DHCP.pptx
BSCI30S05 Redistribution, DHCP.pptxBSCI30S05 Redistribution, DHCP.pptx
BSCI30S05 Redistribution, DHCP.pptx
 
Routing basic
Routing basicRouting basic
Routing basic
 
3a.Error detection provides for accurate data transfer. Indeed, if.pdf
3a.Error detection provides for accurate data transfer. Indeed, if.pdf3a.Error detection provides for accurate data transfer. Indeed, if.pdf
3a.Error detection provides for accurate data transfer. Indeed, if.pdf
 
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docx
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docxITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docx
ITNE2003 -  AssignmentLearning ObjectivesUpon completion of this.docx
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Routing table : Notes
Routing table : NotesRouting table : Notes
Routing table : Notes
 
SRWE_Module_14.pptx
SRWE_Module_14.pptxSRWE_Module_14.pptx
SRWE_Module_14.pptx
 
SRWE_Module_14.pptx
SRWE_Module_14.pptxSRWE_Module_14.pptx
SRWE_Module_14.pptx
 
Ccna 2 chapter 3 v4.0 answers 2011
Ccna 2 chapter 3 v4.0 answers 2011Ccna 2 chapter 3 v4.0 answers 2011
Ccna 2 chapter 3 v4.0 answers 2011
 
Tcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptxTcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptx
 
Cisco routingtable2 lookup
Cisco routingtable2 lookupCisco routingtable2 lookup
Cisco routingtable2 lookup
 
Policy Based Routing (PBR)
Policy Based Routing (PBR)Policy Based Routing (PBR)
Policy Based Routing (PBR)
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Configure Policy-Based Routing on Cisco Router

  • 1. C H A P T E R 23-1 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 23 Configuring Policy-Based Routing This chapter describes the tasks for configuring policy-based routing (PBR) on a router and includes these major sections: • Overview of Policy-Based Routing, page 23-1 • Policy-Based Routing Configuration Task List, page 23-3 • Policy-Based Routing Configuration Examples, page 23-5 Note For a complete description of the PBR commands in this chapter, refer to the Cisco IOS Quality of Service Solutions Command Reference at: http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tqr/ Note To identify the hardware platform or software image information associated with a feature, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. Overview of Policy-Based Routing This section contains the following subsections: • Understanding PBR, page 23-2 • Understanding PBR Flow Switching, page 23-2 • Using Policy-Based Routing, page 23-2 PBR gives you a flexible means of routing packets by allowing you to configure a defined policy for traffic flows, lessening reliance on routes derived from routing protocols. To this end, PBR gives you more control over routing by extending and complementing the existing mechanisms provided by routing protocols. PBR allows you to specify a path for certain traffic, such as priority traffic over a high-cost link. You can set up PBR as a way to route packets based on configured policies. For example, you can implement routing policies to allow or deny paths based on the identity of a particular end system, an application protocol, or the size of packets.
  • 2. 23-2 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 Chapter 23 Configuring Policy-Based Routing Overview of Policy-Based Routing PBR allows you to perform the following tasks: • Classify traffic based on extended access list criteria. Access lists, then establish the match criteria. • Route packets to specific traffic-engineered paths. Policies can be based on IP address, port numbers, or protocols. For a simple policy, you can use any one of these descriptors; for a complicated policy, you can use all of them. Understanding PBR All packets received on an interface with PBR enabled are passed through enhanced packet filters known as route maps. The route maps used by PBR dictate the policy, determining to where the packets are forwarded. Route maps are composed of statements. The route map statements can be marked as permit or deny, and they are interpreted in the following ways: • If a statement is marked as deny, the packets meeting the match criteria are sent back through the normal forwarding channels and destination-based routing is performed. • If the statement is marked as permit and a packet matches the access-lists, then the first valid set clause is applied to that packet. You specify PBR on the incoming interface (the interface on which packets are received), not outgoing interface. Understanding PBR Flow Switching The Catalyst 4500 switching engine supports matching a “set next-hop” route-map action with a packet on a permit ACL. All other route-map actions, as well as matches of deny ACLs, are supported by a flow switching model. In this model, the first packet on a flow that matches a route-map will be delivered to the software for forwarding. Software determines the correct destination for the packet and installs an entry into the TCAM so that future packets on that flow are switched in hardware. The Catalyst 4500 switching engine supports a maximum of 4096 flows. Using Policy-Based Routing You can enable PBR to change the routing path of certain packets from the obvious shortest path. For example, PBR can be used to provide the following functionality: • equal access • protocol-sensitive routing • source-sensitive routing • routing based on interactive versus batch traffic • routing based on dedicated links Some applications or traffic can benefit from source-specific routing; for example, you can transfer stock records to a corporate office on a higher-bandwidth, higher-cost link for a short time while sending routine application data, such as e-mail, over a lower-bandwidth, lower-cost link.
  • 3. 23-3 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 Chapter 23 Configuring Policy-Based Routing Policy-Based Routing Configuration Task List Policy-Based Routing Configuration Task List To configure PBR, perform the tasks described in the following sections. The task in the first section is required; the tasks in the remaining sections are optional. See the end of this chapter for the section “Policy-Based Routing Configuration Examples.” • Enabling PBR (Required) • Enabling Local PBR (Optional) Enabling PBR To enable PBR, you must create a route map that specifies the match criteria and the resulting action if all of the match clauses are met. Then you must enable PBR for that route map on a particular interface. All packets arriving on the specified interface matching the match clauses will be subject to PBR. To enable PBR on an interface, perform this task: Command Purpose Step 1 Switch(config)# route-map map-tag [permit | deny] [sequence-number] Defines a route map to control where packets are output. This command puts the router into route-map configuration mode. Step 2 Switch(config-route-map)# match ip address {access-list-number | name} [...access-list-number | name] Specifies the match criteria. Matches the source and destination IP address that is permitted by one or more standard or extended access lists.
  • 4. 23-4 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 Chapter 23 Configuring Policy-Based Routing Policy-Based Routing Configuration Task List The set commands can be used in conjunction with each other. These commands are evaluated in the order shown in Step 3 in the previous task table. A usable next hop implies an interface. Once the local router finds a next hop and a usable interface, it routes the packet. Step 3 Switch(config-route-map)# set ip next-hop ip-address [... ip-address] Switch(config-route-map)# set interface interface-type interface-number [... type number] Switch(config-route-map)# set ip default next-hop ip-address [... ip-address] Switch(config-route-map)# set default interface interface-type interface-number [... type ...number] Specifies the action or actions to take on the packets that match the criteria. You can specify any or all of the following: • Specifies the next hop for which to route the packet (the next hop must be adjacent). This behavior is identical to a next hop specified in the normal routing table. • Sets output interface for the packet. This action specifies that the packet is forwarded out of the local interface. The interface must be a Layer 3 interface (no switchports), and the destination address in the packet must lie within the IP network assigned to that interface. If the destination address for the packet does not lie within that network, the packet is dropped. • Sets next hop to which to route the packet if there is no explicit route for this destination. Before forwarding the packet to the next hop, the switch looks up the packet’s destination address in the unicast routing table. If a match is found, the packet is forwarded by way of the routing table. If no match is found, the packet is forwarded to the specified next hop. • Sets output interface for the packet if there is no explicit route for this destination. Before forwarding the packet to the next hop, the switch looks up the packet’s destination address in the unicast routing table. If a match is found, the packet is forwarded via the routing table. If no match is found, the packet is forwarded to the specified output interface. If the destination address for the packet does not lie within that network, the packet is dropped. Step 4 Switch(config-route-map)# interface interface-type interface-number Specifies the interface. This command puts the router into interface configuration mode. Step 5 Switch(config-if)# ip policy route-map map-tag Identifies the route map to use for PBR. One interface can only have one route map tag, but you can have multiple route map entries with different sequence numbers. These entries are evaluated in sequence number order until the first match. If there is no match, packets will be routed as usual. Command Purpose
  • 5. 23-5 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 Chapter 23 Configuring Policy-Based Routing Policy-Based Routing Configuration Examples Enabling Local PBR Packets that are generated by the router are not normally policy-routed. To enable local PBR for such packets, indicate which route map the router should use by performing this task: All packets originating on the router will then be subject to local PBR. Use the show ip local policy command to display the route map used for local PBR, if one exists. Unsupported Commands The following PBR commands in config-route-map mode are in the CLI but not supported in Cisco IOS for the Catalyst 4500 series switches. If you attempt to use these commands, an error message displays. • match-length • set ip qos • set ip tos • set ip precedence Policy-Based Routing Configuration Examples The following sections provide PBR configuration examples: • Equal Access Example, page 23-5 • Differing Next Hops Example, page 23-6 • Deny ACE Example, page 23-6 For information on how to configure policy-based routing, see the section “Policy-Based Routing Configuration Task List” in this chapter. Equal Access Example The following example provides two sources with equal access to two different service providers. Packets arriving on interface fastethernet 3/1 from the source 1.1.1.1 are sent to the router at 6.6.6.6 if the router has no explicit route for the destination of the packet. Packets arriving from the source 2.2.2.2 are sent to the router at 7.7.7.7 if the router has no explicit route for the destination of the packet. All other packets for which the router has no explicit route to the destination are discarded. Switch (config)# access-list 1 permit ip 1.1.1.1 access-list 1 permit ip 1.1.1.1 ! interface fastethernet 3/1 ip policy route-map equal-access Command Purpose Switch(config)# ip local policy route-map map-tag Identifies the route map to use for local PBR.
  • 6. 23-6 Software Configuration Guide—Release 12.2(20)EW 78-16453-01 A1 Chapter 23 Configuring Policy-Based Routing Policy-Based Routing Configuration Examples ! route-map equal-access permit 10 match ip address 1 set ip default next-hop 6.6.6.6 route-map equal-access permit 20 match ip address 2 set ip default next-hop 7.7.7.7 route-map equal-access permit 30 set default interface null0 Note If the packets you want to drop do not match either of the first two route-map clauses, then change set default interface null0 to set interface null0. Differing Next Hops Example The following example illustrates how to route traffic from different sources to different places (next hops). Packets arriving from source 1.1.1.1 are sent to the next hop at 3.3.3.3; packets arriving from source 2.2.2.2 are sent to the next hop at 3.3.3.5. access-list 1 permit ip 1.1.1.1 access-list 2 permit ip 2.2.2.2 ! interface fastethernet 3/1 ip policy route-map Texas ! route-map Texas permit 10 match ip address 1 set ip next-hop 3.3.3.3 ! route-map Texas permit 20 match ip address 2 set ip next-hop 3.3.3.5 Deny ACE Example The following example illustrates how to stop processing a given route map sequence, and to jump to the next sequence. Packets arriving from source 1.1.1.1 will skip sequence 10 and jump to sequence 20. All other packets from subnet 1.1.1.0 will follow the set statement in sequence 10. access-list 1 deny ip 1.1.1.1 access-list 1 permit ip 1.1.1.0 0.0.0.255 access-list 2 permit ip 1.1.1.1 access-list 2 permit ip 2.2.2.2 ! interface fastethernet 3/1 ip policy route-map Texas ! route-map Texas permit 10 match ip address 1 set ip next-hop 3.3.3.3 ! route-map Texas permit 20 match ip address 2 set ip next-hop 3.3.3.5