Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Mapping OpenConfig BGP Commands to Junos Configuration

Note:

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

The tables below show the mapping of OpenConfig BGP commands with the relevant configuration in Junos.

AFI-SAFI Prefix-Limit Configuration

Table 1: SRTE Policy Prefix-Limit Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/srte-policy-ipv4

  • IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/srte-policy-ipv6

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 

AFI-SAFI Prefix-Limit Received Configuration

Table 2: Unicast Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/ipv4-unicast

  • IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/ipv6-unicast

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            unicast {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            unicast {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
Table 3: Policy Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • openconfig-network-instance/network-instances/

Peer Group Export Policy

network-instance DEFAULT {
   config {
      type DEFAULT_INSTANCE;
   }
   protocols {
      protocol BGP bgp {
         bgp {
            neighbors {
               neighbor 1.1.1.1 {
                  config {
                     peer-group ext;
                  }
                     afi-safis {
                        afi-safi IPV4_UNICAST {
                           apply-policy {
                              config {
                                 export-policy send-direct;
                              }
                           }
                        }
                     }
                  }
               }
            }
        }
    }
}
protocols {
    bgp {
        group ext {
            type internal;
            local-as 200;
            neighbor 1.1.1.1 {
                family inet {
                    unicast {
                        export send-direct;
                    }
                }
            }
        }
    }
}

Peer Group Import Policy

network-instance DEFAULT {
   config {
      type DEFAULT_INSTANCE;
   }
   protocols {
      protocol BGP bgp {
         bgp {
            peer-groups {
               peer-group ext {
                  config {
                     local-as 200;
                     peer-type INTERNAL;
                  }
                  afi-safis {
                     afi-safi IPV4_UNICAST {
                        apply-policy {
                           config {
                              import-policy send-direct;
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
protocols {
    bgp {
        group ext {
            type internal;
            family inet {
                unicast {
                    import send-direct;
                }
            }
            local-as 200;
        }
    }
}

Neighbor Export Policy

network-instance DEFAULT {
   config {
      type DEFAULT_INSTANCE;
   }
   protocols {
      protocol BGP bgp {
         bgp {
            neighbors {
               neighbor 1.1.1.1 {
                  config {
                     peer-group ext;
                  }
                  afi-safis {
                     afi-safi IPV4_UNICAST {
                        apply-policy {
                           config {
                              export-policy send-direct;
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
 protocols {
    bgp {
        group ext {
            type internal;
            local-as 200;
            neighbor 1.1.1.1 {
                family inet {
                    unicast {
                        export send-direct;
                    }
                }
            }
        }
    }
}

Neighbor Import Policy

network-instance DEFAULT {
   config {
      type DEFAULT_INSTANCE;
   }
   protocols {
      protocol BGP bgp {
         bgp {
            neighbors {
               neighbor 1.1.1.1 {
                  config {
                     peer-group ext;
                  }
                  afi-safis {
                     afi-safi IPV4_UNICAST {
                        apply-policy {
                           config {
                              import-policy send-direct;
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
} 
protocols {
    bgp {
        group ext {
            type internal;
            local-as 200;
            neighbor 1.1.1.1 {
                family inet {
                    unicast {
                        import send-direct;
                    }
                }
            }
        }
    }
}

Global Export Policy

Not Supported

protocols {
    bgp {
        family inet {
            unicast {
                export send-direct;
            }
        }
    }
}

Global Import Policy

Not Supported

protocols {
    bgp {
        family inet {
            unicast {
                import send-direct;
            }
        }
    }
}
Note:

OpenConfig configuration of export and import policies under the afi-sai hierarchy level is only supported for IPv4 and IPv6 unicast.

Table 4: Labeled-Unicast Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/ipv4-labeled-unicast

  • IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/ipv6-labeled-unicast

  • L3 VPN-IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l3vpn-ipv4-unicast

  • L3 VPN-IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l3vpn-ipv6-unicast

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols {
    bgp {
      group <> {
         family (inet | inet6 | 
          inet-vpn | inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family (inet | inet6 | 
          inet-vpn | inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family (inet | inet6 | 
          inet-vpn | inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
Table 5: L3 VPN Multicast Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l3vpn-ipv4-multicast

  • IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l3vpn-ipv6-multicast

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols {
   bgp {
      group <> {
         family (inet-vpn |
          inet6-vpn) {
            multicast {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family (inet-vpn |
          inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family (inet-vpn |
          inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
Table 6: L2 VPN VPLS Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefix:

  • /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l2vpn-vpls

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols {
   bgp {
      group <> {
         family l2vpn {
            signaling {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family l2vpn {
            signaling {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family l2vpn {
            signaling {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
Table 7: L2 VPN EVPN Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefix:

  • /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/l2vpn-evpn

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols {
   bgp {
      group <> {
         family evpn {
            signaling {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family evpn {
            signaling {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family evpn {
            signaling {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
Table 8: SRTE Policy Prefix-Limit-Received Configuration

Command Name

OpenConfig Command Path

Junos Configuration

Command path prefixes:

  • IPv4—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/srte-policy-ipv4

  • IPv6—/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safi/afi-safi-name/<afi-safi-name>/srte-policy-ipv6

Max-Prefixes

/prefix-limit-received/config/max-prefixes

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  maximum <>;
               }
            }
         }
      }
   }
}
 

Prevent-Teardown

/prefix-limit-received/config/prevent-teardown

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  teardown;
               }
            }
         }
      }
   }
}
 

Warning-Threshold-PCT

/prefix-limit-received/config/warning-threshold-pct

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            segment-routing-te {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}