Configuring Additional Parameters

The commands presented in this section include both OSPF-specific commands and routing protocol–independent commands that are not limited to OSPF. You can use these commands to perform the tasks listed in Table 51.

Table 51: Additional Configuration Tasks

Filter and apply policy to routes.

Set the maximum paths.

Set a baseline for statistics.

Enable automatic cost calculation.

Clear statistics for access lists, counters, redistributed routes, or processes.

Enable logs for OSPF neighbor changes.

Set the redistribution routes.

Set SPF hold time.

Set the distance for OSPF routes.

Set a default metric.

Administratively disable OSPF.

Enable use of the configured bandwidth for OSPF cost calculation.

access-list

route-map

auto-cost reference-bandwidth

ospf auto-cost reference-bandwidth

baseline ip ospf

baseline ipv6 ospf

clear ipv6 ospf counters

clear ipv6 ospf process

clear ip ospf database

clear ip ospf neighbor

Note: When OSPF is configured and running over an NBMA network, do not issue the clear ip ospf neighbor command simultaneously on both ends of the OSPF link. Doing so brings the OSPF link down completely. In this event, you must do one of the following on both sides of the link to bring the link back up:

  • Reconfigure the OSPF neighbors on the NBMA interface with the neighbor command.
  • Issue the clear ip ospf database command to clear and reset the OSPF adjacencies.
  • Issue the shutdown command followed by the no shutdown command on the interface.

clear ip ospf redistribution

clear ipv6 ospf redistribution

default-information originate

disable-dynamic-redistribute

distance

ip ospf shutdown

ipv6 ospf shutdown

log-adjacency-changes

ospf log-adjacency-changes

maximum-paths

ospf bandwidth

ospf shutdown

passive-interface

redistribute

table-map

timers spf

Methods for Calculating OSPF Interface Cost

The router uses the methods and precedence listed in Table 52 to calculate the OSPF interface cost.

Table 52: Methods and Precedence for Calculating OSPF Interface Cost

Cost Calculation Method

Precedence

Issuing address cost command

Takes the highest precedence. The router uses the cost configured on the OSPF interface for cost calculation.

Issuing ip ospf cost command

Takes precedence if you do not use the address cost command to configure the interface cost. The router uses the cost configured on the OSPF interface for cost calculation.

Using actual bandwidth configured on OSPF interface

If you issue the ospf bandwidth command to enable use of the configured bandwidth for OSPF interface cost calculation, and do not use either the address cost command or the ip ospf cost command to configure the interface cost, the router uses the actual bandwidth configured on the OSPF interface for cost calculation.

Issuing auto-cost reference-bandwidth command

Takes the lowest precedence. The router uses the reference bandwidth configured on the OSPF interface for cost calculation.

Note: If you do not use any of the preceding methods to configure the OSPF interface cost, the router uses the interface speed to calculate the interface cost.

Default Metrics

Although the router does not support a default-metric command, the redistribute command provides two ways to set a default metric for redistributed routes.

You can simply configure a metric with the redistribute command to apply to all routes redistributed from the specified source protocol:

host1(config)#router ospf 5 host1(config-router)#redistribute bgp metric 5

Alternatively, you can create one or more route maps that set the metric and apply them selectively to redistributed routes:

host1(config)#access-list 1 permit any any host1(config)#route-map defmetric host1(config-route-map)#match ip address 1 host1(config-route-map)#set metric 10 host1(config-route-map)#exit host1(config)#router ospf 5 host1(config-router)#redistribute bgp route-map defmetric host1(config-router)#redistribute isis route-map defmetric

See JunosE IP Services Configuration Guide, for information about configuring route maps.