Goal : Make sure R2 forward traffic from 1.1.1.1 to 4.4.4.4 use s3/2 as outgoing interface, other traffic use fa1/0 interface.
Scenario :
- All router is reachable by EIGRP
- R2 has a normal routing table for destination 4.4.4.0 is via 192.168.23.3, because Fastethernet link is has a better bandwidth than serial link.
- Create access-list permit traffic from host 1.1.1.1 to 4.4.4.4
- Create route-map & set outgoing interface
- Apply PBR to incoming interface
-Verify & make sure, only traffic from 1.1.1.1 to 4.4.4.4 should go to serial link.
Configuration : (All configuration is done in R2)
1. Create access list
access-list 100 permit ip host 1.1.1.1 host 4.4.4.4
2. Create route-map
route-map MYPBR permit 10
match ip address 100
set interface Serial3/2
3. Apply PBR to incoming interface
interface Serial3/1
ip address 192.168.12.2 255.255.255.0
ip policy route-map MYPBR
Verify :
- show ip policy in R2
- show route-map in R2
- show ip route in R2
- traceroute in R1
- debug ip policy in R2
As we can see first traceroute is use normal forwarding & second match by ip policy. So R2 will forward traffic from 1.1.1.1 to 4.4.4.4 via s3/2 next-hop192.168.24.4