Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Mapping OpenConfig Network Instance Commands to Junos Operation

Note:

See OpenConfig Data Model Version topic to understand the data models supported version and its Junos OS release for Juniper Networks ACX Series, EX Series, MX Series, PTX Series, and QFX Series.

Network instance models a generic virtual forwarding table on a device. This supports a Layer 3 forwarding construct such as a virtual routing and forwarding (VRF) instance, or a Layer 2 instance such as a virtual switch instance. A mixed Layer 2 and Layer 3 instances are also supported.

Starting with Junos OS Release 17.4R1, network instance based BGP configuration is supported. After the network instance is configured, you will be prompted with options for BGP configuration such as global bgp, neighbor bgp, and so on.

Note:

There is no change in the existing BGP configuration, you can configure BGP in a specific network instance.

#mapping-openconfig-network-instance-commands-to-junos-operation__NetworkInstance-1377A821 lists the network instance resource paths.

For configuration and mappings to Junos commands, see:

  • Table 1: Basic Configuration
  • Table 2: Interfaces Configuration
  • Table 3: Static Routes Configuration
  • Table 4: Local Aggregates Configuration
  • Table 5: Inter-Instance Policies Configuration
Table 1: Basic Configuration

Command Name

OpenConfig Configuration

Junos Configuration

description

network-instances {
     network-instance <> { 
          config {
               description;
          }
     }
}

routing-instances <> {
     description; 
}

enabled

network-instances {
     network-instance <> { 
          config {
               enabled;
          }
     }
}

routing-instances <>;
Note:

Use the deactivate command to indicate that the network instance should not be active.

name

network-instances {
     network-instance <> { 
          config {
               name;
          }
     }
}

routing-instances <>;

route-distinguisher

network-instances {
     network-instance <> { 
          config {
               route-distinguisher <>;
          }
     }
}

routing-instances <> {
     route-distinguisher <>; 
}

router-id

network-instances {
     network-instance <> { 
          config {
               router-id <>;
          }
     }
}

routing-instances <> {
     router-options {
          router-id <>;
     } 
}

type

network-instances {
     network-instance <> { 
          config {
               type <>;
          }
     }
}

routing-instances <> {
     instance-type <>; 
}
Table 2: Interfaces Configuration

Command Name

OpenConfig Configuration

Junos Configuration

interface

network-instances {
     network-instance <> { 
          interfaces {
	        config {
                    interface <>;
               }
          }
     }
}

routing-instances <> {
     interface <>; 
}

subinterface

network-instances {
     network-instance <> { 
          interfaces {
	        config {
                    subinterface <>;
               }
          }
     }
}

routing-instances <> {
     interface <>; 
}
Table 3: Static Route Configuration

Command Name

OpenConfig Configuration

Junos Configuration

prefix

network-instances {
    network-instance <> {
         protocols {
              protocol {
                   static-routes {
                        static {
                             config {
                                  prefix <>;
                             }
                        }
                   }
              }
         }
    }
}

routing-instances <> {
    routing-options {
         static {
              route <>;
         }
    }
}

set tag (static routes)

network-instances {
    network-instance <> {
         protocols {
              protocol {
                   static-routes {
                        static {
                             config {
                                  set-tag <>;
                             }
                        }
                   }
              }
         }
    }
}

routing-instances <> {
    routing-options {
         static {
              route <> {
                   tag <>;
              }
         }
    }
}

index

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
                        config {
		                   index <>;
			            }
                     }
                  }
               }
            }
         }
      }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            next-hop <>;
         }
      }
   }
}

metric

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
                        config {
			               metric <>;
			            }
                     }
                  }
               }
            }
         }
      }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            qualified-next-hop <> {
               metric <>;
	        }
         }
      }
   }
}

next-hop

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
                        config {
			               next-hop <>;
			            }
                     }
                  }
               }
            }
         }
      }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            next-hop <>;
         }
      }
   }
}

interface

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
			            interface-ref {
                           config {
			                  interface <>;
                           }
			            }
                     }
                  }
               }
            }
         }
      }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            next-hop <>;
         }
      }
   }
}

sub-interface

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
			            interface-ref {
                           config {
			                  subinterface <>;
                           }
			            }
                     }
                  }
               }
            }
         }
      }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            next-hop <>;
         }
      }
   }
}

recurse

network-instances {
   network-instance <> {
      protocols {
         protocol {
            static-routes {
               static {
                  next-hops {
                     next-hop <> {
                        config {
			               recurse;
		                }
                     }
                  }
               }
             }
          }
       }
   }
}

routing-instances <> {
   routing-options {
      static {
         route <> {
            resolve;
         }
      }
   }
}
Table 4: Local Aggregates Configuration

Command Name

OpenConfig Configuration

Junos Configuration

discard

network-instances {
     network-instance <> {
          protocols {
               protocol {
                    local-aggregates {
                         aggregate {
                              config {
                                   discard <>;
                              }
                         }
                    }
               }
          }
     }
}

routing-instances <> {
     routing-options {
          aggregate {
               route <> {
                    discard;
               }
          }
     }
}

prefix

network-instances {
     network-instance <> {
          protocols {
               protocol {
                    local-aggregates {
                         aggregate {
                              config {
                                   prefix <>;
                              }
                         }
                    }
               }
          }
     }
}

routing-instances <> {
     routing-options {
          aggregate {
               route <>;
               }
          }
     }
}

set tag

network-instances {
     network-instance {
          protocols {
               protocol {
                    local-aggregates {
                         aggregate {
                              config {
                                   set-tag <>;
                              }
                         }
                    }
               }
          }
     }
}

routing-instances <> {
     routing-options {
          aggregate {
               route <> {
                    tag <>;
               }
          }
     }
}
Table 5: Inter-instance Policies

Command Name

OpenConfig Configuration

Junos Configuration

export policy

network-instances {
     network-instance <> {
          inter-instance-policies {
               apply-policy <> {
                    config {
                         export-policy;
               }
          }
     }
}
routing-instances <> {
        vrf-export <>;
}

import policy

network-instances {
     network-instance <> {
          inter-instance-policies {
               apply-policy <> {
                    config {
                         import-policy;
               }
          }
     }
}
routing-instances <> {
        vrf-import <>;
}

default export policy

network-instances {
     network-instance <> {
          inter-instance-policies {
               apply-policy <> {
                    config {
                         default-export-policy;
               }
          }
     }
}
routing-instances <> {
        export-default-action <accept | reject>;
}

You must configure an export policy before you can configure a default export policy.

default import policy

network-instances {
     network-instance <> {
          inter-instance-policies {
               apply-policy <> {
                    config {
                         default-import-policy;
               }
          }
     }
}
routing-instances <> {
        import-default-action <accept | reject>;
}

You must configure an import policy before you can configure a default import policy.

Release History Table
Release
Description
17.4R1
Starting with Junos OS Release 17.4R1, network instance based BGP configuration is supported.