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:

  1. Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
  2. Configure security filters. See the Junos OS Security Configuration Guide.
  3. Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
  4. Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
  5. 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.

  6. Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
  7. Configure OSPF stub and not-so-stubby areas. See Example: Configuring OSPF Stub and Not-So-Stubby Areas .
  8. 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:

  1. 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
  2. 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