Technical Documentation

Configure OSPF as the IGP

Before you can run MPLS on your network, you must have an IGP running on all specified routers and interfaces. The IGP can be either OSPF or IS-IS. For the steps to configure IS-IS, see Configure IS-IS as the IGP.

Figure 1: OSPF Network Topology

Image g015532.gif

The OSPF IGP in the MPLS network in IS-IS Network Topology consists of the following:

  • All routers are configured for the backbone OSPF area 0.0.0.0.
  • All routers have the RID manually configured to avoid possible problems when the OSPF RID changes; for example, when multiple loopback addresses are configured.
  • All routers have traffic engineering enabled. When traffic engineering is enabled for OSPF, the SPF algorithm takes into account the various LSPs configured under MPLS and configures OSPF to generate link-state advertisements (LSAs) that carry traffic engineering parameters. These routes are installed into the primary routing table inet.0,but the LSPs are installed by default into the inet.3 routing table.
  • Adjacencies between all OSPF neighbors are as follows:
    • R1 is adjacent to R2, R3, and R5
    • R2 is adjacent to R1, R3, R4, and R6
    • R3 is adjacent to R1, R2, R4, and R6
    • R4 is adjacent to R2, R3, R5, and R6
    • R5 is adjacent to R1, R4, and R6
    • R6 is adjacent to R2, R3, R4, and R5

When you configure OSPF as the IGP, you must enable OSPF and traffic engineering on the router. We also recommend that you manually configure the RID and include the loopback interface (lo0) at the [edit protocols ospf] hierarchy level.

You can enable OSPF throughout the rest of the network by repeating this step as appropriate on other routers until all routers and interfaces establish OSPF neighbors.

To configure OSPF and establish OSPF neighbors, follow these steps:

  1. Enable OSPF on Routers in Your Network
  2. Verify That OSPF Neighbors Are Established

Enable OSPF on Routers in Your Network

Action

To enable OSPF on routers in your MPLS network, follow these steps:

  1. In configuration mode, go to the following hierarchy level:
    [edit]user@host# edit protocols ospf
  2. Configure the area and the interface:
    [edit protocols ospf]user@host# set area area-id interface type-fpc/pic/port
  3. Disable the management interface if you have included the interface all statement in the previous step:
    [edit protocols ospf]user@host# set interface fxp0.0 disable
  4. Include the loopback (lo0) interface if you intend to manually configure the RID:
    [edit protocols ospf]user@host# set area 0.0.0.0 interface lo0
  5. Set the loopback interface (lo0) to passive:
    [edit protocols ospf]user@host# set area 0.0.0.0 interface lo0 passive
  6. Configure traffic engineering:
    [edit protocols ospf]user@host# set traffic-engineering
  7. Manually configure the RID at the [routing-options] hierarchy level:
    [edit]user@host# edit routing-options [edit routing-options]user@host# set router-id router-id
  8. Verify and commit the entire configuration:
    user@host# show
    user@host# commit

Sample Output

user@R6> edit 
Entering configuration mode

[edit]
user@R6# edit protocols ospf
   
[edit protocols ospf]
user@R6# set area 0.0.0.0 interface so-0/0/0.0

[edit protocols ospf]
user@R6# set area 0.0.0.0 interface lo0
 
[edit protocols ospf]
user@R6# set area 0.0.0.0 interface lo0 passive

[edit protocols ospf]
user@R6# set traffic-engineering

[edit protocols ospf]
user@R6# show 
traffic-engineering;
area 0.0.0.0 {
    interface so-0/0/0.0;
    interface so-0/0/1.0;
    interface so-0/0/2.0;
    interface so-0/0/3.0;
    interface lo0.0 {
         passive;
}

[edit protocols ospf]
user@R6# commit 
commit complete

[edit]
user@R6# edit routing-options
  
[edit routing-options]
user@R6# set router-id 10.0.0.6
  
[edit routing-options]
user@R6# show 
[...Output truncated...]
router-id 10.0.0.6;
autonomous-system 65432;

[edit routing-options]
user@R6# commit 
commit complete

Meaning

The sample output shows that OSPF, with traffic engineering, is enabled on the interfaces on egress router R6. In addition, the RID is configured manually to avoid possible problems when the OSPF RID changes; for example, when multiple loopback addresses are configured. The RID uniquely identifies the router within the OSPF network. It is transmitted within the LSAs used to populate the link-state database and calculate the shortest-path tree. In a link-state network, it is important that two routers do not share the same RID value, otherwise IP routing problems may occur.

The sample outputs also shows the passive statement included in the configuration of the loopback (lo0) interface. Including the passive statement is considered best practice and ensures the following:

  • Protocols are not run over the loopback (lo0) interface
  • When the router ID (RID) is configured manually, ensures that the loopback (lo0) interface is advertised to other networks.

Verify That OSPF Neighbors Are Established

Purpose

After configuring OSPF, you must verify that neighboring routers have formed adjacencies with each other.

Action

To verify OSPF neighbors, enter the following JUNOS CLI operational mode command:

user@host> show ospf neighbor

Sample Output

user@R1> show ospf neighbor 
  Address         Interface             State      ID              Pri  Dead
10.1.12.2        so-0/0/0.0             Full      10.0.0.2         128   37  
10.1.15.2        so-0/0/1.0             Full      10.0.0.5         128   35  
10.1.13.2        so-0/0/2.0             Full      10.0.0.3         128   38 

user@R3> show ospf neighbor 
  Address         Interface             State      ID              Pri  Dead
10.1.34.2        so-0/0/0.0             Full      10.0.0.4         128   38  
10.1.23.1        so-0/0/1.0             Full      10.0.0.2         128   35  
10.1.13.1        so-0/0/2.0             Full      10.0.0.1         128   37  
10.1.36.2        so-0/0/3.0             Full      10.0.0.6         128   36 

user@R6> show ospf neighbor 
  Address         Interface             State      ID              Pri  Dead
10.1.56.1        so-0/0/0.0             Full      10.0.0.5         128   39  
10.1.46.1        so-0/0/1.0             Full      10.0.0.4         128   37  
10.1.26.1        so-0/0/2.0             Full      10.0.0.2         128   36  
10.1.36.1        so-0/0/3.0             Full      10.0.0.3         128   37  

Meaning

The sample output from the ingress, transit, and egress routers shows that all routers in the network shown in MPLS Network Topology have formed OSPF neighbor adjacencies.


Published: 2010-01-25