(課堂筆記)第十三章:DNS 全局站點


(課堂筆記)第十三章:DNS 全局站點

-------外網DNS架構--------------
-------Inbound DNS配置----------
-------GSLB全局負載-------------


-------外網DNS架構--------------
1.1 術語:
Data centers:組織server的容器,表述一個具體的數據中心。
               

 

 

 


Servers:用來代表一個server實體,類似於LTM中的node,有bigip server,non-bigip server兩類,隸屬於datacenter中,同一server不應同時存在於兩個datacenter;(簡單來說,所有F5設備組成1個servers,當Active配置變化時,將推送給組內其他成員)
link:代表datacenter中的鏈路,與Data centers關聯;(運營商線路)
               

 

 


      
Pool:用來組織VS,是wideip的配置要素,同一VS可以同時屬於多個pool;(域名下來並不是直接對VS IP,而是pool)
               

 

 


Prober Pools(探針池):指定F5 DNS去檢測各種資源的可用性,Prober pools可以指派給F5 DNS里面的單個server也可以指派給F5 DNS里面的data center
    
Wideip:對外呈現的智能域名,其下包含pool。
               

 

 


Monitos:健康狀況,可以針對GSLB中servers、pool、pool member、virtual servers監控;
               

 

 



iQuery:F5私有協議,用於BIG-IP設備間傳輸SNAT表以及會話保持表等內容的傳輸協議
GTM:Global Traffic Manager,全球流量管理器。
Global Server Load Balancing:全局負載算法,分靜態及動態,各有:
             

 

 


listener:監聽DNS請求和服務。與wideip關系為wideip-listener--pool--vs(不屬於gslb,不會自動同步listener配置,屬於LTM,可LTM同步)
             

 

 


                               

 

 


                                              

 

 -------Inbound DNS配置----------

2.1 配置查詢回應日志
《1》配置logging Profile
    “system”-“logs”-“configurations”-“log publishers”
    name填寫“local-syslog-publishers1”
    Destinations中將“local-syslog”調整為“selected”狀態
    
《2》DNS logging profile
    “DNS”-“Delivry“-"prifiles"-”other“-”DNS logging“
    name填寫“DNS_logging_profile1”
    logging publishers 選擇“local-syslog-publishers1”

《3》DNS profile
    "DNS"-"Delivery"-"profiles"-"DNS"
    name填寫“qytangcciedc.com_dns_profile1”
    Unhandled Query Action 選擇“DROP"
    Use BIND Server on BIG-IP 選擇“Disabled”
    logging 選擇“Enable”
   logging Profile選擇“DNS_logging_profile1”
    AVR Statistics Sample Rate選擇”Enabled“,比例填寫1:1
        
《4》配置udp profile
    “DNS”-“Delivery”-Profiles“-Protocol”-“UDP”
    name填寫“udp-dns_profile1”
    Datagram LB選擇“Enable”
    
《5》配置tcp profile
    “DNS”-“Delivery”-Profiles“-Protocol”-“TCP”
    name填寫“tcp-dns_profile1”
    Paraent Profile填寫“f5-tcp-wan”    

《6》配置DNS linsterner
    “DNS”-“Delivery”-“Listeners"-"Listener List"
    name填寫“isp1_DCI_ns.qytangcciedc.com_udp_53_virtual”
    Destination中Address填寫“61.128.0.4”
    Service選擇“Advanced”高級:
    Protocol選擇“UDP”
    Protocol Profile(Clinet)選擇“udp-dns_profile1”
    DNS profile選擇“qytangcciedc.com_dns_profile1”
    
    name填寫“isp2_DCI_ns.qytangcciedc.com_udp_53_virtual”
    Destination中Address填寫“128.61.0.4”
    Service選擇“Advanced”高級:
    Protocol選擇“UDP”
    Protocol Profile(Clinet)選擇“udp-dns_profile1”
    DNS profile選擇“qytangcciedc.com_dns_profile1”
    
    name填寫“isp1_DCI_ns.qytangcciedc.com_tcp_53_virtual”
    Destination中Address填寫“61.128.0.4”
    Service選擇“Advanced”高級:
    Protocol選擇“TCP”
    Protocol Profile(Clinet)選擇“tcp-dns_profile1”
    DNS profile選擇“qytangcciedc.com_dns_profile1”    

    name填寫“isp2_DCI_ns.qytangcciedc.com_tcp_53_virtual”
    Destination中Address填寫“128.61.0.4”
    Service選擇“Advanced”高級:
    Protocol選擇“TCP”
    Protocol Profile(Clinet)選擇“tcp-dns_profile1”
    DNS profile選擇“qytangcciedc.com_dns_profile1”
    
    驗證:可在LTM-VS上看到2個IP的53端口(共4個條目)

《7》配置Data centers和link
    “DNS”-“GSLB”-“Data Centers”-“Data Centers List”
    name填寫“qytangdc1”
    點擊完成
    
    name填寫“qytangdc2”
    點擊完成

 

“DNS”-“GSLB”-“links”-“Add:   
name填寫“HTTP-ISP1”
Address填寫“61.128.0.6”,並點擊“Add”
Data Center 選擇“qytangdc1”
Health Monitors 選擇“gateway_icmp””
點擊完成

name填寫“HTTP-ISP2”
Address填寫“128.61.0.6",並點擊“Add”
Data Center 選擇“qytangdc1”
Health Monitors 選擇“gateway_icmp””
點擊完成
    
《8》配置servers
    “DNS”-"GSLB“-"Server”-“Servers List”
    name填寫“DC1-DNS-HA”
    Date Center選擇“qytangdc1”
    
    Device中點擊“Add”
    Device Name填寫“DC1-DNS2.qytang.com”
    Address填寫自己的self ip"61.128.0.3"和"128.61.0.3"-finish(DC1-DNS2)
    
    Device中點擊“Add”
    Device Name填寫“DC1-DNS1.qytang.com”
    Address填寫自己的self ip"61.128.0.2"和"128.61.0.2"-finish(DC1-DNS1)
    
    configurations中的“Health Monitors”將“bigip”調整為Active狀態;
    Resources中的virtual Server Discovery選擇”Enabled“,Link Discovery(自動發現)選擇”Enabled“
    
    可以在“DNS”-"GSLB“-"Server”-“Servers List”-“Device”-“DC1-DNS-HA”看到自己端是綠色的,對端是藍色的,證明鏈路還沒有建立。
    
    Device中點擊“Add”

name填寫“DC1-LTM-HA”
Date Center選擇“qytangdc1”

    Device Name填寫“DC1-LTM2.qytang.com”
    Address填寫自己的self ip"172.16.10.253"(DC1-LTM2)
    
    Device中點擊“Add”
    Device Name填寫“DC1-LTM1.qytang.com”
    Address填寫自己的self ip"172.16.10.252"-finish(DC1-LTM1)
    
    configurations中的“Health Monitors”將“bigip”調整為Active狀態;
    Resources中的virtual Server Discovery選擇”Enabled“,Link Discovery(自動發現)選擇”Enabled“
    
    可以在“DNS”-"GSLB“-"Server”-“Servers List”-“Device”-“DC1-LTM-HA”看到自己端是綠色的,對端是藍色的,證明鏈路還沒有建立
    
《9》配置Device Trust
    為什么要交換證書:為了F5 BIG-IP設備設備間通信iQuery;
    有三個命令可以交換機F5 BIG-IP的設備間的證書:bigip add、big3d_install、gtm_add;
    以上三個命令應在F5 DNS上執行:
    a.bigip add  只用來交換證書,使用SSH協議和scp命令;
    b.big3d_install 推送big3d程序給對方+交換證書;
    c.gtm_add拉取對方配置到本機+交換證書+將自己加入DNS同步組
    
    iQuery通信:
    正確交換完證書是iQuery mesh結構建立的前提;
    (1)iQuery F5私有協議使用TCP 4353端口,使用SSL加密通信,實際傳輸的是gzip壓縮的XML數據;
    (2)iQuery負責bigip間的monitor、heartbeat、path metiric collection result、persistence的交換或同步,是各種configurations(bigip、gtm、conf、named、conf、zone)同步的執行者
    (3)big3d在所有self ip,內部接口包括mgmt上監聽tcp 4353;
    (4)iQuery是gtmd與big3d之間的通信,所以iQuery mesh是gtm與gtm,gtm與ltm之間的mesh。ltm只是單向傳送iQuery到GTM,不主動發起iQuery連接;
    (5)查看F5 4353端口情況: netstat -tnlp | grep 4353
    
    bigip_add 61.128.0.2(在DC1-DNS2-F5上)
    bigip_add 172.16.10.252(在DC1-LTM2-F5上)
    檢查是否交換機證書:DNS”-“GSLB”-“Servers”-"Trusted Server Certificates"中“Certificates Subject(S)“中發現是有遠程的設備

《10》dns pool
    “DNS”-“GSLB“-“Pools”-“Pool List”
    name填寫“GLSB-web-pool”

Type選擇“A”

    configurations中的Health monitors,這里選擇適用tcp協議來監控,tcp調為Active狀態;
    Member中的load balancing method中,preferred選擇“Topology”,Altemate選擇“None”,Falback選擇“Global Availability”
    Member List中的virtual Server選擇兩台LTM設備的VS地址(172.16.0.5/6)
    
《11》WideIPs
    “DNS”-“GSLB“-“Wide IPs“-”Wide IP List“
    name填寫“www.gslb.qytangcciedc.com”
    Type選擇“A”
    Pools中的load Balancing Method選擇“Topology”,Pool List中的pool選擇步驟10建立的“GLSB-web-pool(A)”--"Add"
    點擊完成
    
    配置好以后,在ISP1-win7上測試下:cmd敲“dig @61.128.0.4 www.gslb.qytangcciedc.com"發現解析出IP為LTM上的私網地址(172.16.10.5/6)
    回到DC1上隨意一台F5設備,在“DNS”-"GSLB“-"Server”-“Servers List”-“Virtual Servers”-“DC1-LTM-HA”,virtual Server Discovery選擇“Disabled”
    創建Virtual Servers中“DC1-LTM-HA”的新Virtual Servers:
    
    name填寫“HTTP-ISP1”
    Address填寫”61.128.0.6“
    Transiation Address填寫“172.16.10.5”,Server port選擇“80”“HTTP”
    LINK選擇“61.128.0.1”
    configuration中的Health Monitor使用TCP協議通信,調為“Active”狀態;
    
    name填寫“HTTP-ISP2”
    Address填寫”128.61.0.6“
    Transiation Address填寫“172.16.10.6”,Server port選擇“80”“HTTP”
    LINK選擇“61.128.0.1”??
    configuration中的Health Monitor使用TCP協議通信,調為“Active”狀態;
    
    配置好以后,在ISP1-win7上測試下,提示:no servers could be reached
    這是因為步驟10中建立的“GLSB-web-pool“的virtual Server需要新建。
    “DNS”-“GSLB“-“Pools”-“Pool List”-“GLSB-web-pool“-“Member”-”Add“,增加2個公網的VS即可。
    添加完發現第二個IP(128.61.0.6)unlicensed狀態,因為該功能需要授權,且只限於美國地區:(https://support.f5.com/csp/article/K15834)
    
    name填寫“GLSB-web-pool-DC1-ISP2”
    configurations中的Health monitors,這里選擇適用tcp協議來監控,tcp調為Active狀態;
    Member中的load balancing method中,preferred選擇“Topology”,Altemate選擇“None”,Falback選擇“Global Availability”
    Member List中的virtual Server選擇unlicensed狀態的ip(128.161.0.6)
    
    這樣配置2個pool,pool的負載均衡topology方式就廢了,可以檢查:
    tmsh show gtm wideip A www.gslbcciedc.com detail 在Load Balancing中preferred沒有命中(網頁這里配了topology負載),而是其他的命中了
    
《12》DNS同步組
    (在DC1-DNS1和2上:)
    “DNS”-”Settings“-”GSLB“-”General“
    勾選“Synchroize”以及“Synchroize DNS Zone Files”
    Group Name填寫“QytangDC-DNSG"
    點擊完成
    
《13》DNS遷移
    在DC1-DNS1上拉取配置,命令:gtm_add 61.128.0.3



-------GSLB全局負載-------------

《1》DC2上創建listener
    “DNS”-“Delivery”-“Listeners"-"Listener List"
    name填寫“isp1_DC2_ns.qytangcciedc.com_udp_53_virtual”
    Destination中Address填寫“62.129.0.2”
    Protocol選擇“UDP”
    DNS profile選擇“dns”
    
    name填寫“isp2_DCI_ns”.qytangcciedc.com_udp_53_virtual”
    Destination中Address填寫“129.62.0.2”
    Protocol選擇“UDP”
    DNS profile選擇“dns”
    
    (這里的配置跟DC1有出入,只為快速顯示效果,沒有配置DNS Profile和Protocol Profile(Clinet)屬性;)
    
    

《2》DC1上添加BIG-IP類型的Server DC2-DNS
    (DC2-F5-DNS由於有公網,可以直接填寫公網的self ip(62.129.0.2或129.62.0.2)來建立server)
    回到DC1-F5-DNS上:
    “DNS”-"GSLB“-"Server”-“Servers List”-"Add“
    name填寫“DC2-DNS”
    Date Center選擇“qytangdc2”
    Device中點擊“Add”
    Device Name填寫“DC2-DNS.qytang.com”
    Address填寫自己的self ip"62.129.0.2 "和"129.62.0.2 "-finish(DC2-DNS)
    Resources中的virtual Server Discovery選擇”Disbled“
    virtual sever list中:
    
    name填寫“DC2-HTTP-ISP1”
    Address填寫“62.129.0.3”
    service Port選擇“80”“HTTP”
    Traslation填寫“172.16.20.3”
    Translation Port選擇“80”“HTTP”
    最后點擊“Add”
    
    name填寫“DC2-HTTP-ISP2”
    Address填寫“129.62.0.4”
    service Port選擇“80”“HTTP”
    Traslation填寫“172.16.20.4”
    Translation Port選擇“80”“HTTP”
    最后點擊“Add”
    
    Link Discovery(自動發現)選擇”Disbled“
    點擊完成。
    
《3》DC1上添加BIG-IP類型的Server DC2-LTM
    DC2-F5-LTM原應該通過內網來建立iquery,但是設計通過公網地址傳輸(不建議),所以要在DC2-F5-DNS上左NAT:
    “Loacl Traffic”-“Address Translation”-“NAT List”
    name填寫“LTM-iQuery-NAT”
    NAT Address填寫“62.129.0.8”
    Origin Address填寫LTM地址“172.16.20.254”
    點擊完成。

    回到DC1-F5-DNS上:
    “DNS”-"GSLB“-"Server”-“Servers List”-"Add“
    name填寫“DC2-LTM”
    Date Center選擇“qytangdc2”
    Device中點擊“Add”
    Device Name填寫“DC2-LTM.qytang.com”
    Address填寫剛才做的NAT地址“62.129.0.8”
    Translation填寫剛才做的NAT轉換后的私網地址“172.16.20.254”
    Resources中的virtual Server Discovery選擇”Disbled“,Link Discovery(自動發現)選擇”Disbled“
    點擊完成。
    
    
    在DC1-F5-DNS上:
    bigip_add 62.129.0.2
    bigip_add 62.129.0.8(NAT地址)
    
《4》DC2上添加DC2-DNS到DNS同步組
    “DNS”-”Settings“-”GSLB“-”General“
    勾選“Synchroize”以及“Synchroize DNS Zone Files”
    Group Name填寫“QytangDC-DNSG"
    點擊完成
    
    采取命令拉取GTM配置(DC2-F5-DNS上):
    #
    gtm_add 61.128.0.3
    #
    
    拉取后檢查GTM的配置是否同步拉取到DC2的DNS上,發現link部分沒有,手動創建:
    “DNS”-“GSLB”-“link”-“Data Centers List”-“Add”
    
    name填寫“DC2-ISP1”
    Address填寫“62.129.0.1”,並點擊“Add”
    Data Center 選擇“qytangdc2”
    Health Monitors 選擇“gateway_icmp””
    點擊完成
    
    name填寫“DC2-ISP1”
    Address填寫“129.62.0.1,並點擊“Add”
    Data Center 選擇“qytangdc2”
    Health Monitors 選擇“gateway_icmp””
    點擊完成
    
《5》DC1上添加DC2的wide-ip vs pool
    “DNS”-“GSLB“-“Pools”-“Pool List”
    name填寫“GLSB-web-pool-DC2-ISP1”
    Type選擇“A”
    configurations中的Health monitors,這里選擇適用tcp協議來監控,tcp調為Active狀態;
    Member中的load balancing method中,preferred選擇“Topology”,Altemate選擇“None”,Falback選擇“Global Availability”
    Member List中的virtual Server選擇DC2的ISP1(62.129.0.3)
    點擊完成
    
    “DNS”-“GSLB“-“Pools”-“Pool List”
    name填寫“GLSB-web-pool-DC2-ISP2”
    Type選擇“A”
    configurations中的Health monitors,這里選擇適用tcp協議來監控,tcp調為Active狀態;
    Member中的load balancing method中,preferred選擇“Topology”,Altemate選擇“None”,Falback選擇“Global Availability”
    Member List中的virtual Server選擇DC2的ISP1(129.62.0.3)
    點擊完成
    
    “DNS”-“GSLB“-“Wide IPs“-”Wide IP List“
    點擊“www.gslb.qytangcciedc.com”-"Pools”-“Manage"
    添加剛才新建的2個pool池(“GLSB-web-pool-DC2-ISP1”和“GLSB-web-pool-DC2-ISP2”)
    點擊完成
    
《6》BIG-IP配置Topology
    涉及算法的具體內容,這里跳過。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM