cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1197
Views
4
Helpful
7
Replies
Highlighted

OSPF path tuning based on destination prefix

ospf.png

In this figure R1 -R2 are connected by fastethernet and R1 -R3 connected by serial link. 22.22.22.1 and 44.44.44.1 are loopbacks on R2 . Is it possible for R1 to get to 22.22.22.1 through 10.1.1.2 and to 44.44.44.1 through 12.1.1.2. If yes than HOW?

7 REPLIES 7
Highlighted
Enthusiast

One approach i see is to use a distribute-list to filter the route for 44.44.44.1 on the incoming interface of R1 (interface connecting to R2). This will allow R1 to pickup the route for 44.44.44.1 via R3.

Highlighted

Hi vivek,

I tried but unable to apply distribute-list on any interface like in Eigrp.

Roman !

Highlighted

Hi Roman,

Apologies, i know this is quite late response. I totally overlooked the protocol. Yes, this cannot be done by OSPF distribute-list as in OSPF filtering using DL would only block the routes from entering into the routing table, but not the LSDB . But there are some tweaks you can use to accomplish this

How about placing R1 - R3 (serial) + R3 - R2 (Fastethernet & Lo2 44.44.44.1) into area 0 & place R1- R2 (Fasthernet + Lo1 22.22.22.1) in area 1.

For Area 0 ; Lo2 44.44.44.1 will be Intra-area routes whereas Lo1 (22.22.22.1) would be Inter-area route. Hence, intra-area routes would be preferred.

For Area 1; Lo1 22.22.22.1 will be preferred as it's intra-area route.

Though in production, we need to avoid doing this, but as part of certification learning it's possible.

Regards

Vivek

Highlighted

edited 

Highlighted
Beginner

Hi,

I thinks it can't be done using OSPF you can use PBR for the task.

==================

route-map TEST permit 10

match ip address 101

set ip next-hop 12.1.1.2

access-list 101 permit ip any host 44.44.44.1

interface LAN

ip policy route-map TEST

==================

Regards,

Sanjay Kumar

Highlighted
Beginner

Roman,

You can achieve your goal by two ways--

1> under the ethernet interface of R2 that is connected directly to the R1..just increased the cost of the link...by default it will be 1 for Fastethernet link hence R1 will only prefer lowest cost link...hence your communication will be happen thru R1->R2->22 subnet...

Follow this command under Ethernet interface of R2..
int fa0/0
ip ospf cost 1000 <<<

But this is not the solution of your query ..After the implementation of this command Your all R2 subnets will be reachable through the R3.

Hence in the same area you cant use any availble filter statement like area filter list (prefix list) and distribute list....

Better you try by creating a new area that will be attached to the backbone area...then might be you can achieve ..

Thnx

Amit

***********Please rate helpful posts***********

Highlighted
Beginner

The most simple way to resolve this problem is to use static route on R1:

ip route 44.44.44.0/24 12.1.1.2

And a static route on R2:

ip route 12.1.1.0/24 33.33.33.1

But in this scenario you will lose the benefits of dynamic routing reservation.