flow路由器/交换机配置(二)(非CISCO设备)

 

 

int pos 3/0/2

   ip netstream inbound

   ip netstream outbound

!

ip netstream export source 10.111.4.68

ip netstream export host  50.8.8.14

ip netstream version 5/9

snmp-agent sys-info version all
snmp-agent community read public

 

 ip netstream simpling 500

   华三H3C MSR系列路由器支持sflow

系列都支持sflow

<Sysname> system-view

[Sysname] sflow version 5

[Sysname] sflow agent ip 10.10.10.1     

[Sysname] sflow collector ip 10.10.10.2 port 6343   

 

[Sysname] interface ethernet 1/0

[Sysname-Ethernet1/0] sflow enable inbound

[Sysname-Ethernet1/0] sflow enable outbound

 

 

 

相当于source

相当于destination

 

 

采样

 

[Sysname] interface ethernet 1/0

[Sysname-Ethernet1/0] sflow enable inbound

[Sysname-Ethernet1/0] sflow sampling-mode determine

[Sysname-Ethernet1/0] sflow sampling-rate 100000

[Sysname] sflow interval 50

 

 

 

 

 

sflow sampling-mode { determine | random }

 

 

采样的时间间隔,取值范围为2200,单位为秒。

缺省20

  

(注意和H3Csflow语句其实略有不同)

interface ethernet 3/1

sflow forwarding                                                

!

sflow enable

sflow polling-interval 5

sflow destination 10.4.9.18

 

 
  

 

      forwarding-options {

         sampling {

              input {

                  family inet {

                      rate 1;

                                    }

                       }

              output {

                  cflowd 10.42.69.10 {

                      port 2055;

                      version 5;

                                                }

                       }

                         }

                                   }

      firewall {

          filter Cflowfilter {

              term all {

                  then {

                      sample;

                      accept;

                  }

              }

          }

      }

interfaces {

          ge-0/3/0 {

              unit 0 {

                  family inet {

                      filter {

                          input Cflowfilter;

                                }

                      address 10.42.69.1/24;

                                     }

                       }

               }

            }


中兴ZTE

R10(config)#ip stream enable

ZXR10(config)#ip stream expect version 5

ZXR10(config)#ip stream expect destination 192.168.7.203 2055

 

全局配stream

 

ZXR10(config)#interface fei_1/1

ZXR10(config-if)#netflow-sample-rate ingress unicast 2000

ZXR10(config-if)#netflow-sample-rate egress unicast 2000

 

接口配stream

中兴接口命令好象只能配采样,即unicast后面必须跟一个数字(采样率)

官方文档没给出普通11的接口命令

ZXR10(config)#ip stream cache entries 1024

ZXR10(config)#ip stream cache timeout active 1

ZXR10(config)#ip stream cache timeout inactive 10

 

 

ZXR10(config)#interface fei_1/

ZXR10(config-if)#netflow-sample-rate egress multicast 2000

ZXR10(config-if)#netflow-sample-rate ingress multicast 2000

ZXR10(config-if)#netflow-sample-rate egress mpls 2000

 

Multicast

mpls