0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ipfw+natdのパフォーマンス劣化

Last updated at Posted at 2023-08-29

J-COMの安いプランを使っているのですが、通常はほぼほぼ契約帯域が出ます。

image.png

これはWin7のFirefoxからWifi経由(ノーマルアクセスポイント)のFreeBSDのipfwだけのNAT(FW)を通してインターネットに出ています。

同じWin7のEther(100M)でも同じ結果でした。

FWで使用しているのはFreeBSD/12-Stable AR9341(SOC) + AR8316(SW)なモジュールです。

蟹さんのSWがパフォーマンスが悪いのでこのモジュールに変えた経緯があります。

FWとVPNは別にしているので追加でnatdとipfwを使ってIPSec/L2TPのポートフォワードを行うと、22Mくらいしか出なくなります。

ipfwのルールを消すと元に戻りますが、ちょっと不便です。

あまりFWはいじりたくないので、とりあえずVPNを使わない時はルールを消すことにします。

ipfwとnatdをつないでいるdivertが原因かな?CPUパワーは十分あると思うのですが。

ひょっとするとipfwだけでも出来るのかもしれないし、pfでも同じように出来るのかもしれませんが、実運用しているFWで実験するのはいろいろ不都合があるので、もうこのままだと思います。

カーネルパラメーターのチューニングで改善する可能性があるかもしれません。

NATだけだとどれくらいまでいけるのかちょっと試したいのでJ-COMさん帯域上げてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?