Отпремање презентације траје. Молимо да сачекате

Отпремање презентације траје. Молимо да сачекате

Praktična primena NetFlow protokola

Сличне презентације


Презентација на тему: "Praktična primena NetFlow protokola"— Транскрипт презентације:

1 Praktična primena NetFlow protokola
Ivan Ivanović, RCUB Žabljak, februar 2013.

2 Šta je NetFlow tehnologija
NetFlow statistika Router (Exporter) Before we start to dig little deeper into the NetFlow technlogoy let’s define some basic terms. Flow – is unidirectional communication between two devices in the network. Parameters that define one flow are src ip, dst ip, src port, dst port, protocol. Example – When you select google site in mozilla, one flow is request for the page from you to google, and second flow is the answer from the google. All that traffic is passing trough the network and device that collects statistic about that traffic and exports that statistic is called Exporter. Server/software that is used for collection of that statistic is called Collector.

3 NetFlow Tehnologija Razvijena od strane Cisco kompanije
Standardizovana od strane IETF – novi naziv je IPFIX. Netflow V5 i V9 se danas najčešće koriste IPFIX (Netflow V9) – Fleksibilni NetFlow. Postoji definisano više od 100 NetFlow rekorda (većina se još uvek ne koristi) Pruža nam uvid u informacije o statistici sa L3-L4 sloja. Netflow V9 podržava i IPV6, MPLS, MAC…. U AMRESu se samo NetFlow koristi za monitoring IPV6 protokola Drugi proizvođači takođe podržavaju NetFlow (Netstream, Jflow…). Empirijski je pokazano da čini manje od 1% od ukupnog saobraćaja umreži NetFlow was initialy developed by cisco. But later IETF organization used that idea to make open standard called IPFIX. Other vendors also support NetFlow but they call it with different name juniper-jflow or huawei-netstream….etc. Versions v5 and v9 are commonly used in today modern networks. IPFIX is open standard which is compatible with Cisco NetFlow v9 and is also called flexible NetFlow. It will become popular in the future especially in the media world. Those 100 available records are something that will provide us lot of informations in the future media world. (cisco smatra da će 80% saobraćaja biti video i voice saobraćaj)

4 Primer NetFlow statistike
Start time End time Src IP Dst IP Src port Dst port Protocol tos Packet Bytes 01:00 01:01 9733 80 TCP 7 376 Tcp flags Exporter Interface IN Interface OUT Nex hop Src AS Dst AS S Gi0/1 Gi3/4 8756 6985

5 Kako pokrenuti prikupljanje NetFlow statistike?
Dosta rutera koji prosleđuju pakete u “softveru” podržavaju NetFlow Neki od L3 svičeva takođe podržavaju NetFlow (dodatni moduli) Dva tipa podešavanja NetFlowa Globalno Na nivou interfejsa Globalno podešavanje dopušta prikupljanje statistike jedino na svim interfejsima i to najčešće u jednom smeru (in/ingress) Podešavanje na nivou interfejsa nam daje veću fleksibilnost i najčešće je moguće birati smer in/ingress ili out/outgress Not all devices in the network support collection of statistic and export via NetFlow protocol. Most of the routers that are forwarding packets “in software” do support NetFlow protocol. Usually switches do not support NetFlow protocol, except some L3 switches that have support for that in hardware. We can define two groups of configuration commands that enable NetFlow protocol on devices. First group is configured (C2600 ,C3600) in global mode and supports only ingress statistic collection on ALL interfaces.(This is characteristics of old ddevices) Second group is configured per interface, in ingress or egress direction.(C2800, C3800). Why is that problem? Well it creates problem with traffic duplication.

6 NetFlow podešavanje- IN smer
This is simple example of core device that has connection to the ISP. It can be used for precise collection of NetFlow statistic if you enable NetFlow protocol on all interfaces in one direction. Then you will be able to collect statistic of traffic that is passing trough this device and going to the ISP or some other subnet. Host A NetFlow Collector

7 NetFlow podešavanje- IN smer
In this second example you can have duplicated statistic if you have only capability to start export of statistic on all interfaces in one direction (egress). Problem is located on the interfaces on link between R1 and R2. Host A

8 NetFlow dupliranje statistike- IN smer
Gi0/3 Gi0/2 Gi0/1 Gi0/1 So if link between R1 and IPS falls down all communication from HostA will pass trough R2. This statistic from Host A to the ISP will be collected and exported, first time on the ingress interface of R1 and second time on the ingress interface of device R2. Reply from the Internet (ISP) will also matched twice. Host A

9 NetFlow dupliranje statistike
We can cover not only Internet communication but also internal communication

10 Dupliranje NetFlow statistike- Rešenje
Problem se lako može rešiti ako uređaj ima kontrolu eksporta NetFlow statistike na nivou svako pojedinačnog interfejsa. Korišćenjem Ingress/Egress komande možemo kontrolisati prikupljanje NetFlow statistike. Neke aplikacije koje prikupljaju NetFlow statistiku imaju mogućnost da provere da li dolazi do duplranja prikupljene statistike. (src ip, dst ip , src port, dst port, in/out interfaces, next hop…). Veoma dobro rešenje predstavljaju kolektori NetFlow statistike koji imaju mogućnost filtriranja na osnovu NetFlow rekorda (polja)

11 Dupliranje NetFlow statistike- Rešenje
Nećemo koristiti NetFlow statistiku koja ima IP adresu eksportera R2 i koja je prikupljena koristeći saobraćaj koji ulazi na interfejs Gi0/1 uređaja R2! Ignorisati! Koristiti! Gi0/1 Gi0/1 If devices do not support port based configuration we have to use some kind of filtering. Host A Host B

12 Dupliranje NetFlow statistike- Rešenje
Nećemo koristiti NetFlow statistiku koja ima IP adresu eksportera R1 i koja je prikupljena koristeći saobraćaj koji ulazi na interfejs Gi0/1 uređaja R1! Ignorisati! Koristiti! Gi0/1 Gi0/1 Host A Host B

13 NetFlow tajmeri i agregacija
Većina administratora ih ne koristi Neke od aplikacija koje prikupljaju NetFlow statistiku ne koriste timestap polje koje NetFlow eksportuje Problem se javlja kod velike količine NetFlow podataka Rešenje je agregacija podataka Prednosti agregacije su manje baze i brži rad aplikacija Mana agregacije je nedostatak detalja Šta su NetFlow tajmeri (aging)? Npr. Cisco Normal Long Short (threshold ~100packets)

14 NetFlow Agregacija

15 NetFlow Tajmeri– Long aging
Receiving application is using 5 minute aggregation You must check application aggregation timers and device that export netflow statistic

16 NetFlow Tajmeri– Fast aging (Detekcija napada!)

17 NetFlow tajmeri i popunjavanje lokalne memorije eksportera
Eksporter prikuplja statistiku lokalno u svojoj memoriji Kada se memorija prepuni kolektor označi sve prikupljene podatke kao zastarele i eksportuje. Zatim se lokalna memorija oslobađa. Specijalni slučaji mogu dovesti do zauzimanja memorije Ping sweep DNS lookups Kod protokola koji uspostavljaju sesiju postoji mehanizam otkrivanja kraja sesije – TCP flegovi Kod protokoli koji ne uspostavljaju sesiju ne postoji mogućnost detekcije kraja sesije - UDP Preterano zauzimanje memorije može dovesti do opterećenja eksportera Tajmeri su jedini način da se “zastari” i eksportuje NetFlow statistika

18 Netflow Sonda Veoma koristan alat!
Dosta korisnih informacija se može naći na web stranici SWITCH NRENa Šta je NetFlow sonda? Kako se koristi? Gde se koristi? Šta se dobija sa tim? Šta se gubi ako je koristimo? Problemi? You lose information about exporter in/out interfaces so you can not use applications that rely on exporter ip address and in/out interfaces.

19 Netflow Sonda- L2 segment mreže!
L2 Svičevi ne podržavaju NetFlow protokol L2 Svičevi obično podržavaju port mirroring (SPAN)! E.g. softflowd Cheap switches support port mirroring, or span

20 Netflow Sonda– Port mirroring zahtevi!
Dodatni server (desktop pc). Dve NIC kartice. Dva porta na sviču. Gubi se informacija o IN/OUT portovima. eth1 eth0

21 Netflow Sonda– Port mirroring zahtevi!
Institucija koja je na L2 segmentu.

22 NetFlow Sonde– Virtuelizacija
Testirano na Citrix XenServeru Starije verzije VmWare-a (3.5) podržavaju NetFlow protokol. eth0 eth0 eth0 eth0

23 AMRES konfiguracija

24 Budućnost NetFlow-a Raste popularnost novih NetFlow rekorda
Cisco je počeo da koristi dodatna NetFlow polja za media saobraćaj (Cisco -Medianet) NetFlow media rekordi:packet delay, packet loss, jitter…

25 Analiza sigurnosti u mreži - I

26 Analiza sigurnosti u mreži - I

27 Analiza sigurnosti u mreži - II

28 Analiza sigurnosti u mreži - II

29 Analiza sigurnosti u mreži - II

30 Q&A KRAJ


Скинути ppt "Praktična primena NetFlow protokola"

Сличне презентације


Реклама од Google