• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

H3C VSR1000虛擬路由器典型配置舉例-6W100

目錄

35-H3C VSR1000虛擬路由器Sampler結合IPv4 NetStream使用典型配置舉例

本章節下載 35-H3C VSR1000虛擬路由器Sampler結合IPv4 NetStream使用典型配置舉例  (134.28 KB)

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保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們