05-Telemetry Stream配置
本章节下载: 05-Telemetry Stream配置 (231.59 KB)
目 录
Telemetry Stream是一项从设备上采集数据的网络监控技术。配置好Telemetry Stream功能后,设备会主动、持续不断地向采集器上送采集数据。
Telemetry Stream技术支持采集的信息有流量入、出接口和时间戳。
以图1-1Device B为例,Telemetry Stream工作机制如下:
(1) 在流量入接口通过ACL对原始报文进行筛选,命中规则的报文被复制、采样至设备内部的Telemetry Stream处理器。Telemetry Stream处理器向报文中添加采集信息(流量入接口)。
(2) Telemetry Stream处理器将携带采集信息的报文环回至环回组。
(3) 环回组中的接口识别出本机环回报文,对其添加采集信息(时间戳),然后查表转发至出接口。
(4) 出接口识别出本机环回报文,对其添加采集信息(流量出接口和时间戳),然后上送至Telemetry Stream处理器。
(5) Telemetry Stream处理器对其加封装,然后封装报文携带采集信息路由至采集器。
多个节点均各自向采集器上送采集信息,采集器就可以根据收集到的采集信息进行路径和时延计算。
图1-1 Telemetry Stream工作机制示意图
开启Telemetry Stream时间戳功能后,设备会在上送采集器的报文中携带时间戳,采集器可以依据单节点上报的时间戳计算出报文在本节点上转发时产生的时延;同时还可以结合多个节点上报的时间戳,计算出报文在某段路径上转发时产生的时延。
Telemetry Stream与流镜像ERSPAN采样、INT、MOD功能互斥,请勿在设备上同时启用。
Telemetry Stream与MDC特性互斥,请勿在设备上同时启用。
在配置Telemetry Stream时,需要同时配置PTP功能,以确保时间戳的准确。关于PTP的介绍,请参见“网络管理和监控配置指导”中的“PTP”。
仅TD系列接口板、TE系列接口板支持Telemetry Stream功能。
支持配置Telemetry Stream功能的接口包括二层以太网接口、三层以太网接口。
网管口不支持作为Telemetry Stream采样报文的出接口。
对Telemetry Stream功能以及时间戳功能的开启或关闭操作,建议在没有业务流量的时间内进行。
Telemetry Stream功能引用的采样器必须使用随机采样方式(random)。
在同一接口上配置多个Telemetry Stream动作时(telemetry stream action命令),这些动作仅支持引用同一采样器,或者都不引用采样器。Telemetry Stream动作未引用采样器,或者引用的采样器未创建时,缺省从2个报文中采样一个报文。
配置Telmetry Stream时间戳功能时,为确保时间戳的准确,建议不要配置业务环回组,直接执行telemetry stream timestamp enable命令即可。
Telemetry Stream配置任务如下:
(1) 基本功能
(2) (可选)配置Telmetry Stream时间戳功能
在配置Telemetry Stream前,需确保设备之间路由可达。
配置本功能后,设备会对原始报文进行复制,然后在复制报文中添加流量在本设备的入、出接口信息,最后再加上封装信息,路由至采集器。
如果原始报文过多,Telemetry处理器将面临很大的报文处理压力,甚至造成丢包。为了缓解Telemetry处理器的压力,可以在流量入接口配置Telemetry Stream动作,通过:
· 引用ACL对报文进行过滤。Telemetry Stream功能仅对命中ACL permit规则的报文进行后续封装和上报处理。
· 引用采样器对目标流进行采样。Telemetry Stream功能仅对采样后的报文进行后续封装和上报处理。
如果原始报文的数据部分过大,则原始报文加封装后上送给采集器,不但会过多地占用设备和采集器之间链路的带宽,而且会给采集器带来多余的解析负担。此时,可以开启Telemetry Stream报文截断功能。开启后设备会对封装报文进行截断,再上送给采样器,上送的报文中仍然包含完整的入、出接口信息和时间戳信息,不影响采集结果。
(1) 配置设备ID。
a. 进入系统视图。
system-view
b. 配置设备ID。
telemetry stream device-id address
缺省情况下,未配置设备ID。
(2) 配置上送采集器的报文的封装信息。
telemetry stream collector source source-address destination destination-address source-port source-port destination-port destination-port [ vpn-instance vpn-instance-name ] [ truncation ]
缺省情况下,未配置上送采集器的报文的封装信息。
(3) 在流量入接口配置Telemetry Stream动作。
a. 进入接口视图。
interface interface-type interface-number
b. 配置Telemetry Stream动作。
telemetry stream action action-id [ acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } | sampler sampler-name ] *
缺省情况下,未配置Telemetry Stream动作。
c. 退回系统视图。
quit
有关ACL的详细介绍,请参见“ACL和QoS配置指导”中的“ACL”。
有关Sampler的详细介绍,请参见“网络管理和监控配置指导”中的“Sampler”。
(4) 开启Telemetry Stream功能。
telemetry stream enable
缺省情况下,Telemetry Stream功能处于开启状态。
配置本功能后,设备会在上送采集器的报文中添加流量入、出本设备的时间戳。
(1) (可选)配置业务环回组。
a. 进入系统视图。
system-view
b. 创建业务环回组,并指定其业务类型为Telemetry Stream类型。
service-loopback group group-id type telemetry-stream
缺省情况下,不存在业务环回组。
c. 进入二层以太网接口视图。
interface interface-type interface-number
d. 将接口加入业务环回组。
port service-loopback group group-id
缺省情况下,接口不属于任何业务环回组。
e. 退回系统视图。
quit
加入业务环回组的接口会被环回组独占,请注意选择空闲接口。有关业务环回组的详细介绍,请参见“二层技术-以太网交换配置指导”中的“业务环回组”。
(2) 开启Telemetry Stream的时间戳功能。
telemetry stream timestamp enable
缺省情况下,Telemetry Stream的时间戳功能处于关闭状态。
在完成上述配置后,在任意视图下执行display命令可以显示Telemetry Stream的运行情况,通过查看显示信息验证配置的效果。
表1-1 Telemetry Stream显示和维护
操作 |
命令 |
显示ACL的配置和运行情况 |
display acl [ ipv6 | mac | user-defined ] { acl-number | all | name acl-name } 本命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL” |
查看采样器的配置信息 |
(独立运行模式) display sampler [ sampler-name ] [ slot slot-number ] (IRF模式) display sampler [ sampler-name ] [ chassis chassis-number slot slot-number ] 本命令的详细介绍,请参见“网络管理和监控命令参考”中的“Sampler” |
显示业务环回组的信息 |
display service-loopback group [ group-id ] 本命令的详细介绍,请参见“二层技术-以太网交换命令参考”中的“业务环回组” |
显示Telemetry Stream的配置信息 |
display telemetry stream |
在Device B上配置Telmetry Stream功能,Device B将携带采集信息的报文上送采集器,采集器根据采集信息中的时间戳计算出流量在Device B上转发时产生的时延。
加入业务环回组的接口会被环回组独占,请注意选择空闲接口。
IP地址和单播路由协议的具体配置过程略。
# 配置Device B的设备ID为10.0.0.1。
<DeviceB> system-view
[DeviceB] telemetry stream device-id 10.0.0.1
# 配置上送采集器的报文的封装信息:源IP地址为20.0.0.2,目的IP地址为30.0.0.1,源端口号为12,目的端口号为14。
[DeviceB] telemetry stream collector source 20.0.0.2 destination 30.0.0.1 source-port 12 destination-port 14
# 开启Telemetry Stream的时间戳功能。
[DeviceB] telemetry stream timestamp enable
# 创建一个名为samp的采样器,采用随机采样方式,按照2的次方模式采样,采样率为8。
[DeviceB] sampler samp mode random packet-interval n-power 8
# 创建IPv4基本ACL 2000,并配置规则为匹配源IP地址为192.168.1.2的报文。
[DeviceB] acl basic 2000
[DeviceB-acl-ipv4-basic-2000] rule permit source 192.168.1.2 0
[DeviceB-acl-ipv4-basic-2000] quit
# 在流量入接口HundredGigE3/0/3配置Telemetry Stream动作:动作ID为1,引用ACL 2000和采样器samp。
[DeviceB] interface hundredgige 3/0/3
[DeviceB-HundredGigE3/0/3] telemetry stream action 1 acl 2000 sampler samp
[DeviceB-HundredGigE3/0/3] quit
# 开启Telemetry Stream功能。
[DeviceB] telemetry stream enable
查看Device B上的Telemetry Stream相关配置是否生效。
[DeviceB] display telemetry stream
Telemetry stream status : Enabled
Telemetry stream timestamp status: Enabled
Telemetry stream device-id : 10.0.0.1
Telemetry stream action:
HundredGigE3/0/3:
Telemetry stream action 1:
ACL : 2000
Sampler: samp
Telemetry stream collector:
Source IP : 20.0.0.2
Destination IP : 30.0.0.1
Source port : 12
Destination port: 14
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!