• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

14-Telemetry配置指导

目录

02-INT配置

本章节下载 02-INT配置  (364.31 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500G-AF/Configure/Operation_Manual/H3C_S12500G_AF_R7624Pxx-4376/14/202401/2028246_30005_0.htm

02-INT配置


1 INT

1.1  INT简介

INT(In-band Telemetry,带内遥测)是一项从设备上采集数据的网络监控技术。配置了INT功能的设备会主动向采集器上送采集数据,提供实时、高速的数据采集功能,采集器分析收到的采集数据,以达到对网络设备的性能及网络运行情况进行监控的目的。

1.1.1  INT网络构成

INT网络由开启INT功能的设备组成,该网络中包含一个首节点、若干中间节点和一个尾节点设备。

图1-1 INT网络示意图

 

1.1.2  INT报文格式

INT功能通过镜像原始报文、插入INT报文头和采集信息的方式生成INT报文。INT报文头和采集信息位于原始IP头内部,所以INT报文与原始报文含有相同的IP头,走相同的转发链路,进而对路径上各节点进行信息采集。

目前设备支持基于TCP报文、UDP报文和VXLAN报文生成INT报文。不同报文中INT报文头所处位置如图1-2所示。INT报文头中高64位就是INT标记,固定填充0xaaaaaaaabbbbbbbb。

图1-2 INT报文格式

1.1.3  INT运行机制

当前INT功能支持普通型INT和灵活型INT。普通型INT和灵活型INT在信息采集方面没有差异,但运行机制和配置逻辑稍有不同。

·     普通型INT网络中:每个节点的设备需要在入接口配置设备在INT网络中的角色为Ingress、Transit或Egress。首节点通过QoS策略定义数据流,中间节点和尾节点自动识别INT报文并对报文进行相应的INT处理。因此,流量转发路径的每个入接口上都只支持对首节点定义的数据流进行INT处理。

·     灵活型INT网络中:不需要配置设备在INT网络中的角色,每个节点的设备都可以通过ACL定义数据流(对于同一条流,首节点匹配原始报文,中间节点和尾节点匹配INT报文),并针对该数据流配置相应的INT处理动作。设备支持在同一接口上通过ACL匹配多条数据流并针对不同的数据流分别配置INT处理动作。

普通型INT的配置较为简洁,建议优先采用普通型INT。仅当INT节点需要在同一接口对多条数据流进行INT处理的时候采用灵活型INT。

1. 普通型INT

图1-3所示,普通型INT中各节点实现功能如下:

·     首节点

流量入接口上通过QoS策略将命中规则的报文镜像、采样至设备内部的INT处理器。处理器对其添加INT报文头,然后将INT报文环回至入接口。入接口根据INT标记自动识别INT报文,添加采集信息,查表转发。出接口添加采集信息,并发送给中间节点。

·     中间节点

流量入接口根据INT标记自动识别INT报文,添加采集信息,查表转发。出接口添加采集信息,发送给尾节点。

·     尾节点

流量入接口根据INT标记自动识别INT报文,添加采集信息,上送至INT处理器加封装后,查表转发至出接口,发送给采集器。

2. 灵活型INT

图1-3所示,以同一条流的INT处理为例,灵活型INT中各节点实现功能如下:

·     首节点

入接口通过ACL对原始报文进行筛选,命中规则的报文被镜像、采样至设备内部的INT处理器。处理器为其添加INT报文头,然后将INT报文环回至入接口。入接口通过ACL筛选出本机环回INT报文,对其添加采集信息,查表转发。出接口添加采集信息,并发送给中间节点。

·     中间节点

入接口通过ACL筛选出INT报文,为命中规则的报文添加采集信息后,查表转发。出接口添加采集信息,发送给尾节点。

·     尾节点

入接口通过ACL筛选出INT报文,命中规则的报文被镜像至INT处理器,处理器对其进行封装,然后查表转发至出接口,发送给采集器。

图1-3 INT功能组网与处理机制示意图

1.2  INT配置限制和指导

普通型INT支持在Underlay网络和Overlay网络中部署;灵活型INT仅支持在Underlay网络中部署。

在配置INT功能时,建议先配置中间节点和尾节点,最后配置首节点。

在尾节点和中间节点上配置接口角色时,如果既在接口视图下配置了接口角色,又在系统视图下配置了全局角色(即telemetry ifa role transit-egress命令),则对于灵活型INT,接口配置优先生效;对普通型INT,生效规则如下:

·     对于目的IP是本机的INT流量,全局配置优先生效。

·     对于目的IP不是本机、需要继续转发的INT流量,接口配置优先生效。

在配置INT功能时,需要同时配置PTP功能,以确保时间戳的准确。目前,尾节点对报文添加的时间戳只保证纳秒字段(Nanoseconds)的准确性。

INT功能仅支持采集TCP、UDP和VXLAN协议的单播报文。

设备仅支持在二层以太网接口和三层以太网接口上配置INT功能。其中:

·     三层以太网接口不支持telemetry ifa loopback命令。

·     三层以太网子接口不支持直接配置INT功能,而是借用其主接口上的INT配置。

部署INT功能时,注意:

·     同一接口不支持同时在Underlay网络和Overlay网络中作为INT首节点的Ingress接口。

·     Overlay网络使用VXLAN over IPv6隧道或VXLAN-DCI over IPv6隧道时,不支持部署INT。

·     Overlay网络中,VTEP设备上VXLAN隧道的多条ARP表项出现MAC地址或VLAN不同、但出接口为同一公网侧端口时,不支持部署INT。

·     Overlay网络中,INT首节点的Ingress接口必须使用undo mac-address static source-check enable命令关闭报文入接口与静态MAC地址表项匹配检查功能。

在配置INT功能时,注意:

·     在尾节点上配置INT报文上送采集器的封装参数(telemetry ifa collector命令)时,请确保源IP地址和目的IP地址路由可达。

·     为确保INT功能正常,请不要把设备ID(telemetry ifa device-id命令)配置为255.255.*.**.*.255.255形式的IP地址。*表示取值范围为0~255的任意数字。

·     为确保INT功能正常,尾节点上连接采集器的接口请不要作为多端口ARP表项的出接口。关于多端口ARP表项的配置,请参见“三层技术-IP业务配置指导”中的“ARP”。

·     INT功能引用的采样器必须使用随机采样方式(random)。采样器通过sampler命令创建,关于该命令的介绍请参见“网管管理和监控命令参考”中的“Sampler”。

1.3  配置普通型INT

1.3.1  配置尾节点

(1)     配置设备ID。

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

(2)     配置接口角色。请选择其中一项进行配置。

¡     对于非VXLAN网络或VXLAN网络中的非Border设备,可以依次执行以下命令配置接口的角色为egress。

interface interface-type interface-number

telemetry ifa role egress

quit

配置本步骤后,本接口具备egress能力。接口自动识别INT流量,并对其执行egress动作。

¡     对于VXLAN网络中的Border设备,可以执行以下命令配置所有接口的角色为transit-egress。

telemetry ifa role transit-egress

配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作;对目的IP不是本机、需要继续转发的INT流量执行transit动作。

缺省情况下,未配置接口角色。

(3)     配置INT报文上送采集器时的封装参数。

telemetry ifa collector source source-address destination dest-address source-port port destination-port port [ vlan vlan-id ]

缺省情况下,未配置INT报文的IP地址、端口号及VLAN编号。

(4)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.3.2  配置中间节点

(1)     配置设备ID。

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

(2)     配置接口角色。请选择其中一项进行配置。

¡     对于非VXLAN网络或VXLAN网络中的非Border设备,可以依次执行以下命令配置接口的角色为transit。

interface interface-type interface-number

telemetry ifa role transit

quit

配置本步骤后,本接口仅具备transit能力。接口自动识别INT流量,并对其执行transit动作。

¡     对于VXLAN网络中的Border设备,可以执行以下命令配置所有接口为transit-egress。

telemetry ifa role transit-egress

配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作;对目的IP不是本机、需要继续转发的INT流量执行transit动作。

缺省情况下,未配置接口角色。

(3)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.3.3  配置首节点

(1)     配置设备ID

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

(2)     指定Ingress接口。

a.     进入接口视图。

interface interface-type interface-number

b.     配置当前接口为Ingress接口。

telemetry ifa role ingress

缺省情况下,未配置设备接口在INT网络中的角色。

c.     退回系统视图。

quit

(3)     开启指定接口的内部环回功能。

a.     进入接口视图。

interface interface-type interface-number

b.     开启当前接口的内部环回功能。

telemetry ifa loopback

缺省情况下,接口的内部环回功能处于关闭状态。

请选择Ingress接口所属接口组中的任意非Ingress接口开启内部环回功能。通过display qos-acl resource命令可以查看接口所属接口组的信息,同一“Interfaces:”下的接口属于一个接口组。

c.     退回系统视图。

quit

(4)     配置流量镜像到INT处理器。

a.     请依次执行以下命令配置流分类。

traffic classifier classifier-name [ operator { and | or } ]

if-match match-criteria

quit

具体流分类规则的配置,请参见“QoS命令”中的if-match命令。

b.     请依次执行以下命令配置流行为。

traffic behavior behavior-name

(Underlay网络)

mirror-to ifa-processor [ sampler sampler-name ]

(Overlay网络)

mirror-to ifa-processor [ sampler sampler-name ] vxlan

quit

镜像至INT处理器命令的详细情况请参见“网络管理和监控命令参考”中的“镜像”。

c.     请依次执行以下命令配置QoS策略。

qos [ mirroring ] policy policy-name

classifier classifier-name behavior behavior-name

quit

d.     请依次执行以下命令将QoS策略应用在接口入方向上。

interface interface-type interface-number

qos apply [ mirroring ] policy policy-name inbound

quit

(5)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.4  配置灵活型INT

1.4.1  配置任务简介

(1)     配置尾节点

a.     配置设备ID

b.     配置接口角色

c.     配置报文封装参数与功能状态

(2)     配置中间节点

a.     配置设备ID

b.     配置接口角色

c.     配置功能状态

(3)     配置首节点

1.4.2  配置尾节点

1. 配置设备ID

(1)     配置设备ID。

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

2. 配置接口角色

(1)     进入系统视图。

system-view

请选择其中一项进行配置。

·     配置接口的角色为egress。

a.     ‍创建用户自定义ACL,并进入用户自定义ACL视图。

有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

b.     创建规则。

有关rule (user-defined ACL view)命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

注意,本规则中需要配置如下两种内容,且必须配置在同一条规则中。第一,首节点上配置的将原始流量镜像至INT处理器动作中引用了ACL,本规则中要配置与其相同的流量特征匹配项。第二,本规则中还要配置INT标志(rule permit protocol ifa,其中protocoltcpudp)。例如,首节点上配置的镜像至INT处理器动作引用的ACL中,规则为rule permit tcp source 10.0.0.3 0,则本规则需配置为rule permit tcp source 10.0.0.3 0 ifa

c.     退回系统视图

quit

d.     进入接口视图。

interface interface-type interface-number

e.     对接口入方向的INT流量配置镜像至INT处理器动作,并丢弃原始INT报文。

telemetry ifa ifa-id acl user-defined { acl-number | name acl-name } action mirror-to-processor drop

f.     退回系统视图。

quit

说明

配置本步骤后,本接口具备egress能力。接口通过ACL识别INT流量,并对其执行egress动作。

 

·     配置所有接口的角色为transit-egress。

telemetry ifa role transit-egress

说明

配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作,对目的IP不是本机、需要继续转发的INT流量执行transit动作。

 

缺省情况下,未配置接口角色。

3. 配置报文封装参数与功能状态

(1)     进入系统视图。

system-view

(2)     配置INT报文上送采集器的封装参数。

telemetry ifa collector source source-address destination dest-address source-port port destination-port port [ vlan vlan-id ]

缺省情况下,未配置INT报文的IP地址、端口号及VLAN编号。

(3)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.4.3  配置中间节点

1. 配置设备ID

(1)     配置设备ID。

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

2. 配置接口角色

(1)     进入系统视图。

system-view

请选择其中一项进行配置。

·     配置接口的角色为transit。

a.     ‍‍创建用户自定义ACL,并进入用户自定义ACL视图。

有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

b.     创建规则。

有关rule (user-defined ACL view)命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

注意,本规则中需要配置如下两种内容,且必须配置在同一条规则中。第一,首节点上配置的将原始流量镜像至INT处理器动作中引用了ACL,本规则中要配置与其相同的流量特征匹配项。第二,本规则中还要配置INT标志(rule permit protocol ifa,其中protocoltcpudp)。例如,首节点上配置的镜像至INT处理器动作引用的ACL中,规则为rule permit tcp source 10.0.0.3 0,则本规则需配置为rule permit tcp source 10.0.0.3 0 ifa

c.     退回系统视图

quit

d.     进入接口视图。

interface interface-type interface-number

e.     对接口入方向的INT流量配置添加采集信息动作。

telemetry ifa ifa-id acl user-defined { acl-number | name acl-name } action add-metadata

f.     退回系统视图。

quit

说明

配置本步骤后,本接口具备transit能力。接口通过ACL识别INT流量,并对其执行transit动作。

 

·     配置所有接口的角色为transit-egress。

telemetry ifa role transit-egress

说明

配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作,对目的IP不是本机、需要继续转发的INT流量执行transit动作。

 

缺省情况下,未配置接口角色。

3. 配置功能状态

(1)     进入系统视图。

system-view

(2)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.4.4  配置首节点

(1)     配置设备ID。

a.     进入系统视图。

system-view

b.     配置设备ID。

telemetry ifa device-id address

缺省情况下,INT设备未配置设备ID。

(2)     在流量入接口配置将原始流量镜像至INT处理器动作。

a.     创建IPv4、二层或用户自定义ACL,并进入其视图。

有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

b.     创建规则。

有关rule命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

c.     退回系统视图

quit

d.     进入接口视图。

interface interface-type interface-number

e.     对接口入方向的原始流量配置镜像至INT处理器动作。

telemetry ifa ifa-id [ acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } ] action mirror-to-processor [ sampler sampler-name ]

缺省情况下,未配置INT动作。

f.     退回系统视图。

quit

(3)     开启指定接口的内部环回功能。

a.     进入接口视图。

interface interface-type interface-number

b.     开启当前接口的内部环回功能。

telemetry ifa loopback

缺省情况下,接口的内部环回功能处于关闭状态。

c.     退回系统视图。

quit

(4)     在流量入接口配置对本地环回INT流量添加采集信息动作。

a.     创建用户自定义ACL,并进入用户自定义ACL视图。

有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

b.     创建规则。

有关rule (user-defined ACL view)命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。

注意,本规则中需要配置如下两种内容,且必须配置在同一条规则中。第一,步骤(2)中配置的将原始流量镜像至INT处理器动作中引用了ACL,本规则中要配置与其相同的流量特征匹配项。第二,本规则中还要配置INT标志(rule permit protocol ifa,其中protocoltcpudp)。例如,步骤(2)中引用的ACL中,规则为rule permit tcp source 10.0.0.3 0,则本规则需配置为rule permit tcp source 10.0.0.3 0 ifa

c.     退回系统视图。

quit

d.     进入接口视图。

interface interface-type interface-number

e.     对接口入方向的本地环回INT流量配置添加采集信息动作。

telemetry ifa ifa-id acl user-defined { acl-number | name acl-name } local-loopback action add-metadata

缺省情况下,未配置INT动作。

f.     退回系统视图。

quit

(5)     开启INT功能。

telemetry ifa global enable

缺省情况下,INT功能处于开启状态。

1.5  配置全局丢弃INT报文

1. 功能简介

如果网络管理员希望本节点暂时不向下一节点发送INT报文,则可以开启全局丢弃INT报文功能。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置全局丢弃INT报文。

telemetry ifa global packet-drop

缺省情况下,全局丢弃INT报文功能处于关闭状态。

1.6  INT显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示INT的运行情况,通过查看显示信息验证配置的效果。

表1-1 INT显示和维护

操作

命令

显示接口上QoS策略的配置信息和运行情况

(独立运行模式)

display qos [ mirroring ] policy interface [ interface-type interface-number ] [ slot slot-number ] inbound

(IRF模式)

display qos [ mirroring ] policy interface [ interface-type interface-number ] [ chassis chassis-number slot slot-number ] inbound

(本命令的详细介绍,请参见“ACL和QoS命令参考”中的“QoS”)

显示INT的配置信息

display telemetry ifa

 

1.7  INT典型配置举例

1.7.1  普通型INT配置举例

1. 组网需求

在Device A、Device B和Device C上分别配置普通型INT功能,Device C将INT报文上送采集器。

2. 组网图

3. 配置步骤

(1)     IP地址和单播路由协议的具体配置过程略

(2)     配置尾节点Device C

# 配置设备ID为10.0.0.3。

<DeviceC> system-view

[DeviceC] telemetry ifa device-id 10.0.0.3

# 指定流量的入接口HundredGigE3/0/1为Egress接口。

[DeviceC] interface hundredgige 3/0/1

[DeviceC-HundredGigE3/0/1] telemetry ifa role egress

[DeviceC-HundredGigE3/0/1] quit

# 配置INT报文上送采集器时的封装参数。

[DeviceC] telemetry ifa collector source 20.0.0.2 destination 30.0.0.1 source-port 12 destination-port 14

# 开启INT功能。

[DeviceC] telemetry ifa global enable

(3)     配置中间节点Device B

# 配置设备ID为10.0.0.2。

<DeviceB> system-view

[DeviceB] telemetry ifa device-id 10.0.0.2

# 指定流量的入接口HundredGigE3/0/1为Transit接口。

[DeviceB] interface hundredgige 3/0/1

[DeviceB-HundredGigE3/0/1] telemetry ifa role transit

[DeviceB-HundredGigE3/0/1] quit

# 开启INT功能。

[DeviceB] telemetry ifa global enable

(4)     配置首节点Device A

# 配置设备ID为10.0.0.1。

<DeviceA> system-view

[DeviceA] telemetry ifa device-id 10.0.0.1

# 指定流量的入接口HundredGigE3/0/1为Ingress接口。

[DeviceA] interface hundredgige 3/0/1

[DeviceA-HundredGigE3/0/1] telemetry ifa role ingress

[DeviceA-HundredGigE3/0/1] quit

# 开启接口HundredGigE3/0/3的内部环回功能。

[DeviceA] interface hundredgige 3/0/3

[DeviceA-HundredGigE3/0/3] telemetry ifa loopback

[DeviceA-HundredGigE3/0/3] quit

# 创建一个名为samp的采样器,采用随机采样方式,按照2的次方模式采样,采样率为8。

[DeviceA] sampler samp mode random packet-interval n-power 8

# 创建类classifier1,匹配目的MAC地址为a08c-fdd7-fd99的报文。

[DeviceA] traffic classifier classifier1

[DeviceA-classifier-classifier1] if-match destination-mac a08c-fdd7-fd99

[DeviceA-classifier-classifier1] quit

# 创建流行为behavior1,动作为流量镜像到INT处理器,并引用采样器samp。

[DeviceA] traffic behavior behavior1

[DeviceA-behavior-behavior1] mirror-to ifa-processor sampler samp

[DeviceA-behavior-behavior1] quit

# 创建QoS策略,命名为ifa1,将流分类classifier1和流行为behavior1进行关联。

[DeviceA] qos policy ifa1

[DeviceA-qospolicy-ifa1] classifier classifier1 behavior behavior1

[DeviceA-qospolicy-ifa1] quit

# 将QoS策略ifa1应用到接口HundredGigE3/0/1的入方向上。

[DeviceA] interface hundredgige 3/0/1

[DeviceA-HundredGigE3/0/1] qos apply policy ifa1 inbound

[DeviceA-HundredGigE3/0/1] quit

# 开启INT功能。

[DeviceA] telemetry ifa global enable

4. 验证配置

# 查看Device A相关配置是否生效。

[DeviceA] display qos policy interface hundredgige 3/0/1 inbound

Interface: HundredGigE3/0/1

  Direction: Inbound

  Policy: ifa1

   Classifier: classifier1

     Operator: AND

     Rule(s) :

      If-match destination-mac a08c-fdd7-fd99

     Behavior: behavior1

      Mirroring:

        Mirror to the ifa-processor sampler samp

[DeviceA] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.1

  Telemetry ifa role:

    HundredGigE3/0/1: Ingress

  Telemetry ifa loopback:

    HundredGigE3/0/3

# 查看Device B相关配置是否生效。

[DeviceB] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.2

  Telemetry ifa role:

    HundredGigE3/0/1: Transit

# 查看Device C相关配置是否生效。

[DeviceC] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.3

  Telemetry ifa role:

    HundredGigE3/0/1: Egress

  Telemetry ifa collector:

    Source IP: 20.0.0.2

    Destination IP: 30.0.0.1

    Source-port: 12

    Destination-port: 14

1.7.2  灵活型INT配置举例

1. 组网需求

在Device A、Device B和Device C上分别配置灵活型INT功能,Device C将INT报文送往采集器。

2. 组网图

3. 配置步骤

(1)     IP地址和单播路由协议的具体配置过程略

(2)     配置尾节点Device C

# 配置设备ID为10.0.0.3。

<DeviceC> system-view

[DeviceC] telemetry ifa device-id 10.0.0.3

# 创建用户自定义ACL 5000,并配置规则为匹配源IP地址为192.168.1.2的INT报文。

[DeviceC] acl user-defined 5000

[DeviceC-acl-user-5000] rule permit tcp source 192.168.1.2 0 ifa

[DeviceC-acl-user-5000] rule permit udp source 192.168.1.2 0 ifa

[DeviceC-acl-user-5000] quit

# 对接口HundredGigE3/0/1入方向的INT流量配置镜像至INT处理器动作,并丢弃原始INT报文。

[DeviceC] interface hundredgige 3/0/1

[DeviceC-HundredGigE3/0/1] telemetry ifa 1 acl user-defined 5000 action mirror-to-processor drop

[DeviceC-HundredGigE3/0/1] quit

# 配置INT报文上送采集器时的封装参数。

[DeviceC] telemetry ifa collector source 20.0.0.2 destination 30.0.0.1 source-port 12 destination-port 14

# 开启INT功能。

[DeviceC] telemetry ifa global enable

(3)     配置中间节点Device B

# 配置设备ID为10.0.0.2。

<DeviceB> system-view

[DeviceB] telemetry ifa device-id 10.0.0.2

# 创建用户自定义ACL 5000,并配置规则为匹配源IP地址为192.168.1.2的INT报文。

[DeviceB] acl user-defined 5000

[DeviceB-acl-user-5000] rule permit tcp source 192.168.1.2 0 ifa

[DeviceB-acl-user-5000] rule permit udp source 192.168.1.2 0 ifa

[DeviceB-acl-user-5000] quit

# 对接口HundredGigE3/0/1入方向的INT流量配置添加采集信息动作。

[DeviceB] interface hundredgige 3/0/1

[DeviceB-HundredGigE3/0/1] telemetry ifa 1 acl user-defined 5000 action add-metadata

[DeviceB-HundredGigE3/0/1] quit

# 开启INT功能。

[DeviceB] telemetry ifa global enable

(4)     配置首节点Device A

# 配置设备ID为10.0.0.1。

<DeviceA> system-view

[DeviceA] telemetry ifa device-id 10.0.0.1

# 创建一个名为samp的采样器,采用随机采样方式,按照2的次方模式采样,采样率为8。

[DeviceA] sampler samp mode random packet-interval n-power 8

# 创建IPv4基本ACL 2000,并配置规则为匹配源IP地址为192.168.1.2的报文。

[DeviceA] acl basic 2000

[DeviceA-acl-ipv4-basic-2000] rule permit source 192.168.1.2 0

[DeviceA-acl-ipv4-basic-2000] quit

# 对接口HundredGigE3/0/1入方向的原始流量配置镜像至INT处理器动作:引用ACL 2000和采样器samp,对命中ACL规则的原始报文镜像、采样至INT处理器。

[DeviceA] interface hundredgige 3/0/1

[DeviceA-HundredGigE3/0/1] telemetry ifa 1 acl 2000 action mirror-to-processor sampler samp

[DeviceA-HundredGigE3/0/1] quit

# 开启接口HundredGigE3/0/3的内部环回功能。

[DeviceA] interface hundredgige 3/0/3

[DeviceA-HundredGigE3/0/3] telemetry ifa loopback

[DeviceA-HundredGigE3/0/3] quit

# 创建用户自定义ACL 5000,并配置规则为匹配源IP地址为192.168.1.2的INT报文。

[DeviceA] acl user-defined 5000

[DeviceA-acl-user-5000] rule permit tcp source 192.168.1.2 0 ifa

[DeviceA-acl-user-5000] rule permit udp source 192.168.1.2 0 ifa

[DeviceA-acl-user-5000] quit

# 对接口HundredGigE3/0/1入方向的本地环回INT流量配置添加采集信息动作。

[DeviceA] interface hundredgige 3/0/1

[DeviceA-HundredGigE3/0/1] telemetry ifa 2 acl user-defined 5000 local-loopback action add-metadata

[DeviceA-HundredGigE3/0/1] quit

# 开启INT功能。

[DeviceA] telemetry ifa global enable

4. 验证配置

# 查看Device A相关配置是否生效。

[DeviceA] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.1

  Telemetry ifa action:

    HundredGigE3/0/1:

      Telemetry ifa 1 acl 2000 action mirror-to-processor sampler samp

      Telemetry ifa 2 acl user-defined 5000 local-loopback action add-metadata

  Telemetry ifa loopback:

    HundredGigE3/0/3

# 查看Device B相关配置是否生效。

[DeviceB] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.2

  Telemetry ifa action:

    HundredGigE3/0/1:

      Telemetry ifa 1 acl user-defined 5000 action add-metadata

# 查看Device C相关配置是否生效。

[DeviceC] display telemetry ifa

  Telemetry ifa status          : Enabled

  Telemetry ifa packet-drop     : Disabled

  Telemetry ifa device-id       : 10.0.0.3

  Telemetry ifa action:

    HundredGigE3/0/1:

      Telemetry ifa 1 acl user-defined 5000 action mirror-to-processor drop

  Telemetry ifa collector:

    Source IP: 20.0.0.2

    Destination IP: 30.0.0.1

    Source-port: 12

    Destination-port: 14

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们