背景
BIG-IPのnpath構成を構築してみました。
使用機器はLTM2000になります。
構築
・npath構成するための四つのステップが必要
-fastL4 profileの作成
-poolの作成(省略)
-virtual serverの作成
-サーバーのLoopbackアドレスの設定
fastL4 profile設定例
# list ltm profile fastl4 fastL4_Qiita
ltm profile fastl4 fastL4_Qiita {
app-service none
defaults-from fastL4
hardware-syn-cookie enabled
idle-timeout 300
ip-tos-to-client pass-through
ip-tos-to-server pass-through
keep-alive-interval disabled
link-qos-to-client pass-through
link-qos-to-server pass-through
loose-close enabled
loose-initialization disabled
mss-override 0
pva-dynamic-client-packets 2
pva-dynamic-server-packets 2
pva-offload-dynamic enabled
reassemble-fragments disabled
reset-on-timeout enabled
rtt-from-client disabled
rtt-from-server disabled
server-sack disabled
server-timestamp disabled
software-syn-cookie disabled
tcp-close-timeout 5
tcp-generate-isn disabled
tcp-handshake-timeout 51
tcp-strip-sack disabled
tcp-timestamp-mode preserve
tcp-wscale-mode preserve
}
Loose Close設定を有効にすると、TCPプロトコルフローは、TCP FINパケットが見つかるとすぐに失効します(FINパケットは、 これまでの接続の切断を指示します)
virtual serverの設定例
# list ltm virtual
ltm virtual vs_Qiita {
auto-lasthop enabled
destination 10.1.35.21:http
ip-protocol tcp
mask 255.255.255.255
pool pool_Qiita
profiles {
fastL4_Qiita { }
}
source 0.0.0.0/0
translate-address disabled
translate-port disabled
vs-index 2
}
通常のLBでは、VIP宛てのパケットをリアルサーバのIPアドレス宛てに書き換えてパケットを流します。ただ、npath構成ではリアルサーバのアドレスに書き換えないので、translate-addressとtranslate-portを無効にする
サーバーのLoopbackアドレスの設定
npathの構成ではLBから流すパケットのDestination IPがVIPになるため、リアルサーバーのloopbackアドレスに設定必要があります。
httpモニターを例にする(destinationをloopbackに設定、transparent enabled)
L2 nPath Routingでサーバーのループバックインターフェースの生死監視
# list ltm monitor http http_Qiita
ltm monitor http http_Qiita {
defaults-from http
destination 10.1.35.21:http
interval 5
ip-dscp 0
recv OK
recv-disable none
send "GET /health.html\r\n"
time-until-up 0
timeout 16
transparent enabled
}
OKという文字列を含まれると、モニターアップ