NSX Advanced Load Balancer CLI 構成を使用した DNS 仮想サービスへの GSLB サービスの選択的割り当てを構成するには、次の手順を実行します。

手順

  1. 管理者権限を持つ ID を使用して、GSLB リーダーのコントローラの NSX Advanced Load Balancer シェルにログインします。
  2. 構成の名前を指定して、configure gslb コマンドを呼び出します。

    例:configure gslb Default

  3. gslb プロンプトに応じて、2 つのタブを入力すると、使用可能なサブコマンドが表示されます。
    [admin:topo1-controller]: gslb> 
    cancel                 Exit the current submode without saving                                                                                            
    clear_on_max_retries   Max retries after which the remote site is treated as a fresh start. In fresh start all the configs are downloaded.                
    client_ip_addr_group   (submode)                     
    description            Help string not found for argument                                                                                                  
    dns_configs            (submode)                     
    do                     Execute a show command        
    is_federated           This field indicates that this object is replicated across GSLB federation.                                                         
    leader_cluster_uuid    Mark this Site as leader of GSLB configuration. This site is the one among the Avi sites.                                           
    maintenance_mode       This field disables the configuration operations on the leader for all federated objects.  CUD operations on Gslb, GslbService, GslbGeoDbProfile and other federated objects will be rejected. The rest-api disabling helps in upgrade scenarios where we don't want configuration sync operations to the Gslb member when the member is being u...
    name                   Name for the GSLB object.     
    new                    (Editor Mode) Create new object in editor mode                                                                                      
    no                     Remove field                  
    save                   Save and exit the current submode                                                                                                   
    send_interval          Frequency with which group members communicate.                                                                                     
    show_schema            show object schema            
    sites                  (submode)                     
    tenant_ref             Help string not found for argument                                                                                                  
    third_party_sites      (submode)                     
    view_id                The view-id is used in change-leader mode to differentiate partitioned groups while they have the same GSLB namespace. Each partitioned group will be able to operate independently by using the view-id.                                   
    watch                  Watch a given show command    
    where                  Display the in-progress object
  4. sites サブコマンドは、割り当てられる DNS ごとに 1 回、合計 3 回呼び出されます。

    DNS vs-1 のサブドメイン com への割り当て

    si[admin:naveen-ctrl]: gslb> sites index 1
    [admin:naveen-ctrl]: gslb:sites> dns_vses index 1
    [admin:naveen-ctrl]: gslb:sites:dns_vses> domain_names com
    [admin:naveen-ctrl]: gslb:sites:dns_vses> save

    DNS vs-2 のサブドメイン edu への割り当て

    [admin:naveen-ctrl]: gslb:sites> dns_vses index 2
    [admin:naveen-ctrl]: gslb:sites:dns_vses> domain_names edu
    [admin:naveen-ctrl]: gslb:sites:dns_vses> save
    [admin:naveen-ctrl]: gslb:sites> save
    [admin:naveen-ctrl]: gslb> save

    DNS vs-3 のサブドメイン net への割り当て

    [admin:naveen-ctrl]: gslb:sites> dns_vses index 3
    [admin:naveen-ctrl]: gslb:sites:dns_vses> domain_names net
    [admin:naveen-ctrl]: gslb:sites:dns_vses> save
    [admin:naveen-ctrl]: gslb:sites> save
    [admin:naveen-ctrl]: gslb> save
  5. 構成を保存します。

    GSLB はサイトを保存します。

    +--------------------------+-----------------------------------------------------+
    | Field                    | Value                                               |
    +--------------------------+-----------------------------------------------------+
    | uuid                     | gslb-10c15641-2cc9-4fc3-b8ae-30651d3a31d9           |
    | name                     | Default                                             |
    | dns_configs[1]           |                                                     |
    |   domain_name            | avi.com                                             |
    | dns_configs[2]           |                                                     |
    |   domain_name            | vmware.com                                          |
    | sites[1]                 |                                                     |
    |   cluster_uuid           | cluster-37cabcaa-c2c8-4a9e-9bcc-2849cf29ad81        |
    |   name                   | glb-12                                              |
    |   ip_addresses[1]        | 10.102.64.51                                        |
    |   port                   | 443                                                 |
    |   username               | admin                                               |
    |   password               | <sensitive>                                         |
    |   member_type            | GSLB_ACTIVE_MEMBER                                  |
    |   enabled                | True                                                |
    |   dns_vses[1]            |                                                     |
    |     dns_vs_uuid          | virtualservice-3ff9baea-556a-46e5-a086-090fd681b6e6 |
    |     domain_names[1]      | avi.com                                             |
    |   dns_vses[2]            |                                                     |
    |     dns_vs_uuid          | virtualservice-7ef9efc8-4b95-43f4-b670-62979bb1f0e0 |
    |     domain_names[1]      | vmware.com                                          |
    |   hm_shard_enabled       | False                                               |
    |   suspend_mode           | False                                               |
    | leader_cluster_uuid      | cluster-37cabcaa-c2c8-4a9e-9bcc-2849cf29ad81        |
    | send_interval            | 15 sec                                              |
    | clear_on_max_retries     | 20                                                  |
    | view_id                  | 0                                                   |
    | async_interval           | 0 sec                                               |
    | error_resync_interval    | 300 sec                                             |
    | replication_policy       |                                                     |
    |   replication_mode       | REPLICATION_MODE_CONTINUOUS                         |
    | maintenance_mode         | False                                               |
    | is_federated             | True                                                |
    | tenant_ref               | admin                                               |
    | tenant_scoped            | True                                                |
    | enable_config_by_members | False                                               |
    +--------------------------+-----------------------------------------------------+
    [admin:naveen-ctrl]: >