Saturday, December 17, 2016

user routing policy, pbr, to redirect traffic to specific next-hop

PBR, policy based routing, is a way that allow us to match against some traffic patten, then have that patten routed to specific ip or updated ip header before routing.

below will be shown about how it pbr change the next hop address.
By default it will forward to ip address, but we will manipulate it to send to instead.

1- router medel and version using for this testing
R7# show version
Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)

2- router running-configuration
interface FastEthernet0/0
 ip address
 ip nat outside
 speed auto
 duplex auto
interface FastEthernet0/1
 ip address
 ip nat inside
 ip policy route-map h15
 speed auto
 duplex auto
ip nat inside source list 2 interface FastEthernet0/0 overload
ip forward-protocol nd
no ip http server
no ip http secure-server
ip route
access-list 1 permit
access-list 2 permit
route-map h15 permit 10
 match ip address 1
 set ip default global next-hop

3- result of the testing
- before applying the policy

- after applying the policy. It route to first, before sending to dst

No comments:

Post a Comment