Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SF-TAP: L7レベルネットワークトラフィック解析器

ytakano
March 16, 2015

SF-TAP: L7レベルネットワークトラフィック解析器

スケーラブルで柔軟性の高いL7レベルのネットワークトラフィック解析器の説明

ytakano

March 16, 2015
Tweet

More Decks by ytakano

Other Decks in Programming

Transcript

  1. طଘݚڀͱຊݚڀͷҐஔ͚ͮ ("411<64&/*9"5$> 4$"1<*.$> MJCOJET TOPSU OFUNBQ 1'@3*/( %1%, CQG QDBQ

    ϑϩʔϨϕϧղੳ -ϓϩτίϧ൑ผ τϥϑΟοΫΩϟϓνϟ O%1* MpMUFS MJCQSPUPJEFOU 4'5"1 εέʔϥϏϦςΟˍϞδϡϥϦςΟ 
  2. 4'5"1ͷಈ࡞ਤ $16 $16 $16 $16 'MPX"CTUSBDUPS $16 $16 $16 $16

    'MPX"CTUSBDUPS $16 $16 $16 $16 'MPX"CTUSBDUPS $16 $16 $16 $16 'MPX"CTUSBDUPS $FMM*ODVCBUPS 5IF*OUFSOFU 4'5"1$FMM 4'5"1$FMM 4'5"1$FMM 4'5"1$FMM *OUSB/FUXPSL $PSF4DBMJOH $PSF4DBMJOH $PSF4DBMJOH $PSF4DBMJOH )PSJ[POUBM4DBMJOH "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS "OBMZ[FS (C& (C& 
  3. 4'5"1ͷΞʔΩςΫνϟ /8*' )551*' 5-4*' 'MPX"CTUSBDUPS 'MPX $MBTTJpFS 5-4"OBMZ[FS )551"OBMZ[FS )5511SPYZ

    5$1BOE6%1 )BOEMFS pMUFSBOE DMBTTJpFS SVMF --PPQCBDL*' %# 'PSFOTJD *%4*14 FUD "QQMJDBUJPO 1SPUPDPM"OBMZ[FS FUD 5$1%FGBVMU*' 6%1%FGBVMU*'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5-4*' 'MPX"CTUSBDUPS 'MPX $MBTTJpFS 5$1BOE6%1

    )BOEMFS pMUFSBOE DMBTTJpFS SVMF --PPQCBDL*' 5$1%FGBVMU*' 6%1%FGBVMU*' 'MPX *EFOUJpFS *11BDLFU %FGSBHNFOUFS 'MPX$MBTTJpFS -ϓϩτίϧࣝผ ϑϩʔந৅*'΁τϥϑΟοΫΛग़ྗ
  7. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̍ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200
  8. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̎ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 ਖ਼نදݱʹΑΔϓϩτίϧ൑ผ
  9. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̏ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 -ϓϩτίϧࢦఆ
  10. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̐ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 ग़ྗΠϯλʔϑΣʔε໊ࢦఆ
  11. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̑ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 ϙʔτ൪߸ࢦఆ
  12. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̒ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 ϧʔϧͷ༏ઌॱҐࢦఆ
  13. 'MPX"CTUSBDUPSͷ ઃఆϑΝΠϧʢ̓ʣ  develop ana- by this plane. developed by

    s analyzers in rator and ab- f the capturer the analyzer the following ow abstractor le of an ana- stractor illus- 1 http: 2 up = ˆ[-a-zA-Z]+ .+ HTTP/1\.(0\r?\n|1\r?\n([-a- zA-Z]+: .+\r?\n)+) 3 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 4 proto = TCP # TCP or UDP 5 if = http # path to UNIX domain socket 6 nice = 100 # priority 7 balance = 4 # balaced by 4 IFs 8 9 torrent_tracker: # BitTorrent Tracker 10 up = ˆGET .*(announce|scrape).*\?.*info_hash =.+&.+ HTTP/1\.(0\r?\n|1\r?\n([-a-zA-Z]+: .+\r?\n)+) 11 down = ˆHTTP/1\.[01] [1-9][0-9]{2} .+\r?\n 12 proto = TCP 13 if = torrent_tracker 14 nice = 90 # priority 15 16 dns_udp: 17 proto = UDP 18 if = dns 19 port = 53 20 nice = 200 ෼ࢄॲཧɾ$16ෛՙ෼ࢄ༻ઃఆ ͜ͷ৔߹ɼͭͷ*'΁ϑϩʔ୯ҐͰ ෼ׂ͞Εग़ྗ͞ΕΔ
  14. ந৅ϑϩʔ*'ͷ σΟϨΫτϦߏ଄ 20 nice = 200 Figure 3: Configuration Example

    of Flow Abstractor 1 $ ls -R /tmp/sf-tap 2 loopback7= tcp/ udp/ 3 4 /tmp/sf-tap/tcp: 5 default= http2= ssh= 6 dns= http3= ssl= 7 ftp= http_proxy= torrent_tracker= 8 http0= irc= websocket= 9 http1= smtp= 10 11 /tmp/sf-tap/udp: 12 default= dns= torrent_dht= 
  15. ෳ਺ΠϯλʔϑΣεʹΑΔ $16ෛՙܭଌ (a) HTTP Analyzer x 1 (b) HTTP Analyzer

    x 2 (c) HTTP Analyzer x 4 generate 50 clients / sec, 1000 clients maximum, 2500 requests / sec on average Figure 7: CPU Load of HTTP Analyzer and Flow Abstractor 
  16. ·ͱΊ w ൚༻-ղੳث4'5"1ΛఏҊ w εέʔϥϒϧ w ϞδϡϥϦςΟ w ίϞσΟςΟ w

    ඇݴޠґଘͷΠϯλʔϑΣʔε w ϓϩάϥϚϒϧͳωοτϫʔΫղੳ͕Մೳʹ w ߴ଎ͳωοτϫʔΫʹରͯ͠΋ద༻Մೳʹ