05-28-2019 08:22 PM
I have the below scenario
Loc A Loc B Loc C
Router A -> Router B -> Router C
I have 3 locations as shown above
Location A is connected to Location B & Location B is connected to Location C
All are running OSPF. I want to achieve the below.
Router A advertise network 172.16.0.0/16 & 10.0.0.0/8 to Router B with metric ex - 100
So router B has the route for network 172.16.0.0/16 & 10.0.0.0/8 with metric 100 from router A
But when Router B advertise the same networks to Router C , it should advertise with the metric which i want to set manually only for network 172.16.0.0/16.
I want to manipulate/influence the metric only for this particular network.
So when router B advertise 172.16.0.0/16 to Router C I want to set metric 200
The metric for network 10.0.0.0/8 should be calculated default by OSPF
Let me know if this is possible in OSPF with PBR or any other configuration.
06-03-2019 01:23 AM
06-03-2019 02:17 AM
Hello RS19,
if you want location B router R2 to use DC1 for going to 10.0.0.0/8 in Location A you need PBR.
See the following statements:
on router R2 of Location B, perform the following configurations:
! defines traffic to be routed by PBR
ip access-list 101 permit ip any 10.0.0.0 0.255.255.255
route-map PBR permit 10
match address 101
set ip next-hop <IP-address-link-to-DC1>
interface <internal-interface-Location-B>
ip policy route-map PBR
The key point here to understand about PBR is that it works on received packets in inbound direction, so the command for applying it is applied on the internal interface(s) that connect R2 to internal subnets in Location B.
All traffic not matching ACL 101 is routed normally using the IP routing table.
Hope to help
Giuseppe
06-03-2019 03:16 AM
Thanks
Understood,
But in this case how the redundant works ?
If the next hop is not reachable how will it switch to DC2 ?
06-03-2019 04:30 AM
Hello RS19,
if the specified next-hop is not reachable PBR will revert to standard destination based routing and OSPF will provide the only alternate path to 10.0.0.0/8 via DC2 (OSPF will fail on Loc B - DC1 link too)
You need to verify what happens when DC1 interface to Location B fails. If Location B interface to DC1 goes down you are fine, otherwise you need to use IP SLA and the verify-availability option in the route map that says what to track.
Note: this additional feature may be available to your router R2 or not.
Hope to help
Giuseppe
06-04-2019 07:31 PM
Thanks
1 clarification regarding the below command.
set ip next-hop <IP-address-link-to-DC1>
- For the above command the IP address will be the IP address of the DC1 router right ?
06-04-2019 09:46 PM - edited 06-04-2019 10:04 PM
1 more clarification.
If the ACL is matched for the network specified in the ACL, then the route map will be set the next hop for that network as specified.
In this case will it insert new route in the routing table.
In my ex if the AC matches will it set new route for the network 10.0.0.0/8 in the routing table with the next hop I specify.
In addition to this can i apply the route-map policy globally with the below command instead of applying to the interface.
ip local policy route-map <policy name>
06-05-2019 01:30 AM
Hello RS19,
I answer here to your last two posts in this thread.
the set ip next-hop has to refer to DC1 router IP address in the link between location B and DC1.
So your understanding is correct.
About your other questions:
PBR does not introduce new routes in the IP routing table. PBR intercepts traffic and overrides the normal destination based IP routing table for traffic matching the ACL if the speficied next-hop is alive.
>>
ip local policy route-map <policy name>
This command is used to perform PBR for packets that are locally generated on the router.
See the explanation of the command from Protocol indipendent command reference
Packets that are generated by the router are not normally policy routed. However, you can use this command to policy route such packets. You might enable local policy routing if you want packets originated at the router to take a route other than the obvious shortest path.
The ip local policy route-map command identifies a route map to use for local policy routing. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which packets should be policy routed. The set commands specify the set actions—the particular policy routing actions to perform if the criteria enforced by the match commands are met. The no ip local policy route-map command deletes the reference to the route map and disables local policy routing.
link:
https://www.cisco.com/c/en/us/td/docs/ios/iproute_pi/command/reference/iri_book/iri_pi1.html
So you should use the ip policy command on the internal interface(s) of router R2 in location B: all interfaces that receive traffic from the internal of the location.
Hope to help
Giuseppe
06-05-2019 05:56 PM
Thank you.
Based on your inputs I am going to propose the below configurations in R2 for location B
R2 (Location B)
ip access-list 101 permit ip any 10.0.0.0 0.255.255.255 ### Location A Network###
ip sla monitor 1
type echo protocol ipicmpecho <DC1 IP> source-ipaddr <Location B R2 IP>
ip sla monitor schedule 1 start-time now life forever
track 101 ABC 1 reachability
route-map R_Route permit 10
match address 101
set ip next-hop verify-availability <Location B R2 IP> 20 track 101
route-map R_Route permit 20
interface G0/1 (R2 Internal Interface)
ip policy route-map R_Route
interface G0/0 (R2 Internal Interface)
ip policy route-map R_Route
If you find any thing wrong please let me know.
06-05-2019 07:00 PM
There was 1 mistake. Corrected it.
R2 (Location B)
ip access-list 101 permit ip any 10.0.0.0 0.255.255.255 ### Location A Network###
ip sla monitor 1
type echo protocol ipicmpecho <DC1 IP> source-ipaddr <Location B R2 IP>
ip sla monitor schedule 1 start-time now life forever
track 101 ABC 1 reachability
route-map R_Route permit 10
match address 101
set ip next-hop verify-availability <DC1 IP> 20 track 101
route-map R_Route permit 20
interface G0/1 (R2 Internal Interface)
ip policy route-map R_Route
interface G0/0 (R2 Internal Interface)
ip policy route-map R_Route
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide