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:
Navigate to the top of the configuration hierarchy
in either the J-Web or the CLI configuration editor.
Perform the configuration tasks described in Table 175.
Table 175: 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.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Protocols, click Edit.
Next to Ospf, click Edit.
From the [edit] hierarchy level, enter
edit protocols ospf
Set the external and internal route preferences.
In the External preference box, type 130.
In the Preference box, type the internal preference
value of 7.
Click OK.
Set the external preference:
set external-preference 130
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:
Navigate to the top of the configuration hierarchy
in either the J-Web or the CLI configuration editor.
Perform the configuration tasks described in Table 176.
Table 176: 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.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Protocols, click Edit.
Next to Ospf, click Edit.
Under Area id, click 0.0.0.0.
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.
In the Metric box, type the interface metric
value 5.
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:
Simple authentication—Authenticates by means of
a plain-text password (key) included in the transmitted packet.
MD5 authentication—Authenticates by means of an
MD5 checksum included in the transmitted packet.
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:
Navigate to the top of the configuration hierarchy
in either the J-Web or the CLI configuration editor.
Perform the configuration tasks described in Table 177.
Table 177: Enabling OSPF Authentication
Task
J-Web Configuration Editor
CLI Configuration Editor
Navigate to the 0.0.0.0 level in the configuration
hierarchy.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Protocols, click Edit.
Next to Ospf, click Edit.
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.
From the Authentication type list, select md5.
Click OK.
Set the authentication type:
set authentication-type md5
Navigate to the interface-name level in
the configuration hierarchy.
On the main Configuration page next to Protocols,
click Edit.
Next to Ospf, click Edit.
Under Area id, click 0.0.0.0.
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.
In the Key name box, type Chey3nne.
For MD5 authentication only, in the Key ID box,
type 2.
Click OK.
Repeat Step 1 through Step 3 for each interface
in the stub area for which you are enabling authentication.
Set the authentication password and, for MD5
authentication only, set the key identifier:
set authentication-key Chey3nne key-id 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:
Navigate to the top of the configuration hierarchy
in either the J-Web or the CLI configuration editor.
Perform the configuration tasks described in Table 178.
Table 178: 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.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Protocols, click Edit.
Next to Ospf, click Edit.
Under Area id, click 0.0.0.3.
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.