Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Mapping OpenConfig OSPF Commands to Junos Configuration

Note:

See OpenConfig Data Model Version for supported versions of the OpenConfig data model.

Global Configuration

See Table 1 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /global/config/router-id
  • /global/config/igp-shortcuts
  • /global/config/log-adjacency-changes
Table 1: Global OSPF Configuration

Command

OpenConfig Configuration

Junos Configuration

Router ID

openconfig-network-instance:network-instances { 
    protocols ospf { 
        ospfv2 { 
            global { 
                config {
                    router-id <>; 
                } 
            } 
        }
    } 
} 
routing-options { 
    router-id <>; 
}

A 32-bit number represented as a dotted quad assigned to each router running the OSPFv2 protocol. This number should be unique within the autonomous system.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/router-id

IGP shortcuts

openconfig-network-instance:network-instances { 
    protocols ospf { 
        ospfv2 { 
            global { 
                config {
                    igp-shortcuts <>; 
                } 
            } 
        }
    } 
} 
protocols { 
    ospf { 
        traffic-engineering {
            shortcuts;
        }
    }
}

When this leaf is set to true, OSPFv2 will route traffic to a remote system via any LSP to the system that is marked as shortcut eligible.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/igp-shortcuts

Log adjacency changes

openconfig-network-instance:network-instances { 
    protocols ospf { 
        ospfv2 { 
            global { 
                config {
                    log-adjacency-changes <>; 
                } 
            } 
        }
    } 
} 
protocols { 
    ospf { 
        traceoptions {
          file <> size <>;
          flag state;
        }
    }
}

When this leaf is set to true, a log message will be generated when the state of an OSPFv2 neighbor changes.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/log-adjacency-changes

Timer Configuration (Global)

See Table 2 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /global/timers/spf/config/initial-delay
  • /global/timers/max-metric/config/set
  • /global/timers/max-metric/config/timeout
  • /global/timers/max-metric/config/include
Table 2: Global Timer Configuration

Command

OpenConfig Configuration

Junos Configuration

SPF initial delay

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                timer{
                    spf {
                        config {
                            initial-delay <>;
                        }
                    }
                }
            }
        }
    }
}
routing-options {
    ospf {
        spf-options {
            delay <>;
        }
    }
}  


The value of this leaf specifies the time between a change in topology being detected and the first run of the SPF algorithm.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/spf/config/initial-delay

Maximum metric

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                timer {
                    max-metric {
                        config {
                            set <>;
                        }
                    }
                }
            }
        }
    }
}
protocols { 
    ospf { 
        overload;
    }
}

When this leaf is set to true, all non-stub interfaces of the local system are advertised with the maximum metric, such that the router does not act as a transit system.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/set

Maximum metric timeout

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                timer {
                    max-metric {
                        config {
                            timeout <>;
                        }
                    }
                }
            }
        }
    }
}
protocols { 
    ospf { 
        overload {
            timeout <>;
        }
    }
}

The delay after which the advertisement of entities with the maximum metric should be cleared, and the system reverts to the default, or configured, metrics.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/timeout

Maximum metric include

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                timer {
                    max-metric {
                        config {
                            include <>;
                        }
                    }
                }
            }
        }
    }
}
protocols {
    ospf { 
        overload {
            stub-network;
            as-external;
        }
    }
}

By default, the maximum metric is advertised for all non-stub interfaces of a device. You specify additional entities to advertise using the include leaf list.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/include

Timer Configuration (Interfaces)

See Table 2 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /areas/area/interfaces/interface/timers/config/hello-interval
  • /areas/area/interfaces/interface/timers/config/dead-interval
  • /areas/area/interfaces/interface/timers/config/retransmission-interval
Table 3: Timer Configuration (Interfaces)

Command

OpenConfig Configuration

Junos Configuration

Hello interval

openconfig-network-instance:network-instances { 
   protocol ospf {
       ospfv2 {            
           areas {
               area <> {
                   interfaces {
                       interface <> {
                           timers {
                               config {
                                   hello-interval <>;
                               }
                           }
                       }
                   }
               }
           }
       }
   }
}
protocols {
   ospf {
      area <> {
          interface <> {
              hello-interval <>;
           }
       }
   }
}

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/hello-interval

Dead interval

openconfig-network-instance:network-instances { 
   protocol ospf {
       ospfv2 {            
           areas {
               area <> {
                   interfaces {
                       interface <> {
                           timers {
                               config {
                                   dead-interval <>;
                               }
                           }
                       }
                   }
               }
           }
       }
   }
}
protocols {
   ospf {
      area <> {
          interface <> {
              dead-interval <>;
           }
       }
   }
}
OpenConfig path:

/network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/dead-interval

Retransmission interval

openconfig-network-instance:network-instances { 
   protocol ospf {
       ospfv2 {            
           areas {
               area <> {
                   interfaces {
                       interface <> {
                           timers {
                               config {
                                   retransmission-
                                    interval <>;
                               }
                           }
                       }
                   }
               }
           }
       }
   }
}
protocols {
   ospf {
      area <> {
          interface <> {
              retransmit-
               interval <>;
           }
       }
   }
}

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/retransmission-interval

MPLS Configuration (Global)

See Table 4 for configuration mappings of the OpenConfig path /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls/config/traffic-engineering-extensions.

Table 4: MPLS Configuration (Global)

Command and Path

OpenConfig Configuration

Junos Configuration

Traffic engineering extensions

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                mpls {
                    config {
                        traffic-engineering-extensions <>;
                    }
                }
            }
        }
    }
}
protocols { 
    ospf { 
        traffic-engineering;
    }
}
 

When this leaf is set to true, traffic engineering extensions for OSPF advertise traffic engineering parameters using type 10 opaque LSAs.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/mpls/config/traffic-engineering-extensions

MPLS Configuration (Interfaces)

See Table 2 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /areas/area/interfaces/interface/mpls/config/traffic-engineering-metric
  • /areas/area/interfaces/interface/mpls/igp-ldp-sync/config/enabled
  • /areas/area/interfaces/interface/mpls/igp-ldp-sync/config/post-session-up-delay
Table 5: MPLS Configuration (Interfaces)

Command

OpenConfig Configuration

Junos Configuration

Traffic engineering metric

openconfig-network-instance:network-instances { 
   protocol ospf {
       ospfv2 {            
           areas {
               area <> {
                   interfaces {
                       interface <> {
                           mpls {
                               config {
                                   traffic-engineering-
                                    metric <>;
                               }
                           }
                       }
                   }
               }
           }
       }
   }
}
protocols {
   ospf {
      area <> {
          interface <> {
              te-metric <>;
           }
       }
   }
}

A link metric that should only be considered for traffic engineering purposes.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config/traffic-engineering-metric

IGP-LDP sync

openconfig-network-instance:network-instances { 
   protocol ospf {
       ospfv2 {            
           areas {
               area <> {
                   interfaces {
                       interface <> {
                           mpls {
                               igp-ldp-sync {
                                   config {
                                       enabled <>;
                                   }
                               }
                           }
                       }
                   }
               }
           }
       }
   }
}
protocols {
   ospf {
      area <> {
         interface <> {
            ldp-
             synchronization <>;
         }
      }
   }
}

When this leaf is set to true, do not utilize this link for forwarding over IGP until LDP adjacencies to the neighbors over the link are established.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/config/enabled

Post-session up delay

openconfig-network-instance:network-instances { 
   protocol ospf {
      ospfv2 {            
         areas {
            area <> {
               interfaces {
                  interface <> {
                     mpls {
                        igp-ldp-sync {
                           config {
                              post-session-up-delay <>;
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
protocols {
   ospf {
      area <> {
         interface <> {
            ldp-
            synchronization {
               hold-time <>;
            }
         }
      }
   }
}

This leaf specifies a delay, in milliseconds, between the establishment of the LDP session to the IGP neighbor, and it being considered synchronized by the IGP. You must configure this leaf using multiples of 1000 so that it maps to the Junos equivalent hold-time, which is measured in seconds.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/config/post-session-up-delay

Graceful Restart Configuration

See Table 6 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /global/graceful-restart/config/enabled
  • /global/graceful-restart/config/helper-only
Table 6: Graceful Restart Configuration

Command

OpenConfig Configuration

Junos Configuration

Enable

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                graceful-restart {
                    config {
                        enabled <>;
                    }
                }
            }
        }
    }
}
system {
    commit synchronize;
}

chassis {
    redundancy {
        graceful-switchover;
    }
}

routing-options {
    graceful-restart;
}


OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/graceful-restart/config/enabled

Helper mode

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            global {
                graceful-restart {
                    config {
                        helper-only <>;
                    }
                }
            }
        }
    }
}
Note:

Helper mode is enabled by default.

If you enable helper mode using OpenConfig:

  • You will not be able to configure graceful restart in Junos.

  • Any existing configuration for graceful restart in Junos will be deleted.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/graceful-restart/config/helper-only

Area Configuration

See Table 7 for configuration mappings of the OpenConfig path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/config/identifier.

Table 7: Area Configuration

Command and Path

OpenConfig Configuration

Junos Configuration

Area ID

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    config {
                        identifier <>;
                    }
                }
            }
        }
    }
}
protocols {
    ospf {
        area <>;
    }
}  


OpenConfig path: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/config/identifier

Interface Configuration

See Table 8 for configuration mappings of the following OpenConfig paths under /network-instances/network-instance/protocols/protocol/ospfv2/:

  • /areas/area/interfaces/interface/config/id
  • /areas/area/interfaces/interface/config/passive
  • /areas/area/interfaces/interface/config/priority
  • /areas/area/interfaces/interface/config/metric
  • /areas/area/interfaces/interface/config/network-type
Table 8: Interface Configuration

Command

OpenConfig Configuration

Junos Configuration

Interface ID

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    interfaces {
                        interface <> {
                            config {
                                id <>;
                            }
                        }
                    }
                }
            }
        }
    }
}
protocols {
    ospf {
        area <> {
            interface <>;
        }
    }
}  


Use this leaf to define a unique reference for the interface.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/id

Passive interface

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    interfaces {
                        interface <> {
                            config {
                                passive <>;
                            }
                        }
                    }
                }
            }
        }
    }
}
protocols {
    ospf {
        area <> {
            interface <> {
                passive;
            }
        }
    }
}  


When this leaf is set to true, the interface is advertised within the OSPF area but OSPF adjacencies are not established over the interface.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/passive

Interface priority

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    interfaces {
                        interface <> {
                            config {
                                priority <>;
                            }
                        }
                    }
                }
            }
        }
    }
}
protocols {
    ospf {
        area <> {
            interface <> {
                priority <>;
            }
        }
    }
}  


The local system's priority to become the designated router.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/priority

Interface metric

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    interfaces {
                        interface <> {
                            config {
                                metric <>;
                            }
                        }
                    }
                }
            }
        }
    }
}
protocols {
    ospf {
        area <> {
            interface <> {
                metric <>;
            }
        }
    }
}  


OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/metric

Interface network type

openconfig-network-instance:network-instances { 
   protocol ospf {
      ospfv2 {
         areas {
            area <> {
               interfaces {
                  interface <> {
                     config {
                        network-type <>;
                     }
                  }
               }
            }
         }
      }
   }
}
protocols {
   ospf {
      area <> {
         interface <> {
            interface-type <>;
         }
      }
   }
}  


OpenConfig path: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/network-type

Neighbor Configuration

See Table 9 for configuration mappings of the OpenConfig path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router-id.

Table 9: Neighbor Configuration

Command and Path

OpenConfig Configuration

Junos Configuration

Neighbor router ID

openconfig-network-instance:network-instances { 
    protocol ospf {
        ospfv2 {
            areas {
                area <> {
                    interfaces {
                        interface <> {
                            neighbors {
                                neighbor <router-id> {
                                    config {
                                        router-id <router-id>;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
protocols { 
    ospf { 
       area <> {
           interface <> {
                 neighbor <>;
            }
        }
    }
}  

 

The router ID of the remote system.

OpenConfig path: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router-id