NSX Advanced Load Balancer 的默认行为是,隐式监控所有配置的默认网关。如果配置了很多默认网关,这可能会导致在 NSX Advanced Load Balancer 和默认网关之间发送多个 ICMP 回显请求-应答消息。您可以通过 CLI 命令停用内部网关监控器并更改内部网关监控器的默认设置。
停用内部网关监控器
登录到 NSX Advanced Load Balancer CLI,然后使用 disable_gateway_monitor 命令停用内部网关监控器。在以下示例中,停用了名为 Default-Cloud 的云的内部网关监控器。
[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
在停用内部网关监控器后,使用 show vrfcontext global 命令确认更改。disable-gateway-monitor 标记的值现在更改为 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
更改内部网关监控器的默认设置
可以使用 configure vrfcontext global 命令更改内部网关监控器的默认设置。
通过使用 CLI,您可以更改内部网关监控器的以下设置的默认值:
网关监控器间隔
网关监控器故障阈值
网关监控器成功阈值
[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