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

17-Telemetry配置指導

目錄

02-Telemetry Stream配置

本章節下載 02-Telemetry Stream配置  (197.35 KB)

02-Telemetry Stream配置


1 Telemetry Stream

1.1  Telemetry Stream簡介

Telemetry Stream是一項從設備上采集數據的網絡監控技術。配置好Telemetry Stream功能後,設備會主動、持續不斷地向采集器上送采集數據。

Telemetry Stream技術支持采集的信息有流量入、出接口和時間戳。

1.1.1  Telemetry Stream工作機製

Telemetry Stream工作機製如下:

(1)     在流量入接口通過ACL對原始報文進行篩選,命中規則的報文被複製、采樣至設備內部的Telemetry Stream處理器。Telemetry Stream處理器向報文中添加采集信息(流量入接口)。

(2)     Telemetry Stream處理器對其加封裝,然後封裝報文攜帶采集信息路由至采集器。

多個節點均各自向采集器上送采集信息,采集器就可以根據收集到的采集信息進行路徑和時延計算。

1.1.2  Telemetry Stream時間戳功能

開啟Telemetry Stream時間戳功能後,設備會在上送采集器的報文中攜帶時間戳,采集器可以依據單節點上報的時間戳計算出報文在本節點上轉發時產生的時延;同時還可以結合多個節點上報的時間戳,計算出報文在某段路徑上轉發時產生的時延。

1.2  Telemetry Stream配置限製和指導

本功能對三層聚合接口和三層聚合子接口的流量不生效。

Telemetry Stream上送采集器的采集信息是封裝在sFlow格式的報文中的。當前上送的sFlow格式的報文中暫不包含Extended Switch Data和Extended Router Data字段,並且sample pool字段為固定值。

1.3  Telemetry Stream配置準備

在配置Telemetry Stream前,需確保設備之間路由可達。

1.4  配置Telemetry Stream

1.4.1  配置Telemetry Stream基本功能

1. 功能簡介

配置本功能後,設備會對原始報文進行複製,然後在複製報文中添加流量在本設備的入、出接口信息,最後再加上封裝信息,路由至采集器。

如果原始報文過多,Telemetry處理器將麵臨很大的報文處理壓力,甚至造成丟包。為了緩解Telemetry處理器的壓力,可以在流量入接口配置Telemetry Stream動作,通過:

·     引用ACL對報文進行過濾。Telemetry Stream功能僅使用ACL中的匹配規則來匹配報文,忽略ACL規則的permit/deny動作以及time-range指定的規則生效時間段等的處理機製,對匹配ACL規則的報文進行後續封裝和上報處理。

·     引用采樣器對目標流進行采樣。Telemetry Stream功能僅對采樣後的報文進行後續封裝和上報處理。

如果原始報文的數據部分過大,則原始報文加封裝後上送給采集器,不但會過多地占用設備和采集器之間鏈路的帶寬,而且會給采集器帶來多餘的解析負擔。此時,可以開啟Telemetry Stream報文截斷功能。開啟後設備會對封裝報文進行截斷,再上送給采樣器,上送的報文中仍然包含完整的入、出接口信息和時間戳信息,不影響采集結果。

2. 配置步驟

(1)     配置設備ID。

a.     進入係統視圖。

system-view

b.     配置設備ID。

telemetry stream device-id address

缺省情況下,未配置設備ID。

(2)     配置上送采集器的報文的封裝信息。

telemetry stream collector source source-address destination destination-address source-port source-port destination-port destination-port [ vpn-instance vpn-instance-name ]

缺省情況下,未配置上送采集器的報文的封裝信息。

(3)     在流量入接口配置Telemetry Stream動作。

a.     進入接口視圖。

interface interface-type interface-number

b.     配置Telemetry Stream動作。

telemetry stream action action-id [ acl [ ipv6 | mac | user-defined ] { acl-number | name acl-name } | sampler sampler-name ] *

缺省情況下,未配置Telemetry Stream動作。

如果需要統計MPLS報文,則必須通過本命令引用二層ACL,並通過二層ACL匹配鏈路層協議類型type為8847的報文。

c.     退回係統視圖。

quit

有關ACL的詳細介紹,請參見“ACL和QoS配置指導”中的“ACL”。

有關Sampler的詳細介紹,請參見“網絡管理和監控配置指導”中的“Sampler”。

(4)     開啟Telemetry Stream功能。

telemetry stream enable

缺省情況下,Telemetry Stream功能處於開啟狀態。

1.4.2  配置Telmetry Stream時間戳功能

1. 功能簡介

配置本功能後,設備會在上送采集器的報文中添加流量入、出本設備的時間戳。

2. 配置步驟

(1)     開啟Telemetry Stream的時間戳功能。

telemetry stream timestamp enable

缺省情況下,Telemetry Stream的時間戳功能處於關閉狀態。

1.5  Telemetry Stream顯示和維護

1.5.1  顯示ACL配置及運行狀況

可在任意視圖下執行以下命令:

·     顯示ACL的配置和運行情況

display acl [ ipv6 | mac | user-defined ] { acl-number | all | name acl-name }

本命令的詳細介紹,請參見“ACL和QoS命令參考”中的“ACL”。

1.5.2  顯示Telemetry Stream和采樣器配置

可在任意視圖下執行以下命令:

·     查看采樣器的配置信息

display sampler [ sampler-name ] [ slot slot-number ]

本命令的詳細介紹,請參見“網絡管理和監控命令參考”中的“Sampler”。

·     顯示Telemetry Stream的配置信息

display telemetry stream

1.6  Telemetry Stream典型配置舉例

1.6.1  Telemetry Stream配置舉例

1. 組網需求

在Device B上配置Telmetry Stream功能,Device B將攜帶采集信息的報文上送采集器,采集器根據采集信息中的時間戳計算出流量在Device B上轉發時產生的時延。

2. 組網圖

3. 配置準備

說明

缺省情況下,本設備的接口處於ADM(Administratively Down)狀態,請根據實際需要在對應接口視圖下使用undo shutdown命令開啟接口。

 

IP地址和單播路由協議的具體配置過程略。

4. 配置步驟

# 配置Device B的設備ID為10.0.0.1。

<DeviceB> system-view

[DeviceB] telemetry stream device-id 10.0.0.1

# 配置上送采集器的報文的封裝信息:源IP地址為20.0.0.2,目的IP地址為30.0.0.1,源端口號為12,目的端口號為14。

[DeviceB] telemetry stream collector source 20.0.0.2 destination 30.0.0.1 source-port 12 destination-port 14

# 開啟Telemetry Stream的時間戳功能。

[DeviceB] telemetry stream timestamp enable

A service loopback group of the telemetry stream type must be configured for the timestamp function to take effect.

# 創建一個名為samp的采樣器,采用隨機采樣方式,按照2的次方模式采樣,采樣率為8。

[DeviceB] sampler samp mode random packet-interval n-power 8

# 創建IPv4基本ACL 2000,並配置規則為匹配源IP地址為192.168.1.2的報文。

[DeviceB] acl basic 2000

[DeviceB-acl-ipv4-basic-2000] rule permit source 192.168.1.2 0

[DeviceB-acl-ipv4-basic-2000] quit

# 在流量入接口HundredGigE1/0/3配置Telemetry Stream動作:動作ID為1,引用ACL 2000和采樣器samp。

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] telemetry stream action 1 acl 2000 sampler samp

[DeviceB-HundredGigE1/0/3] quit

# 開啟Telemetry Stream功能。

[DeviceB] telemetry stream enable

5. 驗證配置

查看Device B上的Telemetry Stream相關配置是否生效。

[DeviceB] display telemetry stream

  Telemetry stream status          : Enabled

  Telemetry stream timestamp status: Enabled

  Telemetry stream device-id       : 10.0.0.1

  Telemetry stream action:

    HundredGigE1/0/3:

      Telemetry stream action 1:

        ACL    : 2000

        Sampler: samp

  Telemetry stream collector:

    Source IP       : 20.0.0.2

    Destination IP  : 30.0.0.1

    Source port     : 12

    Destination port: 14

 

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們