ā04-05-2023 08:37 AM
Im having issues with changing the cost of a learned ospf route. the route map pics up the route but the set metric command isnt working. Am I missing something?
ip prefix-list DEFAULT_ROUTE seq 5 permit 0.0.0.0/0
route-map test permit 10
match ip address prefix-list DEFAULT_ROUTE
match interface GigabitEthernet0/1.99
set metric 5
router ospf 1
priority 0
redistribute eigrp 1 subnets
network 192.168.X.X 0.0.0.X area X.X.X.X
distribute-list route-map test in
ā04-05-2023 08:52 AM
Hi @Samuel ,
The "distribute-list in" ospf feature allows you to allow or deny an ospf route to be installed in the RIB, but it doesn't allow you to change the metric.
Regards,
ā04-05-2023 08:56 AM
Thanks for that. What would be the best way to influence this route on my local router? I need the metric to be set higher than another one.
ā04-05-2023 09:00 AM
ā04-05-2023 09:00 AM
Hi @Samuel ,
Can you please tell us more about what you are trying to achieve? I suppose that you have another default route being learnt via ospf as well and you are trying to favour one over the other. You would normally do that on the route originator not on the receiver.
Regards,
ā04-05-2023 09:09 AM
we have 2 fortigate firewalls with static routes being redistributed into OSPF. One firewall redistributes with a higher cost than the other. What I would like to do is to change the cost of one of those default routes for one of my downstream routers so that it can prefer the higher cost one.
ā04-05-2023 10:56 AM
Hi,
OSPF is link state protocol, does not work as we expect in EIGRP/RIP.
But you can use E1 type external route advertisement, so path to ASBR (firewall in your topology) is also considered. You should use value, so that every routers chooses proper firewall (primary) in your network. However, for the device that you want to go through secondary one (higher cost), you can increase OSPF interface cost on downstream router. Note, that this will have impact not only to default route, but for others as well.
I tried to use distance command with source and access-list (prefix) matching, it changes distance, but does not have effect within the same OSPF process.
ā04-05-2023 01:37 PM
If i were to change the cost on the interface, it would affect both routes and still not get the desired outcome.
ā04-05-2023 09:55 AM
Hi @Samuel ,
Is the router directly connected to both FW? Are the default routes received as E1 or E2?
Regards,
ā04-05-2023 10:37 AM - edited ā04-05-2023 10:38 AM
The default routes are e2. The router is ospf neighbors with both firewalls in the same broadcast segment. This router is a secondary dmvpn hub. We also want it to pass traffic via our secondary internet hence the reason to alter the cost.
ā04-05-2023 09:01 AM - edited ā04-05-2023 09:12 AM
using redistrubte with route-map (this will filter the prefix) and then add metric
check above lab
ā04-05-2023 11:21 AM
Am I in same way or in different way'
I see in original post redistrubte from eigrp into ospf and I think I answer this.
But I see talking about FW and local route !!
Can I see at least topolgy??
ā04-05-2023 12:20 PM
Opsf select prefix with specific order'
When can change this order with
Run multi process
Run multi routing topolgy via vrf
Run different area ( some cases can solve with config specific area)
But all above and what I can suggest depend on topolgy.
Waiting your reply
ā04-05-2023 04:50 PM
So guys Ive decided to let both default routes have the same cost, making both default routes present in my downstream routers. I only hope that this will have the desired effect of load sharing internet traffic between the two firewalls.
Thanks everyone who chipped in.
ā04-05-2023 05:04 PM
But fw and multi path' I think you will face asymmetric traffic issue'.
I recommend use only one path
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide