IPv4 トラフィックのポリシーベースルート (PBR)
-
PBR を作成します。
-
PBR を適用してください。
-
(オプション)PBR を無効または有効にします。
-
(オプション)PBR のプライオリティの番号を変更します。
PBR の作成または変更
CLI のプロシージャ
-
show ns pbr
> add ns pbr pbr1 allow -srcip 10.102.37.252 -destip 10.10.10.2 -nexthop 10.102.29.77
Done
> set ns pbr pbr1 -priority 23
Done
-
rm ns pbr \<name>
-
clear ns pbrs
> rm ns pbr pbr1
Done
> clear ns PBRs
Done
GUIのプロシージャ
PBR を適用する
PBR の有効化または無効化
-
enable ns pbr \<name>
-
disable ns pbr \<name>
> enable ns PBR pbr1
Done
> show ns PBR pbr1
1) Name: pbr1
Action: ALLOW Hits: 0
srcIP = 10.102.37.252
destIP = 10.10.10.2
srcMac: Protocol:
Vlan: Interface:
Active Status: ENABLED Applied Status: APPLIED
Priority: 10
NextHop: 10.102.29.77
Done
> disable ns PBR pbr1
Warning: PBR modified, use 'apply pbrs' to commit this operation
> apply pbrs
Done
> show ns PBR pbr1
1) Name: pbr1
Action: ALLOW Hits: 0
srcIP = 10.102.37.252
destIP = 10.10.10.2
srcMac: Protocol:
Vlan: Interface:
Active Status: DISABLED Applied Status: NOTAPPLIED
Priority: 10
NextHop: 10.102.29.77
Done
PBR の番号変更
使用事例-複数ホップの PBR
-
同じ LLB 仮想サーバで別の PBR を追加します。
-
存在しない LLB 仮想サーバーを指定する。
-
バインドされたサービスがネクストホップではない LLB 仮想サーバーを指定する。
-
LB 方式が次のいずれかに設定されていない LLB 仮想サーバを指定する。
-
ROUNDROBIN
-
DESTINATIONIPHASH
-
SOURCEIPHASH
-
SRCIPDESTIPHASH
-
LEASTPACKETS
-
LEASTBANDWIDTH
-
LTRM
-
CALLIDHASH
-
CUSTOM LOAD
-
-
LB パーシステンスタイプが次のいずれかに設定されていない LLB 仮想サーバーを指定します。
-
DESTIP
-
SOURCEIP
-
SRCDSTIP
-
| エンティティの種類 | 名前 | IPアドレス |
|---|---|---|
| リンク負荷分散仮想サーバー | LLB1 | - |
| サービス (ネクストホップ) | Router1 | 1.1.1.254 |
| Router2 | 2.2.2.254 | |
| Router3 | 3.3.3.254 | |
| PBR | PBR1 | - |
| PBR2 | - |
-
ネクストホップルータ R1、R2、R3 を表すルータ 1、ルータ 2、ルータ 3 のサービスを作成します。
-
リンク負荷分散仮想サーバー LLB1 を作成し、それにサービス Router1、Router2、Router3 をバインドします。
-
PBR PBR1 と PBR2 を作成し、ネクストホップフィールドをそれぞれ LLB1 と 2.2.254(ルータ R2 の IP アドレス)に設定します。
-
add service \<name> \<IP> \<serviceType> \<port>
-
show service \<name>
> add service Router1 1.1.1.254 ANY *
Done
> add service Router2 2.2.2.254 ANY *
Done
> add service Router3 3.3.3.254 ANY *
Done
-
add lb vserver \<name> \<serviceType>
-
bind lb vserver \< name> \<serviceName>
-
show lb vserver < name>
> add lb vserver LLB1 ANY
Done
> bind lb vserver LLB1 Router1 Router2 Router3
Done
-
「 サービス 」タブの「 アクティブ 」列で、仮想サーバーにバインドするサービスのチェックボックスを選択します。
-
show ns pbr
> add pbr PBR1 ALLOW -srcIP 10.102.29.30 -nextHop LLB1
Done
> add pbr PBR2 ALLOW -srcIP 10.102.29.90 -nextHop 2.2.2.254
Done