Eth-trunk接口不支持随机包采样的问题

发布时间:  2014-06-18 浏览次数:  65 下载次数:  0
问题描述
【Problem Summary】thailand dtac isp netstream don't have cache
【Problem Details】

客户反馈eth-trunk口应用相关的配置后,cache中没有生成采样报文,也没有相关接口的报文输出。

客户在eth-trunk8的接口使能了采样:

#

interface Eth-Trunk8.103

 vlan-type dot1q 103

...

 ip netstream inbound

#

interface Eth-Trunk8.105

 vlan-type dot1q 105

...

 ip netstream inbound

# 

Slot 2,3,7都有接口加入eth-trunk8

#

interface GigabitEthernet2/0/1

undo shutdown

 eth-trunk 8

#

interface GigabitEthernet3/0/0

undo shutdown

 eth-trunk 8

#

interface GigabitEthernet7/0/0

undo shutdown

 eth-trunk 8

#

但是查询cache信息,以3号板为例,没有cache也没有统计信息:

[ROUT6]dis ip netstream  cache   as slot 3

Info: No required stream can be found in the cache.

[ROUT6]dis ip netstream st               

[ROUT6]dis ip netstream statistics   slot  3 

 Netstream statistic information on slot 3:

 

--------------------------------------------------------------------------------

 length of packets  Number                   Protocol   Number

--------------------------------------------------------------------------------

 1      ~    64   : 0                        IPV4     : 0                  

 65     ~    128  : 0                        IPV6     : 0                  

 129    ~    256  : 0                        MPLS     : 0                  

 257    ~    512  : 0                        L2       : 0                  

 513    ~    1024 : 0                        Total    : 0                  

 1025   ~    1500 : 0                  

 longer than 1500 : 0                  

 

 

--------------------------------------------------------------------------------

 Aggregation   Current Streams       Aged Streams

               Created Streams       Exported Packets      Exported Streams

--------------------------------------------------------------------------------

 origin        0                     0                  

               0                     0                     0                  

 as            0                     0                  

               0                     0                     0                  

 as-tos        0                     0                  

               0                     0                     0                  

 protport      0                     0                  

               0                     0                     0                  

 protporttos   0                     0                  

               0                     0                     0                  

 srcprefix     0                     0                  

               0                     0                     0                  

 srcpretos     0                     0                  

               0                     0                     0                  

 dstprefix     0                     0                  

               0                     0                     0                  

 dstpretos     0                     0                  

               0                     0                     0                   

 prefix        0                     0                  

               0                     0                     0                  

 prefix-tos    0                     0                  

               0                     0                     0                  

 mpls-label    0                     0                  

               0                     0                     0                  

 vlan-id       0                     0                  

               0                     0                     0                  

 bgp-nhp-tos   0                     0                  

               0                     0                     0                  

 index-tos     0                     0                  

               0                     0                     0                  

 src-index-tos 0                     0                  

               0                     0                     0                  

 all-aggre     0                     0                   

               0                     0                     0                  
....

处理过程

1、首先检查配置,客户采样配置是齐全的,相关配置都已经配置。

配置采样比、hostsource地址、slot视图配置采样方式,接口下使能采样。

#

ip netstream as-mode 32

ip netstream export version 9 origin-as bgp-nexthop

ip netstream sampler random-packets 100 inbound

ip netstream sampler random-packets 100 outbound

ip netstream export source 172.3.1.1

ip netstream export host 172.3.2.6 9905

#

interface Eth-Trunk8.103

 vlan-type dot1q 103

...

 ip netstream inbound

#

slot 3

ip netstream sampler to slot self

#

 

2、和其他配置采样的接口进行对比分析

设备上,还配置了部分物理口的采样:

#

interface GigabitEthernet2/0/4

undo shutdown

 mtu 1550

 ...
 ip netstream inbound

 ip netstream statistics enable

#

经过查询,发现2号板,物理口的采样是可以采集到的。

[RST-ISP-AGG-06-diagnose]dis ip netstream  cache   as slot 2

 Start to show information of aggregation-as cache of slot 2.

 Getting user data from cache success.

 

 

 DstIf          DstAs      Streams    Packets    Direction

 SrcIf          SrcAs     

--------------------------------------------------------------------------------

 

 108/0/0        36351      1          2          in

 GI2/0/4        132032   

 

 108/1/0        45758      3          135        in

 GI2/0/4        132032   

 

 108/1/0        1267       1          1          in

 GI2/0/4        132032   

 

 108/0/0        18837      2          2          in

 GI2/0/4        132032   

 

 108/1/0        56041      3          3          in

 GI2/0/4        132032   

 

 108/0/0        48882      1          1          in

 GI2/0/4        132032   

……

 

通过对比分析,发现无法采集到报文的是eth-trunk口的采样,当前的采样方式是随机包采样(random-packets)。

经过分析和确认,对于逻辑口eth-trunk,只支持固定报文采样(fix-packets),因此无法采集到报文。

固定包采样的配置命令:

ip netstream sampler fix-packets fix-packet-number { inbound | outbound }

 

 

根因

Eth-trunk这样的逻辑口,不支持随机包采样。

解决方案
【Resolution Summary】
【Resolution Details】

将随机包采样修改为固定包采样。

随机包和固定包采样只是采集报文方式的不同,都可以实现采样的功能,一般网络中流量报文大小都是随机的情况下,两种方式差异不大。

建议与总结

1、  eth-trunk/ip-trunk/tunnel/mtunel逻辑口只支持固定包采样。

2、  LPUF-20/21/40单板无论逻辑口还是物理口,都只支持固定包采样。

因为有固定包、随机包、固定时间、随机时间四种采样方式,在处理相关问题时也需要注意应用的接口场景是否支持相关采样方式。

END