Jackson J. answered 06/16/23
Cisco Certified Internetworking Expert (CCIE) Senior Network Engineer
Hi McKenna D., The answer would be D
Under the 'router ospf [x]' mode (where "x" is the OSPF Process ID), you would enter the following command to specify the Maximum Number of Equal-Cost Paths (or "routes") to the same Network that the OSPF process would be allowed to install into the Routing Table:
'maximum-paths [x]'
Here, "x" equals the maximum amount of Equal-Cost Routes that OSPF is allowed to install into the Router's routing table for the purpose of Load Sharing. Those routes are also referred to as "ECMP" (Equal-Cost Multipaths). By default, the Maximum-Paths is set to a value of "4" however, this can be changed to any numerical value between 1 - 16 (or up to 32 depending on the version of IOS Software Version and Router Platform).
For example, in order to limit the amount of Equal-Cost OSPF routes for a given Network to only 2, you would enter the following commands on a Cisco Router:
- R1(config)# router ospf 1
- R1(config-router)# maximum-paths 2
A good way to verify that the Router has installed the multiple equal-cost routes into the Routing Table is to enter the following command:
'show ip route ospf' - Which will display all of the Routes that were learned via an OSPF neighbor. If you see multiple instances of the same network with the same metric (or "Cost"), but different "Next-Hop" Addresses, then you are achieving ECMP.
Another helpful command is:
'show ip route x.x.x.x/x' - Where "x.x.x.x/x" is the IP Network (or "Route") that you are inquiring about. This command will show you each known "Path" to a given Network and much more information about it, including the metric (cost) and how it was learned. If you see multiple Next Hops for that one particular network and the "Metric" and "Traffic Share Count" is the same for each, then you are achieving ECMP to that Network.
(For Example): show ip route 192.168.1.0/24
A good way to test whether or not ECMP is being achieved and you are actually Load-Sharing across Multiple Paths is to use the: 'show ip cef exact-route x.x.x.x (where x.x.x.x is the Source IP) y.y.y.y (where y.y.y.y is the Destination IP)'. Repeating this command (within Privilege Exec Mode) will display which Interface and Next-Hop the Router will use to send the traffic out of in order to reach the destination with the Multiple Paths. If you see the interfaces and/or Next-Hops alternating, then you are achieving ECMP.
(For Example): show ip cef exact-route 192.168.1.1 172.16.2.30
192.168.1.1 -> 172.16.2.30 =>IP adj out of GigabitEthernet0/1, addr 10.1.1.5
192.168.1.1 -> 172.16.2.30 =>IP adj out of GigabitEthernet0/2, addr 10.1.1.6
192.168.1.1 -> 172.16.2.30 =>IP adj out of GigabitEthernet0/1, addr 10.1.1.5
192.168.1.1 -> 172.16.2.30 =>IP adj out of GigabitEthernet0/2, addr 10.1.1.6
There are couple requirements that you must have in place before performing that test in order to achieve the desired results.
- You must have "IP CEF" enabled in Global Config Mode
- Under each participating interface (associated with the Multiple Paths), you must have the following command entered: "ip load-sharing per-packet", which will cause the Router to alternate Multiple Paths on a "packet-by-packet" basis instead of the default "per-flow" basis.
(For Example):
- R1(config)# ip cef
- R1(config)# interface GigabitEthernet0/1
- R1(config-if)# ip load-sharing per-packet
I hope that explanation was helpful. If you or anyone would like to learn more about OSPF, Load Sharing, Equal-Cost Multipaths or Cisco Express Forwarding (IP CEF), then please reach out to me! :)