cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2569
Views
20
Helpful
23
Replies

OSPF Routing

RS19
Level 4
Level 4

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.

23 Replies 23

Thanks. Sorry I have gone through the entire communication. I am not able to make it out which configuration I need to do in location B R2 router so that the traffic from location B -> location A will be via DC1.

 

Request you to please share it once again.

 

 

 

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

 

Thanks

Understood,

But in this case how the redundant works ?

If the next hop is not reachable how will it switch to DC2 ?

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

 

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 ?

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>

 

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

 

 

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.

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