I think I may have lost my mind as I can't seem to get this scenario working how I'd like it to.
I managed to solve it using Policy based routing and an extended ACL. The router-ids match the router number. i.e. R2=2.2.2.2
I'm sure I am forgetting something fundamental which is preventing me from achieving my goals.The picture will explain more what I want to do. I used PBR but only because I couldn't resolve it any other way.
network diagram.jpg
For example the PBR config on R3 is
R3#show route-map
route-map PBR, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
ip next-hop 192.168.23.1
Policy routing matches: 10 packets, 1000 bytes
R3#show access-list
Extended IP access list 100
10 permit ip 172.16.10.0 0.0.0.7 any (5 matches)
20 permit ip 172.16.20.0 0.0.0.7 any (5 matches)
On R1 AND R2 truncated config is
R1#show route-map
route-map PBR, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
ip next-hop 192.168.12.2
Policy routing matches: 5 packets, 500 bytes
R1#show access-l
Extended IP access list 100
10 permit ip any 172.16.10.0 0.0.0.7 (5 matches)
20 permit ip any 172.16.20.0 0.0.0.7
route-map PBR, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
ip next-hop 192.168.23.2
Policy routing matches: 18 packets, 1892 bytes
R2#show access-list
Extended IP access list 100
10 permit ip any 172.16.10.0 0.0.0.7 (8 matches)
20 permit ip any 172.16.20.0 0.0.0.7 (10 matches)
It works with a PBR but lets be honest it is kinda messy and means a lot of typing.
I tried to use a distribution list on R1 which prevented the 172.16.10.0/29 amd 172.16.20.0/29 coming into F1/0 of R1. Did a similar thing on R2's fa0/0. YET it did not work and instead blocked 172.16.10.0/29 and 172.16.20.0/29 totally and there was no path to it.
I also tried changing the admin distance for 172.16.10.0/29 and 172.16.20.0/20 to AD=200 on R2 as it is advertised from R3 but no chance. It never worked.
Is there a way to influence the path without using PBR?
Maybe I messed things up when I changed the auto cost reference bw to 1000Mb but I did this because I wanted to use the faster links.
It has been a long time since I did any cisco related work so my mind is a bit fuzzy.