- play_arrow 了解和配置 Junos 路由策略
- play_arrow 概述
- play_arrow 使用匹配条件、操作、术语和表达式评估路由策略
- play_arrow 使用策略链和子例程评估复杂案例
- play_arrow 将路由过滤器和前缀列表配置为匹配条件
- 了解用于路由策略匹配条件的路由过滤器
- 了解用于路由策略匹配条件的路由过滤器和源地址过滤器列表
- 了解仅使用源 IP 或目标 IP 的负载平衡
- 仅使用源或目标 IP 配置负载平衡
- 路由过滤器概述
- 配置路由过滤器的步行以提高运营效率
- 示例:配置路由过滤器列表
- 示例:全局配置路由过滤器的步行以提高运营效率
- 示例:在本地配置路由过滤器的步行以提高运营效率
- 示例:配置路由过滤器策略以指定通过 OSPF 获知的前缀的优先级
- 示例:使用路由过滤器配置 MED
- 示例:为路由过滤器配置第 3 层 VPN 协议系列限定符
- 了解用于路由策略匹配条件的前缀列表
- 示例:配置路由策略前缀列表
- 示例:配置 RPD 基础架构中路由前缀的优先级
- 配置 RPD 基础架构中路由前缀的优先级
- play_arrow 将 AS 路径配置为匹配条件
- play_arrow 将社区配置为匹配条件
- play_arrow 通过 BGP 路由抖动操作提高网络稳定性
- play_arrow 使用源类使用情况和目标类使用情况操作跟踪流量使用情况
- play_arrow 使用条件路由策略避免流量路由威胁
- play_arrow 通过将流量转发到丢弃接口来防范 DoS 攻击
- play_arrow 使用动态路由策略缩短提交时间
- play_arrow 应用路由策略前的测试
-
- play_arrow 配置防火墙过滤器
- play_arrow 了解防火墙过滤器如何保护您的网络
- play_arrow 防火墙过滤器匹配条件和操作
- 防火墙过滤器概述(OCX 系列)
- ACX 系列路由器上的防火墙过滤器配置文件概述(Junos OS 演化版)
- 了解防火墙过滤器匹配条件
- 了解防火墙过滤器规划
- 了解如何评估防火墙过滤器
- 了解防火墙过滤器匹配条件
- 防火墙过滤器灵活匹配条件
- 防火墙过滤器非终止操作
- 防火墙过滤器终止操作
- 防火墙过滤器匹配条件和操作(ACX 系列路由器)
- ACX 系列路由器中的防火墙过滤器匹配条件和操作 (Junos OS 演化版)
- 与协议无关的流量的防火墙过滤器匹配条件
- IPv4 流量的防火墙过滤器匹配条件
- IPv6 流量的防火墙过滤器匹配条件
- 基于数字或文本别名的防火墙过滤器匹配条件
- 基于位字段值的防火墙过滤器匹配条件
- 基于地址字段的防火墙过滤器匹配条件
- 基于地址类的防火墙过滤器匹配条件
- 了解 MPLS 流量的基于 IP 的过滤和选择性端口镜像
- MPLS 流量的防火墙过滤器匹配条件
- MPLS 标记的 IPv4 或 IPv6 流量的防火墙过滤器匹配条件
- VPLS 流量的防火墙过滤器匹配条件
- 第 2 层 CCC 流量的防火墙过滤器匹配条件
- 第 2 层桥接流量的防火墙过滤器匹配条件
- 环路接口上的防火墙过滤器支持
- play_arrow 将防火墙过滤器应用于路由引擎流量
- 在第 3 层 VPN 中的路由实例的环路接口上配置逻辑单元
- 示例:配置过滤器以根据前缀列表限制对端口的 TCP 访问
- 示例:配置无状态防火墙过滤器以接受来自可信源的流量
- 示例:配置过滤器以阻止 Telnet 和 SSH 访问
- 示例:配置过滤器以阻止 TFTP 访问
- 示例:配置过滤器以接受基于 IPv6 TCP 标志的数据包
- 示例:配置过滤器以阻止对端口的 TCP 访问(来自指定 BGP 对等方除外)
- 示例:配置无状态防火墙过滤器以防止 TCP 和 ICMP 泛滥
- 示例:使用每秒数据包数速率限制过滤器保护路由引擎
- 示例:配置过滤器以排除 LAC 订阅者的 DHCPv6 和 ICMPv6 控制流量
- DHCP 防火墙过滤器的端口号要求
- 示例:配置 DHCP 防火墙过滤器以保护路由引擎
- play_arrow 将防火墙过滤器应用于传输流量
- 示例:配置过滤器以用作入口队列过滤器
- 示例:配置过滤器以匹配 IPv6 标志
- 示例:配置过滤器以匹配端口和协议字段
- 示例:配置过滤器以计算接受和拒绝的数据包
- 示例:配置过滤器以计数和丢弃 IP 选项数据包
- 示例:配置过滤器以对 IP 选项数据包进行计数
- 示例:配置过滤器以对接受的数据包进行计数和采样
- 示例:配置过滤器以将 DSCP 位设置为零
- 示例:配置过滤器以将 DSCP 位设置为零
- 示例:将筛选器配置为匹配两个不相关的条件
- 示例:将过滤器配置为基于地址接受 DHCP 数据包
- 示例:配置过滤器以接受来自前缀的 OSPF 数据包
- 示例:配置无状态防火墙过滤器以处理片段
- 配置防火墙过滤器以防止或允许 IPv4 数据包分段
- 配置防火墙过滤器以丢弃带有移动扩展标头的入口 IPv6 数据包
- 示例:基于 IPv6 源或目标 IP 地址配置出口过滤器
- 示例:基于目标类配置速率限制过滤器
- play_arrow 在逻辑系统中配置防火墙过滤器
- play_arrow 配置防火墙过滤器记帐和日志记录
- play_arrow 将多个防火墙过滤器连接到单个接口
- play_arrow 将单个防火墙过滤器连接到多个接口
- play_arrow 配置跨 IP 网络的基于过滤器的隧道
- play_arrow 配置服务过滤器
- play_arrow 配置简单筛选器
- play_arrow 配置第 2 层防火墙过滤器
- play_arrow 为转发、分段和监管配置防火墙过滤器
- play_arrow 配置防火墙过滤器(EX 系列交换机)
- EX 系列交换机的防火墙过滤器概述
- 了解防火墙过滤器的规划
- 了解防火墙过滤器匹配条件
- 了解防火墙过滤器如何控制数据包流
- 了解如何评估防火墙过滤器
- 了解 EX 系列交换机上桥接数据包和路由数据包的防火墙过滤器处理点
- EX 系列交换机的防火墙过滤器匹配条件、操作和操作修改符
- EX 系列交换机上防火墙过滤器匹配条件、操作和操作修饰符的平台支持
- 支持交换机上环路防火墙过滤器的匹配条件和操作
- 配置防火墙过滤器(CLI 过程)
- 了解防火墙过滤器如何测试数据包的协议
- 了解 EX 系列交换机基于过滤器的转发
- 示例:为 EX 系列交换机上的端口、VLAN 和路由器流量配置防火墙过滤器
- 示例:在 EX 系列交换机的管理接口上配置防火墙过滤器
- 示例:使用基于过滤器的转发将应用程序流量路由到安全设备
- 示例:将防火墙过滤器应用于启用了 802.1X 或 MAC RADIUS 身份验证的接口上的多个请求方
- 验证监管器是否正常运行
- 防火墙过滤器故障排除
- play_arrow 配置防火墙过滤器(QFX 系列交换机、EX4600 交换机、PTX 系列路由器)
- 防火墙过滤器概述(QFX 系列)
- 了解防火墙过滤器规划
- 规划要创建的防火墙过滤器数量
- 防火墙过滤器匹配条件和操作(QFX 和 EX 系列交换机)
- 防火墙过滤器匹配条件和操作(QFX10000交换机)
- 防火墙过滤器匹配条件和操作(PTX 系列路由器)
- PTX 系列数据包传输路由器和 T 系列矩阵路由器之间的防火墙和监管差异
- 配置防火墙过滤器
- 将防火墙过滤器应用于接口
- 环路接口上的 MPLS 防火墙过滤器概述
- 在交换机上配置 MPLS 防火墙过滤器和监管器
- 在路由器上配置 MPLS 防火墙过滤器和监管器
- 配置 MPLS 防火墙过滤器和监管器
- 了解防火墙过滤器如何测试协议
- 了解桥接和路由数据包的防火墙过滤器处理点
- 了解基于过滤器的转发
- 示例:使用基于过滤器的转发将应用程序流量路由到安全设备
- 配置防火墙过滤器以解封装 GRE 或 IPIP 流量
- 验证防火墙过滤器是否正常运行
- 监控防火墙过滤器流量
- 防火墙过滤器配置疑难解答
- play_arrow 配置防火墙过滤器计费和日志记录(EX9200 交换机)
-
- play_arrow 配置语句和操作命令
- play_arrow 故障排除
- play_arrow 知识库
-
分层监管器
分层监管器概述
您可以使用分层监管器对物理或 逻辑接口 上的入口第 2 层流量进行速率限制,并根据数据包是针对加速转发 (EF) 还是较低优先级分类来应用不同的监管操作。
传入灵活 PIC 集中器 (FPC) 作为 SFPC,传出 FPC 作为 FFPC)的 M40E、M120 和 M320 边缘路由器,以及具有增强型智能排队 (IQE) PIC 的 MX 系列、 ACX7100-L、 T320、T640 和 T1600 核心路由器,都支持分层管制。
您可以将分层监管应用于逻辑接口。
分层监管器配置定义了两个以分层方式运行的监管器(一个仅用于 EF 流量,另一个用于非 EF 流量):
高级监管器 — 您可以为高级监管器配置流量限制,仅适用于高优先级 EF 流量:保证带宽和相应的突发大小限制。当 EF 流量的平均到达速率超过保证带宽且平均数据包大小超过高级突发大小限制时,EF 流量将归类为不符合。对于高级监管器,针对不合格流量的唯一可配置操作是丢弃数据包。
聚合监管器 - 您可以为聚合监管器配置聚合监管器聚合带宽(以容纳保证带宽以下的高优先级 EF 流量和正常优先级的非 EF 流量)和仅针对非 EF 流量的突发大小限制。当非 EF 流量的平均到达率超过 EF 流量当前未消耗的聚合带宽量,并且其平均数据包大小超过聚合监管器中定义的突发大小限制时,非 EF 流量被归类为不符合。对于聚合监管器,不符合流量的可配置操作是丢弃数据包、分配转发类或分配数据包丢失优先级 (PLP) 级别。
您必须将高级监管器的带宽限制配置为等于或低于聚合监管器的带宽限制。如果两个带宽限制相等,则非 EF 流量仅在没有 EF 流量到达接口时不受限制地通过接口。
EF 流量保证具有指定为高级带宽限制的带宽,而非 EF 流量的速率限制为 EF 流量当前未消耗的聚合带宽量。非 EF 流量仅在不存在 EF 流量的情况下将速率限制为整个聚合带宽。
例如,假设您使用以下组件配置分层监管器:
带宽限制设置为 2 Mbps、突发大小限制设置为 3000 字节且不合格操作设置为丢弃数据包的高级监管器。
带宽限制设置为 10 Mbps、突发大小限制设置为 3000 字节且不合格操作设置为丢弃数据包的聚合监管器。
EF 流量保证带宽为 2 Mbps。EF 流量突发(以高于 2 Mbps 的速率到达接口的 EF 流量)也可以通过接口,前提是 3000 字节存储桶中有足够的令牌可用。当没有令牌可用于突发非 EF 流量时,将使用高级监管器的监管操作对数据包进行速率限制。
非 EF 流量按带宽限制计量,范围介于 8 Mbps 和 10 Mbps 之间,具体取决于 EF 流量的平均到达速率。非 EF 流量的突发(以高于非 EF 流量的当前限制的速率到达接口的非 EF 流量)也会通过接口,前提是 3000 字节存储桶中有足够的令牌可用。当非 EF 流量超过当前允许的带宽或没有令牌可用于突发非 EF 流量时,将使用聚合监管器的监管操作对数据包进行速率限制。
订户服务防火墙监管器(ACX7100-48L 设备)
从 Junos Evolved 版本 23.4R1 开始,您可以在用户接口上的 DHCP 和 PPPoE 接入模型上配置分层监管器,该模型在订阅者登录或 CoA 期间激活。此功能支持根据数据包的颜色分类进行颜色编码的流量监管。数据包颜色使用为两个用户定义的流量类指定的数据包匹配标准进行分类。有关该功能的相关配置示例和限制,请参阅该 示例:为订阅者服务防火墙(ACX7100-48L 设备)配置分层监管器 部分。
另请参阅
示例:配置分层监管器
此示例说明如何配置分层监管器并将监管器应用于受支持平台上逻辑接口上的入口第 2 层流量。
要求
在开始之前,请确保您的环境满足以下要求:
应用分层监管器的接口是托管在以下路由平台之一上的 SONET 接口:
M40e、M120 或 M320 边缘路由器,传入 FPC 为 SFPC,传出 FPC 为 FFPC。
MX 系列、T320、T640 或 T1600 核心路由器,带增强型智能排队 (IQE) PIC。
不会将其他监管器应用于应用分层监管器的接口的输入。
您知道,如果将分层监管器应用于同时应用了输入过滤器的逻辑接口,则首先执行监管器。
概述
在此示例中,您将配置分层监管器并将该监管器应用于逻辑接口上的入口第 2 层流量。
拓扑学
将监管器应用于 SONET 逻辑接口 ,您可以为 IPv4 和 VPLS 流量配置该接口 so-1/0/0.0
。将分层监管器应用于该逻辑接口时,IPv4 和 VPLS 流量均受到分层速率限制。
您还可以为 MPLS 流量配置逻辑接口 so-1/0/0.1
。如果选择将分层监管器应用于物理接口 so-1/0/0
,则分层管制将应用于 IPv4 和 VPLS 流量 so-1/0/0.0
以及 的 MPLS 流量 so-1/0/0.1
。
配置
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参见 在配置模式下使用 CLI 编辑器。
要配置此示例,请执行以下操作:
CLI 快速配置
要快速配置此示例,请将以下配置命令复制到文本文件中,删除所有换行符,然后将命令粘贴到层次结构级别的 CLI [edit]
中。
set interfaces so-1/0/0 unit 0 family inet address 192.168.1.1/24 set interfaces so-1/0/0 unit 0 family vpls set interfaces so-1/0/0 unit 1 family mpls set class-of-service forwarding-classes class fc0 queue-num 0 priority high policing-priority premium set class-of-service forwarding-classes class fc1 queue-num 1 priority low policing-priority normal set class-of-service forwarding-classes class fc2 queue-num 2 priority low policing-priority normal set class-of-service forwarding-classes class fc3 queue-num 3 priority low policing-priority normal set firewall hierarchical-policer policer1 aggregate if-exceeding bandwidth-limit 300m burst-size-limit 30k set firewall hierarchical-policer policer1 aggregate then forwarding-class fc1 set firewall hierarchical-policer policer1 premium if-exceeding bandwidth-limit 100m burst-size-limit 50k set firewall hierarchical-policer policer1 premium then discard set interfaces so-1/0/0 unit 0 layer2-policer input-hierarchical-policer policer1
定义接口
分步过程
要定义接口,请执行以下操作:
启用物理接口的配置。
content_copy zoom_out_map[edit] user@host# edit interfaces so-1/0/0
配置逻辑单元 0。
content_copy zoom_out_map[edit interfaces so-1/0/0] user@host# set unit 0 family inet address 192.168.1.1/24 user@host# set unit 0 family vpls
如果将第 2 层监管器应用于此逻辑接口,则必须至少配置一个协议家族。
配置逻辑单元 1。
content_copy zoom_out_map[edit interfaces so-1/0/0] user@host# set unit 1 family mpls
结果
输入配置命令, show interfaces
确认接口的配置。如果命令输出未显示预期的配置,请重复此过程中的说明以更正配置。
[edit] user@host# show interfaces so-1/0/0 { unit 0 { family inet { address 192.168.1.1/24; } family vpls; } unit 1 { family mpls; } }
定义转发类
分步过程
要将引用为聚合监管器操作的转发类定义为聚合监管器操作,请执行以下操作:
启用转发类的配置。
content_copy zoom_out_map[edit] user@host# edit class-of-service forwarding-classes
定义转发类。
content_copy zoom_out_map[edit class-of-service forwarding-classes] user@host# set class fc0 queue-num 0 priority high policing-priority premium user@host# set class fc1 queue-num 1 priority low policing-priority normal user@host# set class fc2 queue-num 2 priority low policing-priority normal user@host# set class fc3 queue-num 3 priority low policing-priority normal
结果
输入 show class-of-service
配置命令,确认作为聚合监管器操作引用的转发类的配置。如果命令输出未显示预期的配置,请重复此过程中的说明以更正配置。
[edit] user@host# show class-of-service forwarding-classes { class fc0 queue-num 0 priority high policing-priority premium; class fc1 queue-num 1 priority low policing-priority normal; class fc2 queue-num 2 priority low policing-priority normal; class fc3 queue-num 3 priority low policing-priority normal; }
配置分层监管器
分步过程
要配置分层监管器:
启用分层监管器的配置。
content_copy zoom_out_map[edit] user@host# edit firewall hierarchical-policer policer1
配置聚合监管器。
content_copy zoom_out_map[edit firewall hierarchical-policer policer1] user@host# set aggregate if-exceeding bandwidth-limit 300m burst-size-limit 30k user@host# set aggregate then forwarding-class fc1
对于聚合监管器,不合格流中数据包的可配置操作是丢弃数据包、更改丢失优先级或更改转发类。
配置高级监管器。
content_copy zoom_out_map[edit firewall hierarchical-policer policer1] user@host# set premium if-exceeding bandwidth-limit 100m burst-size-limit 50k user@host# set premium then discard
高级监管器的带宽限制不得大于聚合监管器的带宽限制。
对于高级监管器,对于不合格流量中的数据包,唯一可配置的操作是丢弃数据包。
结果
输入 show firewall
配置命令,确认分层监管器的配置。如果命令输出未显示预期的配置,请重复此过程中的说明以更正配置。
[edit] user@host# show firewall hierarchical-policer policer1 { aggregate { if-exceeding { bandwidth-limit 300m; burst-size-limit 30k; } then { forwarding-class fc1; } } premium { if-exceeding { bandwidth-limit 100m; burst-size-limit 50k; } then { discard; } } }
将分层监管器应用于物理或逻辑接口上的第 2 层入口流量
分步过程
要仅在逻辑接口 so-1/0/0.0上对 IPv4 和 VPLS 流量的第 2 层入口流量进行分层速率限制,请从逻辑接口配置中引用监管器:
启用逻辑接口的配置。
content_copy zoom_out_map[edit] user@host# edit interfaces so-1/0/0 unit 0
将监管器应用于逻辑接口上的第 2 层流量时,必须为逻辑接口定义至少一个协议族。
将监管器应用于逻辑接口。
content_copy zoom_out_map[edit] user@host# set layer2-policer input-hierarchical-policer policer1
或者,要对所有协议家族和在物理接口
so-1/0/0
上配置的所有逻辑接口分层限制第 2 层入口流量的速率,您可以从物理接口配置中引用监管器。
结果
输入 show interfaces
配置命令,确认分层监管器的配置。如果命令输出未显示预期的配置,请重复此过程中的说明以更正配置。
[edit] user@host# show interfaces so-1/0/0 { unit 0 { layer2-policer { input-hierarchical-policer policer1; } family inet { address 192.168.1.1/24; } family vpls; } unit 1 { family mpls; } }
如果完成设备配置,请从配置模式输入 commit
。
验证
确认配置工作正常。
显示逻辑接口的流量统计数据和监管器
目的
验证通过逻辑接口的信息流,以及在逻辑接口上收到数据包时是否评估监管器。
操作
show interfaces
对逻辑接口so-1/0/0.0
使用操作模式命令,并包括detail
或extensive
选项。的 Traffic statistics 命令输出部分列出了逻辑接口上接收和传输的字节数和数据包数,该 Protocol inet 部分包含一个 Policer 字段,该字段将监管器 policer1
列为输入或输出监管器,如下所示:
Input: policer1-so-1/0/0.0-inet-i
Output: policer1-so-1/0/0.0-inet-o
在此示例中,监管器仅应用于输入方向上的逻辑接口流量。
显示监管器的统计信息
目的
验证监管器评估的数据包数。
操作
show policer
使用操作模式命令并选择性地指定监管器的名称。命令输出显示每个已配置的监管器(或指定的监管器)在每个方向上评估的数据包数。对于监管器 policer1
,输入和输出监管器名称显示如下:
policer1-so-1/0/0.0-inet-i
policer1-so-1/0/0.0-inet-o
-inet-i后缀表示应用于 IPv4 输入流量的监管器,而-inet-o后缀表示应用于 IPv4 输出流量的监管器。在此示例中,监管器仅适用于输入流量。
示例:为订阅者服务防火墙(ACX7100-48L 设备)配置分层监管器
此示例说明如何配置分层监管器并将监管器应用于受支持平台 (ACX7100-48L) 上订阅者接口上的入口流量。
概述
从 Junos Evolved 23.4R1 版开始,您可以配置分层监管器并将监管器应用于订阅者接口上的入口流量。ACX7100-48L 设备支持此功能。
订阅者服务分层监管器具有以下限制:
您只能配置四个级别的分层监管器,每个级别都有聚合和高级配置。
订阅者服务不支持逻辑接口监管器和聚合监管器。
- 不支持在转发类中设置监管优先级。例如: content_copy zoom_out_map
class-of-service { forwarding-classes { class BestEffort queue-num 0 priority low policing-priority normal; } }
next term
仅允许用于分层监管器,不允许用于过滤器。- 不支持将监管器直接连接到接口或家族。监管器仅通过防火墙过滤器操作受支持。
- 入口和出口不支持监管器操作
forwarding-class
。入口支持操作。loss-priority high
出口中仅discard
支持操作。 - 不能配置
loss-priority
单个策略和policer
操作。在任何给定时间,这两个操作中只有一个都受支持。 filter-specific
监管器配置不支持选项。- 出口方向不支持分层监管器和三色监管器。
筛选词链接功能不可用。
出口方向不支持三色监管器和分层监管器。
配置方案
以下部分提供了各种分层监管器选项的不同配置:
单速率双色标记监管器配置
您可以在 DHCP 和 PPPoE 访问模型上配置单速率双色标记监管器。配置在订阅者登录或 CoA 期间激活。通过输入 show dynamic-profiles pppoe-client-policer-1-profile
命令查看配置。配置示例如下:
[edit] root@bng-controller# show dynamic-profiles pppoe-client-policer-1-profile variables { downstream-inet uid; upstream-inet uid; HPolicer-in uid; HPolicer-out uid; } interfaces { pp0 { unit "$junos-interface-unit" { actual-transit-statistics; no-traps; ppp-options { chap; pap; } pppoe-options { underlying-interface "$junos-underlying-interface"; server; } keepalives interval 30; family inet { filter { input "$upstream-inet"; output "$downstream-inet"; } unnumbered-address lo0.0; } family inet6 { unnumbered-address lo0.0; } } } } firewall { family inet { filter "$downstream-inet" { interface-specific; term t1 { from { source-port 80; } then { policer "$HPolicer-in"; accept; } } } filter "$upstream-inet" { interface-specific; term t1 { from { source-port 80; } then { policer "$HPolicer-out"; accept; } } } } policer "$HPolicer-in" { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then discard; } policer "$HPolicer-out" { if-exceeding { bandwidth-limit 10m; burst-size-limit 10k; } then discard; } }
您可以在 DHCP 和 PPPoE 接入型号上配置单速率三色标记监管器。它在订阅者登录或 CoA 期间激活。通过输入 show dynamic-profiles pppoe-client-policer-1-profile
命令查看配置。配置示例如下:
[edit] user@bng-controller# show dynamic-profiles pppoe-client-policer-2-profile | no-more variables { downstream-inet uid; upstream-inet uid; HPolicer-in uid; HPolicer-out uid; } interfaces { pp0 { unit "$junos-interface-unit" { actual-transit-statistics; no-traps; ppp-options { chap; pap; } pppoe-options { underlying-interface "$junos-underlying-interface"; server; } keepalives interval 30; family inet { filter { input "$upstream-inet"; output "$downstream-inet"; } unnumbered-address lo0.0; } family inet6 { unnumbered-address lo0.0; } } } } firewall { family inet { filter "$downstream-inet" { interface-specific; term t1 { from { source-port 80; } then { policer "$HPolicer-out"; accept; } } } filter "$upstream-inet" { interface-specific; term t1 { from { source-port 80; } then { three-color-policer { single-rate "$HPolicer-in"; } count three-color-policer-count; accept; } } } } policer "$HPolicer-out" { if-exceeding { bandwidth-limit 10m; burst-size-limit 10k; } then discard; } three-color-policer "$HPolicer-in" { action { loss-priority high then discard; } single-rate { color-blind; committed-information-rate 5m; committed-burst-size 5k; excess-burst-size 15k; } } }
双速率三色标记监管器
您可以在 DHCP 和 PPPoE 访问型号上配置双速率三色标记监管器。它在订阅者登录或 CoA 期间激活。
在本节中,您可以看到控制器点上的动态配置文件配置示例。动态配置文件的内容在客户端配置文件的订阅者登录或服务配置文件的服务激活期间向前传播。通过输入 show dynamic-profiles pppoe-client-policer-1-profile
命令查看配置。配置示例如下:
[edit] root@bng-controller# show dynamic-profiles pppoe-client-policer-3-profile | no-more variables { downstream-inet uid; upstream-inet uid; HPolicer-in uid; HPolicer-out uid; } interfaces { pp0 { unit "$junos-interface-unit" { actual-transit-statistics; no-traps; ppp-options { chap; pap; } pppoe-options { underlying-interface "$junos-underlying-interface"; server; } keepalives interval 30; family inet { filter { input "$upstream-inet"; output "$downstream-inet"; } unnumbered-address lo0.0; } family inet6 { unnumbered-address lo0.0; } } } } firewall { family inet { filter "$downstream-inet" { interface-specific; term t1 { from { source-port 80; } then { policer "$HPolicer-out"; accept; } } } filter "$upstream-inet" { interface-specific; term t1 { from { source-port 80; } then { three-color-policer { two-rate "$HPolicer-in"; } count three-color-policer-count; accept; } } } } policer "$HPolicer-out" { if-exceeding { bandwidth-limit 10m; burst-size-limit 10k; } then discard; } three-color-policer "$HPolicer-in" { action { loss-priority high then discard; } two-rate { color-blind; committed-information-rate 5m; committed-burst-size 5k; peak-information-rate 10m; peak-burst-size 10k; } } }
适用于 DHCP 和 PPPoE 的分层监管器
在本节中,您可以看到 DHCP 和 PPPoE 访问模型上控制器点的动态配置文件配置示例。动态配置文件的内容在客户端配置文件的订阅者登录或服务配置文件的服务激活期间向前传播。通过输入 show dynamic-profiles pppoe-client-policer-1-profile
命令查看配置。配置示例如下:
[edit] user@host# show dynamic-profiles pppoe-client-policer-4-profile variables { downstream-inet uid; upstream-inet uid; HPolicer-in uid; HPolicer-out uid; P0-IN uid; P1-IN uid; P2-IN uid; Session-IN uid; } interfaces { pp0 { unit "$junos-interface-unit" { actual-transit-statistics; no-traps; ppp-options { chap; pap; } pppoe-options { underlying-interface "$junos-underlying-interface"; server; } keepalives interval 30; family inet { filter { input "$upstream-inet"; output "$downstream-inet"; } unnumbered-address lo0.0; } family inet6 { unnumbered-address lo0.0; } } } } firewall { family inet { filter "$downstream-inet" { interface-specific; term t1 { from { source-port 80; } then { policer "$HPolicer-out"; accept; } } } filter "$upstream-inet" { interface-specific; term P0-Aggregate { from { dscp 46; } then { hierarchical-policer "$P0-IN"; next term; } } term P1-Premium { from { dscp [ 46 22 ]; } then { force-premium; next term; } } term P1-Aggregate { from { dscp [ 46 22 ]; } then { hierarchical-policer "$P1-IN"; next term; } } term P2-Premium { from { dscp [ 46 22 56 ]; } then { force-premium; next term; } } term P2-Aggregate { from { dscp [ 46 22 56 ]; } then { hierarchical-policer "$P2-IN"; next term; } } term final-Premium { from { dscp [ 46 22 56 00 ]; } then { force-premium; next term; } } term final { then { hierarchical-policer "$Session-IN"; accept; } } } } policer "$HPolicer-out" { if-exceeding { bandwidth-limit 10m; burst-size-limit 10k; } then discard; } hierarchical-policer "$HPolicer-in" { aggregate { if-exceeding { bandwidth-limit 30m; burst-size-limit 30k; } then { loss-priority high; } } premium { if-exceeding { bandwidth-limit 10m; burst-size-limit 10k; } then { discard; } } } hierarchical-policer "$P0-IN" { logical-interface-policer; aggregate { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } premium { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } } hierarchical-policer "$P1-IN" { logical-interface-policer; aggregate { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } premium { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } } hierarchical-policer "$P2-IN" { logical-interface-policer; aggregate { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } premium { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } } hierarchical-policer "$Session-IN" { logical-interface-policer; aggregate { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } premium { if-exceeding { bandwidth-limit 5m; burst-size-limit 5k; } then { discard; } } } }
如果完成设备配置,请从配置模式输入 commit
。