[an error occurred while processing this directive][an error occurred while processing this directive]

Enable OSPF on Routers in Your Network


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 interface lo0
  5. Set the loopback interface (lo0) to passive:
    [edit protocols ospf]user@host# set area 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

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

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

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

[edit protocols ospf]
user@R6# show 
area {
    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 {

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

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

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


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.

Published: 2010-01-25

[an error occurred while processing this directive]