The NSX Advanced Load Balancer supports configuration of static private IP address and public IP address for virtual service in the Azure cloud. The steps to configure private IP address and public IP address are discussed in this topic.

Creating a Virtual Service with Static Private and Public IP Address

Log in to the NSX Advanced Load Balancer CLI and use the configure vsvip <vsvip name> command to associate the virtual service with a public IP address and a private IP address.

[admin:10-10-10-1]: > configure vsvip vsvip1
[admin:10-10-10-1]: vsvip> use_standard_alb
[admin:10-10-10-1]: vsvip> vip
New object being created
[admin:10-10-10-1]: vsvip:vip> subnet_uuid rahulr-subnet
[admin:10-10-10-1]: vsvip:vip> ip_address 10.145.130.20
[admin:10-10-10-1]: vsvip:vip> floating_ip <floating_ip>
[admin:10-10-10-1]: vsvip:vip> save
[admin:10-10-10-1]: vsvip> save
[admin:10-10-10-1]: > configure virtualservice vs1
[admin:10-10-10-1]: virtualservice> pool_ref vs-pool
[admin:10-10-10-1]: virtualservice> services port 80
New object being created
[admin:10-10-10-1]: virtualservice:services> save
[admin:10-10-10-1]: virtualservice> vsvip_ref vsvip1
[admin:10-10-10-1]: virtualservice> save

Changing Private IP Allocation Type from Auto Allocate to Static IP

Log in to the NSX Advanced Load Balancer CLI and perform the following changes:

  • Set an index value for the virtual service.

  • Set the value of avi_allocated_vip and auto_allocate_ip to No and configure the required private IP address.

[admin:10-10-10-1]: > configure vsvip vsvip1
[admin:10-10-10-1]: vsvip> vip index 1
[admin:10-10-10-1]: vsvip:vip> no avi_allocated_vip
[admin:10-10-10-1]: vsvip:vip> no auto_allocate_ip
[admin:10-10-10-1]: vsvip:vip> ip_address 10.145.130.111
[admin:10-10-10-1]: vsvip:vip> save
[admin:10-10-10-1]: vsvip> save

Changing Public IP allocation type from Static to Auto allocate

Log in to the NSX Advanced Load Balancer CLI and perform the following changes:

  • Set an index value for the virtual service.

  • Configure the required subnet_uuid once the auto_allocate_ip flag is enabled. Use the no ip_address command to set the public IP address allocation from static to auto allocate.

[admin:10-10-10-1]: > configure vsvip vsvip1
[admin:10-10-10-1]: vsvip> vip index 1
[admin:10-10-10-1]: vsvip:vip> no avi_allocated_fip
[admin:10-10-10-1]: vsvip:vip> auto_allocate_floating_ip
[admin:10-10-10-1]: vsvip:vip> no floating_ip
[admin:10-10-10-1]: vsvip:vip> save
[admin:10-10-10-1]: vsvip> save
Note:

Changing public IP allocation type from auto allocate to static is not allowed.