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

H3C VSR1000虚拟路由器典型配置举例-6W100

目录

35-H3C VSR1000虚拟路由器Sampler结合IPv4 NetStream使用典型配置举例

本章节下载 35-H3C VSR1000虚拟路由器Sampler结合IPv4 NetStream使用典型配置举例  (134.28 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/NFV/H3C_VSR/Configure/Typical_Configuration_Example/H3C_VSR1000_CE-6W100/201411/845122_30005_0.htm

35-H3C VSR1000虚拟路由器Sampler结合IPv4 NetStream使用典型配置举例

H3C VSR1000虚拟路由器Sampler结合IPv4 NetStream使用典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2014杭州华三通信技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

 



1  简介

本文档介绍通过Sampler结合IPv4 NetStream使用的典型配置举例。

2  配置前提

本文档不严格与具体软件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解Sampler特性和IPv4 NetStream特性。

3  配置举例

3.1  组网需求

图1所示,路由器作为局域网内主机访问外网的网关,现要求通过NetStream功能使用采样器对路由器上GigabitEthernet2/0出方向和GigabitEthernet3/0入方向的流量进行统计,再将统计的信息输出到Netstream服务器上。具体应用需求如下:

·     在接口GigabitEthernet2/0的出方向上配置随机采样,每200个报文中抽取一个报文进行NetStream统计。

·     在接口GigabitEthernet3/0的入方向上配置固定采样,每100个报文中抽取一个报文进行NetStream统计。

图1 Sampler结合IPv4 NetStream使用配置组网图

 

3.2  使用版本

本举例是在E0301版本上进行配置和验证的。

3.3  配置步骤

# 创建一个名为samplerin的采样器,采用固定采样方式,设置采样率为8,即8个报文中抽取第一个报文。

<Device> system-view

[Device] sampler samplerin mode fixed packet-interval 8

# 创建一个名为samplerout的采样器,采用随机采样方式,设置采样率为16,即16个报文中抽取任意一个报文。

[Device] sampler samplerout mode random packet-interval 16

# 配置接口GigabitEthernet3/0地址,在此接口的入方向开启NetStream功能,使用samplerin采样器对该接口的流量进行采样。

[Device] interface gigabitethernet 3/0

[Device-GigabitEthernet3/0] ip address 10.0.0.1 24

[Device-GigabitEthernet3/0] ip netstream inbound

[Device-GigabitEthernet3/0] ip netstream inbound sampler samplerin

[Device-GigabitEthernet3/0] quit

# 配置接口GigabitEthernet2/0地址,在此接口的出方向开启NetStream功能,使用samplerout采样器对该接口的流量进行采样。

[Device] interface gigabitethernet 2/0

[Device-GigabitEthernet2/0] ip address 192.168.0.1 24

[Device-GigabitEthernet2/0] ip netstream outbound

[Device-GigabitEthernet2/0] ip netstream outbound sampler samplerout

[Device-GigabitEthernet2/0] quit

# 配置接口GigabitEthernet1/0地址。

[Device] interface gigabitethernet 1/0

[Device-GigabitEthernet1/0] ip address 192.168.1.1 24

[Device-GigabitEthernet1/0] quit

# 配置NetStream普通流统计信息输出的目的地址为192.168.1.2和目的UDP端口号为5000。

[Device] ip netstream export host 192.168.1.2 5000

3.4  验证配置

# 通过display sampler命令查看采样器的配置信息。

[Device] display sampler

 Sampler name: samplerout

  Mode: random;  Packet-interval: 16

 Sampler name: samplerin

  Mode: fixed;  Packet-interval: 8

# 路由器运行一段时间后,通过display ip netstream cache命令来查看NetStream流缓存区的配置和状态信息。

[Device] display ip netstream cache

IP NetStream cache information:

  Active flow timeout               : 30 min

  Inactive flow timeout             : 30 sec

  Max number of entries             : 10000

  IP active flow entries            : 1

  MPLS active flow entries          : 0

  L2 active flow entries            : 0

  IPL2 active flow entries          : 0

  IP flow entries counted           : 7

  MPLS flow entries counted         : 0

  L2 flow entries counted           : 0

  IPL2 flow entries counted         : 0

  Last statistics resetting time    : Never

 

IP packet size distribution (157 packets in total):

 

 1-32   64   96  128  160  192  224  256  288  320  352  384  416  448  480

 .000 .929 .031 .006 .000 .006 .000 .000 .000 .000 .025 .000 .000 .000 .000

 

  512  544  576 1024 1536 2048 2560 3072 3584 4096 4608 >4608

 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

 

 Protocol          Total  Packets    Flows  Packets Active(sec) Idle(sec)

                   Flows  /sec       /sec   /flow   /flow       /flow

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

 TCP-other             3        0        0       26           7        30

 ICMP                  1        0        0        1           0        30

 UDP-BOOTP             1        0        0        4          15        30

 TCP-Telnet            2        0        0       35          24        30

 

Type DstIP(Port)            SrcIP(Port)            Pro ToS If(Direct)  Pkts

     DstMAC(VLAN)           SrcMAC(VLAN)

     TopLblType(IP/MASK)    Lbl-Exp-S-List

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

IP   192.168.0.1(23)       192.168.0.2(56839)      6   0   GE2/0(I)    1

# 通过display ip netstream export命令来查看NetStream统计输出报文的信息。

[Device] display ip netstream export

IP export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 192.168.1.2 (5000)

  Version 5 exported flows number                 : 0

  Version 5 exported UDP datagrams number (failed): 0 (0)

  Version 9 exported flows number                 : 8

  Version 9 exported UDP datagrams number (failed): 6 (6)

3.5  配置文件

#

 sampler samplerout mode random packet-interval 16

 sampler samplerin mode fixed packet-interval 8

#

 ip netstream export host 192.168.1.2 5000

#

interface GigabitEthernet1/0

 port link-mode route

 ip address 192.168.1.1 255.255.255.0

#

interface GigabitEthernet2/0

 port link-mode route

 ip address 192.168.0.1 255.255.255.0

 ip netstream outbound

 ip netstream outbound sampler samplerout

#

interface GigabitEthernet3/0

 port link-mode route

 ip address 10.0.0.1 255.255.255.0

 ip netstream inbound

 ip netstream inbound sampler samplerin

#

4  相关资料

·     《H3C VSR1000虚拟路由器配置指导》中的“网络管理和监控配置指导”

·     《H3C VSR1000虚拟路由器命令参考》中的“网络管理和监控命令参考”

 

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

新华三官网
联系我们