Tuning an OSPF Network for Efficient Operation

To make your OSPF network operate more efficiently, you can change some default settings on the Services Router by performing the following tasks:

Controlling Route Selection in the Forwarding Table

OSPF uses route preferences to select the route that is installed in the forwarding table when several routes have the same shortest path first (SFP) calculation. To evaluate a route, OSPF calculates the sum of the individual preferences of every router along the path and selects the route with the lowest total preference.

By default, internal OSPF routes have a preference value of 10, and external OSPF routes have a preference value of 150. Suppose all routers in your OSPF network use the default preference values. By setting the internal preference to 7 and the external preference to 130, you can ensure that the path through a particular Services Router is selected for the forwarding table any time multiple equal-cost paths to a destination exist.

To modify the default preferences on a Services Router:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or the CLI configuration editor.
  2. Perform the configuration tasks described in Table 166.

Table 166: Controlling Route Selection in the Forwarding Table by Setting Preferences

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Ospf level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Ospf, click Edit.

From the [edit] hierarchy level, enter

edit protocols ospf

Set the external and internal route preferences.

  1. In the External preference box, type 130.
  2. In the Preference box, type the internal preference value of 7.
  3. Click OK.
  1. Set the external preference:

    set external-preference 130

  2. Set the internal preference:

    set preference 7

Controlling the Cost of Individual Network Segments

When evaluating the cost of individual network segments, OSPF evaluates the reference bandwidth. For any link faster than 100 Mbps, the default cost metric is 1. When OSPF calculates the SPF algorithm, it sums the metrics of all interfaces along a path to determine the overall cost of the path. The path with the lowest metric is selected for the forwarding table.

To control the cost of the network segment, you can modify the metric value on an individual interface. Suppose all routers in the OSPF network use default metric values. If you increase the metric on an interface to 5, all paths through this interface have a calculated metric higher than the default and are not preferred.

To manually set the cost of a network segment on the stub area's Fast Ethernet interface by modifying the interface metric:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or the CLI configuration editor.
  2. Perform the configuration tasks described in Table 167.

Table 167: Controlling the Cost of Individual Network Segments by Modifying the Metric

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the ge-0/0/0.0 level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Ospf, click Edit.
  4. Under Area id, click 0.0.0.0.
  5. Under Interface name, click ge-0/0/0.0.

From the [edit] hierarchy level, enter

edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0

Set the interface metric.

  1. In the Metric box, type the interface metric value 5.
  2. Click OK.

Set the interface metric:

set metric 5

Enabling Authentication for OSPF Exchanges

All OSPFv2 protocol exchanges can be authenticated to guarantee that only trusted routers participate in the AS's routing. By default, OSPF authentication is disabled.

Note: OSPFv3 does not support authentication.

You can enable either of two authentication types:

Because OSPF performs authentication at the area level, all routers within the area must have the same authentication and corresponding password (key) configured. For MD5 authentication to work, both the receiving and transmitting routers must have the same MD5 key.

To enable OSPF authentication on the stub area:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or the CLI configuration editor.
  2. Perform the configuration tasks described in Table 168.

Table 168: Enabling OSPF Authentication

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the 0.0.0.0 level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Ospf, click Edit.
  4. Under Area id, click 0.0.0.0.

From the [edit] hierarchy level, enter

edit protocols ospf area 0.0.0.0

Set the authentication type for the stub area to either simple or MD5—for example, MD5.

  1. From the Authentication type list, select md5.
  2. Click OK.

Set the authentication type:

set authentication-type md5

Navigate to the interface-name level in the configuration hierarchy.

  1. On the main Configuration page next to Protocols, click Edit.
  2. Next to Ospf, click Edit.
  3. Under Area id, click 0.0.0.0.
  4. Under Interface name, click an interface name.

From the [edit] hierarchy level, enter

edit protocols ospf area 0.0.0.0 interface interface-name

Set the authentication password (key) and, for MD5 authentication only, the key identifier to associate with the MD5 password:

  • For simple authentication, set a password of from 1 through 8 ASCII characters—for example, Chey3nne.
  • For MD5 authentication:
    • Set a password of from 1 through 16 ASCII characters—for example, Chey3nne.
    • Set a key identifier between 0 (the default) and 255—for example, 2.
  1. In the Key name box, type Chey3nne.
  2. For MD5 authentication only, in the Key ID box, type 2.
  3. Click OK.
  4. Repeat Step 1 through Step 3 for each interface in the stub area for which you are enabling authentication.
  1. Set the authentication password and, for MD5 authentication only, set the key identifier:

    set authentication-key Chey3nne key-id 2

  2. Repeat Step 1 for each interface in the stub area for which you are enabling authentication.

Controlling Designated Router Election

At designated router election, the router priorities are evaluated first, and the router with the highest priority is elected designated router.

By default, routers have a priority of 128. A priority of 0 marks the router as ineligible to become the designated router. To configure a router so it is always the designated router, set its priority to 255.

To change the priority of a Services Router to control designated router election:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or the CLI configuration editor.
  2. Perform the configuration tasks described in Table 169.

Table 169: Controlling Designated Router Election

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the OSPF interface address for the Services Router. For example, navigate to the ge-/0/0/1 level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Ospf, click Edit.
  4. Under Area id, click 0.0.0.3.
  5. Under Interface name, click ge-0/0/1.

From the [edit] hierarchy level, enter

edit protocols ospf area 0.0.0.3 interface ge-0/0/1

Set the Services Router priority to a value between 0 and 255—for example, 200. The default value is 128.

  1. In the Priority box, type 200.
  2. Click OK.

Set the priority value:

set priority 200