03-Telemetry Stream配置
本章節下載: 03-Telemetry Stream配置 (236.73 KB)
目 錄
Telemetry Stream是一項從設備上采集數據的網絡監控技術。配置好Telemetry Stream功能後,設備會主動、持續不斷地向采集器上送采集數據。
Telemetry Stream技術支持采集的信息有流量入、出接口和時間戳。
以圖1-1Device B為例,Telemetry Stream工作機製如下:
(1) 在流量入接口通過ACL對原始報文進行篩選,命中規則的報文被複製、采樣至設備內部的Telemetry Stream處理器。Telemetry Stream處理器向報文中添加采集信息(流量入接口)。
(2) Telemetry Stream處理器將攜帶采集信息的報文環回至環回組。
(3) 環回組中的接口識別出本機環回報文,對其添加采集信息(時間戳),然後查表轉發至出接口。
(4) 出接口識別出本機環回報文,對其添加采集信息(流量出接口和時間戳),然後上送至Telemetry Stream處理器。
(5) Telemetry Stream處理器對其加封裝,然後封裝報文攜帶采集信息路由至采集器。
多個節點均各自向采集器上送采集信息,采集器就可以根據收集到的采集信息進行路徑和時延計算。
圖1-1 Telemetry Stream工作機製示意圖
開啟Telemetry Stream時間戳功能後,設備會在上送采集器的報文中攜帶時間戳,采集器可以依據單節點上報的時間戳計算出報文在本節點上轉發時產生的時延;同時還可以結合多個節點上報的時間戳,計算出報文在某段路徑上轉發時產生的時延。
Telemetry Stream僅支持在Underlay網絡中部署。
Telemetry Stream和如下功能互斥,不能同時配置:
· 引用了采樣器的鏡像功能。
· NetStream、IPv6 NetStream、Netanalysis、INT、MOD功能。
有關鏡像、NetStream、IPv6 NetStream和Netanalysis的詳細配置,請參見“網絡管理和監控配置指導”中的“鏡像”、“NetStream”、“IPv6 NetStream”和“Netanalysis”。有關INT和MOD的詳細配置,請參見“Telemetry配置指導”中的“INT”和“MOD”。
Telemetry Stream配置任務如下:
(2) (可選)配置Telmetry Stream時間戳功能
在配置Telemetry Stream前,需確保設備之間路由可達。
配置本功能後,設備會對原始報文進行複製,然後在複製報文中添加流量在本設備的入、出接口信息,最後再加上封裝信息,路由至采集器。
如果原始報文過多,Telemetry處理器將麵臨很大的報文處理壓力,甚至造成丟包。為了緩解Telemetry處理器的壓力,可以在流量入接口配置Telemetry Stream動作,通過:
· 引用ACL對報文進行過濾。Telemetry Stream功能僅對命中ACL permit規則的報文進行後續封裝和上報處理。
· 引用采樣器對目標流進行采樣。Telemetry Stream功能僅對采樣後的報文進行後續封裝和上報處理。
如果原始報文的數據部分過大,則原始報文加封裝後上送給采集器,不但會過多地占用設備和采集器之間鏈路的帶寬,而且會給采集器帶來多餘的解析負擔。此時,可以開啟Telemetry Stream報文截斷功能。開啟後設備會對封裝報文進行截斷,再上送給采樣器,上送的報文中仍然包含完整的入、出接口信息和時間戳信息,不影響采集結果。
(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 ] [ truncation ]
缺省情況下,未配置上送采集器的報文的封裝信息。
本命令中的目的IP地址需指定為采集器的IP地址,目的端口號需指定為采集器上相應軟件的監聽端口號,此IP地址對應的路由出接口不能是管理用以太網接口。
(3) 在流量入接口配置Telemetry Stream動作。
a. 進入接口視圖。
interface interface-type interface-number
b. 配置Telemetry Stream動作。
telemetry stream action action-id [ acl [ mac | user-defined ] { acl-number | name acl-name } | sampler sampler-name ] *
缺省情況下,未配置Telemetry Stream動作。
c. 退回係統視圖。
quit
有關ACL的詳細介紹,請參見“ACL和QoS配置指導”中的“ACL”。
有關Sampler的詳細介紹,請參見“網絡管理和監控配置指導”中的“Sampler”。
(4) 開啟Telemetry Stream功能。
telemetry stream enable
缺省情況下,Telemetry Stream功能處於開啟狀態。
配置本功能後,設備會在上送采集器的報文中添加流量入、出本設備的時間戳。
(1) 配置業務環回組。
a. 進入係統視圖。
system-view
b. 創建業務環回組,並指定其業務類型為Telemetry Stream類型。
service-loopback group group-id type telemetry-stream
缺省情況下,不存在業務環回組。
c. 進入二層以太網接口視圖。
interface interface-type interface-number
d. 將接口加入業務環回組。
port service-loopback group group-id
缺省情況下,接口不屬於任何業務環回組。
e. 退回係統視圖。
quit
加入業務環回組的接口會被環回組獨占,請注意選擇空閑接口。有關業務環回組的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“業務環回組”。
(2) 開啟Telemetry Stream的時間戳功能。
telemetry stream timestamp enable
缺省情況下,Telemetry Stream的時間戳功能處於關閉狀態。
在完成上述配置後,在任意視圖下執行display命令可以顯示Telemetry Stream的運行情況,通過查看顯示信息驗證配置的效果。
表1-1 Telemetry Stream顯示和維護
操作 |
命令 |
顯示ACL的配置和運行情況 |
display acl [ mac | user-defined ] { acl-number | all | name acl-name } 本命令的詳細介紹,請參見“ACL和QoS命令參考”中的“ACL” |
查看采樣器的配置信息 |
display sampler [ sampler-name ] [ slot slot-number ] 本命令的詳細介紹,請參見“網絡管理和監控命令參考”中的“Sampler” |
顯示業務環回組的信息 |
display service-loopback group [ group-id ] 本命令的詳細介紹,請參見“二層技術-以太網交換命令參考”中的“業務環回組” |
顯示Telemetry Stream的配置信息 |
display telemetry stream |
在Device B上配置Telmetry Stream功能,Device B將攜帶采集信息的報文上送采集器,采集器根據采集信息中的時間戳計算出流量在Device B上轉發時產生的時延。
加入業務環回組的接口會被環回組獨占,請注意選擇空閑接口。
IP地址和單播路由協議的具體配置過程略。
# 配置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
# 配置業務環回組1,並指定其業務類型為Telemetry Stream類型。
[DeviceB] service-loopback group 1 type telemetry-stream
# 將端口Twenty-FiveGigE1/0/2加入業務環回組1。
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port service-loopback group 1
All configurations on the interface will be lost. Continue?[Y/N]:y
[DeviceB-Twenty-FiveGigE1/0/2] quit
# 開啟Telemetry Stream的時間戳功能。
[DeviceB] telemetry stream timestamp enable
# 創建一個名為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
# 在流量入接口Twenty-FiveGigE1/0/3配置Telemetry Stream動作:動作ID為1,引用ACL 2000和采樣器samp。
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] telemetry stream action 1 acl 2000 sampler samp
[DeviceB-Twenty-FiveGigE1/0/3] quit
# 開啟Telemetry Stream功能。
[DeviceB] telemetry stream enable
查看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:
Twenty-FiveGigE1/0/3:
Telemetry stream action 1:
ACL : 2000
Sampler: samp
Telemetry stream collector: (Configuration succeeded)
Source IP : 20.0.0.2
Destination IP : 30.0.0.1
Source port : 12
Destination port: 14
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!