İstifadəçilərə daha keyfiyyətli xidmət göstərilmək üçün şəbəkənin işinin optimallaşdırılması vacibdir. Lakin şəbəkədə dövr edən trafik haqqında məlumat olmadan bunu etmək çətindir. Cisco IOS da Netflow protokolu məhz trafiki monitorinq etməyə kömək edir. Bu yazıda qeyd olunan protokolun sazlanması haqqında danışacağıq. Topologiyada bir ədəd 7200 marşrutlayıcı bir ədəd komutator və iki PC var:

Netflow bir neçə komponentdən ibarətdir:
- Sensor keçən trafiki toplamaq üçün istifadə olunur. Sensorları şəbəkənin dar yerlərinə, məsələn provayderə qoşulu olan avadanlıqda qurmaq daha məqsədəuyğundur.
- Kollektor Sensorlardan daxil olan informasiyanı cəmləyir və növbəti analiz üçün müvafiq faylda saxlayır.
- Analizator kollektor tərəfindən generasiya edilmiş faylı analiz edərək oxunaqlı hala salır. Müasir həllərdə kollektor və analizator bir həll çərçiəvəsində olur.
Marşrutlayıcının ilkin konfiqurasiyası
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip virtual-reassembly
duplex half
!
interface FastEthernet1/0
ip address dhcp
ip virtual-reassembly
duplex auto
speed auto
!
NAT konfiqurasiyası:
ip nat inside source list FOR-NAT interface FastEthernet1/0 overload
!
ip access-list extended FOR-NAT
permit ip 192.168.1.0 0.0.0.255 any
interface FastEthernet0/0
ip nat inside
interface FastEthernet1/0
ip nat outside
NetFlow konfiqurasiyası:
ip flow-export source FastEthernet0/0
ip flow-export version 9
ip flow-export destination 10.55.10.55 2055
ip flow-top-talkers
top 2
sort-by bytes
!
interface FastEthernet0/0
ip flow ingress
Marşrutlayıcının özündə NetFlow-u yoxlamaq üçün aşağıdakı komandalardan istifadə etmək olar:
show ip flow export
show ip cache flow
show ip cache verbose flow
show ip flow interface
show ip flow top-talkers
show ip flow export – NetFlow protokolun ümumi konfiqurasiyasını əks etdirir:
R1#sh ip flow export
Flow export v9 is enabled for main cache
Export source and destination details :
VRF ID : Default
Source(1) 192.168.1.1 (FastEthernet0/0)
Destination(1) 10.55.10.55 (2055)
Version 9 flow records
0 flows exported in 0 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
show ip cache flow – NetFlow protokolunun marşrutlayıcıda topladığı keşə baxmaq üçün istifadə olunur:
R1#show ip cache flow
IP packet size distribution (0 total packets):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
IP Flow Switching Cache, 4456704 bytes
0 active, 65536 inactive, 0 added
0 ager polls, 0 flow alloc failures
Active flows timeout in 30 minutes
Inactive flows timeout in 15 seconds
IP Sub Flow Cache, 533256 bytes
0 active, 16384 inactive, 0 added, 0 added to flow
0 alloc failures, 0 force free
1 chunk, 1 chunk added
last clearing of statistics never
Protocol Total Flows Packets Bytes Packets Active(Sec) Idle(Sec)
-------- Flows /Sec /Flow /Pkt /Sec /Flow /Flow
SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts
show ip flow top-talkers şəbəkədən ən çox istfadə edən hostların IP ünvanlarını, müraciət etdikləri resursların IP-lərini və istifadə olunan protokol və portları əks etdirir.
NetFlow server
Bu yerdə GNS3 məni pis vəziyyətdə qoydu və trafiki qeyd olunan ünvana göndərmədi. Lakin real şəbəkələrdə belə problemlər yaşanmır. O ki, qaldı NetFlow analizatora, bazarda bu həlli təqdim edən bir çox şirkətlər var: Solarwinds Real-Time Netflow Traffic Analyzer (məhz bu ödənişsizdir), Solarwinds NetFlow Traffic Analyzer – bu ödənişlidir və daha geniş funksiyalara malikdir; PRTG Network Monitor; ntopng və nProbe bu həll pulsuzdur və Linux ƏS üçün nəzərdə tutulub.
Həllərin əksəriyyəti ödənişli olsa da 30 günlük sınaq versiyasını əldə etmək olar. Daha sonra isə bəyəndiyiniz həlli seçib ala bilərsiniz.
netadmin.az IT haqqında Azərbaycan dilində