PfR is designed to make the best use of available bandwidth, but it does not solve the problem of over-subscribed bandwidth.
Stages
- Learn
- Measure
- Apply Policy
- Enforce
- Verify
Learn
BRs learn interesting applications (traffic classes) using destination prefix with or without port, dscp, source prefix or even application using NBAR.
This profiling process can be automatic or configured manually.
- Automatic
MC(config)#key chain key1MC(config-keychain)#key 1MC(config-keychain-key)#key-string ciscoMC(config)#oer masterMC(config-oer-mc)#loggingMC(config-oer-mc)#border 10.0.1.1 key-chain key1MC(config-oer-mc-br)#interface fa0/0 internalMC(config-oer-mc-br)#interface fa0/1 externalMC(config-oer-mc)#border 10.0.2.1 key-chain key1MC(config-oer-mc-br)#interface fa0/0 internalMC(config-oer-mc-br)#interface fa0/1 externalMC(config-oer-mc)#learnMC(config-oer-mc-learn)#throughputMC(config-oer-mc-learn)#monitor 1MC(config-oer-mc-learn)#periodic 0
- Manual
MC(config)#ip prefix-list FILTERBRANCH1 seq 10 permit 10.1.1.0/24MC(config)#ip prefix-list FILTERBRANCH1 seq 20 permit 10.1.2.0/24MC(config)#ip prefix-list FILTERBRANCH2 seq 10 permit 10.2.1.0/24MC(config)#ip prefix-list FILTERBRANCH2 seq 20 permit 10.2.2.0/24MC(config)#ip access-list extended MYAPPMC(config-ext-nacl)#permit tcp any any eq 21MC(config)#oer-map MYMAP 10MC(config-oer-map)#match traffic-class application telnet prefix-list FILTERBRANCH1MC(config-oer-map)#set mode select-exit goodMC(config-oer-map)#set delay threshold 2000MC(config-oer-map)#set mode route controlMC(config-oer-map)#set mode monitor bothMC(config-oer-map)#no set resolve delayMC(config-oer-map)#set active-probe echo 10.1.1.10! IP SLA probe MC(config)#oer-map MYMAP 20MC(config-oer-map)#match traffic-class application http prefix-list FILTERBRANCH2MC(config-oer-map)#set mode select-exit goodMC(config-oer-map)#set delay threshold 2000MC(config-oer-map)#set mode route controlMC(config-oer-map)#set mode monitor bothMC(config-oer-map)#no set resolve delayMC(config)#oer-map MYMAP 30MC(config-oer-map)#traffic-class access-list MY_APP filter FILTERBRANCH2MC(config-oer-map)#set mode select-exit goodMC(config-oer-map)#set delay threshold 2000MC(config-oer-map)#set mode route controlMC(config-oer-map)#set mode monitor bothMC(config-oer-map)#no set resolve delayMC(config-oer-map)#set active-probe echo 10.1.3.10! IP SLA probe MC(config)#oer masterMC(config-oer-mc)#policy-rules MYMAPMC(config-oer-mc)#loggingMC(config-oer-mc)#border 10.1.0.1 key-chain key1MC(config-oer-mc-br)#interface fa0/0 internalMC(config-oer-mc-br)#interface fa0/1 externalMC(config-oer-mc)#border 10.2.0.1 key-chain key1MC(config-oer-mc-br)#interface fa0/0 internalMC(config-oer-mc-br)#interface fa0/1 external
Measure
Collect traffic class statistics.
The monitor modes are: passive (Netflow), active (IP SLA), both (Netflow + IP SLA), fast and special (cat6k).
Apply Policy
Determine whether traffic class is out of policy and if an alternate path can meet the policy requirements.
Traffic class states:
- Default: Prefix manually configured but has not been determined to be out-of-policy ~ shutdown
- InPolicy: The prefix meets its respective policy.
- Out-of-Policy: The prefix fails its respective policy.
- HoldDown: Is a period of wait to avoid erratic behaviour after a prefix has been changed.
Enforce
Re-route traffic injecting static routes, BGP local preference or using PBR.
Two modes:
- Observe mode
Default mode. MC monitors traffic classes and exit links.
- Control mode
Configured using the
mode route control command. MC coordinates information from BRs and changes the routing process.Verify
Check the new route match the policy.
Use the
logging command to log PfR state changes.To display PfR information about prefixes or routes use:
show oer master prefixshow oer border routes ?Laboratory
Topology:
R1-R2-R3-R5
R2-R4-R5
R2 is the MC.
R3 and R4 are the BRs.
Routing configuration:
R1(config)#interface fa0/0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2
R2(config)#interface lo2R2(config-if)#ip address 2.2.2.2 255.255.255.255R2(config)#interface fa0/0R2(config-if)#ip address 192.168.23.2 255.255.255.0R2(config)#interface fa0/1R2(config-if)#ip address 192.168.24.2 255.255.255.0R2(config)#interface fa1/0R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config)#router bgp 10R2(config-router)#network 2.2.2.2 mask 255.255.255.255R2(config-router)#network 192.168.12.0R2(config-router)#network 192.168.23.0R2(config-router)#network 192.168.24.0R2(config-router)#neighbor 192.168.23.3 remote-as 10R2(config-router)#neighbor 192.168.24.4 remote-as 10
R3(config)#interface lo3R3(config-if)#ip address 3.3.3.3 255.255.255.255R3(config)#interface fa0/0R3(config-if)#ip address 192.168.23.3 255.255.255.0R3(config)#interface sel1/0R3(config-if)#ip address 192.168.35.3 255.255.255.0R3(config)#router bgp 10R3(config-router)#network 3.3.3.3 mask 255.255.255.255R3(config-router)#network 192.168.23.0R3(config-router)#network 192.168.35.0R3(config-router)#neighbor 192.168.23.2 remote-as 10R3(config-router)#neighbor 192.168.35.5 remote-as 20
R4(config)#interface lo4R4(config-if)#ip address 4.4.4.4 255.255.255.255R4(config)#interface fa0/0R4(config-if)#ip address 192.168.45.4 255.255.255.0R4(config)#interface fa0/1R4(config-if)#ip address 192.168.24.4 255.255.255.0R4(config)#router bgp 10R4(config-router)#network 4.4.4.4 mask 255.255.255.255R4(config-router)#network 192.168.24.0R4(config-router)#network 192.168.45.0R4(config-router)#neighbor 192.168.24.2 remote-as 10R4(config-router)#neighbor 192.168.45.5 remote-as 20
R5(config)#interface lo5R5(config-if)#ip address 5.5.5.5 255.255.255.255R5(config)#interface fa0/0R5(config-if)#ip address 192.168.45.5 255.255.255.0R5(config)#interface se1/0R5(config-if)#ip address 192.168.35.5 255.255.255.0R5(config)#router bgp 20R5(config-router)#network 5.5.5.5 mask 255.255.255.255R5(config-router)#network 192.168.35.0R5(config-router)#network 192.168.45.0R5(config-router)#neighbor 192.168.35.3 remote-as 10R5(config-router)#neighbor 192.168.45.4 remote-as 10
OER configuration:
R3(config)#key chain MYKEYR3(config-keychain)#key 1R3(config-keychain-key)#key-string OERR3(config)#oer borderR3(config-oer-br)#loggingR3(config-oer-br)#local loopback 3R3(config-oer-br)#master 2.2.2.2 key-chain MYKEY
R4(config)#key chain MYKEYR4(config-keychain)#key 1R4(config-keychain-key)#key-string OERR4(config)#oer borderR4(config-oer-br)#loggingR4(config-oer-br)#local loopback 4R4(config-oer-br)#master 2.2.2.2 key-chain MYKEY
R2(config)#key chain MYKEYR2(config-keychain)#key 1R2(config-keychain-key)#key-string OERR2(config)#oer masterR2(config-oer-mc)#policy-rules CRITICAL-APPR2(config-oer-mc)#loggingR2(config-oer-mc)#border 3.3.3.3 key-chain MYKEYR2(config-oer-mc-br)#interface fa0/0 internalR2(config-oer-mc-br)#interface se1/0 externalR2(config-oer-mc)#border 4.4.4.4 key-chain MYKEYR2(config-oer-mc-br)#interface fa0/1 internalR2(config-oer-mc-br)#interface fa0/0 externalR2#show oer masterR2(config)#ip prefix-list CRITICAL seq 10 permit 5.5.5.5/32R2(config)#oer-map CRITICAL-APP 10R2(config-oer-map)#match traffic-class prefix-list CRITICALR2(config-oer-map)#set periodic 90! Try to find a better path every 90 seconds R2(config-oer-map)#set mode select-exit best! Try to find the best exit R2(config-oer-map)#set backoff 90 90! Time to wait for a OOPolicy prefix R2(config-oer-map)#set holddown 90R2(config-oer-map)#set delay threshold 50! Maximum delay time R2(config-oer-map)#set mode route control! Control mode R2(config-oer-map)#set mode monitor activeR2(config-oer-map)#set resolve delay priority 1 variance 1R2(config-oer-map)#set active-probe echo 5.5.5.5! From BRs R2#show oer master policyR2#show oer master prefixR2#show ip bgp 5.5.5.5/32! Look for localpref
Debugging and delay modification:
R3# debug oer border active-probesR4# debug oer border active-probesR3(config)#int s1/0R3(config-if)#traffic-shape rate 8000 1000 0 0
References
PfR:Technology_Overview
No comments:
Post a Comment