Technical Documentation

Configuring Multiple Instances of OSPF

To configure multiple routing instances of OSPF or OSPFv3, perform the following tasks:

  1. Configure the OSPF or OSPFv3 default instance at the [edit protocols (ospf | ospf3)] and [edit logical-systems logical-system-name protocols (ospf | ospf3)] hierarchy levels with the statements needed for your network so that routes are installed in inet.0 and in the forwarding table. Make sure to include the routing table group.
  2. Configure an OSPF or OSPFv3 routing instance for each additional OSPF or OSPFv3 routing entity, configuring the following:
    • Interfaces
    • Routing options
    • OSPF protocol statements belonging to that entity
    • Routing table group
  3. Configure a routing table group to install routes from the default route table, inet.0, into a routing instance’s route table.
  4. Configure a routing table group to install routes from a routing instance into the default route table, inet.0.

    Note: Nonforwarding routing instances do not have forwarding tables that correspond to their routing tables.

  5. Create an export policy to export routes with a specific tag and to use that tag to export routes back into the instances. For more information, see the Junos Policy Framework Configuration Guide.

Example: Configuring Multiple Routing Instances of OSPF

Figure 1 shows how you can use multiple routing instances of OSPF or OSPFv3 to segregate prefixes within a large network. The network consists of three administrative entities: voice-policy, other-policy, and the default routing instance. Each entity is composed of several geographically separate sites that are connected by the backbone and managed by the backbone entity.

Figure 1: Configuration for Multiple Routing Instances

Image h1460.gif

Sites A and D belong to the voice-policy routing instance. Sites B and C belong to the other-policy instance. Router 1 and Router 3 at the edge of the backbone connect the routing instances. Each runs a separate OSPF or OSPFv3 instance (one per entity).

Router 1 runs three OSPF or OSPFv3 instances: one each for Site A (voice-policy), Site C (other-policy), and the backbone, otherwise known as the default instance. Router 3 also runs three OSPF or OSPFv3  instances: one each for Site B (other-policy), Site D (voice-policy), and the backbone (default instance).

When Router 1 runs the OSPF or OSPFv3 instances, the following occur:

  • Routes from the default instance routing table are placed in the voice_policy and other_policy instance routing tables.
  • Routes from the voice-policy routing instance are placed in the default instance routing table.
  • Routes from the other-policy routing instance are placed in the default instance routing table.
  • Routes from the voice-policy routing instance do not enter the other-policy instance routing table.
  • Routes from the other-policy routing instance do not enter the voice-policy instance routing table.

Configuring Router 1

The following sections describe how to configure Router 1 in the backbone entity with multiple routing instances.

Configure the routing instances for voice-policy and other-policy:

[edit]routing-instances {voice-policy {interface so-2/2/2.0;protocols {(ospf | ospf3) {rib-group voice_to_inet; # Places routes into inet.0 #area 0.0.0.0 {interface so-2/2/2.0;}}}}other-policy {interface so-4/2/2.0;protocols {(ospf | ospf3) {rib-group other-to-inet; # Places routes into inet.0 #area 0.0.0.0 {interface so-4/2/2.0;}}}}}

Configure the routing table group inet-to-voice-and-others to take routes from inet.0 (default routing table) and place them in the voice-policy.inet.0 and other-policy.inet.0 routing tables:

[edit]routing-options {rib-groups {inet-to-voice-and-other {import-rib [ inet.0 voice-policy.inet.0 other-policy.inet.0 ];}}}

Configure the routing table group voice-to-inet to take routes from voice-policy.inet.0 and place them in the inet.0 default routing table:

[edit]routing-options {rib-groups {voice-to-inet {import-rib [ voice-policy.inet.0 inet.0 ];}}}

Configure the routing table group other-to-inet to take routes from other-policy.inet.0 and place them in the inet.0 default routing table:

[edit]routing-options {rib-groups {other-to-inet {import-rib [ other-policy.inet.0 inet.0 ];}}}

Configure the default OSPF or OSPFv3 instance:

[edit]protocols {(ospf | ospf3) {rib-group inet-to-voice-and-other; # Place prefixes from inet.0 intoarea 0.0.0.0 { # voice-policy.inet.0 andinterface so-2/2/2.0; # other-policy.inet.0interface so-4/2/2.0;}}}}

Configuring Router 3

The configuration for Router 3 is the same as for Router 1 except that the interface names might differ. In this topology, the interface so-5/2/2.0 belongs to other-policy, and so-3/2/2.0 belongs to voice-policy.

Related Topics


Published: 2010-07-02