Configure the Floating Interface IP (FIP) in the network service and attach it to the appropriate SE group, VRF, and cloud reference which is hosting the virtual service that require the preserve client IP feature. The FIP is used as the redirection target for reply traffic from the back-end servers and ensures that traffic always routes back to the Active Service Engine when a failover occurs.

For more information, see Network Service Configuration in the VMware Avi Load BalancerConfiguration Guide.

[admin:10-170-67-140]: > show nsxt segment London_ALB_DATA_SEGMENT
 +-------------------+-----------------------------------------+
 | Field             | Value                                   |
 +-------------------+-----------------------------------------+
 | uuid              | segmentruntime-ab75a213243b             |
 | segment_id        | /infra/segments/London_ALB_DATA_SEGMENT |
 | name              | London_ALB_DATA_SEGMENT                 |
 | subnet            | 192.168.100.0/24                        |
 | dhcp_enabled      | True                                    |
 | nw_ref            | London_ALB_DATA_SEGMENT                 |
 | nw_name           | London_ALB_DATA_SEGMENT                 |
 | vrf_context_ref   | London_Tier1Gateway1                    |
 | tier1_id          | /infra/tier-1s/London_Tier1Gateway1     |
 | opaque_network_id | 9cbf6823-3bb8-4935-a675-e07872e7935f    |
 | segment_gw        | 192.168.100.1/24                        |
 | dhcp_ranges[1]    | 192.168.100.170-192.168.100.180         |
 | segname           | London_ALB_DATA_SEGMENT                 |
 | tenant_ref        | admin                                   |
 | cloud_ref         | nsxt_cloud_overlay                      |
 +-------------------+-----------------------------------------+
Note:

From the configuration, note that the DHCP range is 192.168.100.170-192.168.100.180.

The preserve client IP is configured as shown below:

[admin:10-170-67-140]: > show networkservice nsxt_preserveIP_ns
 +--------------------------------+------------------------------------+
 | Field                          | Value                              |              
 +--------------------------------+------------------------------------+
 | uuid                           | networkservice-55e0f033-02e1-4a6b- |
 | name                           | nsxt_preserveIP_ns                 |                                
 | se_group_ref                   | Default-Group                      |                                    
 | vrf_ref                        | London_Tier1Gateway1               |                               
 | service_type                   | ROUTING_SERVICE                    |                                    
 | routing_service                |                                    |                                                  
 |   enable_routing               | False                              |                                         
 |   routing_by_linux_ipstack     | False                              |                                             
 |   floating_intf_ip[1]          | 192.168.100.150                    |                                  
 |   enable_vmac                  | False                              |                                             
 |   enable_vip_on_all_interfaces | True                               |                                             
 |   advertise_backend_networks   | False                              |                                            
 |   graceful_restart             | False                              |                                               
 |   enable_auto_gateway          | False                              |                                             
 | tenant_ref                     | admin                              |                                          
 | cloud_ref                      | nsxt_cloud_overlay                 |                                
+--------------------------------+------------------------------------+

The floating IP is 192.168.100.150, which is outside the DHCP range:



Note:
  • Ensure that the FIP is from the same segment where the Service Engine’s data segment is configured.

  • Ensure that the FIP does not fall in the DHCP/static range of the data segment.