Tuesday, August 21, 2012
Cisco CCNP / BSCI Exam Tutorial: Introduction to Policy Routing
Policy routing is an important topic on your BSCI exam, and you will find a little 'policy routing going into production networks today. But what exactly is policy routing?
Policy-based routing, generally referred to as "policy routing", is the use of route maps to determine the location of a package needed to reach its final destination. As you progress through your CCNP studies and go to the CCIE (Cisco or a Quality of Service certification), you will find that the traffic can be "marked" by policy routing so as to give different levels of service to various classes of traffic . (This is done by marking traffic and allocate different classes of traffic in different queues in the router, allowing the administrator to give some traffic higher priority for transmission.)
There are some basic policy routing rules you should know:
Policy routing does not affect the destination of the packet, but affects the path that is taken to get there.
Policy routing can forward traffic based on source IP address or IP address of destination (with the use of an extended ACL).
Routing rules can be configured at the interface, or globally.
The application of policy routing on an interface affects only packets arriving on that interface:
R2 (config) # int s0
R2 (config-if) # ip policy route-map CHANGE_NEXT_HOP
Applying the policy globally applies the route map to packets generated on the router, all packets received on all interfaces.
Whether you're running policy routing at the interface level, on packets created locally, or both, always run the show ip policy command to ensure you have the right route maps on the appropriate interfaces.
R2 # show ip policy
Street Map Interface
Local CHANGE_NEXT_HOP
Serial0 CHANGE_NEXT_HOP
And here is the great rule to remember ....
If a packet does not match any of the specific criteria in a route map, or does not match a line that has an explicit deny statement, the data is sent to the routing process and will be processed normally. If you do not want to route packets that do not meet any criteria Route Map, the set command must be used to send packets to the interface null0. This command should be set to control the final set the route map.
There are four possibilities for an incoming packet when route maps are in use. The following example illustrates all.
R2 (config) # access-list 29 permit host 20.1.1.1
R2 (config) # access-list 30 permit host 20.2.2.2
R2 (config) # access-list 31 permit host section 20.3.3.3
R2 (config) # access-list 32 permit host 20.4.4.4
R2 (config) # route-map EXAMPLE permit 10
R2 (config-route-map) # match ip address 29
R2 (config-route-map) # set ip next-hop 40.1.1.1
R2 (config-route-map) # route-map EXAMPLE permit 20
R2 (config-route-map) # match the IP 30
Assuming the route map is applied to the router ethernet0 interface, a packet from 20.1.1.1 would meet the first line map of your route and have her next-hop IP address set to 40.1.1.1.
A packet from 20.2.2.2 should match the statement following the authorization (sequence number 20). Since there is no action listed, this package would be returned to the routing engine to undergo the normal routing procedure. Any traffic that did not match in these two addresses be routed normally - there would be no action taken by the route map.
Maybe we want to specifically block traffic from section 20.3.3.3 and 20.4.4.4. We can use the instructions of the lots into one single route map, and have packets matching those two addresses sent to the bit bucket - the null0 interface.
R2 (config) # route-map EXAMPLE permit 30
R2 (config-route-map) # match the IP 31
R2 (config-route-map) # match ip address 32
R2 (config-route-map) # set?
as-path Prepend string for a BGP AS-path attribute
Automatic-tag Automatically compute TAG value
comm-list set list BGP communities (for deletion)
community BGP community attribute
Set the parameters of damping BGP strip of wetting of the path
Default set of default information
extcommunity BGP extended community attributes
Interface Output Interface
ip IP specific information
level where import path
local-preference BGP local preference path attribute
metric metric value for the destination routing protocol
metric-type Type of metric for destination routing protocol
origin BGP origin code
tag Tag value for destination routing protocol
weight weight for the BGP routing table
R2 (config-route-map) # set interface null0
Any traffic that matches ACL 31 or 32 will be sent to null0, resulting in its being discarded by the router. All traffic that does not match any route map statements will be returned to the routing engine for normal processing.
Knowing policy routing and how to apply it are essential skills to pass the BSCI exam, earning the CCNP, and become increasingly important in today's job market. Get some 'hands-on practice in a CCNA / CCNP home lab or rack rental to move forward with learning theory, and you will be writing and applying policy routing in no time ....
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment