示例:在 MX104 路由器上为网桥域中的第 2 层 E-LAN 服务配置基于 RFC2544 的基准测试
此示例说明如何为桥接域中的第 2 层 E-LAN 服务配置基准测试。此示例包含四个基本测试:吞吐量、帧丢失、背靠后和延迟。
要求
MX 系列路由器在基于 RFC2544 的基准测试中仅支持反射器功能。此示例使用 MX104 3D 通用边缘路由器作为反射器。您还可以在具有 Junos OS 16.1 或更高版本的 MPC1、MPC2 和 16 端口 10 千兆以太网 MPC 的 MX80 系列路由器以及 MX240、MX480 和 MX960 系列路由器上配置基准测试。要对 MX240、MX480、MX960 系列路由器配置基于 RFC2544 的基准测试,请参阅 在 MX 系列路由器上启用对基于 RFC 2544 的基准测试的支持。
此示例使用以下硬件和软件组件:
MX104(反射器)
ACX 系列路由器(发起方)
MX 系列路由器的 Junos OS 14.2 或更高版本
概述
考虑一个示例拓扑,其中 ACX 系列路由器充当基于 RFC2544 的基准测试的测试帧的发起者和终止器。ACX 系列路由器一侧连接到客户边缘设备 CE1,并通过第 2 层网络连接到 MX104 系列路由器。MX104 系列路由器可充当反射器,将从 ACX 系列发起方接收的测试帧反射到发起方。MX04 系列路由器还连接到了客户的边缘设备 CE2。
在接口上启用第 2 层反射时,将内部配置过滤器以阻止入口和出口流量(通过测试接口的测试流量除外)。
图 1 显示了用于在第 2 层网桥网络上的 UNI 方向执行所有四个基于 RFC2544 的基准测试(吞吐量、从后到后的帧、延迟和帧丢失)的示例拓扑。

在 ACX 系列路由器上,ge-1/2/1.0 是第 2 层 NNI 接口,ge-1/1/3.0 是第 2 层 UNI 接口。在 MX104 系列路由器上,ge-1/1/6.0 是第 2 层 NNI 接口,ge-1/1/5.0 是第 2 层 UNI 接口。基准测试用于计算网桥域中 E-LAN 服务的性能属性。
可以使用目标 MAC 地址、源 MAC 地址和测试接口识别测试数据包。支持已标记和未标记的接口。对于标记的接口,测试接口是 VLAN 子接口。对于未标记的接口,物理端口表示测试接口。当您对其中一个子接口配置基准测试时,通过同一物理端口中的其他 VLAN 子接口的流量不会受到影响。
配置
在此示例中,您将为第 2 层网桥域中的 E-LAN 服务配置基准测试,该域在两个路由器之间启用,以检测和分析互连路由器的性能。在此示例中,我们首先配置 ACX 系列路由器。在 ACX 系列路由器上,首先通过指定测试配置文件和测试属性来配置每个测试,然后通过将测试与测试配置文件与相关属性相关联来定义测试。然后,您可以配置该接口。在 MX104 系列路由器上,执行相同的步骤。但是,外部 VLAN ID、源 UDP 端口、目标 UDP 端口、每次迭代的持续时间及其值等几个属性仅适用于发起方或 ACX 系列路由器。
配置第 2 层反射时,如果要使用桥接封装模拟 ELINE 服务,可以将受测服务类型指定为 ELINE。
- CLI 快速配置
- 在 ACX 系列路由器上配置吞吐量基准测试参数
- 在 ACX 系列路由器上配置从后到后的帧基准测试参数
- 在 ACX 系列路由器上配置延迟基准测试参数
- 在 ACX 系列路由器上配置帧丢失基准测试参数
- 在 ACX 系列路由器上配置其他基准测试参数
- 在 MX104 路由器上配置基准测试参数
- 在 MX104 路由器上配置其他基准测试参数
- 结果
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到 [edit
] 层次结构级别的 CLI 中:
在 ACX 系列路由器上配置基准测试参数
set services rpm rfc2544-benchmarking profiles test-profile tput test-type throughput set services rpm rfc2544-benchmarking profiles test-profile tput packet-size 128 set services rpm rfc2544-benchmarking profiles test-profile tput bandwidth-kbps 900000 set services rpm rfc2544-benchmarking profiles test-profile b2bt test-type back-back-frames set services rpm rfc2544-benchmarking profiles test-profile b2bt packet-size 512 set services rpm rfc2544-benchmarking profiles test-profile b2bt bandwidth-kbps 950000 set services rpm rfc2544-benchmarking profiles test-profile lty test-type latency set services rpm rfc2544-benchmarking profiles test-profile lty packet-size 512 set services rpm rfc2544-benchmarking profiles test-profile lty bandwidth-kbps 1000000 set services rpm rfc2544-benchmarking profiles test-profile frloss test-type frame-loss set services rpm rfc2544-benchmarking profiles test-profile frloss packet-size 1600 set services rpm rfc2544-benchmarking profiles test-profile frloss bandwidth-kbps 1000000 set services rpm rfc2544-benchmarking tests test-name tput-test test-profile tput set services rpm rfc2544-benchmarking tests test-name tput-test source-mac-address 00:00:5e:00:53:11 set services rpm rfc2544-benchmarking tests test-name tput-test destination-mac-address 00:00:5e:00:53:22 set services rpm rfc2544-benchmarking tests test-name tput-test ovlan-id 400 set services rpm rfc2544-benchmarking tests test-name tput-test service-type elan set services rpm rfc2544-benchmarking tests test-name tput-test mode initiate-and-terminate set services rpm rfc2544-benchmarking tests test-name tput-test family bridge set services rpm rfc2544-benchmarking tests test-name tput-test direction egress set services rpm rfc2544-benchmarking tests test-name tput-test source-udp-port 200 set services rpm rfc2544-benchmarking tests test-name tput-test destination-udp-port 200 set services rpm rfc2544-benchmarking tests test-name tput-test test-iterator-duration 20 set services rpm rfc2544-benchmarking tests test-name tput-test test-interface ge-1/1/3.0 set services rpm rfc2544-benchmarking tests test-name b2b-test test-profile b2bt set services rpm rfc2544-benchmarking tests test-name b2b-test source-mac-address 00:00:5e:00:53:11 set services rpm rfc2544-benchmarking tests test-name b2b-test destination-mac-address 00:00:5e:00:53:22 set services rpm rfc2544-benchmarking tests test-name b2b-test ovlan-id 400 set services rpm rfc2544-benchmarking tests test-name b2b-test service-type elan set services rpm rfc2544-benchmarking tests test-name b2b-test mode initiate-and-terminate set services rpm rfc2544-benchmarking tests test-name b2b-test family bridge set services rpm rfc2544-benchmarking tests test-name b2b-test direction egress set services rpm rfc2544-benchmarking tests test-name b2b-test test-iterator-duration 20 set services rpm rfc2544-benchmarking tests test-name b2b-test test-interface ge-1/1/3.0 set services rpm rfc2544-benchmarking tests test-name lty-test test-profile lty set services rpm rfc2544-benchmarking tests test-name lty-test source-mac-address 00:00:5e:00:53:11 set services rpm rfc2544-benchmarking tests test-name lty-test destination-mac-address 00:00:5e:00:53:22 set services rpm rfc2544-benchmarking tests test-name lty-test ovlan-id 400 set services rpm rfc2544-benchmarking tests test-name lty-test service-type elan set services rpm rfc2544-benchmarking tests test-name lty-test mode initiate-and-terminate set services rpm rfc2544-benchmarking tests test-name lty-test family bridge set services rpm rfc2544-benchmarking tests test-name lty-test direction egress set services rpm rfc2544-benchmarking tests test-name lty-test source-udp-port 200 set services rpm rfc2544-benchmarking tests test-name lty-test destination-udp-port 200 set services rpm rfc2544-benchmarking tests test-name lty-test test-iterator-duration 20 set services rpm rfc2544-benchmarking tests test-name lty-test test-interface ge-1/1/3.0 set services rpm rfc2544-benchmarking tests test-name frloss-test test-profile frloss set services rpm rfc2544-benchmarking tests test-name frloss-test source-mac-address 00:00:5e:00:53:11 set services rpm rfc2544-benchmarking tests test-name frloss-test destination-mac-address 00:00:5e:00:53:22 set services rpm rfc2544-benchmarking tests test-name frloss-test ovlan-id 400 set services rpm rfc2544-benchmarking tests test-name frloss-test service-type elan set services rpm rfc2544-benchmarking tests test-name frloss-test mode initiate-and-terminate set services rpm rfc2544-benchmarking tests test-name frloss-test family bridge set services rpm rfc2544-benchmarking tests test-name frloss-test direction egress set services rpm rfc2544-benchmarking tests test-name frloss-test source-udp-port 200 set services rpm rfc2544-benchmarking tests test-name frloss-test destination-udp-port 200 set services rpm rfc2544-benchmarking tests test-name frloss-test test-iterator-duration 20 set services rpm rfc2544-benchmarking tests test-name frloss-test test-interface ge-1/1/3.0 set interfaces ge-1/2/1 flexible-vlan-tagging set interfaces ge-1/2/1 mtu 9192 set interfaces ge-1/2/1 encapsulation flexible-ethernet-services set interfaces ge-1/2/1 unit 0 encapsulation vlan-bridge set interfaces ge-1/2/1 unit 0 vlan-id 400 set interfaces ge-1/1/3 flexible-vlan-tagging set interfaces ge-1/1/3 mtu 9192 set interfaces ge-1/1/3 encapsulation flexible-ethernet-services set interfaces ge-1/1/3 unit 0 encapsulation vlan-bridge set interfaces ge-1/1/3 unit 0 vlan-id 400 set bridge-domains bd1 vlan-id 600 set bridge-domains bd1 interface ge-1/2/1.0 set bridge-domains bd1 interface ge-1/1/3.0
在 MX104 路由器上配置基准测试参数
set services rpm rfc2544-benchmarking tests test-name l2b-reflector source-mac-address 00:00:5e:00:53:11 set services rpm rfc2544-benchmarking tests test-name l2b-reflector destination-mac-address 00:00:5e:00:53:22 set services rpm rfc2544-benchmarking tests test-name l2b-reflector service-type elan set services rpm rfc2544-benchmarking tests test-name l2b-reflector mode reflect set services rpm rfc2544-benchmarking tests test-name l2b-reflector family bridge set services rpm rfc2544-benchmarking tests test-name l2b-reflector direction egress set services rpm rfc2544-benchmarking tests test-name l2b-reflector test-interface ge-1/1/5.0 set interfaces ge-1/1/6 flexible-vlan-tagging set interfaces ge-1/1/6 mtu 9192 set interfaces ge-1/1/6 encapsulation flexible-ethernet-services set interfaces ge-1/1/6 unit 0 encapsulation vlan-bridge set interfaces ge-1/1/6 unit 0 vlan-id 400 set interfaces ge-1/1/5 flexible-vlan-tagging set interfaces ge-1/1/5 mtu 9192 set interfaces ge-1/1/5 encapsulation flexible-ethernet-services set interfaces ge-1/1/5 unit 0 encapsulation vlan-bridge set interfaces ge-1/1/5 unit 0 vlan-id 400 set bridge-domains bd1 domain-type bridge set bridge-domains bd1 vlan-id 500 set bridge-domains bd1 interface ge-1/1/6.0 set bridge-domains bd1 interface ge-1/1/5.0
在 ACX 系列路由器上配置吞吐量基准测试参数
逐步过程
以下配置要求您为吞吐量测试配置测试配置文件,并引用唯一测试名称中的测试配置文件。测试名称用于定义将在 ACX 系列路由器上执行的吞吐量测试参数。
要配置 ACX 系列路由器上的吞吐量测试参数,
在配置模式下,在 [
edit
] 层次结构级别,为 RPM 实例配置实时性能监控服务 (RPM) 实例和基于 RFC2544 的基准测试。[edit] user@host# edit services rpm rfc2544-benchmarking
-
为第一个测试配置文件定义一个名称,例如吞吐量
tput
测试配置文件。[edit services rpm rfc2544-benchmarking] user@host# set profiles test-profile tput
将测试类型配置为吞吐量,将数据包大小指定为 128 字节,并将测试的理论最大带宽定义为每秒千位 (Kbps),值从 1 Kbps 到 1,000,000 Kbps。
[edit services rpm rfc2544-benchmarking profiles test-profile tput] user@host# set test-type throughput packet-size 128 bandwidth-kbps 900000
up
输入命令两次,以转至配置层次结构中的 [edit services rpm rfc2544-benchmarking
] 级别。[edit services rpm rfc2544-benchmarking profiles test-profile tput ] user@host# up user@host# up
-
为吞吐量测试定义一个名称,
tput-test
例如。测试名称的长度最多可为 32 个字符。[edit services rpm rfc2544-benchmarking ] user@host# set tests test-name tput-test
-
指定要与测试名称关联的测试配置文件
tput
的名称。[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set test-profile tput
配置测试数据包的源和目标 MAC 地址。
[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set source-mac-address 00:00:5e:00:53:11 destination-mac-address 00:00:5e:00:53:22
配置测试帧的外部 VLAN ID,并将受测服务类型指定为 E-LAN。
[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set ovlan-id 400 service-type elan
将基准测试期间发送的数据包的测试模式指定为初始化和终止。
[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set mode initiate-and-terminate
为基准测试配置系列类型
bridge
,并指定方向和出口。此外,指定要在测试数据包的 UDP 标头中使用的源和目标 UDP 端口。[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set family bridge direction egress source-udp-port 200 destination-udp-port 200
指定每次迭代的持续时间(以秒为单位),其值从 10 秒到 1,728,000 秒,并指定运行 RFC2544 基准测试的逻辑接口 ge-0/2/1.0。
[edit services rpm rfc2544-benchmarking tests test-name tput-test] user@host# set test-iterator-duration 20 test-interface ge-1/1/3.0
在 ACX 系列路由器上配置从后到后的帧基准测试参数
逐步过程
以下配置要求您为从后到背的帧测试配置测试配置文件,并引用唯一测试名称中的测试配置文件。测试名称用于定义将在 ACX 系列路由器上执行的从后到后帧测试的参数。
在 ACX 系列路由器上配置从后至后的帧测试参数:
在配置模式下,在 [
edit
] 层次结构级别,为 RPM 实例配置实时性能监控服务 (RPM) 实例和基于 RFC2544 的基准测试。[edit] user@host# edit services rpm rfc2544-benchmarking
-
为背靠背测试配置文件定义一个名称,
b2bt
例如。[edit services rpm rfc2544-benchmarking] user@host# set profiles test-profile b2bt
配置要以背靠背帧执行的测试类型,将数据包大小指定为 128 字节,并将此测试的理论最大带宽定义为每秒千位(值从 1 Kbps 到 1,000,000 Kbps)。
[edit services rpm rfc2544-benchmarking profiles test-profile b2bt] user@host# set test-type back-toback-frames packet-size 4444 bandwidth-kbps 950000
up
输入命令两次,以转至配置层次结构中的 [edit services rpm rfc2544-benchmarking
] 级别。[edit services rpm rfc2544-benchmarking profiles test-profile b2bt ] user@host# up user@host# up
-
为从后到后帧测试定义一个名称,
b2bt-test
例如。测试名称的长度最多可为 32 个字符。[edit services rpm rfc2544-benchmarking ] user@host# set tests test-name b2bt-test
-
指定要与测试名称关联的测试配置文件
b2bt
的名称。[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set test-profile b2bt
配置测试数据包的源和目标 MAC 地址。
[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set source-mac-address 00:00:5e:00:53:11 destination-mac-address 00:00:5e:00:53:22
为测试帧配置外部 VLAN ID 并指定受测服务类型。
[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set ovlan-id 400 service-type elan
将基准测试期间发送的数据包的测试模式指定为初始化和终止。
[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set mode initiate-and-terminate
为基准测试配置系列类型
bridge
,并指定方向和出口。[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set family bridge direction egress
指定每次迭代的持续时间(以秒为单位,其值从 10 秒到 1,728,000 秒)。此外,请指定逻辑接口 ge-0/2/1.0,运行基于 RFC2544 的基准测试。
[edit services rpm rfc2544-benchmarking tests test-name b2bt-test] user@host# set test-iterator-duration 20 test-interface ge-1/1/3.0
在 ACX 系列路由器上配置延迟基准测试参数
逐步过程
以下配置要求您为延迟测试配置测试配置文件,并引用唯一测试名称中的测试配置文件。测试名称用于定义将在 ACX 系列路由器上执行的延迟测试参数。
在 ACX 系列路由器上配置延迟测试参数:
在配置模式下,在 [
edit
] 层次结构级别,为 RPM 实例配置实时性能监控服务 (RPM) 实例和基于 RFC2544 的基准测试。[edit] user@host# edit services rpm rfc2544-benchmarking
-
为延迟测试配置文件定义一个名称,
lty
例如。[edit services rpm rfc2544-benchmarking] user@host# set profiles test-profile lty
配置要作为延迟来执行的测试类型,指定测试数据包的数据包大小,并将测试的最大带宽定义为每秒千位,值形式为 1 Kbps 到 1,000,000 Kbps。
[edit services rpm rfc2544-benchmarking profiles] user@host# set test-profile lty test-type latency packet-size 512 bandwidth-kbps 1000000
输入
up
命令两次,以转至配置层次结构中的上一级别。[edit services rpm rfc2544-benchmarking profiles test-profile lty] user@host# up user@host# up
-
为延迟测试定义一个名称,
lty-test
例如。测试名称的长度最多可为 32 个字符。[edit services rpm rfc2544-benchmarking ] user@host# set tests test-name lty-test
-
指定要与测试名称关联的测试配置文件
lty
的名称。[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set test-profile lty
配置测试数据包的源和目标 MAC 地址。
[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set source-mac-address 00:00:5e:00:53:11 destination-mac-address 00:00:5e:00:53:22
为测试帧配置外部 VLAN ID 并指定受测服务类型。
[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set ovlan-id 400 service-type elan
将基准测试期间发送的数据包的测试模式指定为初始化和终止。
[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set mode initiate-and-terminate
为基准测试配置系列类型
bridge
,并指定方向和出口。此外,指定要在测试数据包的 UDP 标头中使用的源和目标 UDP 端口。[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set family bridge direction egress source-udp-port 200 destination-udp-port 200
指定每次迭代的持续时间(以秒为单位,其值从 10 秒到 1,728,000 秒)。此外,请指定逻辑接口 ge-0/2/1.0,运行基于 RFC2544 的基准测试。
[edit services rpm rfc2544-benchmarking tests test-name lty-test] user@host# set test-iterator-duration 20 test-interface ge-1/1/3.0
在 ACX 系列路由器上配置帧丢失基准测试参数
逐步过程
以下配置要求您为帧丢失测试配置测试配置文件,并引用唯一测试名称中的测试配置文件。测试名称用于定义将在 ACX 系列路由器上执行的帧丢失测试参数。
在 ACX 系列路由器上配置帧丢失测试参数:
在配置模式下,在 [
edit
] 层次结构级别,为 RPM 实例配置实时性能监控服务 (RPM) 实例和基于 RFC2544 的基准测试。[edit] user@host# edit services rpm rfc2544-benchmarking
-
定义帧丢失测试配置文件的名称,例如
frloss
。[edit services rpm rfc2544-benchmarking] user@host# set profiles test-profile frloss
配置在帧丢失时执行的测试类型,指定测试数据包的数据包大小,并将测试的最大带宽定义为每秒千位(值从 1 Kbps 到 1,000,000 Kbps)。
[edit services rpm rfc2544-benchmarking profiles] user@host# set test-profile frloss test-type frame-loss packet-size 1600 bandwidth-kbps 1000000
输入命令以
up
转至配置层次结构中的上一级别。[edit services rpm rfc2544-benchmarking profiles ] user@host# up
-
为帧丢失测试定义一个名称,
frloss-test
例如。测试名称的长度最多可为 32 个字符。[edit services rpm rfc2544-benchmarking ] user@host# set tests test-name frloss-test
-
指定要与测试名称关联的测试配置文件
frloss
的名称。[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set test-profile frloss
配置测试数据包的源和目标 MAC 地址。
[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set source-mac-address 00:00:5e:00:53:11 destination-mac-address 00:00:5e:00:53:22
为测试帧配置外部 VLAN ID 并指定受测服务类型。
[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set ovlan-id 400 service-type elan
将基准测试期间发送的数据包的测试模式指定为初始化和终止。
[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set mode initiate-and-terminate
为基准测试配置系列类型
bridge
,并指定方向和出口。此外,指定要在测试数据包的 UDP 标头中使用的源和目标 UDP 端口。[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set family bridge direction egress source-udp-port 200 destination-udp-port 200
指定每次迭代的持续时间(以秒为单位,其值从 10 秒到 1,728,000 秒)。此外,请指定逻辑接口 ge-0/2/1.0,运行基于 RFC2544 的基准测试。
[edit services rpm rfc2544-benchmarking tests test-name frloss-test] user@host# set test-iterator-duration 20 test-interface ge-1/1/3.0
exit
输入命令以转至 [edit] 层次结构级别。[edit services rpm rfc2544-benchmarking tests test-name test4 ] user@host# exit
在 ACX 系列路由器上配置其他基准测试参数
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 在配置模式下使用 CLI 编辑器。
在 ACX 系列路由器上配置接口和网桥域:
配置必须从 [
edit
] 层次结构级别运行测试的第 2 层 NNI 接口。[edit] user@host# edit interfaces ge-1/2/1
配置灵活的 VLAN 标记,以在逻辑接口上传输未标记的帧或 802.1Q 单标记和双标记帧。您还可以指定接口和封装的最大传输单元 (MTU) 大小。
[edit interfaces ge-1/2/1] user@host# set flexible-vlan-tagging mtu 9192 encapsulation flexible-ethernet-services
为接口配置逻辑单元,指定封装,并在逻辑接口上配置 VLAN ID。
[edit interfaces ge-1/2/1] user@host# set unit 0 encapsulation vlan-bridge vlan-id 400
配置第 2 层 UNI 接口。
[edit] user@host# edit interfaces ge-1/1/3
配置灵活的 VLAN 标记,以在逻辑接口上传输非标记帧或 802.1Q 单标记和双标记帧。您还可以指定接口和封装的最大传输单元 (MTU) 大小。
[edit interfaces ge-1/1/3] user@host# set flexible-vlan-tagging mtu 9192 encapsulation flexible-ethernet-services
为接口配置逻辑单元,并指定封装并在逻辑接口上配置 VLAN ID。
[edit interfaces ge-1/1/3] user@host# set unit 0 encapsulation vlan-bridge vlan-id 400
配置网桥域 bd1,并指定与网桥域和 [
edit
] 层次结构级别的关联接口关联的 VLAN ID。[edit] user@host# set bridge-domains bd1 vlan-id 600 interface ge-1/2/1.0 user@host# set bridge-domains bd1 vlan-id 600 intreface ge-1/1/3.0
在 MX104 路由器上配置基准测试参数
逐步过程
以下配置要求您为 MX104 系列路由器上的基准测试配置唯一的测试名称。测试名称用于定义要执行的基准测试参数。由于测试接口和测试 MAC 地址相同,因此可以在反射器 (MX104) 上创建单个测试配置。
在 MX104 系列路由器上配置基准测试参数:
在配置模式下,在 [
edit
] 层次结构级别,为 RPM 实例配置实时性能监控服务 (RPM) 实例和基于 RFC2544 的基准测试。[edit] user@host# edit services rpm rfc2544-benchmarking
-
为测试定义一个名称,例如
l2b-reflector
。测试名称的长度最多可为 32 个字符。[edit services rpm rfc2544-benchmarking ] user@host# set tests test-name l2b-reflector
指定测试数据包的源 MAC 地址和目标 MAC 地址。
[edit services rpm rfc2544-benchmarking test-name l2b-reflector] user@host# set source-mac-address 00:00:5e:00:53:11 destination-mac-address 00:00:5e:00:53:22
-
指定受测服务类型和反射器处的模式
reflect
。[edit services rpm rfc2544-benchmarking test-name l2b-reflector] user@host# set service-type elan
指定反射器处反射的模式。
[edit services rpm rfc2544-benchmarking test-name l2b-reflector] user@host# set mode reflect
-
配置系列类型,
bridge
并指定基准测试的方向、出口。此外,请指定逻辑接口 ge-1/1/5.0,运行基于 RFC2544 的基准测试。[edit services rpm rfc2544-benchmarking tests test-name l2b-reflector] user@host# set family bridge direction egress test-interface ge-1/1/5.0
在 MX104 路由器上配置其他基准测试参数
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 在配置模式下使用 CLI 编辑器。
在 MX104 系列路由器上配置接口和网桥域:
配置必须运行测试的第 2 层 NNI 接口。
[edit] user@host# edit interfaces ge-1/1/6
配置灵活的 VLAN 标记,以在逻辑接口上传输未标记的帧或 802.1Q 单标记和双标记帧。您还可以指定接口和封装的最大传输单元 (MTU) 大小。
[edit interfaces ge-1/1/6] user@host# set flexible-vlan-tagging mtu 9192 encapsulation flexible-ethernet-services
为接口配置逻辑单元,指定封装,并在逻辑接口上配置 VLAN ID。
[edit interfaces ge-1/1/6] user@host# set unit 0 encapsulation vlan-bridge vlan-id 400
配置第 2 层 NNI 接口。
[edit] user@host# edit interfaces ge-1/1/5
配置灵活的 VLAN 标记,以在逻辑接口上传输未标记的帧或 802.1Q 单标记和双标记帧。您还可以指定接口和封装的最大传输单元 (MTU) 大小。
[edit interfaces ge-1/1/5] user@host# set flexible-vlan-tagging mtu 9192 encapsulation flexible-ethernet-services
为接口配置逻辑单元,指定封装,并在逻辑接口上配置 VLAN ID。
[edit interfaces ge-1/1/5] user@host# set unit 0 encapsulation vlan-bridge vlan-id 400
配置网桥域 bd1,并指定与网桥域关联的 VLAN ID 以及 [
edit
] 层次结构级别的关联接口。[edit] user@host# set bridge-domains bd1 vlan-id 500 interface ge-1/1/6.0 user@host# set bridge-domains bd1 vlan-id 500 interface ge-1/1/5.0
开始对反射器进行基准测试。
user@host> test services rpm rfc2544-benchamrking test l2b-reflector start
在发起方成功完成测试后,可以通过输入
test services rpm rfc2544-benchmarking test l2b-reflector stop
命令在反射器处停止测试。
结果
在配置模式下,输入 show
命令,确认您在 ACX 系列路由器和 MX104 系列路由器上的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
ACX 系列路由器上的基准测试参数:
[edit interfaces] ge-1/2/1 { flexible-vlan-tagging; mtu 9192; encapsulation flexible-ethernet-services; unit 0 { encapsulation vlan-bridge; vlan-id 400; } } ge-1/1/3 { flexible-vlan-tagging; mtu 9192; encapsulation flexible-ethernet-services; unit 0 { encapsulation vlan-bridge; vlan-id 400; } } [edit bridge-domains] bd1 { vlan-id 600; interface ge-1/2/1.0; interface ge-1/1/3.0; } [edit services rpm] rfc2544-benchmarking { profiles { test-profile tput { test-type throughput packet-size 128; bandwidth-kbps 900000; } test-profile b2bt { test-type back-back-frames packet-size 512; bandwidth-kbps 950000; } test-profile lty { test-type latency packet-size 512; bandwidth-kbps 100000; } test-profile frloss { test-type frameloss packet-size 1600; bandwidth-kbps 1000000; } } tests { test-name tput-test { interface ge-1/1/3.0; test-profile tput; mode initiate-and-terminate; source-mac-address 00:00:5e:00:53:11; destination-mac-address 00:00:5e:00:53:22; ovlan-id 400; service-type elan; family bridge; direction egress; source-udp-port 200; destination-udp-port 200; test-iterator-duration 20; } test-name b2b-test { interface ge-1/1/3.0; test-profile b2bt; mode initiate-and-terminate; source-mac-address 00:00:5e:00:53:11; destination-mac-address 00:00:5e:00:53:22; ovlan-id 400; service-type elan; family bridge; direction egress; test-iterator-duration 20; } test-name lty-test { interface ge-1/1/3.0; test-profile lty; mode initiate-and-terminate; source-mac-address 00:00:5e:00:53:11; destination-mac-address 00:00:5e:00:53:22; ovlan-id 400; service-type elan; family bridge; direction egress; source-udp-port 200; destination-udp-port 200; test-iterator-duration 20; } test-name frloss-test { interface ge-1/1/3.0; test-profile frloss; mode initiate-and-terminate; source-mac-address 00:00:5e:00:53:11; destination-mac-address 00:00:5e:00:53:22; ovlan-id 400; service-type elan; family bridge; direction egress; source-udp-port 200; destination-udp-port 200; test-iterator-duration 20; } } }
MX104 系列路由器上的基准测试参数:
[edit interfaces] ge-1/1/6 { flexible-vlan-tagging; mtu 9192; encapsulation flexible-ethernet-services; unit 0 { encapsulation vlan-bridge; vlan-id 400; } } ge-1/1/5 { flexible-vlan-tagging; mtu 9192; encapsulation flexible-ethernet-services; unit 0 { encapsulation vlan-bridge; vlan-id 400; } } } [edit bridge-domains] bd1 { vlan-id 500; interface ge-1/1/6.0; interface ge-1/1/5.0; } [edit services rpm] rfc2544-benchmarking { # Note, When in reflector mode, test profile is not needed tests { test-name l2b-reflector { interface ge-1/1/5.0; source-mac-address 00:00:5e:00:53:11; destination-mac-address 00:00:5e:00:53:22; family bridge; mode reflect; service-type elan; family bridge; direction egress; } } }
验证桥接域中第 2 层服务 (E-LAN) 基准测试的结果
检查 ACX 系列路由器和 MX104 系列路由器之间对配置的服务执行的基准测试的结果。首先在反射器上启动测试,然后在发起方上开始测试。
验证吞吐量基准测试结果
目的
验证是否显示了在 ACX 系列路由器和 MX104 系列路由器之间配置的服务上运行的基准测试的必要和统计值。
行动
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
ACX 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 1 detail Test information : Test id: 1, Test name: tput_test, Test type: Throughput Test mode: Initiate-and-Terminate Test packet size: 128 Test state: TEST_STATE_COMPLETED Status: Test-Completed Test start time: 2014-09-24 22:21:09 PDT Test finish time: 2014-09-24 22:21:33 PDT Counters last cleared: Never Test-profile Configuration: Test-profile name: tput Test packet size: 128 Theoretical max bandwidth : 900000 kbps Test Configuration: Test mode: Initiate-and-Terminate Duration in seconds: 20 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/3.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Outer vlan-id: 400 Outer vlan priority: 0 Outer vlan cfi: 0 Outer tag protocol id: 0x8100 Source ipv4 address: 192.168.1.10 Destination ipv4 address: 192.168.1.20 Source udp port: 200 Destination udp port: 200 Rfc2544 throughput test information : Initial test load percentage : 100.00 % Test iteration mode : Binary Test iteration step : 50.00 % Theoretical max bandwidth : 900000 kbps Test packet size: 128 Iteration Internal Duration Elapsed -------- Throughput --------- Overhead (sec) time Theoretical Transmit Measured 1 0 20 20 100.00 % 100.00 % 100.00 % Result of the iteration runs : Throughput Test complete for packet size 128 Best iteration : 1, Best iteration (pps) : 760135 Best iteration throughput : 100.00 % RFC2544 Throughput test results summary: ---------------------------------------- Packet Internal Theoretical Transmit Tx Rx Measured Measured Size overhead rate (pps) pps Packets Packets throughput % bandwidth (kbps) 128 0 760135 760135 15202700 15202700 100.00 % 900000
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
MX104 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 1 detail Test information : Test id: 1, Test name: l2b-reflector, Test type: Reflect Test mode: Reflect Test packet size: 0 Test state: TEST_STATE_RUNNING Status: Running Test start time: 2014-09-24 22:20:54 PDT Test finish time: TEST_RUNNING Counters last cleared: Never Test Configuration: Test mode: Reflect Duration in seconds: 864000 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/5.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Service type: Elan Elapsed Reflected Reflected time Packets Bytes 61 15202700 1945945600
您还可以使用 show services rpm rfc2544-benchmarking (aborted-test | active-tests | completed-tests | summary)
命令显示有关每个实时性能监控 (RPM) 实例的每个类别的结果或基于 RFC2544 的基准测试的状态。
意义
输出显示所执行的基准测试的详细信息。有关操作命令的更多信息 run show services rpm rfc2544-benchmarking
,请参阅 show services rpm rfc2544-benchmarking
CLI 浏览器。
验证背靠背基准测试结果
目的
验证是否显示了在 ACX 系列路由器和 MX104 系列路由器之间配置的服务上运行的基准测试的必要和统计值。
行动
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
ACX 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 4 detail Test information : Test id: 4, Test name: b2b-test, Test type: Back-Back-Frames Test mode: Initiate-and-Terminate Test packet size: 128 512 Test state: TEST_STATE_COMPLETED Status: Test-Completed Test start time: 2014-09-24 22:30:16 PDT Test finish time: 2014-09-24 22:31:03 PDT Counters last cleared: Never Test-profile Configuration: Test-profile name: b2bt Test packet size: 128 512 Theoretical max bandwidth : 950000 kbps Test Configuration: Test mode: Initiate-and-Terminate Duration in seconds: 20 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/3.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Outer vlan-id: 400 Outer vlan priority: 0 Outer vlan cfi: 0 Outer tag protocol id: 0x8100 Source ipv4 address: 192.168.1.10 Destination ipv4 address: 192.168.1.20 Source udp port: 4040 Destination udp port: 4041 Rfc2544 Back-Back test information : Initial burst length: 20 seconds at 950000 kbps Test iteration mode : Binary Test iteration step : 50.00 % Test packet size: 128 Iteration Theoretical Transmit Internal Duration Elapsed burst length burst length overhead time (packets) (packets) 1 16047280 16047280 0 20 20 Result of the iteration runs : Back-Back Test complete for packet size 128 Best iteration : 1 Measured burst (num sec) : 20 sec Measured burst (num pkts) : 16047280 packets Test packet size: 512 Iteration Theoretical Transmit Internal Duration Elapsed burst length burst length overhead time (packets) (packets) 1 4464280 4464280 0 20 20 Result of the iteration runs : Back-Back Test complete for packet size 512 Best iteration : 1 Measured burst (num sec) : 20 sec Measured burst (num pkts) : 4464280 packets RFC2544 Back-Back test results summary: ---------------------------------------- Packet Measured Burst Time Size length (Packets) (seconds) 128 16047280 20 512 4464280 20
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
MX104 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 4 detail Test information : Test id: 4, Test name: l2b-reflector, Test type: Reflect Test mode: Reflect Test packet size: 0 Test state: TEST_STATE_RUNNING Status: Running Test start time: 2014-09-24 22:30:07 PDT Test finish time: TEST_RUNNING Counters last cleared: Never Test Configuration: Test mode: Reflect Duration in seconds: 864000 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/5.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Service type: Elan Elapsed Reflected Reflected time Packets Bytes 58 20511560 4339763200
您还可以使用 show services rpm rfc2544-benchmarking (aborted-test | active-tests | completed-tests | summary)
命令显示有关每个实时性能监控 (RPM) 实例的每个类别的结果或基于 RFC2544 的基准测试的状态。
意义
输出显示所执行的基准测试的详细信息。有关操作命令的更多信息 run show services rpm rfc2544-benchmarking
,请参阅 show services rpm rfc2544-benchmarking
CLI 浏览器。
验证帧丢失基准测试结果
目的
验证是否显示了在 ACX 系列路由器和 MX104 系列路由器之间配置的服务上运行的基准测试的必要和统计值。
行动
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
ACX 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 3 detail Test information : Test id: 3, Test name: frloss-test, Test type: Frame-Loss Test mode: Initiate-and-Terminate Test packet size: 1600 Test state: TEST_STATE_COMPLETED Status: Test-Completed Test start time: 2014-09-24 22:26:45 PDT Test finish time: 2014-09-24 22:27:55 PDT Counters last cleared: Never Test-profile Configuration: Test-profile name: frloss Test packet size: 1600 Theoretical max bandwidth : 1000000 kbps Test Configuration: Test mode: Initiate-and-Terminate Duration in seconds: 20 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/3.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Outer vlan-id: 400 Outer vlan priority: 0 Outer vlan cfi: 0 Outer tag protocol id: 0x8100 Source ipv4 address: 192.168.1.10 Destination ipv4 address: 192.168.1.20 Source udp port: 200 Destination udp port: 200 Rfc2544 frame-loss test information : Initial test load percentage : 100.00 % Test iteration mode : step-down Test iteration step : 10 % Theoretical max bandwidth : 1000000 kbps Test packet size: 1600 Iteration Internal Duration Elapsed -------- Throughput --------- Frame-loss Overhead (sec) time Theoretical Transmit Measured rate % 1 0 20 20 100.00 % 100.00 % 100.00 % 0.00 % 2 0 20 20 100.00 % 100.00 % 100.00 % 0.00 % 3 0 20 20 100.00 % 100.00 % 100.00 % 0.00 % Result of the iteration runs : Frame-loss test complete for packet size 1600 Percentage throughput transmitted: 100.00 % Frame-loss rate (percent) : 0.00 % RFC2544 Frame-loss test results summary: ---------------------------------------- Packet Internal Theoretical Transmit Transmit Tx Rx Frame Loss Size overhead rate (pps) pps throughput Packets Packets rate percent 1600 0 77160 77160 100.00 % 1543200 1543200 0.00 %
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
MX104 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 3 detail Test information : Test id: 3, Test name: l2b-reflector, Test type: Reflect Test mode: Reflect Test packet size: 0 Test state: TEST_STATE_RUNNING Status: Running Test start time: 2014-09-24 22:25:36 PDT Test finish time: TEST_RUNNING Counters last cleared: Never Test Configuration: Test mode: Reflect Duration in seconds: 864000 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/5.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Service type: Elan Elapsed Reflected Reflected time Packets Bytes 95 1624361 2598977600
您还可以使用 show services rpm rfc2544-benchmarking (aborted-test | active-tests | completed-tests | summary)
命令显示有关每个实时性能监控 (RPM) 实例的每个类别的结果或基于 RFC2544 的基准测试的状态。
意义
输出显示所执行的基准测试的详细信息。有关操作命令的更多信息 run show services rpm rfc2544-benchmarking
,请参阅 show services rpm rfc2544-benchmarking
CLI 浏览器。
验证延迟基准测试结果
目的
验证是否显示了在 ACX 系列路由器和 MX104 系列路由器之间配置的服务上运行的基准测试的必要和统计值。
行动
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
ACX 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 5 detail Test information : Test id: 5, Test name: lty-test, Test type: Latency Test mode: Initiate-and-Terminate Test packet size: 512 Test state: TEST_STATE_COMPLETED Status: Test-Completed Test start time: 2014-09-24 22:33:05 PDT Test finish time: 2014-09-24 22:40:46 PDT Counters last cleared: Never Test-profile Configuration: Test-profile name: lty Test packet size: 512 Theoretical max bandwidth : 1000000 kbps Test Configuration: Test mode: Initiate-and-Terminate Duration in seconds: 20 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/3.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Outer vlan-id: 400 Outer vlan priority: 0 Outer vlan cfi: 0 Outer tag protocol id: 0x8100 Source ipv4 address: 192.168.1.10 Destination ipv4 address: 192.168.1.20 Source udp port: 200 Destination udp port: 200 Rfc2544 latency test information : Theoretical max bandwidth : 1000000 kbps Initial test load percentage : 100.00 % Duration in seconds: 20 Measurement unit for timestamp: Nanoseconds Test packet size: 512 Iteration Duration Elapsed Theoretical Transmit Throughput ------------------ Latency -------------------- (sec) time rate (pps) pps percent Minimum Average Maximum Probe 1 20 20 234962 234962 100.00 % 44008 45253 47424 45096 2 20 20 234962 234962 100.00 % 44008 45237 47456 45256 3 20 20 234962 234962 100.00 % 43864 45198 46976 45144 4 20 20 234962 234962 100.00 % 43832 45243 47088 45096 5 20 20 234962 234962 100.00 % 44072 45261 46976 45176 6 20 20 234962 234962 100.00 % 43784 45214 46864 45032 7 20 20 234962 234962 100.00 % 44024 45259 47216 45240 8 20 20 234962 234962 100.00 % 44072 45290 46864 45192 9 20 20 234962 234962 100.00 % 43976 45272 46792 45208 10 20 20 234962 234962 100.00 % 44024 45206 46976 45112 11 20 20 234962 234962 100.00 % 44040 45198 47088 45176 12 20 20 234962 234962 100.00 % 44008 45223 46976 45160 13 20 20 234962 234962 100.00 % 44088 45257 47408 45176 14 20 20 234962 234962 100.00 % 43976 45183 46832 45080 15 20 20 234962 234962 100.00 % 44024 45198 47088 45112 16 20 20 234962 234962 100.00 % 43864 45206 46912 45208 17 20 20 234962 234962 100.00 % 44056 45209 46960 45176 18 20 20 234962 234962 100.00 % 44008 45198 46912 45112 19 20 20 234962 234962 100.00 % 43816 45175 47248 45000 20 20 20 234962 234962 100.00 % 43912 45202 46992 45192 Result of the iteration runs : Latency Test complete for packet size 512 Internal overhead per packet: 0 Avg (min) Latency : 43972 Avg (avg) latency : 45224 Avg (Max) latency : 47052 Avg (probe) latency : 45147 RFC2544 Latency test results summary: ---------------------------------------- Packet Internal Theoretical Transmit Tx Rx ------------------ Latency -------------------- Size overhead rate (pps) pps Packets Packets Minimum Average Maximum Probe 512 0 234962 234962 93984800 93984800 43972 45224 47052 45147
在操作模式下,在 show services rpm rfc2544-benchmarking test-id test-id-number detail
MX104 系列路由器上输入命令。
user@host> show services rpm rfc2544-benchmarking test-id 5 detail Test information : Test id: 5, Test name: l2b-reflector, Test type: Reflect Test mode: Reflect Test packet size: 0 Test state: TEST_STATE_RUNNING Status: Running Test start time: 2014-09-24 22:32:55 PDT Test finish time: TEST_RUNNING Counters last cleared: Never Test Configuration: Test mode: Reflect Duration in seconds: 864000 Test finish wait duration in seconds: 1 Test family: Bridge Test iterator pass threshold: 0.50 % Test receive failure threshold: 0.00 % Test transmit failure threshold: 0.50 % Bridge family Configuration: Interface : ge-1/1/5.0 Test direction: Egress Source mac address: 00:00:5e:00:53:11 Destination mac address: 00:00:5e:00:53:22 Service type: Elan Elapsed Reflected Reflected time Packets Bytes 426 84586320 43308195840
您还可以使用 show services rpm rfc2544-benchmarking (aborted-test | active-tests | completed-tests | summary)
命令显示有关每个实时性能监控 (RPM) 实例的每个类别的结果或基于 RFC2544 的基准测试的状态。
意义
输出显示所执行的基准测试的详细信息。有关操作模式命令的更多信息 show services rpm rfc2544-benchmarking
,请参阅 show services rpm rfc2544-benchmarking
CLI Explorer 中的主题。