NTP(网络时间协议)设置对 NSX Advanced Load Balancer 的运行至关重要。控制器中的分析功能依赖于集群中的控制器与 SE 之间的同步。控制器将时间与配置的 NTP 服务器同步,SE 又会将时间与控制器同步。

NSX Advanced Load Balancer 需要访问有效的 DNS 和 NTP 服务器才能执行操作。使用 NTP 服务器尤为重要,如果没有 NTP 服务器,NSX Advanced Load Balancer 将无法正常运行。

必须在 NSX Advanced Load Balancer 控制器 上打开端口 123,才能通过 UDP 接收时间戳。

使用 UI 配置 DNS/NTP 设置

NSX Advanced Load Balancer UI 配置 NTP 服务器,如下所示:

  1. 导航到管理 > 系统设置

  2. 单击编辑图标以查看编辑系统设置屏幕。

  3. DNS/NTP 选项卡下,输入 DNS 解析器。这是 DNS 服务器 IP 地址的逗号分隔列表。如果未配置 DNS 服务器,NSX Advanced Load Balancer 将无法接受负载均衡服务器、虚拟服务、邮件服务器的名称以及类似输入内容。

  4. 输入要在 DNS 查找中使用的搜索域

  5. 配置 NTP 身份验证密钥

    1. 单击添加

    2. 输入用于进行该服务器身份验证的受信任密钥列表中的密钥编号

    3. 选择用于 NTP 身份验证的消息摘要算法。已选择消息摘要 (MD5) 和安全哈希算法 (SHA1)。

    4. 输入 NTP 身份验证密钥



  6. NTP 服务器下,选择用于 NTP 身份验证的密钥编号以及 NTP 服务器的 IP 地址。

  7. 单击保存

使用 CLI 配置 DNS/NTP 设置

从 CLI 中配置 NTP 服务器,如下所示。

: > configure systemconfiguration
: systemconfiguration> ntp_configuration
: systemconfiguration:ntp_configuration> ntp_server_list 23.239.26.89 ntp_server_list 69.89.207.99
: systemconfiguration:ntp_configuration> exit
: systemconfiguration> exit
+-------------------------------------+----------------------------------+
| Field                               | Value                            |
+-------------------------------------+----------------------------------+
| uuid                                | default                          |
| dns_configuration                   |                                  |
| search_domain                       |                                  |
| ntp_configuration                   |                                  |
| ntp_server_list[1]                  | 23.239.26.89                     |
| ntp_server_list[2]                  | 69.89.207.99                     |
| tech_support_uploader_configuration |                                  |
| auto_upload                         | False                            |
| portal_configuration                |                                  |
| enable_https                        | True                             |
| redirect_to_https                   | True                             |
| enable_http                         | True                             |
| sslkeyandcertificate_refs[1]        | System-Default-Portal-Cert       |
| sslkeyandcertificate_refs[2]        | System-Default-Portal-Cert-EC256 |
| use_uuid_from_input                 | False                            |
| sslprofile_ref                      | System-Standard                  |
| enable_clickjacking_protection      | True                             |
| allow_basic_authentication          | True                             |
| password_strength_check             | False                            |
| disable_remote_cli_shell            | False                            |
| global_tenant_config                |                                  |
| tenant_vrf                          | False                            |
| se_in_provider_context              | True                             |
| tenant_access_to_provider_se        | True                             |
| email_configuration                 |                                  |
| smtp_type                           | SMTP_LOCAL_HOST                  |
| from_email                          | [email protected]          |
| mail_server_name                    | localhost                        |
| mail_server_port                    | 25                               |
| docker_mode                         | False                            |
+-------------------------------------+----------------------------------+

DNS 搜索域是本地域名,该域名将附加到未完全限定的名称后面。例如,如果将 DNS 搜索域设置为 avinetworks.com,并且要解析的名称为 www,NSX Advanced Load Balancer 将查找 www.avinetworks.com。

使用 CLI 配置 DNS 设置

默认情况下,无法通过配置的 DNS 服务器解析 .local 域(本地域不会路由到 DNS 服务器)。需要为 .local 域明确配置搜索域,才能在此 DNS 域中进行查找。从 CLI 中配置 DNS 设置,如下所示。

  [admin:avictrl]: > configure systemconfiguration 
  [admin:avictrl]: systemconfiguration> dns_configuration
  [admin:avictrl]: systemconfiguration:dns_configuration> search_domain "test.domain1.local test.domain2.com"
  Overwriting the previously entered value for search_domain
  [admin:avictrl]: systemconfiguration:dns_configuration> save
  [admin:avictrl]: systemconfiguration> save
  +----------------------------------+------------------------------------+
  | Field                            | Value                              |
  +----------------------------------+------------------------------------+
  | uuid                             | default                            |
  | dns_configuration                |                                    |
  |   server_list[1]                 | 10.79.16.132                       |
  |   search_domain                  | test.domain1.local test.domain2.com|
  | ntp_configuration                |                                    |
  |   ntp_servers[1]                 |                                    |
  |     server                       | 0.us.pool.ntp.org                  |
  |   ntp_servers[2]                 |                                    |
  |     server                       | 1.us.pool.ntp.org                  |
  |   ntp_servers[3]                 |                                    |
  |     server                       | 2.us.pool.ntp.org                  |
  |   ntp_servers[4]                 |                                    |
  |     server                       | 3.us.pool.ntp.org                  |
  | portal_configuration             |                                    |
  |   enable_https                   | True                               |
  |   redirect_to_https              | True                               |
  |   enable_http                    | True                               |
  |   sslkeyandcertificate_refs[1]   | System-Default-Portal-Cert         |
  |   sslkeyandcertificate_refs[2]   | System-Default-Portal-Cert-EC256   |
  |   use_uuid_from_input            | False                              |
  |   sslprofile_ref                 | System-Standard-Portal             |
  |   enable_clickjacking_protection | True                               |
  |   allow_basic_authentication     | True                               |
  |   password_strength_check        | False                              |
  |   disable_remote_cli_shell       | False                              |
  |   disable_swagger                | False                              |
  |   api_force_timeout              | 24 hours                           |
  |   minimum_password_length        | 8                                  |
  | global_tenant_config             |                                    |
  |   tenant_vrf                     | False                              |
  |   se_in_provider_context         | False                              |
  |   tenant_access_to_provider_se   | True                               |
  | email_configuration              |                                    |
  |   smtp_type                      | SMTP_LOCAL_HOST                    |
  |   from_email                     | [email protected]            |
  |   mail_server_name               | localhost                          |
  |   mail_server_port               | 25                                 |
  |   disable_tls                    | False                              |
  | docker_mode                      | False                              |
  | ssh_ciphers[1]                   | aes128-ctr                         |
  | ssh_ciphers[2]                   | aes256-ctr                         |
  | ssh_hmacs[1]                     | [email protected]      |
  | ssh_hmacs[2]                     | [email protected]      |
  | ssh_hmacs[3]                     | hmac-sha2-512                      |
  | default_license_tier             | ENTERPRISE                         |
  | secure_channel_configuration     |                                    |
  |   sslkeyandcertificate_refs[1]   | System-Default-Secure-Channel-Cert |
  | welcome_workflow_complete        | False                              |
  | fips_mode                        | False                              |
  | enable_cors                      | False                              |
  | common_criteria_mode             | False                              |
  +----------------------------------+------------------------------------+

使用 API 配置 DNS 设置

使用 API 配置 NTP 服务器,如下所示。

{
    },
    "ntp_configuration": {
        "ntp_server_list": [
            {
                "type": "V4",
                "addr": "23.239.26.89"
            },
            {
                "type": "V4",
                "addr": "69.89.207.99"
            }
        ]
    }
}

使用 CLI 配置 NTP 身份验证

可以使用 CLI 或 REST API 启用 NTP 身份验证。通过 NTP 身份验证,用户可以指定一组受信任的身份验证密钥,并为每个 NTP 服务器对等体配置特定的身份验证密钥。NTP 身份验证密钥对象由密钥编号、密钥算法(SHA1 或 MD5)和密钥本身组成。

使用 CLI 配置 NTP 和 NTP 身份验证,如下所示。

[admin:10-10-25-45]: > configure systemconfiguration
[admin:10-10-25-45]: systemconfiguration> ntp_configuration
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> ntp_authentication_keys key_number 1 algorithm ntp_auth_algorithm_md5 key "=I&FBDl,WM,en5Mn~DaG"
New object being created
[admin:10-10-25-45]: systemconfiguration:ntp_configuration:ntp_authentication_keys> exit
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> ntp_authentication_keys key_number 5 algorithm ntp_auth_algorithm_sha1 key ff9a0d589668a0f66649abbd7dfb388d841f1f44
New object being created
[admin:10-10-25-45]: systemconfiguration:ntp_configuration:ntp_authentication_keys> exit
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> exit
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> ntp_servers server 23.239.26.89
New object being created
[admin:10-10-25-45]: systemconfiguration:ntp_configuration:ntp_servers> exit
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> ntp_servers server 69.89.207.99 key_number 5
New object being created
[admin:10-10-25-45]: systemconfiguration:ntp_configuration:ntp_servers> exit
[admin:10-10-25-45]: systemconfiguration:ntp_configuration> exit
[admin:10-10-25-45]: systemconfiguration> exit
+-------------------------------------+------------------------------------------+
| Field                               | Value                                    |
+-------------------------------------+------------------------------------------+
| uuid                                | default                                  |
| dns_configuration                   |                                          |
| search_domain                       |                                          |
| ntp_configuration                   |                                          |
| ntp_authentication_keys[1]          |                                          |
| key_number                          | 1                                        |
| algorithm                           | NTP_AUTH_ALGORITHM_MD5                   |
| key                                 | =I&FBDl,WM,en5Mn~DaG                     |
| ntp_authentication_keys[2]          |                                          |
| key_number                          | 5                                        |
| algorithm                           | NTP_AUTH_ALGORITHM_SHA1                  |
| key                                 | ff9a0d589668a0f66649abbd7dfb388d841f1f44 |
| ntp_servers[1]                      |                                          |
| server                              | 23.239.26.89                             |
| ntp_servers[2]                      |                                          |
| server                              | 69.89.207.99                             |
| key_number                          | 5                                        |
| tech_support_uploader_configuration |                                          |
| auto_upload                         | False                                    |
| portal_configuration                |                                          |
| enable_https                        | True                                     |
| redirect_to_https                   | True                                     |
| enable_http                         | True                                     |
| sslkeyandcertificate_refs[1]        | System-Default-Portal-Cert               |
| sslkeyandcertificate_refs[2]        | System-Default-Portal-Cert-EC256         |
| use_uuid_from_input                 | False                                    |
| sslprofile_ref                      | System-Standard                          |
| enable_clickjacking_protection      | True                                     |
| allow_basic_authentication          | True                                     |
| password_strength_check             | False                                    |
| disable_remote_cli_shell            | False                                    |
| global_tenant_config                |                                          |
| tenant_vrf                          | False                                    |
| se_in_provider_context              | True                                     |
| tenant_access_to_provider_se        | True                                     |
| email_configuration                 |                                          |
| smtp_type                           | SMTP_LOCAL_HOST                          |
| from_email                          | [email protected]                  |
| mail_server_name                    | localhost                                |
| mail_server_port                    | 25                                       |
| docker_mode                         | False                                    |
+-------------------------------------+------------------------------------------+

使用 API 配置 NTP 身份验证

使用 API 配置 NTP 和 NTP 身份验证,如下所示。

{
    },
    "ntp_configuration": {
        "ntp_servers": [
            {
                "server": {
                    "type": "V4",
                    "addr": "23.239.26.89"
                }
            },
            {
                "key_number": 5,
                "server": {
                    "type": "V4",
                    "addr": "69.89.207.99"
                }
            }
        ],
        "ntp_authentication_keys": [
            {
                "key_number": 1,
                "algorithm": "NTP_AUTH_ALGORITHM_MD5",
                "key": "=I&FBDl,WM,en5Mn~DaG"
            },
            {
                "key_number": 5,
                "algorithm": "NTP_AUTH_ALGORITHM_SHA1",
                "key": "ff9a0d589668a0f66649abbd7dfb388d841f1f44"
            }
        ]
    }
}