NSX Advanced Load Balancer DNS 可以托管手动静态 DNS 条目。对于给定的 FQDN,用户可以配置要返回的 A、SRV 或 CNAME 记录。这是通过本文中所述的 NSX Advanced Load Balancer CLI 完成的。
configure virtualservice dns-vs 命令显示 FQDN ggg.avi.local 已具有静态自定义 A 记录。
: < configure virtualservice dns-vs Updating an existing object. Currently, the object is: +----------------------------------+--------------------------------------+ | Field | Value | +----------------------------------+--------------------------------------+ | uuid | virtualservice-bc7c7fc6-583e-4335-8d33-ec4670771a85 | | name | dns-vs | | ip_address | 10.90.12.200 | | enabled | True | | services[1] | | | port | 53 | | enable_ssl | False | | port_range_end | 53 | | application_profile_ref | System-DNS | | network_profile_ref | System-UDP-Per-Pkt | | se_group_ref | Default-Group | | east_west_placement | False | | scaleout_ecmp | False | | active_standby_se_tag | ACTIVE_STANDBY_SE_1 | | flow_label_type | NO_LABEL | | static_dns_records[1] | | | fqdn[1] | ggg.avi.local | | type | DNS_RECORD_A | | ip_address[1] | | | ip_address | 1.1.1.1 | +----------------------------------+--------------------------------------+
可以添加另一个类似的自定义 A 记录:
: virtualservice< static_dns_records New object being created : virtualservice:static_dns_records< fqdn abc.avi.local : virtualservice:static_dns_records< ip_address New object being created : virtualservice:static_dns_records:ip_address< ip_address 11.11.11.11 : virtualservice:static_dns_records:ip_address< save : virtualservice:static_dns_records< type dns_record_a : virtualservice:static_dns_records< save : virtualservice< save <+----------------------------------+-------------------------------------+ | Field | Value | +----------------------------------+--------------------------------------+ | uuid | virtualservice-bc7c7fc6-583e-4335-8d33-ec4670771a85 | | name | dns-vs | | ip_address | 10.90.12.200 | | enabled | True | | services[1] | | | port | 53 | | enable_ssl | False | | port_range_end | 53 | | application_profile_ref | System-DNS | | network_profile_ref | System-UDP-Per-Pkt | | se_group_ref | Default-Group | | east_west_placement | False | | scaleout_ecmp | False | | active_standby_se_tag | ACTIVE_STANDBY_SE_1 | | flow_label_type | NO_LABEL | | static_dns_records[1] | | | fqdn[1] | ggg.avi.local | | type | DNS_RECORD_A | | ip_address[1] | | | ip_address | 1.1.1.1 | | static_dns_records[2] | | | fqdn[1] | abc.avi.local | | type | DNS_RECORD_A | | ip_address[1] | | | ip_address | 11.11.11.11 | +----------------------------------+--------------------------------------+
上述命令序列为虚拟服务
dns-vs
上的 FQDN
abc.avi.local 创建一个静态条目。也可以从 GUI 中的
下面进行确认,如下图所示。
注:
对于按域名添加的服务器,将自动覆盖对解析的服务器 IP 地址进行的手动更改。