帮助我们改善您的体验。

让我们了解您的想法。

您是否能抽出两分钟的时间完成一份问卷调查?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
keyboard_arrow_right

机器翻译对您有帮助吗?

starstarstarstarstar
Go to English page
免责声明:

我们将使用第三方机器翻译软件翻译本页面。瞻博网络虽已做出相当大的努力提供高质量译文,但无法保证其准确性。如果对译文信息的准确性有任何疑问,请参阅英文版本. 可下载的 PDF 仅提供英文版.

示例:将监管器应用于 OVSDB 管理的接口

date_range 18-Jan-25

从 Junos OS 14.1X53-D30 版开始,您可以在由 Contrail 控制器管理的 VXLAN 接口上创建 family ethernet-switching 逻辑单元(子接口)。(控制器和交换机通过 Open vSwitch 数据库 — OVSDB — 管理协议进行通信)。此支持使您能够将带有操作 three-color-policer 的防火墙过滤器应用于这些子接口,这意味着您可以将双速率三色标记(监管器)应用于 OVSDB 管理的接口。

由于 Contrail 控制器可以动态创建子接口,因此您需要应用防火墙过滤器,以便在控制器创建子接口时将过滤器应用于子接口。您可以通过使用配置组配置和应用防火墙过滤器来实现此目的。(您必须使用配置组来实现此目的,也就是说,您不能将防火墙过滤器直接应用于这些子接口。

注:

防火墙过滤器是 OVSDB 管理的接口的子接口上 family ethernet-switching 唯一受支持的配置项目。双速率三色标记是唯一受支持的监管器。

要求

此示例使用以下硬件和软件组件:

  • QFX5100交换机

  • Junos OS 版本 14.1X53-D30 或更高版本

概述

此示例假定交换机上的接口 xe-0/0/0 和 xe-0/0/1 是由 Contrail 控制器管理的 VXLAN 接口,这意味着控制器已将 and encapsulation extended-vlan-bridge 语句应用于flexible-vlan-tagging这些接口。要将带有监管器操作的防火墙过滤器第 2 层(端口)防火墙过滤器应用于控制器动态创建的任何子接口,您必须创建并应用过滤器,如以下示例所示。

注:

如示例中所示,如果要将防火墙过滤器(和监管器)应用于 OVSDB 管理的子接口,则所有语句都必须是配置组的一部分。

配置

要使用自动应用于 Contrail 控制器动态创建的子接口的监管器操作配置防火墙过滤器,请执行以下操作:

CLI 快速配置

content_copy zoom_out_map
[edit]
set groups vxlan-policer-group interfaces xe-0/0/0 unit <*> family ethernet-switching filter input vxlan-filter
set groups vxlan-policer-group interfaces xe-0/0/1 unit <*> family ethernet-switching filter input vxlan-filter
set groups vxlan-policer-group firewall three-color-policer vxlan-policer action loss-priority high then discard
set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate color-blind
set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate committed-burst-size 2m
set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate committed-information-rate 100m
set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate peak-burst-size 4m
set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate peak-information-rate 100m
set groups vxlan-policer-group firewall family ethernet-switching filter vxlan-filter term t1 then three-color-policer two-rate vxlan-policer
set apply-groups vxlan-policer-group

程序

分步过程

  1. 创建配置组 vxlan-policer-group 以将防火墙过滤器 vxlan-filter 应用于接口 xe-0/0/0 的任何子接口。过滤器适用于任何子接口,因为您指定 unit <*>

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group interfaces xe-0/0/0 unit <*> family ethernet-switching filter input vxlan-filter
  2. 为接口 xe-0/0/1 创建相同的配置:

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group interfaces xe-0/0/1 unit <*> family ethernet-switching filter input vxlan-filter
  3. 将监管器配置为丢弃具有高丢失优先级的数据包。(Junos OS 为超过峰值信息速率和峰值突发大小的数据包分配高丢失优先级。)与接口配置一样,您还必须将监管器配置为配置组的一部分。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer action loss-priority high then discard
  4. 将监管器配置为色盲,这意味着它会忽略数据包的任何预分类,并且可以分配更高或更低的丢包优先级。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate color-blind
  5. 将监管器配置为允许传入流量比承诺的信息速率最多突增 2 MB,并且仍标记为低丢包优先级(绿色)。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate committed-burst-size 2m
  6. 配置监管器以在正常线路条件下允许 100 MB 的保证带宽。这是数据包标记为低丢包优先级(绿色)的平均速率上行阈值。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate committed-information-rate 100m
  7. 配置监管器,允许传入数据包在峰值信息速率以上最多突发 4 MB,但仍标有中高丢包优先级(黄色)。超过峰值突发大小的数据包将被标记为高丢包优先级(红色)。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate peak-burst-size 4m
  8. 将监管器配置为允许最大可实现的速率为 100 MB。超过承诺信息速率但低于峰值信息速率的数据包将标记为中高丢包优先级(黄色)。超过峰值信息速率的数据包标记为高丢包优先级(红色)。

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall three-color-policer vxlan-policer two-rate peak-information-rate 100m
  9. 配置防火墙过滤器 vxlan-filter 以向监管器发送匹配的数据包(所有数据包,因为没有 from 语句):

    content_copy zoom_out_map
    [edit]
    user@switch# set groups vxlan-policer-group firewall family ethernet-switching filter vxlan-filter term t1 then three-color-policer two-rate vxlan-policer
  10. 应用组以启用其配置:

    content_copy zoom_out_map
    [edit]
    user@switch# set apply-groups vxlan-policer-group
footer-navigation