In this figure R1 -R2 are connected by fastethernet and R1 -R3 connected by serial link. 22.214.171.124 and 126.96.36.199 are loopbacks on R2 . Is it possible for R1 to get to 188.8.131.52 through 10.1.1.2 and to 184.108.40.206 through 220.127.116.11. If yes than HOW?
One approach i see is to use a distribute-list to filter the route for 18.104.22.168 on the incoming interface of R1 (interface connecting to R2). This will allow R1 to pickup the route for 22.214.171.124 via R3.
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 126.96.36.199) into area 0 & place R1- R2 (Fasthernet + Lo1 188.8.131.52) in area 1.
For Area 0 ; Lo2 184.108.40.206 will be Intra-area routes whereas Lo1 (220.127.116.11) would be Inter-area route. Hence, intra-area routes would be preferred.
For Area 1; Lo1 18.104.22.168 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.
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 22.214.171.124
access-list 101 permit ip any host 126.96.36.199
ip policy route-map TEST
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..
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 ..
***********Please rate helpful posts***********
The most simple way to resolve this problem is to use static route on R1:
ip route 188.8.131.52/24 184.108.40.206
And a static route on R2:
ip route 220.127.116.11/24 18.104.22.168
But in this scenario you will lose the benefits of dynamic routing reservation.