I am having issues tweaking OSPF in my lab. I understand that route selection should be a) longest prefix, b) lowest AD, c) lowest cost. Within OSPF it is a) intra-area, b) inter-area, c) E1, d) E2. As you can see in my topology I have BGP/OSPF mutual route redistribution taking place. On both R3 and R6 I have the command distance ospf external 105 added under the OSPF process. I want the routes to prefer the OSPF/BGP path instead of the otehr path, but even though I have the external routes with an AD of 105 the normal intra-area routes with the default AD of 110 are preferred. Can someone please tell me why this is?? Thanks.
the routing tables to prefer the intra-area routes even though the costs are much higher than the 45 being advertised by the E1 routes.
That's expected. If you want R3 and R6 to reach each other via R8 and R5, then you need to have R3 and R6 in another area (area 1, for instance).
Then on R4 and R7, you summarize the area 1 routes when entering area 0 with the area 1 range command. This process will make the routes less specific.
When doing the mutual redistribution on R8 and R5, you will keep the longest mask in the routes and they will be preferred.
Please rate helpful posts