Implementing Policy Based Routing (PBR) on Cisco Routers.

Implementing Policy Based Routing (PBR) on Cisco Routers.

Last time we demonstrated how to configure PBR(Policy Based Routing) on Huawei routers. Check it from this link: Implementing PBR on Huawei Routers.

Configuration Steps

Step 1: Configure system hostnames and IP addresses on interfaces of all the routers.

*************************R5
enable
configure terminal
hostname R5
!
interface FastEthernet0/0
 ip address 50.50.50.1 255.255.255.0
 no shut
!
interface FastEthernet0/1
 ip address 40.40.40.1 255.255.255.0
 no shut
!
interface FastEthernet1/0
 ip address 10.10.10.0 255.255.255.254
 no shut
!         
interface FastEthernet2/0
 ip address 30.30.30.0 255.255.255.254
 no shut
!
*************************R6
enable
configure terminal
hostname R6
!
interface FastEthernet0/0
 ip address 10.10.10.1 255.255.255.254
 no shut
!
interface FastEthernet0/1
 ip address 10.10.10.2 255.255.255.254
 no shut
!
*************************R7
enable
configure terminal
hostname R7
!
interface FastEthernet0/0
 ip address 30.30.30.1 255.255.255.254
 no shut
!
interface FastEthernet0/1
 ip address 30.30.30.2 255.255.255.254
 no shut
!
*************************R8
enable
configure terminal
hostname R8
!
interface FastEthernet0/0
 ip address 10.10.10.3 255.255.255.254
 no shut
!
interface FastEthernet0/1
 ip address 10.10.10.4 255.255.255.254
 no shut
!
*************************R9
enable
configure terminal
hostname R9
!
interface FastEthernet0/0
 ip address 10.10.10.5 255.255.255.254
 no shut
!
interface FastEthernet0/1
 ip address 30.30.30.3 255.255.255.254
 no shut
!
interface FastEthernet1/0
 ip address 40.40.41.1 255.255.255.254
 no shut
!         
interface FastEthernet2/0
 ip address 50.50.51.1 255.255.255.254
 no shut
!

Step 2: Configure OSPF on all the routers.

*************************R5
!
router ospf 10
 router-id 5.5.5.5
 log-adjacency-changes
 network 10.10.10.0 0.0.0.1 area 0
 network 30.30.30.0 0.0.0.1 area 0
 network 40.40.40.0 0.0.0.255 area 0
 network 50.50.50.0 0.0.0.255 area 0
!
*************************R6
!
router ospf 10
 router-id 6.6.6.6
 log-adjacency-changes
 network 10.10.10.0 0.0.0.1 area 0
 network 10.10.10.2 0.0.0.1 area 0
!
*************************R7
!
router ospf 10
 router-id 7.7.7.7
 log-adjacency-changes
 network 30.30.30.0 0.0.0.1 area 0
 network 30.30.30.2 0.0.0.1 area 0
!
*************************R8
!
router ospf 10
 router-id 8.8.8.8
 log-adjacency-changes
 network 10.10.10.4 0.0.0.1 area 0
 network 10.10.10.2 0.0.0.1 area 0
!
*************************R9
!
router ospf 10
 router-id 9.9.9.9
 log-adjacency-changes
 network 10.10.10.4 0.0.0.1 area 0
 network 30.30.30.2 0.0.0.1 area 0
 network 40.40.41.0 0.0.0.255 area 0
 network 50.50.51.0 0.0.0.255 area 0
!

Step 3: Verify OSPF adjacency status

Step 4: Verify the path taken by traffic from VPC1 and VPC2.

Traffic from VPC1 goes through R5,R7 then R9.
Traffic from VPC2 also follows R5,R7 and then R9.

The objective of this lab is to configure Policy Based Routing (PBR) to force traffic from VPC2 to VPC4 follows the path R5—>R6—->R8 —>R9—-VPC4 by specifying R6 as the next hop.

Step 5: Configure PBR on R5 and force traffic from VPC2 to flow to R6 as follows.

*************************R5
!
access-list 1 permit 40.40.40.2
!
route-map PBR_TEST permit 10
 set ip next-hop 10.10.10.1
!
interface FastEthernet0/1
 ip policy route-map PBR_TEST
!

Step 6: Verify the traffic flow from VPC01 is taking the path to R6.

Thank you for reading our article and please leave your comments in the comments section. Also subscribe to our youtube Channel for more interesting content on networking: Lyfey Technologies Youtube Channel.

Related Posts



Leave a Reply

This website uses cookies and asks your personal data to enhance your browsing experience.