Example: Controlling the Cost of Individual OSPF Network Segments
This example shows how to control the cost of individual OSPF network segments.
Requirements
Before you begin:
- Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
- Configure security filters. See the Junos OS Security Configuration Guide.
- Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
- Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
- Create the backbone area for your OSPF network and add
the appropriate interfaces to the area. See Example: Configuring a Single-Area OSPF Network.

Note: Once you complete this step, OSPF begins sending LSAs. No additional configuration is required to enable OSPF traffic on the network.
- Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
- Configure OSPF stub and not-so-stubby areas. See Example: Configuring OSPF Stub and Not-So-Stubby Areas .
- Enable authentication for OSPF exchanges. See Example: Enabling Authentication for OSPF Exchanges.
Overview
In this example, the OSPF interface address for the device is ge-/0/0/0 and the interface metric is 5.
Configuration
Step-by-Step Procedure
To control the cost of individual OSPF network segments:
- Configure the metric of the OSPF network segment.[edit]user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 metric 5
- If you are done configuring the device,
commit the configuration.[edit]user@host# commit
Verification
To verify the configuration is working properly, enter the show protocols ospf command.
Related Topics
- Junos OS Feature Support Reference for SRX Series and J Series Devices
- Understanding OSPF Traffic Control
- OSPF Configuration Overview
- OSPF Overview
- Verifying an OSPF Configuration
Hide Navigation Pane
Show Navigation Pane
Download
SHA1