Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

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 65510
Router(config-router)#maximum-paths 2
Router(config-router)#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 99
Router(config-router)#maximum-paths 2
Router(config-router)#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 65511
Router(config-router)#maximum-paths 2
Router(config-router)#maximum-paths ibgp 3
Router(config-router)#end
Router#

IOS releases prior to 12.2T only include a standard maximum-paths ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page