The default behavior of the Avi Load Balancer is to implicitly monitor all configured default gateways. If many default gateways are configured, it can lead to multiple ICMP echo request-reply messages between the Avi Load Balancer and the default gateways. You can deactivate internal gateway monitors and change the default setting of internal gateway monitors through CLI commands.

Deactivating Internal Gateway Monitor

Login to the Avi Load Balancer CLI and use the disable_gateway_monitor command to deactivate the internal gateway monitor. In the following example, the internal gateway monitor for the cloud named Default-Cloud is deactivated.

[admin: controller]: > terminal unhide
[admin: controller]: >
[admin: controller]: >
[admin: controller]: > configure vrfcontext global
Multiple objects found for this query.
[0]: vrfcontext-72421d6e-1665-43aa-ae1e-b7147c3bfe52#global in tenant admin, Cloud MyLinux
[1]: vrfcontext-108b944e-c2f6-497b-a20c-6d302a84a046#global in tenant admin, Cloud Default-Cloud
Select one: 1
Updating an existing object. Currently, the object is:
-----------------------------------------------------------------+
Field	Value
-----------------------------------------------------------------+
uuid	vrfcontext-108b944e-c2f6-497b-a20c-6d302a84a046
name	global
static_routes[1]	 
prefix	10.70.45.195/32
next_hop	10.70.45.1
route_id	1
system_default	True
tenant_ref	admin
cloud_ref	Default-Cloud
-----------------------------------------------------------------+
[admin: controller]: vrfcontext>
[admin: controller]: vrfcontext> internal_gateway_monitor
[admin: controller]: vrfcontext:internal_gateway_monitor> disable_gateway_monitor
[admin: controller]: vrfcontext:internal_gateway_monitor> save

Use show vrfcontext global command to confirm the changes after deactivating the internal gateway monitor. The value for the flag disable-gateway-monitor is now changed to true

[admin: controller]: vrfcontext> show vrf
[admin: controller]: vrfcontext> where
Tenant: admin
--------------------------------------------------------------------------+
Field	Value
--------------------------------------------------------------------------+
uuid	vrfcontext-108b944e-c2f6-497b-a20c-6d302a84a046
name	global
static_routes[1]	 
prefix	10.70.45.195/32
next_hop	10.70.45.1
route_id	1
system_default	True
internal_gateway_monitor	 
disable_gateway_monitor	True
tenant_ref	admin
cloud_ref	Default-Cloud
--------------------------------------------------------------------------+
[admin: controller: vrfcontext> save

Changing Default Setting of Internal Gateway Monitor

Use the command configure vrfcontext global to change the default setting of internal gateway monitor.

Using the CLI, you can change the default value for the following settings for the internal gateway monitor:

  • Gateway monitor interval

  • Gateway monitor failure threshold

  • Gateway monitor success threshold

[admin:controller]: >
[admin:controller]: > configure vrfcontext global
Multiple objects found for this query.
[0]: vrfcontext-72421d6e-1665-43aa-ae1e-b7147c3bfe52#global in tenant admin, Cloud MyLinux
[1]: vrfcontext-108b944e-c2f6-497b-a20c-6d302a84a046#global in tenant admin, Cloud Default-Cloud
Select one: 1
Updating an existing object. Currently, the object is:
------------------------------------------------------------------------------------+
Field	Value
------------------------------------------------------------------------------------+
uuid	vrfcontext-108b944e-c2f6-497b-a20c-6d302a84a046
name	global
static_routes[1]	 
prefix	10.70.45.195/32
next_hop	10.70.45.1
route_id	1
system_default	True
internal_gateway_monitor	 
gateway_monitor_interval	1000 milliseconds
gateway_monitor_failure_threshold	10
gateway_monitor_success_threshold	15
disable_gateway_monitor	True
tenant_ref	admin
cloud_ref	Default-Cloud
------------------------------------------------------------------------------------+
[admin:controller]: vrfcontext>
[admin:controller]: vrfcontext> internal_gateway_monitor
[admin:controller]: vrfcontext:internal_gateway_monitor> gateway_monitor_interval 2000
Overwriting the previously entered value for gateway_monitor_interval
[admin:controller]: vrfcontext:internal_gateway_monitor> gateway_monitor_failure_threshold 20
Overwriting the previously entered value for gateway_monitor_failure_threshold
[admin:controller]: vrfcontext:internal_gateway_monitor> gateway_monitor_success_threshold 20
Overwriting the previously entered value for gateway_monitor_success_threshold
[admin:controller]: vrfcontext:internal_gateway_monitor>
[admin:controller]: vrfcontext:internal_gateway_monitor>
[admin:controller]: vrfcontext:internal_gateway_monitor> where
Tenant: admin
----------------------------------------------------+
Field	Value
----------------------------------------------------+
gateway_monitor_interval	2000 milliseconds
gateway_monitor_failure_threshold	20
gateway_monitor_success_threshold	20
disable_gateway_monitor	True
----------------------------------------------------+
[admin:controller]: vrfcontext:internal_gateway_monitor> save
[admin:controller]: vrfcontext> save