05-INT配置
本章节下载: 05-INT配置 (385.45 KB)
目 录
INT(In-band Telemetry,带内遥测)是一项从设备上采集数据的网络监控技术。配置了INT功能的设备会主动向采集器上送采集数据,提供实时、高速的数据采集功能,采集器分析收到的采集数据,以达到对网络设备的性能及网络运行情况进行监控的目的。
INT网络由开启INT功能的设备组成,该网络中包含一个首节点、若干中间节点和一个尾节点设备。
图1-1 INT网络示意图
INT功能通过镜像原始报文、插入INT报文头和采集信息的方式生成INT报文。INT报文头和采集信息位于原始IP头内部,所以INT报文与原始报文含有相同的IP头,走相同的转发链路,进而对路径上各节点进行信息采集。
目前设备支持基于TCP报文、UDP报文和VXLAN报文生成INT报文。不同报文中INT报文头所处位置如图1-2所示。INT报文头中高64位就是INT标记,固定填充0xccccccccdddddddd。
图1-2 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-3所示,普通型INT中各节点实现功能如下:
· 首节点
流量入接口上通过QoS策略将命中规则的报文镜像、采样至设备内部的INT处理器。处理器对其添加INT报文头,然后将INT报文环回至入接口。入接口根据INT标记自动识别INT报文,添加采集信息,查表转发。出接口添加采集信息,并发送给中间节点。
· 中间节点
流量入接口根据INT标记自动识别INT报文,添加采集信息,查表转发。出接口添加采集信息,发送给尾节点。
· 尾节点
流量入接口根据INT标记自动识别INT报文,添加采集信息,上送至INT处理器加封装后,查表转发至出接口,发送给采集器。
如图1-3所示,以同一条流的INT处理为例,灵活型INT中各节点实现功能如下:
· 首节点
入接口通过ACL对原始报文进行筛选,命中规则的报文被镜像、采样至设备内部的INT处理器。处理器为其添加INT报文头,然后将INT报文环回至入接口。入接口通过ACL筛选出本机环回INT报文,对其添加采集信息,查表转发。出接口添加采集信息,并发送给中间节点。
· 中间节点
入接口通过ACL筛选出INT报文,为命中规则的报文添加采集信息后,查表转发。出接口添加采集信息,发送给尾节点。
· 尾节点
入接口通过ACL筛选出INT报文,对其进行封装,然后查表转发至出接口,发送给采集器。
图1-3 INT功能组网与处理机制示意图
普通型INT支持在Underlay网络和Overlay网络中部署;灵活型INT仅支持在Underlay网络中部署。
在配置INT功能时,建议先配置中间节点和尾节点,最后配置首节点。
在尾节点和中间节点上配置接口角色时,如果既在接口视图下配置了接口角色,又在系统视图下配置了全局角色(即telemetry ifa role transit-egress命令):
· 对于目的IP是本机的INT流量,全局配置优先生效。
· 对于目的IP不是本机、需要继续转发的INT流量,接口配置优先生效。
对于S12500G-AF系列交换机,仅SF系列接口板和SG系列接口板支持INT功能。
对于TCP和UDP报文,INT尾节点不能正确携带报文出方向的队列信息。
对于VXLAN报文,限制如下:
· INT尾节点不能正确携带VXLAN报文出方向的端口、队列信息。
· 灵活型INT尾节点不支持VXLAN报文。
· 不支持IPv6 Underlay网络的VXLAN报文
INT不支持采集跨fabric的流量。
已添加INT报文头的报文,在经过已开启INT功能的单板时,会自动添加采集信息。
如果设备转发INT报文的出接口为聚合接口,则INT报文的出接口会被填充为聚合组的ID。
仅设备模式(系统视图下使用system-working-mode命令配置)为专家模式时,跨板转发的INT报文才会正确的更新报文出端口信息。
INT和iNQA不能处理同一个数据流的报文,INT无法处理被iNQA染色的报文,iNQA无法处理被INT采集到的报文。
(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) 配置设备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功能处于开启状态。
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) 配置流量镜像到INT处理器。
a. 请依次执行以下命令配置流分类。
traffic classifier classifier-name [ operator { and | or } ]
if-match match-criteria
quit
具体流分类规则的配置,请参见“QoS命令”中的if-match命令。
为保证流量统计的准确性,不建议配置if-match any命令匹配所有的数据包,否则可能会导致INT采集OSPF等协议的报文。
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 policy policy-name
classifier classifier-name behavior behavior-name
quit
d. 请依次执行以下命令将QoS策略应用在接口入方向上。
interface interface-type interface-number
qos apply policy policy-name inbound
quit
(4) 开启INT功能。
telemetry ifa global enable
缺省情况下,INT功能处于开启状态。
(1) 配置尾节点
(2) 配置中间节点
(3) 配置首节点
(1) 配置设备ID。
a. 进入系统视图。
system-view
b. 配置设备ID。
telemetry ifa device-id address
缺省情况下,INT设备未配置设备ID。
(1) 进入系统视图。
system-view
(2) 配置接口角色。请选择其中一项进行配置。
对于非VXLAN网络或VXLAN网络中的非Border设备,可以执行以下命令配置接口的角色为egress。
a. 创建用户自定义ACL,并进入用户自定义ACL视图。
有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。
b. 创建规则。
有关rule (user-defined ACL view)命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。
注意,首节点上配置的将原始流量镜像至INT处理器动作中引用了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 add-metadata drop
缺省情况下,未配置INT动作。
f. 退回系统视图。
quit
配置本步骤后,本接口具备egress能力。接口通过ACL识别INT流量,并对其执行egress动作。
对于VXLAN网络中的Border设备,可以执行以下命令配置所有接口的角色为transit-egress。
telemetry ifa role transit-egress
缺省情况下,未配置接口角色。
配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作,对目的IP不是本机、需要继续转发的INT流量执行transit动作。
(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) 配置设备ID。
a. 进入系统视图。
system-view
b. 配置设备ID。
telemetry ifa device-id address
缺省情况下,INT设备未配置设备ID。
(1) 进入系统视图。
system-view
(2) 配置接口角色。请选择其中一项进行配置。
对于非VXLAN网络或VXLAN网络中的非Border设备,可以执行以下命令配置接口的角色为transit。
a. 创建用户自定义ACL,并进入用户自定义ACL视图。
有关acl命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。
b. 创建规则。
有关rule (user-defined ACL view)命令的详细介绍,请参见“ACL和QoS命令参考”中的“ACL”。
注意,首节点上配置的将原始流量镜像至INT处理器动作中引用了ACL,本规则中要配置与其相同的流量特征匹配项。
c. 退回系统视图。
quit
d. 进入接口视图。
interface interface-type interface-number
e. 对接口入方向的流量配置添加采集信息动作。
telemetry ifa ifa-id [ acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } action add-metadata
缺省情况下,未配置INT动作。
f. 退回系统视图。
quit
配置本步骤后,本接口具备transit能力。接口通过ACL识别INT流量,并对其执行transit动作。
对于VXLAN网络中的Border设备,可以执行以下命令配置所有接口的角色为transit-egress。
telemetry ifa role transit-egress
缺省情况下,未配置接口角色。
配置本步骤后,所有接口都同时具备transit和egress能力。接口自动识别INT流量,对目的IP是本机的INT流量执行egress动作,对目的IP不是本机、需要继续转发的INT流量执行transit动作。
(1) 进入系统视图。
system-view
(2) 开启INT功能。
telemetry ifa global enable
缺省情况下,INT功能处于开启状态。
(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) 开启INT功能。
telemetry ifa global enable
缺省情况下,INT功能处于开启状态。
如果网络管理员希望本节点暂时不向下一节点发送INT报文,则可以开启全局丢弃INT报文功能。
(1) 进入系统视图。
system-view
(2) 配置全局丢弃INT报文。
telemetry ifa global packet-drop
缺省情况下,全局丢弃INT报文功能处于关闭状态。
在完成上述配置后,在任意视图下执行display命令可以显示INT的运行情况,通过查看显示信息验证配置的效果。
表1-1 INT显示和维护
操作 |
命令 |
显示接口上QoS策略的配置信息和运行情况 |
(独立运行模式) display qos policy interface [ interface-type interface-number ] [ slot slot-number ] inbound (IRF模式) display qos policy interface [ interface-type interface-number ] [ chassis chassis-number slot slot-number ] inbound (本命令的详细介绍,请参见“ACL和QoS命令参考”中的“QoS”) |
显示INT的配置信息 |
display telemetry ifa |
在Device A、Device B和Device C上分别配置普通型INT功能,Device C将INT报文上送采集器。
(1) IP地址和单播路由协议的具体配置过程略
(2) 配置尾节点Device C
# 配置设备ID为10.0.0.3。
<DeviceC> system-view
[DeviceC] telemetry ifa device-id 10.0.0.3
# 指定流量的入接口Ten-GigabitEthernet3/0/1为Egress接口。
[DeviceC] interface ten-gigabitethernet 3/0/1
[DeviceC-Ten-GigabitEthernet3/0/1] telemetry ifa role egress
[DeviceC-Ten-GigabitEthernet3/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
# 指定流量的入接口Ten-GigabitEthernet3/0/1为Transit接口。
[DeviceB] interface ten-gigabitethernet 3/0/1
[DeviceB-Ten-GigabitEthernet3/0/1] telemetry ifa role transit
[DeviceB-Ten-GigabitEthernet3/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
# 指定流量的入接口Ten-GigabitEthernet3/0/1为Ingress接口。
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] telemetry ifa role ingress
[DeviceA-Ten-GigabitEthernet3/0/1] 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应用到接口Ten-GigabitEthernet3/0/1的入方向上。
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] qos apply policy ifa1 inbound
[DeviceA-Ten-GigabitEthernet3/0/1] quit
# 开启INT功能。
[DeviceA] telemetry ifa global enable
# 查看Device A相关配置是否生效。
[DeviceA] display qos policy interface ten-gigabitethernet 3/0/1 inbound
Interface: Ten-GigabitEthernet3/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:
Ten-GigabitEthernet3/0/1: Ingress
# 查看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:
Ten-GigabitEthernet3/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:
Ten-GigabitEthernet3/0/1: Egress
Telemetry ifa collector:
Source IP: 20.0.0.2
Destination IP: 30.0.0.1
Source-port: 12
Destination-port: 14
在Device A、Device B和Device C上分别配置灵活型INT功能,Device C将INT报文送往采集器。
(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
[DeviceC-acl-user-5000] rule permit udp source 192.168.1.2 0
[DeviceC-acl-user-5000] quit
# 对接口Ten-GigabitEthernet3/0/1入方向的INT流量配置添加采集信息动作,并丢弃原始INT报文。
[DeviceC] interface ten-gigabitethernet 3/0/1
[DeviceC-Ten-GigabitEthernet3/0/1] telemetry ifa 1 acl user-defined 5000 action add-metadata drop
[DeviceC-Ten-GigabitEthernet3/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
[DeviceB-acl-user-5000] rule permit udp source 192.168.1.2 0
[DeviceB-acl-user-5000] quit
# 对接口Ten-GigabitEthernet3/0/1入方向的INT流量配置添加采集信息动作。
[DeviceB] interface ten-gigabitethernet 3/0/1
[DeviceB-Ten-GigabitEthernet3/0/1] telemetry ifa 1 acl user-defined 5000 action add-metadata
[DeviceB-Ten-GigabitEthernet3/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
# 对接口Ten-GigabitEthernet3/0/1入方向的原始流量配置镜像至INT处理器动作:引用ACL 2000和采样器samp,对命中ACL规则的原始报文镜像、采样至INT处理器。
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] telemetry ifa 1 acl 2000 action mirror-to-processor sampler samp
[DeviceA-Ten-GigabitEthernet3/0/1] quit
# 开启INT功能。
[DeviceA] telemetry ifa global enable
# 查看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:
Ten-GigabitEthernet3/0/1:
Telemetry ifa 1 acl 2000 action mirror-to-processor sampler samp
# 查看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:
Ten-GigabitEthernet3/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:
Ten-GigabitEthernet3/0/1:
Telemetry ifa 1 acl user-defined 5000 action add-metadata drop
Telemetry ifa collector:
Source IP: 20.0.0.2
Destination IP: 30.0.0.1
Source-port: 12
Destination-port: 14
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!