My network is using OSPF, i need to do unequal load balancing in two links. Use static route or PBR it could cause the auto-recovery problem. If one of the link down it will not tune to another link automatically, i need to modify the static route or PBR setting manually. I was wondering if i could use route-map to adjust OSPF inbound route's metric, insead of deny. I tried to do that, but i found the set statement do not work. Any comment about my scenario?
Basically what you have described, the answer is use EIGRP.
I am not sure why you think floating statics can't auto recover, you just have to be imaginative. If you are doing it on a lan, it does need the next hop to be in a dedicated subnet, and does not aoturecover if the device is up, but not passing traffic. It also needs the next hop device to be directly connected.
Int fas 0/4
ip add 172.19.32.5 255.255.255.252
ip route 0.0.0.0 0.0.0.0 188.8.131.52
That way as long as the next hop does go down, the static will disappear.
I really must advise against unequal cost load balancing and OSPF - the protocol is not designed to do that. If you need that use EIGRP. You can con OSPF into thinking costs are equal, but you really need to fully understand OSPF to do that. Conning the RP will also mean both paths get an even-ish share. There is normally a reason for the unequal cost (10M Vs 100M Vs 1G ethernet as an example), and that may mean stuffing the same traffic down each is less than wise. It also makes it more difficult at 3am sunday morning and there is a routing problem. I like simple solutions, because people don't have to call me to fix it when there is a problem.
OSPF does not equal cost load balance, and as it is a link state protocol, metric adjustment is not as straightforwards.
Adjustment to make the costs even may also not be great, as the costs will be unequal for a reason - normally different size links or a longer path with more links. Making the metrics equal would result in roughly equal load on the links.
If you want to influence the way OSPF chooses links, you need to know your network well, and adjust carefully.
If you have a large network, and the two links go to different places in the network, and it happens most of your routes are out of one of the links, you can adjust the cost of the links (raise the lower one) and some routes should then be better down the other link, Tune for the load balancing you want. You may need to tune the link at both ends to influence the return traffic as well.
Direct adjustment of a metric is not a easy thing to do with OSPF.
The only RP I know that will do unequal balancing is EIGRP.
If you add more info on your topologu - how big is the network? are we in an area or the backbone? If an area what type of area? where are the routes being sourced? eg local to OSPF within the same area, redistributed from another RP, if redistributed, what metric type is in use?
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...