ILPIP(Instance Level Public IP)
ILPIP : サービスではなく仮想マシンに直接グローバルIPを割り当てる。
問題点:仮想マシンを再起動する度には変更されてしまう。
ILPIPに後述の予約済みIPは利用できない
予約済みIP(Reserved IP)を使用する
予約済みIP : Azureで利用できる固定のグローバルIP
仮想マシンインスタンスが存在するサービスに予約済みIP(=固定IP)を割り振る。
- 予約済みIPの取得
> New-AzureReservedIP -ReservedIPName "IPアドレスの名前" -Label "ラベル名" -Location "East Asia"
- 確認
> Get-AzureReservedIP
- サービスへ適用
サービスへ適用したところ以下のエラーが発生。
> Set-AzureReservedIPAssociation -ReservedIPName "予約済みIPの名前" -ServiceName "サービス名"
Set-AzureReservedIPAssociation : BadRequest: The region "予約IPの名前" specified for the reserved ip asiaeast is different than the region
japaneast that hosted service japaneast belongs to, they need to belong to the same region.
予約済みのIPとサービスを同じリージョンにしないといけないらしい。
一旦、予約済みIPを削除。
> Remove-AzureReservedIP -ReservedIPName "予約IPの名前"
東アジアはおそらく香港。東日本で再作成。
> New-AzureReservedIP -ReservedIPName "予約済みIPの名前" -Label "ラベル名" -Location "Japan East"
> Set-AzureReservedIPAssociation -ReservedIPName "予約済みIPの名前" -ServiceName "サービス名"
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
Set-AzureReservedIPAssociation xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Succeeded
今度はエラーが発生しなかった。
dig
コマンドで名前解決をしたところうまくいっているようだ。
ただし、
サービス内の仮想マシンが全て停止しているときは予約済みIPに対して課金が発生する($0.41/時 ~306円/月 2015/08/21時点)