Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

将 OpenConfig BGP 命令映射到 Junos 配置

注意:

请参阅 OpenConfig 数据模型版本主题 ,了解瞻博网络 MX 系列、PTX 系列和 QFX 系列的数据模型支持的版本及其 Junos OS 版本。

下表显示了 OpenConfig BGP 命令与 Junos 中相关配置的映射。

AFI-SAFI 前缀-限制配置

表 1: SRTE 策略前缀-限制配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • 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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

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

AFI-SAFI 前缀限制接收配置

表 2:单播前缀限制接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • 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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

protocols { 
   bgp {
      group <> {
         family (inet | inet6) {
            unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
表 3:策略配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • openconfig-network-instance/network-instances/

对等组导出策略

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;
                    }
                }
            }
        }
    }
}

对等组导入策略

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;
        }
    }
}

邻居导出策略

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;
                    }
                }
            }
        }
    }
}

邻居导入策略

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;
                    }
                }
            }
        }
    }
}

全球出口政策

不支持

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

全球进口政策

不支持

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

只有 IPv4 和 IPv6 单播支持层次结构级别下的 afi-sai 导出和导入策略的 OpenConfig 配置。

表 4:标记单播前缀限制接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • 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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

protocols { 
   bgp {
      group <> {
         family (inet | inet6 | 
          inet-vpn | inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
表 5:L3 VPN 组播前缀限制接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • 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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

protocols { 
   bgp {
      group <> {
         family (inet-vpn |
          inet6-vpn) {
            labeled-unicast {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
表 6:L2 VPN VPLS 前缀限制接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

protocols { 
   bgp {
      group <> {
         family l2vpn {
            signaling {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
表 7:L2 VPN EVPN 前缀限制接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

protocols { 
   bgp {
      group <> {
         family evpn {
            signaling {
               prefix-limit {
                  teardown <>;
               }
            }
         }
      }
   }
}
 
表 8:SRTE 策略前缀-限制-接收配置

命令名称

OpenConfig 命令路径

Junos 配置

命令路径前缀:

  • 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

最大前缀数

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

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

预防-拆解

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

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

警告阈值-PCT

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

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