基本設置

(config)# ip cef /新版IOS都需開啟 (config)# ip flow-capture ip-id /顯示出Flow IP (config)# ip flow-top-talkers /設定顯示前幾筆流量 (config-flow-top-talkers)# top 4 /自訂顯示筆數 (config-flow-top-talkers)# sort-by byte /排序方式 (config)# ip flow-cache timeout active [1-60] /預設30分鐘歸零一次

基本輸出設置

(config)# ip flow-export destination [IP address] [UDP Port] /輸出目的IP及UDP Port (config)# ip flow-export source loopback 0 /輸出所帶的來源IP or 介面 (config)# ip flow-export version 5 /flow輸出版本,版本有1、5、9

(config)#interface gigabitethernet 1/1 (config-if)#ip flow egress /介面流出流量 (config-if)#ip flow ingress /介面流入流量

(config)#interface vlan254 (config-if)#ip flow egress /介面流出流量 (config-if)#ip flow ingress /介面流入流量

clear ip flow stats ======================================= sh ip cache flow  IP packet size distribution (4747587 total packets):   1-32  64  96 128 160 192 224 256 288 320  352 384 416 448 480   .000 .443 .033 .005 .003 .008 .005 .003 .004 .003 .005 .005 .004 .003 .002   512 544 576 1024 1536 2048 2560 3072 3584 4096 4608   .002 .002 .037 .024 .400 .000 .000 .000 .000 .000 .000 IP Flow Switching Cache, 278544 bytes  0 active, 4096 inactive, 0 added  0 ager polls, 0 flow alloc failures  Active flows timeout in 30 minutes  Inactive flows timeout in 15 seconds  last clearing of statistics never Protocol     Total  Flows  Packets Bytes Packets Active(Sec) Idle(Sec) --------     Flows   /Sec   /Flow /Pkt   /Sec   /Flow   /Flow TCP-Telnet     16   0.0     6  40    0.0    2.6   16.1 TCP-FTP      2282   0.0     6  57    0.0    3.3    5.8 TCP-FTPD      232   0.0     5  244    0.0    0.4    4.1 TCP-WWW     273886   0.0    11  725    0.7    2.9    5.9 TCP-SMTP     1770   0.0    11  713    0.0    9.4   13.7 TCP-X        1   0.0     4  140    0.0    0.1    4.3 TCP-BGP       7   0.0     1  40    0.0    0.0    4.4 TCP-other     8102   0.0    41  350   0.0   18.7    9.7 UDP-DNS      8304   0.0     1  64    0.0    2.9   17.2 UDP-other    15320   0.0     4  105    0.0    6.3   17.2 ICMP       1787   0.0     6  72    0.0    3.7   17.2 Total:     311707   0.0    11  671    0.8    3.5    7.0 SrcIf     SrcIPaddress  DstIf      DstIPaddress  Pr TOS Flgs Pkts Port Msk AS          Port Msk AS   NextHop       B/Pk Active Switch#config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#ip route-cache flow Switch(config)#ip flow-export destination 40.0.0.2 9991 Switch(config)#ip flow-export version 5 Switch(config)#end Switch#show ip flow export Flow export is enabled Exporting flows to 40.0.0.2 (9991) Exporting using source IP address 40.0.0.1 Version 5 flow records 2 flows exported in 1 udp datagrams 0 flows failed due to lack of export packet 0 export packets were sent up to process level 0 export packets were dropped due to no fib 0 export packets were dropped due to adjacency issues 0 export packets were dropped due to fragmentation failures 0 export packets were dropped due to encapsulation fixup failures Switch#

相關網誌

 




文章標籤
全站熱搜
創作者介紹
創作者 鵝 的頭像

mini鵝的天地

發表在 痞客邦 留言(0) 人氣(15,585)