Routing Over Multiple Paths with Equal Costs
Problem
You want to restrict how many paths your router can use simultaneously to reach a particular destination.
Solution
By default, the router will install up to four routes to the same destination for most routing protocols, except BGP where the default is one, and static routes that allow six. You can change this default to any value between one and sixteen by using the configuration command maximum-paths. In IOS versions before 12.3(2)T, the maximum number of paths was six:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf
Router(config-router)#
65510
maximum-paths
Router(config-router)#
2
end
Router#
The same syntax works for other routing protocols:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router eigrp
Router(config-router)#
99
maximum-paths
Router(config-router)#
2
end
Router#
In IOS Version 12.2T, Cisco introduced a new command to allow you to configure the number iBGP paths separately from eBGP. You set the maximum number of eBGP paths using the standard maximum-paths command, and specify the number of paths for iBGP separately:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router bgp
Router(config-router)#
65511
maximum-paths
Router(config-router)#
2
maximum-paths ibgp
Router(config-router)#
3
end
Router#
IOS releases prior to 12.2T only include a standard maximum-paths ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.