如題。
H3C是否有自己的Sflow數據收集工具?
軟件或者硬件。
(0)
您好,請知:
可以參考如下配置案例:
如圖1所示,在某園區網中,教務處、實驗室/圖書館均可以訪問教育網,但是在實際的訪問過程中前者比後者的數據訪問流量大。現要求在Device A和Device B上配置sFlow功能,使Collector Server(服務端口號為5000)能夠對教務處、實驗室/圖書館機房網絡的出、入方向流量進行采樣,從而可以獲取流經端口的數據包的相關信息和該端口的報文統計信息。
圖1 sFlow典型配置舉例
· Flow采樣是基於數據包的流采樣,用於獲取數據包內容的相關信息。在接口數據流量大的網絡環境中,為防止采樣到數據過多,可以配置較低的Flow采樣率;在接口數據流量小的網絡環境中,為防止采樣到的數據過少,可以配置較高的Flow采樣率。
· Counter采樣是基於時間的接口統計信息采樣,用於獲取接口的報文統計信息。在接口數據流量大的網絡環境中,為防止采樣過於頻繁,可以配置較大的Counter采樣時間間隔;在接口數據流量小的網絡環境中,為保證采樣統計更加精確,可以配置較小的Counter采樣時間間隔。
· 為了獲取流經端口的數據包內容的相關信息和該端口的報文統計信息,需要同時配置Flow采樣和Counter采樣功能。
· 進行sFlow相關配置前,請在各設備上配置路由,並確保各間路由可達,具體配置過程略。
· 在設備上配置的sFlow Collector的IP地址和遠端的sFlow Collector的IP地址需保持一致,否則會導致遠端的sFlow Collector無法收到sFlow報文。
(1) Device A的配置
# 創建VLAN10,並向VLAN 10中添加端口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3。
[DeviceA] vlan 10
[DeviceA-vlan10] port Ten-GigabitEthernet 1/0/1 to Ten-GigabitEthernet 1/0/3
[DeviceA-vlan10] quit
# 配置VLAN接口10的IP地址為10.1.1.1/24。請參考此方法配置圖1中其它接口的IP地址,配置步驟這裏省略。
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] ip address 10.1.1.1 255.255.255.0
[DeviceA-Vlan-interface10] quit
# 配置sFlow Agent的IP地址。
[DeviceA] sflow agent ip 10.1.1.1
# 配置sFlow Collector信息:指定sFlow Collector的ID為1,IP地址為30.1.1.2,端口號為5000。
[DeviceA] sflow collector 1 ip 30.1.1.2 port 5000
# 配置Counter采樣,以使設備能夠獲取對應端口的報文統計信息:采樣時間間隔為120秒(即每隔120秒對端口的報文統計信息采樣一次),且經過Counter采樣後,sFlow Agent輸出sFlow報文的目的sFlow Collector編號為1。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] sflow counter interval 120
[DeviceA-Ten-GigabitEthernet1/0/1] sflow counter collector 1
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] sflow counter interval 120
[DeviceA-Ten-GigabitEthernet1/0/2] sflow counter collector 1
[DeviceA-Ten-GigabitEthernet1/0/2] quit
# 配置Flow采樣,以使設備能夠獲取流經端口的數據包的相關信息:采樣率為100000(即在100000個報文中抽取一個報文進行采樣),且經過Flow采樣後,sFlow Agent輸出sFlow報文的目的sFlow Collector編號為1。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] sflow sampling-rate 100000
[DeviceA-Ten-GigabitEthernet1/0/1] sflow flow collector 1
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] sflow sampling-rate 100000
[DeviceA-Ten-GigabitEthernet1/0/2] sflow flow collector 1
[DeviceA-Ten-GigabitEthernet1/0/2] quit
(2) Device B的配置
# 創建VLAN20,並向VLAN 20中添加端口Ten-GigabitEthernet1/0/1和端口Ten-GigabitEthernet1/0/2。
<DeviceB> system-view
[DeviceB] vlan 20
[DeviceB-vlan20] port Ten-GigabitEthernet 1/0/1 to Ten-GigabitEthernet 1/0/2
[DeviceB-vlan20] quit
# 配置VLAN接口20的IP地址為20.1.1.1/24。
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] ip address 20.1.1.1 255.255.255.0
[DeviceB-Vlan-interface20] quit
# 配置sFlow Agent的IP地址。
[DeviceB] sflow agent ip 20.1.1.1
# 配置sFlow Collector信息:指定sFlow Collector的ID、IP地址和端口號。
[DeviceB] sflow collector 1 ip 30.1.1.2 port 5000
# 配置Counter采樣,以使設備能夠獲取對應端口的報文統計信息:采樣時間間隔為30秒,且經過Counter采樣後,sFlow Agent輸出sFlow報文的目的sFlow Collector編號為1。
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] sflow counter interval 30
[DeviceB-Ten-GigabitEthernet1/0/1] sflow counter collector 1
# 配置Flow采樣,以使設備能夠獲取流經端口的數據包的相關信息:采樣率為20000(即在20000個報文中抽取一個報文進行采樣),且經過Flow采樣後,sFlow Agent輸出sFlow報文的目的sFlow Collector編號為1。
[DeviceB-Ten-GigabitEthernet1/0/1] sflow sampling-rate 20000
[DeviceB-Ten-GigabitEthernet1/0/1] sflow flow collector 1
[DeviceB-Ten-GigabitEthernet1/0/1] quit
# 以Device A為例,使用命令display sflow查看各sFlow的配置信息。
[DeviceA] display sflow
sFlow datagram version: 5
Global information:
Agent IP: 10.1.1.1(CLI)
Source address:
Port counter sampling information:
Interface Instance CID Interval(s)
XGE1/0/1 1 1 120
XGE1/0/2 1 1 120
Port flow sampling information:
Interface Instance FID MaxHLen Rate Mode Status
XGE1/0/1 1 1 128 100000 Random Active
XGE1/0/2 1 1 128 100000 Random Active
以上信息表明,接口Ten-GigabitEthernet1/0/1和接口Ten-GigabitEthernet1/0/2已開啟sFlow功能並處於“Active”狀態,sFlow功能正在正常運行,並且Counter采樣的時間間隔為120秒,Flow采樣的報文采樣率為100000。
· Device A:
#
vlan 10
#
interface Vlan-interface10
ip address 10.1.1.1 255.255.255.0
#
sflow agent ip 10.1.1.1
sflow collector 1 ip 30.1.1.2 port 5000 description "CLI Collector"
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 10
sflow flow collector 1
sflow sampling-rate 100000
sflow counter collector 1
sflow counter interval 120
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 10
sflow flow collector 1
sflow sampling-rate 100000
sflow counter collector 1
sflow counter interval 120
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 10
#
· Device B:
#
vlan 20
#
interface Vlan-interface20
ip address 20.1.1.1 255.255.255.0
#
sflow agent ip 20.1.1.1
sflow collector 1 ip 30.1.1.2 port 5000 description "CLI Collector"
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 20
sflow flow collector 1
sflow sampling-rate 20000
sflow counter collector 1
sflow counter interval 30
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 20
(0)
暫無評論
親~登錄後才可以操作哦!
確定你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作
舉報
×
侵犯我的權益
×
侵犯了我企業的權益
×
抄襲了我的內容
×
原文鏈接或出處
誹謗我
×
對根叔社區有害的內容
×
不規範轉載
×
舉報說明
暫無評論