本文共 1050 字,大约阅读时间需要 3 分钟。
当前环境
a.v.com 1.1.1.1b.v.com 2.2.2.2
希望绑域名 y.v.com 能够嗟系 1.1.1.1 及 2.2.2.2 以实现 DNS 负载均衡
错误做法
mysql> insert into records (domain_id, name, type, content, ttl) values ( 1,'y.v.com', 'CNAME','a.v.com,'360');Query OK, 1 row affected (0.00 sec)mysql> insert into records (domain_id, name, type, content, ttl) values ( 1,'y.v.com', 'CNAME','b.v.com','360');Query OK, 1 row affected (0.00 sec)
正确做法
mysql> insert into records (domain_id, name, type, content, ttl) values ( 1,'y.v.com', 'A','1.1.1.1','360');Query OK, 1 row affected (0.00 sec)mysql> insert into records (domain_id, name, type, content, ttl) values ( 1,'y.v.com', 'A','1.1.1.2','360');Query OK, 1 row affected (0.00 sec)mysql> update records set content='pdns.vclound.com admin.pdns.vclound.com 2609 1200 7200 64800' where id=1;Query OK, 1 row affected (0.00 sec)
客户端测试效果如下
[root@hh-yun-puppet-129021 named]# nslookup yum.vclound.comServer: 10.199.129.21Address: 10.199.129.21#53Name: yum.vclound.comAddress: 10.199.129.22Name: yum.vclound.comAddress: 10.199.129.21
转载地址:http://ikdoa.baihongyu.com/