主聚合接口 (AE) 的速率限制,无需在 Juniper MX 中的单元级别应用

网络工程 路由器 瞻博网络 瞻博网络
2021-07-04 00:24:08

我想在主聚合接口 (AE) 上应用速率限制而不在单元级别应用。我们有一位客户通过 100G 接口连接到我们的瞻博网络 MX480。单个 100G 接口是捆绑链接 ae23 的一部分。该捆绑链路上配置了 2 个子接口(单元)。我们想在主界面上应用50G的速率限制。

我们可以使用 class of service scheduler 在主界面上应用速率限制。但我们现在想避免它。是否可以在不使用服务调度程序类的情况下在主界面上应用速率限制?

如果有人可以对此提供帮助,我们将不胜感激。

非常感谢 !!!!

下面是我们最后的配置。

R1> show lacp interfaces ae23 
Aggregated interface: ae23
    LACP state:       Role   Exp   Def  Dist  Col  Syn  Aggr  Timeout  Activity
      et-4/1/5       Actor    No    No   Yes  Yes  Yes   Yes     Fast    Active
      et-4/1/5     Partner    No    No   Yes  Yes  Yes   Yes     Slow    Active
    LACP protocol:        Receive State  Transmit State          Mux State 
      et-4/1/5                  Current   Slow periodic Collecting distributing


R1> show interfaces et-4/1/5 descriptions 
Interface       Admin Link Description
et-4/1/5        up    up   Customer_Link_100G

R1> show configuration interfaces ae23 
apply-groups xge-if-parameters;
aggregated-ether-options {
    lacp {
        active;
    }
}
unit 100 {
    description Customer_Internet_Traffic;
    vlan-id 100;
    family inet {
        address 172.16.1.1/30;
    }
}
unit 200 {
    description Customer_Office_Traffic;
    vlan-id 200;
    family inet {
        address 172.16.2.1/30;
    }
}

R1> show interfaces et-4/1/5 | match Speed 
  Link-level type: Flexible-Ethernet, MTU: 9192, MRU: 9200, Speed: 100Gbps, BPDU Error: None, Loopback: Disabled, Source filtering: Disabled,
1个回答

这有点复杂。:) 要将过滤器应用于物理接口,您需要将“物理接口策略器”应用于 ae 的所有单元。这只能通过防火墙过滤器来完成。您可以使用 apply-groups 避免在所有设备上配置此功能。以下是分步说明:


配置监管器

[edit firewall]
policer shared-phy-policer-50g {
    physical-interface-policer;
    shared-bandwidth-policer;
    if-exceeding {
        bandwidth-limit 50g;
        burst-size-limit 6250000;
    }
    then discard;
}

该策略器有两个特殊选项。physical-interface-policer表示该策略器的所有实例都将在物理接口级别聚合。shared-bandwidth-policer使监管器正确应用于多个 PFE,以便在 PFE 之间共享带宽(否则每个 PFE 将获得完整的 50G 带宽)。

配置防火墙过滤器

[edit firewall family inet]
      filter shared-phy-filter-50g-inet {
          physical-interface-filter;
          term policer {
              then policer shared-phy-policer-50g;
          }
      }

监管器需要通过防火墙过滤器应用。这个过滤器不是很复杂,唯一的特殊选项就是pyhsical-interface-filter你可以在这个过滤器中使用物理接口策略器。

如果您也有 IPv6(或 VPLS 或任何其他系列),您可以配置一个额外的过滤器,在firewall family ipv6 (or vpls, ...)过滤器下引用相同的监察器。

创建应用组

[edit groups]
   shared-phy-filter-50g {
       interfaces {
           <ae*> {
               unit <*> {
                   family inet {
                       filter {
                           input shared-phy-filter-50g-inet;
                           output shared-phy-filter-50g-inet;
                       }
                   }
               }
           }
       }
   }

该组将把policer 应用到family inet 下的所有单元。请注意,当您将此组应用于 ae 时,将为每个单元创建一个“家庭 inet”,如果您在 ae 上使用混合服务(如 VPLS),这可能无法工作。在这种情况下,您需要手动将其应用到每个 inet 单元。

申请组

set interfaces ae23 apply-groups shared-phy-filter-50g

应该就是这样。您现在正在监管流量,应该会看到类似的内容:

> show firewall filter shared-phy-filter-50g-inet-ae23-i detail    
Filter: shared-phy-filter-50g-inet-ae23-i                
Policers:
Name                                                Bytes              Packets
shared-phy-filter-50g-inet-ae23-i                   0                  0

有一个过滤器,-i最后用于传入流量,-o最后用于传出流量。