SlideShare a Scribd company logo
1 of 22
単位時間あたりの 
新規NAT session 数の 
最大値を測ってみた 
~パケット送信方法~ 
2014/11/02 
#vyosjp 
@otsuka752 (@twovs)
Measurement of 
Maximum new NAT-sessions 
per second 
(How to send packets) 
2014/11/02 
#vyosjp 
@otsuka752 (@twovs)
about me 
• @otsuka752 (@twovs) 
• ネコ2人+奥さん+可愛い娘 
•• 無線LLAANN装置の開発((11999999~~22000044)) 
• オンラインゲームのシステム管理者(2004~) 
• ただし,ゲームには全く興味無し 
• ZFS 最高!!! beadm 便利!!!
はじめに/Intro 
• VyOS は10万セッションのNAT も動くらしい 
VyOS can store 100K sessions and works well 
http://research.ssaakkuurraa..aadd..jjpp// 
2012/07/24/janog30-network2/ 
• 単位時間あたりの新規session 数は? 
How many new sessions/sec does VyOS handle?
構成/System 
• server(Guest) 
• tcpdump 
Internal 
network 
• Host(*3) 
• VirtualBox 
• VyOS-1.1.0(*1) 
• NAT(masquerade) 
• client(Physical) 
• send packets 
packets(*2) 
1GbE
構成/System 
(*1) Guest properties (VyOS) 
CPU x1 
Memory 2GB 
((**22)) IICCMMPP((たくさんのSSrrcc//DDsstt IIPPAAddddrr の組合せ)) 
ICMP(Many kinds of Src/Dst IPAddr pairs) 
(*3) Host properties 
CPU AMD Athlon 64 X2 Dual Core Processor 6400+ 
Memory 8GB 
OS Solaris 11.1 
VirtualBox 4.3.14
設定/Configuration 
• IPAddr と下記以外はデフォルト値 
Use Default Configuration 
except for IPAddr and below 
set protocols static route 0.0.0.0/0 next-hop ‘(server)' 
set nat source rule 10 outbound-interface 'eth1' 
set nat source rule 10 source address '0.0.0.0/0' 
set nat source rule 10 translation address 'masquerade' 
set system conntrack expect-table-size '2048' 
set system conntrack hash-size '16384' 
set system conntrack table-size '1048576'
試験手順/Testing procedure 
(1) VyOS のNAT セッションやカウンタをリセット 
Reset conntrack and clear NAT counters of VyOS 
vvyyooss@@vvyyooss::~~$$ rreesseett ccoonnnnttrraacckk 
This will clear all currently tracked and expected 
connections. Continue? (Y/N) [N]: y 
vyos@vyos:~$ clear nat source counters
試験手順/Testing procedure 
(2) クライアントからP[pps] でN 種類のパケットを送信 
Send N different kinds of packets to VyOS at P[pps] 
from client 
[client]$ scapy 
Welcome to Scapy (2.2.0-1) 
>>> 
Scapy も良いけど… 
Scapy is good.
試験手順/Testing procedure 
(2) クライアントからP[pps] でN 種類のパケットを送信 
Send N different kinds of packets to VyOS at P[pps] 
from client 
[client]$ sudo tcpreplay --unique-ip ¥ 
-l ${N} --pps=${P} -K -i eth0 file.pcap 
Tcpreplay もイイネ 
I love Tcpreplay too.
試験手順/Testing procedure 
(3) サーバに届いたパケット数を数える 
Count the number of packets from client 
[[sseerrvveerr]]$$ ssuuddoo ttccppdduummpp --nn --ii eetthh00
試験手順/Testing procedure 
(4) VyOS でNAT table の数を見る 
Show NAT statistics on VyOS 
vyos@vyos:~$ show nat source statistics 
rule pkts bytes interface 
---- ---- ----- --------- 
10 100K 2800K eth1
結果/Results 
N:セッション数/sessions handled by VyOS
結果/Results 
N:セッション数/sessions handled by VyOS
結果/Results 
• 新規セッション20K[pps] で処理できそう 
(合計20万セッションでも) 
VyOS will bbee aabbllee ttoo hhaannddllee 
20K new-session per sec 
(with 200K unique sessions condition)
備考/Notes 
• >30K[pps] のパケロス発生時でも 
[サーバに届いたパケット数] と 
[VyOS で作られたNAT session 数] は概ね同数 
>30K[pps] condition, i.e. PER != 0 
[number of packets received by server] 
is also nearly equal to 
[number of NAT-sessions on VyOS]
tcpreplay が気になるでしょ!? 
You will be interested in tcpreplay.
続きはウェブで! 
Find more on the web!
お知らせ 
日本語サイト始めてみました! 
I translate the web site into Japanese. 
http://tcpreplay.jp/
お知らせ 
• 日本語サイト始めてみました! 
• http://tcpreplay.jp/ 
• https://github.com/otsuka752/ 
• Web site in English 
• http://tcpreplay.appneta.com/ 
• https://github.com/appneta/tcpreplay/
END

More Related Content

Similar to Measurement of Maximum new NAT-sessions per second / How to send packets

おまえらこのライブラリ使ってないの? m9 (2013-07)
おまえらこのライブラリ使ってないの? m9	(2013-07)おまえらこのライブラリ使ってないの? m9	(2013-07)
おまえらこのライブラリ使ってないの? m9 (2013-07)Toru Furukawa
 
イベント会場ネットワーク
イベント会場ネットワークイベント会場ネットワーク
イベント会場ネットワークFumihisa Shigekane
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書くmametter
 
20131230_CloudStack Advent Calendar VPCを作ってみよう
20131230_CloudStack Advent Calendar VPCを作ってみよう20131230_CloudStack Advent Calendar VPCを作ってみよう
20131230_CloudStack Advent Calendar VPCを作ってみようMidori Oge
 
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料Yasutaka Hamada
 
遺伝研スパコンを使った解析の並列化.pptx
遺伝研スパコンを使った解析の並列化.pptx遺伝研スパコンを使った解析の並列化.pptx
遺伝研スパコンを使った解析の並列化.pptxOsamu Ogasawara
 
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016Kohei Hoshi
 
リアルタイムゲームサーバーの ベンチマークをとる方法
リアルタイムゲームサーバーの ベンチマークをとる方法リアルタイムゲームサーバーの ベンチマークをとる方法
リアルタイムゲームサーバーの ベンチマークをとる方法モノビット エンジン
 
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライド
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライドMBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライド
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライドYoshinori Hayashi
 
Lt ingaoho-jsonb+postgeres fdw
Lt ingaoho-jsonb+postgeres fdwLt ingaoho-jsonb+postgeres fdw
Lt ingaoho-jsonb+postgeres fdwToshi Harada
 
仮想化環境での利用者公平性
仮想化環境での利用者公平性仮想化環境での利用者公平性
仮想化環境での利用者公平性Takuya ASADA
 
A Sensor Network System using Arduino, Android and Wiki
A Sensor Network System using Arduino, Android and WikiA Sensor Network System using Arduino, Android and Wiki
A Sensor Network System using Arduino, Android and WikiTakashi Yamanoue
 
tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1Ryosuke IWANAGA
 

Similar to Measurement of Maximum new NAT-sessions per second / How to send packets (15)

おまえらこのライブラリ使ってないの? m9 (2013-07)
おまえらこのライブラリ使ってないの? m9	(2013-07)おまえらこのライブラリ使ってないの? m9	(2013-07)
おまえらこのライブラリ使ってないの? m9 (2013-07)
 
イベント会場ネットワーク
イベント会場ネットワークイベント会場ネットワーク
イベント会場ネットワーク
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書く
 
20131230_CloudStack Advent Calendar VPCを作ってみよう
20131230_CloudStack Advent Calendar VPCを作ってみよう20131230_CloudStack Advent Calendar VPCを作ってみよう
20131230_CloudStack Advent Calendar VPCを作ってみよう
 
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
 
遺伝研スパコンを使った解析の並列化.pptx
遺伝研スパコンを使った解析の並列化.pptx遺伝研スパコンを使った解析の並列化.pptx
遺伝研スパコンを使った解析の並列化.pptx
 
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016
サバカン屋のサバ缶はre:Inventで通用したのか&すぐに使える!最新運用ネタ #re:Port2016
 
リアルタイムゲームサーバーの ベンチマークをとる方法
リアルタイムゲームサーバーの ベンチマークをとる方法リアルタイムゲームサーバーの ベンチマークをとる方法
リアルタイムゲームサーバーの ベンチマークをとる方法
 
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライド
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライドMBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライド
MBSD_Cybersecurity_Challenges_2017_最終審査会_発表スライド
 
Lt ingaoho-jsonb+postgeres fdw
Lt ingaoho-jsonb+postgeres fdwLt ingaoho-jsonb+postgeres fdw
Lt ingaoho-jsonb+postgeres fdw
 
Maatkitの紹介
Maatkitの紹介Maatkitの紹介
Maatkitの紹介
 
仮想化環境での利用者公平性
仮想化環境での利用者公平性仮想化環境での利用者公平性
仮想化環境での利用者公平性
 
A Sensor Network System using Arduino, Android and Wiki
A Sensor Network System using Arduino, Android and WikiA Sensor Network System using Arduino, Android and Wiki
A Sensor Network System using Arduino, Android and Wiki
 
Open stackceilometer
Open stackceilometerOpen stackceilometer
Open stackceilometer
 
tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1tcpdump & xtrabackup @ MySQL Casual Talks #1
tcpdump & xtrabackup @ MySQL Casual Talks #1
 

More from @ otsuka752

NS & NSID of Amazon Route 53
NS & NSID of Amazon Route 53NS & NSID of Amazon Route 53
NS & NSID of Amazon Route 53@ otsuka752
 
OLD_Lt traffic analyse_OLD
OLD_Lt traffic analyse_OLDOLD_Lt traffic analyse_OLD
OLD_Lt traffic analyse_OLD@ otsuka752
 
Hijack the domain name
Hijack the domain nameHijack the domain name
Hijack the domain name@ otsuka752
 
Route53 で親子同居
Route53 で親子同居Route53 で親子同居
Route53 で親子同居@ otsuka752
 
reusable delegation set のススメ (Route53)
reusable delegation set のススメ (Route53)reusable delegation set のススメ (Route53)
reusable delegation set のススメ (Route53)@ otsuka752
 
DNS64 (El capitan and unbound-1.5.1)
DNS64 (El capitan and unbound-1.5.1)DNS64 (El capitan and unbound-1.5.1)
DNS64 (El capitan and unbound-1.5.1)@ otsuka752
 
raspi + soracom #pakeana33
raspi + soracom #pakeana33raspi + soracom #pakeana33
raspi + soracom #pakeana33@ otsuka752
 
192.0.0.4 on android
192.0.0.4 on android192.0.0.4 on android
192.0.0.4 on android@ otsuka752
 
a little more about CaptureFilter
a little more about CaptureFiltera little more about CaptureFilter
a little more about CaptureFilter@ otsuka752
 
iptables BPF module 効果測定
iptables BPF module 効果測定iptables BPF module 効果測定
iptables BPF module 効果測定@ otsuka752
 
how to defend DNS authoritative server against DNS WaterTorture
how to defend DNS authoritative server against DNS WaterTorturehow to defend DNS authoritative server against DNS WaterTorture
how to defend DNS authoritative server against DNS WaterTorture@ otsuka752
 
how to decrypt SSL/TLS without PrivateKey of servers
how to decrypt SSL/TLS without PrivateKey of servershow to decrypt SSL/TLS without PrivateKey of servers
how to decrypt SSL/TLS without PrivateKey of servers@ otsuka752
 
WireEdit のススメ
WireEdit のススメWireEdit のススメ
WireEdit のススメ@ otsuka752
 
about tcpreplay-edit
about tcpreplay-editabout tcpreplay-edit
about tcpreplay-edit@ otsuka752
 
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~超簡単!? Punycode 変換 ~国際化・日本語ドメイン~
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~@ otsuka752
 
毎日 dig ったら分かったこと ~新 gTLD~
毎日 dig ったら分かったこと ~新 gTLD~毎日 dig ったら分かったこと ~新 gTLD~
毎日 dig ったら分かったこと ~新 gTLD~@ otsuka752
 
萌え萌えドメイン名一覧(.moe)
萌え萌えドメイン名一覧(.moe)萌え萌えドメイン名一覧(.moe)
萌え萌えドメイン名一覧(.moe)@ otsuka752
 
パケットが教えてくれた ルートサーバが 13個の理由
パケットが教えてくれた ルートサーバが 13個の理由パケットが教えてくれた ルートサーバが 13個の理由
パケットが教えてくれた ルートサーバが 13個の理由@ otsuka752
 

More from @ otsuka752 (20)

NS & NSID of Amazon Route 53
NS & NSID of Amazon Route 53NS & NSID of Amazon Route 53
NS & NSID of Amazon Route 53
 
OLD_LT_DNS_OLD
OLD_LT_DNS_OLDOLD_LT_DNS_OLD
OLD_LT_DNS_OLD
 
OLD_Lt traffic analyse_OLD
OLD_Lt traffic analyse_OLDOLD_Lt traffic analyse_OLD
OLD_Lt traffic analyse_OLD
 
Hijack the domain name
Hijack the domain nameHijack the domain name
Hijack the domain name
 
Route53 で親子同居
Route53 で親子同居Route53 で親子同居
Route53 で親子同居
 
reusable delegation set のススメ (Route53)
reusable delegation set のススメ (Route53)reusable delegation set のススメ (Route53)
reusable delegation set のススメ (Route53)
 
DNS64 (El capitan and unbound-1.5.1)
DNS64 (El capitan and unbound-1.5.1)DNS64 (El capitan and unbound-1.5.1)
DNS64 (El capitan and unbound-1.5.1)
 
raspi + soracom #pakeana33
raspi + soracom #pakeana33raspi + soracom #pakeana33
raspi + soracom #pakeana33
 
192.0.0.4 on android
192.0.0.4 on android192.0.0.4 on android
192.0.0.4 on android
 
a little more about CaptureFilter
a little more about CaptureFiltera little more about CaptureFilter
a little more about CaptureFilter
 
iptables BPF module 効果測定
iptables BPF module 効果測定iptables BPF module 効果測定
iptables BPF module 効果測定
 
how to defend DNS authoritative server against DNS WaterTorture
how to defend DNS authoritative server against DNS WaterTorturehow to defend DNS authoritative server against DNS WaterTorture
how to defend DNS authoritative server against DNS WaterTorture
 
how to decrypt SSL/TLS without PrivateKey of servers
how to decrypt SSL/TLS without PrivateKey of servershow to decrypt SSL/TLS without PrivateKey of servers
how to decrypt SSL/TLS without PrivateKey of servers
 
WireEdit のススメ
WireEdit のススメWireEdit のススメ
WireEdit のススメ
 
about tcpreplay-edit
about tcpreplay-editabout tcpreplay-edit
about tcpreplay-edit
 
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~超簡単!? Punycode 変換 ~国際化・日本語ドメイン~
超簡単!? Punycode 変換 ~国際化・日本語ドメイン~
 
毎日 dig ったら分かったこと ~新 gTLD~
毎日 dig ったら分かったこと ~新 gTLD~毎日 dig ったら分かったこと ~新 gTLD~
毎日 dig ったら分かったこと ~新 gTLD~
 
萌え萌えドメイン名一覧(.moe)
萌え萌えドメイン名一覧(.moe)萌え萌えドメイン名一覧(.moe)
萌え萌えドメイン名一覧(.moe)
 
about Tcpreplay
about Tcpreplayabout Tcpreplay
about Tcpreplay
 
パケットが教えてくれた ルートサーバが 13個の理由
パケットが教えてくれた ルートサーバが 13個の理由パケットが教えてくれた ルートサーバが 13個の理由
パケットが教えてくれた ルートサーバが 13個の理由
 

Recently uploaded

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 

Recently uploaded (10)

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 

Measurement of Maximum new NAT-sessions per second / How to send packets

  • 1. 単位時間あたりの 新規NAT session 数の 最大値を測ってみた ~パケット送信方法~ 2014/11/02 #vyosjp @otsuka752 (@twovs)
  • 2. Measurement of Maximum new NAT-sessions per second (How to send packets) 2014/11/02 #vyosjp @otsuka752 (@twovs)
  • 3. about me • @otsuka752 (@twovs) • ネコ2人+奥さん+可愛い娘 •• 無線LLAANN装置の開発((11999999~~22000044)) • オンラインゲームのシステム管理者(2004~) • ただし,ゲームには全く興味無し • ZFS 最高!!! beadm 便利!!!
  • 4. はじめに/Intro • VyOS は10万セッションのNAT も動くらしい VyOS can store 100K sessions and works well http://research.ssaakkuurraa..aadd..jjpp// 2012/07/24/janog30-network2/ • 単位時間あたりの新規session 数は? How many new sessions/sec does VyOS handle?
  • 5. 構成/System • server(Guest) • tcpdump Internal network • Host(*3) • VirtualBox • VyOS-1.1.0(*1) • NAT(masquerade) • client(Physical) • send packets packets(*2) 1GbE
  • 6. 構成/System (*1) Guest properties (VyOS) CPU x1 Memory 2GB ((**22)) IICCMMPP((たくさんのSSrrcc//DDsstt IIPPAAddddrr の組合せ)) ICMP(Many kinds of Src/Dst IPAddr pairs) (*3) Host properties CPU AMD Athlon 64 X2 Dual Core Processor 6400+ Memory 8GB OS Solaris 11.1 VirtualBox 4.3.14
  • 7. 設定/Configuration • IPAddr と下記以外はデフォルト値 Use Default Configuration except for IPAddr and below set protocols static route 0.0.0.0/0 next-hop ‘(server)' set nat source rule 10 outbound-interface 'eth1' set nat source rule 10 source address '0.0.0.0/0' set nat source rule 10 translation address 'masquerade' set system conntrack expect-table-size '2048' set system conntrack hash-size '16384' set system conntrack table-size '1048576'
  • 8. 試験手順/Testing procedure (1) VyOS のNAT セッションやカウンタをリセット Reset conntrack and clear NAT counters of VyOS vvyyooss@@vvyyooss::~~$$ rreesseett ccoonnnnttrraacckk This will clear all currently tracked and expected connections. Continue? (Y/N) [N]: y vyos@vyos:~$ clear nat source counters
  • 9. 試験手順/Testing procedure (2) クライアントからP[pps] でN 種類のパケットを送信 Send N different kinds of packets to VyOS at P[pps] from client [client]$ scapy Welcome to Scapy (2.2.0-1) >>> Scapy も良いけど… Scapy is good.
  • 10. 試験手順/Testing procedure (2) クライアントからP[pps] でN 種類のパケットを送信 Send N different kinds of packets to VyOS at P[pps] from client [client]$ sudo tcpreplay --unique-ip ¥ -l ${N} --pps=${P} -K -i eth0 file.pcap Tcpreplay もイイネ I love Tcpreplay too.
  • 11. 試験手順/Testing procedure (3) サーバに届いたパケット数を数える Count the number of packets from client [[sseerrvveerr]]$$ ssuuddoo ttccppdduummpp --nn --ii eetthh00
  • 12. 試験手順/Testing procedure (4) VyOS でNAT table の数を見る Show NAT statistics on VyOS vyos@vyos:~$ show nat source statistics rule pkts bytes interface ---- ---- ----- --------- 10 100K 2800K eth1
  • 15. 結果/Results • 新規セッション20K[pps] で処理できそう (合計20万セッションでも) VyOS will bbee aabbllee ttoo hhaannddllee 20K new-session per sec (with 200K unique sessions condition)
  • 16. 備考/Notes • >30K[pps] のパケロス発生時でも [サーバに届いたパケット数] と [VyOS で作られたNAT session 数] は概ね同数 >30K[pps] condition, i.e. PER != 0 [number of packets received by server] is also nearly equal to [number of NAT-sessions on VyOS]
  • 17. tcpreplay が気になるでしょ!? You will be interested in tcpreplay.
  • 18.
  • 20. お知らせ 日本語サイト始めてみました! I translate the web site into Japanese. http://tcpreplay.jp/
  • 21. お知らせ • 日本語サイト始めてみました! • http://tcpreplay.jp/ • https://github.com/otsuka752/ • Web site in English • http://tcpreplay.appneta.com/ • https://github.com/appneta/tcpreplay/
  • 22. END