Configuration Guide Vol. 3


11.2.5 Configuring route selection

Points to note

The example below shows how to use the ip ospf cost command to specify the cost of sending a packet on a specific interface.

If you specify 1 in the maximum-paths command, the protocol does not establish an equal-cost multipath even when routes have an equal-cost value.

Command examples

The following is an example of configuring route selection when using single-path routes.

  1. (config)# router ospf 1

    (config-router)# maximum-paths 1

    Sets 1 as the maximum number of OSPF paths.

  2. (config-router)# network 10.0.0.0 0.255.255.255 area 0

    (config-router)# exit

    Associates interfaces in the 10.0.0.0/8 network range with area 0.

  3. (config)# interface vlan 1

    (config-if)# ip ospf cost 10

    (config-if)# exit

    Sets the cost to 10.

  4. (config)# interface vlan 2

    (config-if)# ip ospf cost 2

    Set the cost to 2. The route through VLAN 2 has priority because it has a smaller cost value than VLAN 1.