Chuẩn bị

Thiết lập mô hình như sau:

Netflow cho ta giám sát được các cặp IP nào đang trao đổi bao nhiêu thông tin với nhau thay vì chỉ thấy tổng traffic SNMP trên PRTG.

Có 2 loại Netflow là v5 và v9, trong đó v9 mới hơn . Ở đây mình trình bày cấu hình Netflow v9 trên router Cisco và đẩy traffic lên Server Solarwind.

Trên router các bạn vẫn khai báo community string “public”

snmp-server community public

Tải và cài đặt Solarwind NetFlow Traffic Analyzer: https://www.solarwinds.com/netflow-traffic-analyzer

Bản này giá tương tự PRTG 1k2$ và cho phép trial 30 ngày. Sau đó cài đặt mất 20-30p.

Sau khi cài xong thì truy cập qua http://<ip-solarwind-server>:8787 và đăng nhập.

Cấu hình Netflow trên thiết bị mạng

Thiết lập netflow và các rule trên Router

flow record FLOW-RECORD-1
 match ipv4 destination address
 match ipv4 source address
 match ipv4 protocol
 match ipv4 precedence
 match ipv4 tos
 match ipv4 ttl
 match transport destination-port
 match transport source-port
 match application name
 match timestamp absolute monitoring-interval start
 match flow direction
 match interface input
 match interface output
 match flow sampler
 collect counter bytes long
 collect counter packets
!
!
flow exporter EXPORTER-1
 destination 192.168.200.10 ##IP của solarwind
 source ethernete0/0
 transport udp 9996
!
!
flow monitor FLOW-MONITOR-1
 exporter EXPORTER-1
 cache timeout inactive 10 ##sau 10s thì luồng nào ko có gói sẽ bị xóa
 cache timeout active 60 ##sau 60s thì luồng nào cũng bị xóa
 record FLOW-RECORD-1
!
interface Ethernet0/0
 ip address 192.168.200.20 255.255.255.0
 ip flow monitor FLOW-MONITOR-1 input
 ip flow monitor FLOW-MONITOR-1 output

Cấu hình Netflow trên Solarwind

Trên Solarwind, Vào Settings/Manage Nodes, ấn Add node

Bấm next hết là được, thấy node UP là ok.

Sau đó vào Settings/All settings, chọn NTA Settings, đổi port cho Netflow Collector thành 9996

Kiểm tra traffic giao tiếp

Để xem traffic, vào My Dashboards/NTA Summary

Sẽ thấy overview traffic dạng như dưới:

Để xem thông tin trên router, chạy show flow monitor FLOW-MONITOR-1 cache sẽ thấy các luồng traffic của các cặp IP

Leave a Reply

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.