02-Telemetry Stream命令
本章节下载: 02-Telemetry Stream命令 (188.77 KB)
仅NCP支持Telemetry Stream功能。
display telemetry stream命令用来显示Telemetry Stream的配置信息。
【命令】
display telemetry stream
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【举例】
# 显示Telemetry Stream的配置信息。
<Sysname> display telemetry stream
Telemetry stream status : Enabled
Telemetry stream device ID : N/A
表1-1 display telemetry stream命令显示信息描述表
|
字段 |
描述 |
|
Telemetry stream status |
Telemetry stream的状态 · Enabled:开启 · Disabled:关闭 |
|
Telemetry stream device ID |
设备ID |
|
Telemetry stream action |
Telemetry Stream动作。Inactive表示未下发,Failed表示下发失败 · ACL:表示引用ACL · Sampler:表示引用采样器 |
|
Telemetry stream collector |
上送采集器的报文的封装信息 · Source IP:源IP地址 · Destination IP:目的IP地址 · Source port:源端口号 · Destination port:目的端口号 · VPN instance:VPN实例 · Truncation:报文截断功能,Enable表示功能处于开启状态。只有开启报文截断功能时才会显示本字段 |
telemetry stream action命令用来配置Telemetry Stream动作。
undo telemetry stream action命令用来恢复缺省情况。
【命令】
telemetry stream action action-id [ acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } | sampler sampler-name ] *
undo telemetry stream action action-id
【缺省情况】
未配置Telemetry Stream动作。
【视图】
接口视图
【缺省用户角色】
network-admin
【参数】
action-id:表示动作ID,取值范围为1~32。
acl:表示引用ACL。
· ipv6:表示IPv6 ACL。
· mac:表示二层ACL。
· user-defined:表示用户自定义ACL。
· acl-number:指定ACL的编号。取值范围及其代表的ACL类型如下:
¡ 2000~2999:表示基本ACL。
¡ 3000~3999:表示高级ACL。
¡ 4000~4999:表示二层ACL。
¡ 5000~5999:表示用户自定义ACL。
· name acl-name:表示ACL名称,为1~63个字符的字符串,不区分大小写。
sampler sampler-name:表示引用采样器名称,sampler-name为采样器的名称,为1~31个字符的字符串,不区分大小写。未指定本参数时,表示不对报文进行采样。
【使用指导】
配置本命令后,设备会将接口收到的报文复制一份,并使用telemetry stream collector命令中指定的报文封装信息对报文进行封装,上送采集器。
如果仅需对某些流量开启Telemetry Stream功能,则可以引用ACL,此时只有命中ACL规则的报文才会被复制。
引用采样器可以减少复制和上送报文的数量,减轻设备和采集器的数据处理压力,但会降低监控信息的颗粒度,请合理配置采样率。
如果不指定ipv6、mac和user-defined,则表示IPv4 ACL。
引用二层ACL和用户自定义ACL时,必须首先指定mac和user-defined,再指定其编号或名称。
引用ACL时,需要注意的是:
· 若引用的ACL不存在,或者引用的ACL中没有配置规则,则表示没有流量会命中该ACL,即没有报文会被复制。
· 在引用的ACL中,如果规则中指定了VPN实例,则表示该规则仅对VPN报文有效;如果规则中没有指定VPN实例,则表示该规则对公网报文和VPN报文均有效。
【举例】
# 配置Telemetry Stream动作,并引用名为samp的采样器。
<Sysname> system-view
[Sysname] interface fourhundredgige 1/0/1
[Sysname-FourHundredGigE1/0/1] telemetry stream action 1 sampler samp
telemetry stream collector命令用来配置上送采集器的报文的封装信息。
undo telemetry stream collector命令用来恢复缺省情况。
【命令】
telemetry stream collector source source-address destination destination-address source-port source-port destination-port destination-port [ vpn-instance vpn-instance-name ] [ truncation ]
undo telemetry stream collector
【缺省情况】
未配置上送采集器的报文的封装信息。
【视图】
系统视图
【缺省用户角色】
network-admin
【参数】
source source-address:表示上送采集器的报文封装的源IP地址。
destination destination-address:表示上送采集器的报文封装的目的IP地址。
source-port source-port:表示上送采集器的报文封装的源端口号。
destination-port destination-port:表示上送采集器的报文封装的目的端口号。由于协议规范限制,实际仅允许配置为6343。
vpn-instance vpn-instance-name:表示上送采集器的报文由该VPN实例对应出接口的路由信息指导转发。vpn-instance-name表示VPN实例名称,为1~31个字符的字符串,区分大小写。如果未指定本参数,则表示上送采集器的报文由公网的路由信息指导转发。
truncation:表示开启报文截断功能。不指定本参数时,表示不开启报文截断功能。
【使用指导】
设备将使用本命令中指定的封装信息封装报文,路由至远端采集器。
本命令中的目的IP地址需指定为采集器的IP地址,目的端口号需指定为采集器上相应软件的监听端口号。
【举例】
# 配置上送采集器的报文的源IP地址为10.10.10.10、目的IP地址为20.20.20.20、源端口号为10、目的端口号为20。
<Sysname> system-view
[Sysname] telemetry stream collector source 10.10.10.10 destination 20.20.20.20 source-port 10 destination-port 20
telemetry stream enable命令用来开启Telemetry Stream功能。
undo telemetry stream enable命令用来关闭Telemetry Stream功能。
【命令】
telemetry stream enable
undo telemetry stream enable
【缺省情况】
Telemetry Stream功能处于开启状态。
【视图】
系统视图
【缺省用户角色】
network-admin
【举例】
# 开启Telemetry Stream功能。
<Sysname> system-view
[Sysname] telemetry stream enable
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!
