/
STEP6:ルーティングテーブル作成およびルート設定

STEP6:ルーティングテーブル作成およびルート設定

 

仮想マシン一覧の表示

PS C:\> Get-AzureVM
ServiceName                             Name                                    Status
-----------                             ----                                    ------
cuda-test-linux                         cuda-test-linux                         ReadyRole
cuda-test-ng                            cuda-test-ng                            ReadyRole
cuda-test-waf                           cuda-test-waf                           ReadyRole

 

ルーティング情報の表示

PS C:\> Get-AzureVM -ServiceName cuda-test-ng -name cuda-test-ng | Get-AzureEffectiveRouteTable
詳細: 16:06:48 - Completed Operation: Get Deployment
Effective routes :
                   Name            Address Prefix    Next hop type    Next hop IP address Status   Source
                   ----            --------------    -------------    ------------------- ------   ------
                                   {10.0.0.0/8}      VNETLocal                            Active   Default
                                   {0.0.0.0/0}       Internet                             Active   Default
                                   {25.0.0.0/8}      Null                                 Active   Default
                                   {100.64.0.0/10}   Null                                 Active   Default
                                   {172.16.0.0/12}   Null                                 Active   Default
                                   {192.168.0.0/16}  Null                                 Active   Default

PS C:\> Get-AzureVM -ServiceName cuda-test-waf -name cuda-test-waf | Get-AzureEffectiveRouteTable
詳細: 16:08:12 - Completed Operation: Get Deployment
Effective routes :
                   Name            Address Prefix    Next hop type    Next hop IP address Status   Source
                   ----            --------------    -------------    ------------------- ------   ------
                                   {10.0.0.0/8}      VNETLocal                            Active   Default
                                   {0.0.0.0/0}       Internet                             Active   Default
                                   {25.0.0.0/8}      Null                                 Active   Default
                                   {100.64.0.0/10}   Null                                 Active   Default
                                   {172.16.0.0/12}   Null                                 Active   Default
                                   {192.168.0.0/16}  Null                                 Active   Default


PS C:\> Get-AzureVM -ServiceName cuda-test-linux -name cuda-test-linux | Get-AzureEffectiveRouteTable
詳細: 16:08:44 - Completed Operation: Get Deployment
Effective routes :
                   Name            Address Prefix    Next hop type    Next hop IP address Status   Source
                   ----            --------------    -------------    ------------------- ------   ------
                                   {10.0.0.0/8}      VNETLocal                            Active   Default
                                   {0.0.0.0/0}       Internet                             Active   Default
                                   {25.0.0.0/8}      Null                                 Active   Default
                                   {100.64.0.0/10}   Null                                 Active   Default
                                   {172.16.0.0/12}   Null                                 Active   Default
                                   {192.168.0.0/16}  Null                                 Active   Default

 

ルーティングテーブル作成

PS C:\> Get-AzureRouteTable
PS C:\> New-AzureRouteTable -name ngroutetable -Location "Japan East" -Label "route table to NGF"
Name                                    Location                                Label
----                                    --------                                -----
ngroutetable                            Japan East                              route table to NGF

 

デフォルトルート、dmz、backendへのルートとして、NGFのIPアドレスへルーティングさせる設定を追加

PS C:\> Get-AzureRouteTable -name ngroutetable | Set-AzureRoute -RouteName Default -AddressPrefix 0.0.0.0/0 -NextHopType
 VirtualAppliance -NextHopIpAddress 10.0.0.4
Name     : ngroutetable
Location : Japan East
Label    : route table to NGF
Routes   :
           Name                 Address Prefix    Next hop type        Next hop IP address
           ----                 --------------    -------------        -------------------
           default              0.0.0.0/0         VirtualAppliance     10.0.0.4

PS C:\> Get-AzureRouteTable -name ngroutetable | Set-AzureRoute -RouteName dmz -AddressPrefix 10.0.1.0/24 -NextHopType V
irtualAppliance -NextHopIpAddress 10.0.0.4
Name     : ngroutetable
Location : Japan East
Label    : route table to NGF
Routes   :
           Name                 Address Prefix    Next hop type        Next hop IP address
           ----                 --------------    -------------        -------------------
           default              0.0.0.0/0         VirtualAppliance     10.0.0.4
           dmz                  10.0.1.0/24       VirtualAppliance     10.0.0.4

PS C:\> Get-AzureRouteTable -name ngroutetable | Set-AzureRoute -RouteName backend -AddressPrefix 10.0.2.0/24 -NextHopTy
pe VirtualAppliance -NextHopIpAddress 10.0.0.4
Name     : ngroutetable
Location : Japan East
Label    : route table to NGF
Routes   :
           Name                 Address Prefix    Next hop type        Next hop IP address
           ----                 --------------    -------------        -------------------
           backend              10.0.2.0/24       VirtualAppliance     10.0.0.4
           default              0.0.0.0/0         VirtualAppliance     10.0.0.4
           dmz                  10.0.1.0/24       VirtualAppliance     10.0.0.4

 

 

ルーティングテーブルをサブネットに割り当て

PS C:\> Set-AzureSubnetRouteTable -VirtualNetworkName cuda-test-vnet -SubnetName dmz -RouteTableName ngroutetable
PS C:\> Set-AzureSubnetRouteTable -VirtualNetworkName cuda-test-vnet -SubnetName backend -RouteTableName ngroutetable

 

IPフォワーディングを有効化(有効化されるまでには数分程度かかります。)

Get-AzureVM -ServiceName cuda-test-ng -Name cuda-test-ng | Set-AzureIPForwarding -Enable

Related content

STEP7: (オプション)クラウドサービスへVIPを追加
STEP7: (オプション)クラウドサービスへVIPを追加
More like this
STEP4:NGFのセットアップおよびFWルール設定
STEP4:NGFのセットアップおよびFWルール設定
More like this
STEP2:NGF、WAF、Linuxの仮想マシンの作成
STEP2:NGF、WAF、Linuxの仮想マシンの作成
More like this
STEP3:LinuxにWebサーバをインストール
STEP3:LinuxにWebサーバをインストール
More like this
サポートトンネル接続
サポートトンネル接続
More like this
手順4: AzureADとの連携
手順4: AzureADとの連携
More like this