Overview
BIG-IP の管理インターフェイス以外のネットワーク設定を行います。
TMOS Shell の起動
TMOS Shell を起動します。
[root@localhost:Active:Standalone] config # tmsh
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)#
インターフェイスのリスト
BIG-IP が認識しているインターフェイスを取得します。下記の例では、1.1 が mgmt 以外で使用可能なインターフェイスです。virt-install で割り当てた br2000 がこれに対応します。
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# list net interface
net interface 1.1 {
if-index 48
mac-address 52:54:00:9b:af:85
media-fixed 10000T-FD
media-max auto
mtu 9198
}
net interface mgmt {
if-index 32
mac-address 52:54:00:c9:2d:48
media-active 100TX-FD
}
VLAN 設定
BIG-IP は Tag の仕様有無に関わらず、必ず VLAN を作成します。そして後述の Self IP は VLAN に設定します。基本的には 物理インターフェイスとの紐づけと Tag の設定です。VLAN 使わなければ VLAN を作らずにそのままインターフェイスに IP アドレスを設定できればいいのにと思いますし、これは現在でも少し違和感があります。本稿では、external, internal, ha の 3 つの VLAN を Tag をつけて設定しています。
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net vlan external interfaces replace-all-with { 1.1 { tagged } } tag 3034 root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net vlan internal interfaces replace-all-with { 1.1 { tagged } } tag 3035 root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net vlan ha interfaces replace-all-with { 1.1 { tagged } } tag 3036
設定を確認します。
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# list net vlan
net vlan external {
fwd-mode l3
if-index 112
interfaces {
1.1 {
tagged
}
}
tag 3034
}
net vlan ha {
fwd-mode l3
if-index 144
interfaces {
1.1 {
tagged
}
}
tag 3036
}
net vlan internal {
fwd-mode l3
if-index 128
interfaces {
1.1 {
tagged
}
}
tag 3035
}
Self IP 設定
各 VLAN に Self IP を設定します。ha の IP アドレスは BIG-IP 間でしか使用しない為、/30 で十分ですが、検証環境の都合で /24 にしています。
HA 用リンクはハートビート等でいくつかの通信を許可する必要があります。all で許可することも可能ですが、本稿では default を設定しています。default は定義済みのルールとなり、 BIG-IP の展開で通常必要となるプロトコルやポート番号が許可されています。HA には不要な許可設定もありますが、ざっくりと HA 構成で必要な通信を許可するのは default が簡単です。必要な通信を個別に設定することも可能ですが、おそらく HA 設定時の allow-service (Port Lockdown) は、許可した通信以外でも明確に必要な通信はシステム的に許可されているようです(TCP:1029 等)。
今回はデュアルスタック構成にしたい為、external, internal は IPv6 を合わせて設定しています。ha は IPv6 を設定しても、HA の設定としてどちらか片方しか使用しない為、IPv4 のみとしています。
root@(bigip-1)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self external-ipv4 address 10.0.34.112/24 vlan external root@(bigip-1)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self internal-ipv4 address 10.0.35.112/24 vlan internal root@(bigip-1)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self ha-ipv4 address 10.0.36.112/24 vlan ha allow-service default root@(bigip-1)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self external-ipv6 address fd00:0000:0000:0000:0000:0000:0a00:2270/120 vlan external root@(bigip-1)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self internal-ipv6 address fd00:0000:0000:0000:0000:0000:0a00:2370/120 vlan internal
設定を確認します。
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos)# list net self
net self internal-ipv6 {
address fd00::a00:2370/120
traffic-group traffic-group-local-only
vlan internal
}
net self external-ipv6 {
address fd00::a00:2270/120
traffic-group traffic-group-local-only
vlan external
}
net self ha-ipv4 {
address 10.0.36.112/24
allow-service {
default
}
traffic-group traffic-group-local-only
vlan ha
}
net self internal-ipv4 {
address 10.0.35.112/24
traffic-group traffic-group-local-only
vlan internal
}
net self external-ipv4 {
address 10.0.34.112/24
traffic-group traffic-group-local-only
vlan external
}
定義済みの allow-service default (Port Lockdown: Allow Default) で許可されている通信は下記の通りです。
root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# list net self-allow
net self-allow {
defaults {
igmp:any
ospf:any
pim:any
tcp:domain
tcp:f5-iquery
tcp:https
tcp:snmp
tcp:ssh
udp:520
udp:cap
udp:domain
udp:f5-iquery
udp:snmp
}
}
bigip-2 の設定です。
root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self external-ipv4 address 10.0.34.113/24 vlan external root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self internal-ipv4 address 10.0.35.113/24 vlan internal root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self ha-ipv4 address 10.0.36.113/24 vlan ha allow-service default root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self external-ipv6 address fd00:0000:0000:0000:0000:0000:0a00:2271/120 vlan external root@(bigip-2)(cfg-sync Standalone)(Active)(/Common)(tmos)# create net self internal-ipv6 address fd00:0000:0000:0000:0000:0000:0a00:2371/120 vlan internal
設定の保存
設定を保存します。
root@(localhost)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# save sys config
TMOS Shell の終了
TMOS Shell を終了します。
root@(localhost)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# quit
[root@localhost:NO LICENSE:Standalone] config #