SCAN概念
先介绍一下什么叫SCAN,SCAN(Single Client Access Name)是Oracle从11g R2开始推出的,客户端可以通过SCAN特性负载均衡地连接到RAC数据库。SCAN提供一个域名来访问RAC,域名可以解析1个到3个(注意,最多3个)SCAN IP,我们可以通过DNS或者GNS来解析实现。其中DNS大家都很熟悉,这里不多说。GNS(Grid Naming Service)则是Oracle 11g R2的新功能,可以通过DHCP服务为节点和SCAN分配VIP和SCAN IP。另外还有个优点是,对于新加入集群的节点,它会自动分配VIP地址,更新集群资源,客户端依然通过SCAN特性负载均衡地连接到新增集群节点上。DNS和GNS配置与解析相关内容在下面还有说明。
除了DNS和GNS解析方法外,SCAN也可以使用hosts文件来解析,但用过的人都知道,此方法不仅在安装RAC的时候产生问题,后期使用也是存在问题的,比如SCAN域名只能定义一个SCAN IP。所以这种方法也是Oracle不推荐使用的。但尽管如此,我见过很多生产上依然这样使用,也就是废弃了11g的新特性SCAN,而是依然采用VIP连接方式。
备注:有人可能会注意到《此方法不仅在安装RAC的时候产生问题》这句,RAC安装的时候的确会报错,但这并不影响后期Oracle的使用。
SCAN最明显的优点就是,当集群中新增加了节点或者删除了节点,不需要额外维护客户端。
PUBLIC IP, PRIVATE IP, VIP, SCAN VIP, GNS VIP, LOCAL_LISTENER, REMOTE_LISTENER , LOCAL LISTENER, SCAN LISTENER
在RAC部署的时候,我们都会接触到PUBLIC IP、PRIVATE I、VIP等等,那下面就针对它们进行介绍。
PUBLIC IP : 这是我们网卡上配置的真实IP地址,我们称为公共IP,这个IP的存在关系到下面介绍的VIP能不能正确漂在其所在网卡上。注意,PUBLIC IP是不提供给客户端去连接配置的,这并不是说通过PUBLIC IP无法连接实例,而是它会存在节点服务器宕机的时候所有向它请求的客户端都会有等待现象并且最后得到超时信息的缺点。
PRIVATE IP : 称为私网IP(私有IP),它是用于心跳同步的,也就是保证两台服务器数据同步。说道私网IP,我简单说下Oracle另一个高可用性连接特性 – HAIP。其实Cache Fusion会消耗节点服务器很大的私网资源,另外,私网间无法通信还会引起brain split(脑裂),以前为解决这种问题,我们可以采用网卡bonding技术,而Oracle在11g R2的时候HAIP技术来实现,HAIP(Highly Available Virtual IP)用于节点间的私网通信,支持同时使用多个网络连接来满足网卡间的负载均衡,并且还提高了Cache Fusion资源通信能力。HAIP技术并不是主要内容,所以在这里点到为止。
VIP : RAC的每个节点都需要有一个虚拟IP,这就是VIP。VIP需要和PUBLIC IP同一个子网,它们是由GI的Clusterware来管理的。VIP在其节点服务器发生故障的时候会自动漂移到另外正常的节点服务器上,如果RAC是多个节点运行的,那具体漂移到哪个活动的节点将由Clusterware决定。VIP发生漂移现象之后,其当前的节点服务器LOCAL LISTENER是不会监听它的请求的,所以有客户端向这个VIP发送请求时,Clusterware的FAN会通知客户端向别的VIP发送请求,客户端收到通知后通过Failover机制把请求重新发送到ADDRESS列表中的其他VIP上。虽然有这种较复杂的过程,但始终对客户端是透明进行的,而且这个过程完成时间非常短暂,客户端也就几乎感受不到有节点宕机。等故障节点恢复正常,漂移的VIP也回到此节点上,继续提供服务。
SCAN VIP : SCAN VIP就是我在刚开始常说的SCAN IP,也就是由DNS或者GNS、hosts解析出来的IP地址。上面也说过,SCAN VIP最多能有三个,它们循环地被客户端所请求到。这里大家可能会存在这样的问题,SCAN VIP只有三个,那RAC是四节点或更多的节点情况怎么办?存在这种问题的原因归咎于对SCAN VIP的了解不足。其实,SCAN VIP数量和节点数是没有任何关系的,SCAN VIP会落到哪个节点上都是随机的。
GNS VIP : GNS VIP同SCAN VIP,也是Oracle从11g R2开始提供的。GNS VIP是提供GNS服务的IP地址,它绑定到某个节点的PUBLIC IP所在网卡上,当节点出现故障,GNS资源会自动切换到其他正常的节点继续提供GNS解析服务。如果我们不使用GNS解析方法,那么也不会存在GNS VIP。
LOCAL LISTENER : 本地监听器,RAC的每个节点上都会有独立的本地监听器,它会监听该节点的PUBLIC IP和VIP,而每个节点的实例在启动的时候也向本地监听器进行注册,当然它也会向SCAN监听器注册,当VIP或者PUBLIC IP(这种情况比较少见)有连接请求的时候,本地监听器就接受处理并和本地实例建立连接。如果某个节点故障,其上面的VIP会进行漂移,但本地监听器并不会产生漂移。
SCAN LISTENER : SCAN监听器,它是实现SCAN负载均衡的原理所在。如果RAC上有三个SCAN VIP,那么SCAN监听器也有三个,它们各自监听SCAN VIP的连接请求。SCAN监听器跟着SCAN VIP随机分配到节点服务器上,如果某个节点发生故障,运行在此节点上的SCAN VIP会进行漂移,这时候SCAN监听器也跟着漂移到正常的节点上,继续为SCAN VIP监听连接请求,当PMON进程下次动态更新实例信息到该SCAN监听器之后,它又重新接受客户端的连接。这和VIP产生漂移的时候是有所区别的。
LOCAL_LISTENER : 这是Oracle的参数,这个参数控制着本地监听器的注册,因为本地监听器的工作机制关系,通过本地监听器的数据库连接请求只会连接到本地节点的实例上。
REMOTE_LISTENER : 同LOCAL_LISTENER是Oracle的参数,通过这个设置,任何实例都会向SCAN监听器注册,所以SCAN监听器能够负载均衡地分发连接请求到节点本地监听器上,也就是连接到其本地节点上实例上。
关于LOCAL_LISTENER与REMOTE_LISTENER的配置,在下面讲动态注册的时候再看一下。
SCAN解析与配置
SCAN是在安装GI(Grid Infrastructure)时配置的,作为Clusterware资源被管理。
忽略hosts解析之后,有两种方式配置和解析SCAN: DNS和GNS(Grid Naming Service)。
这里重点说一下DNS解析SCAN方式
使用DNS解析SCAN的时候,DNS服务器会采用rr(round-robin)的方式循环解析为它准备的3个IP地址,与Oracle 11g R2的客户端配合使不同的客户端能够连接到不同的SCAN Listener上,这相当于是Oracle 10g中配置的客户端负载均衡(通过LOAD_BALANCE=yes配置)。
下面看一下客户端通过SCAN连接到数据库的过程,首先由DNS服务器解析SCAN名称,DNS服务器返回SCAN对应的3个IP地址的列表,客户端会选择使用其中一个SCAN VIP地址作为连接地址,将命名方法解析后的连接信息发送到SCAN VIP对应的SCAN Listener上,SCAN Listener通过负载均衡机制再把请求转发给比较空闲的服务器上的本地监听器,由本地监听器完成实例与客户端之间的连接。
使用SCAN连接数据库实例,整个过程实现了客户端的Failover(Oracle 10g R2是通过FAILOVER=on来配置),DNS服务器返回的是一个SCAN VIP列表,客户端会选择其中一个连接到RAC,如果这个IP地址不能正常访问,客户端会选择另一个IP地址继续连接,直到所有的地址都不能正常连接,才返回错误给客户端,整个过程对客户端程序来说依然是透明的。
需要注意的是,使用SCAN连接到数据库,不再需要客户端能解析节点的PUBLIC IP和VIP,只需要客户端能够通过DNS服务器正常解析SCAN就可以了。负载均衡工作交给服务器端的SCAN实现。
至于GNS解析SCAN,因为目前GNS服务存在不稳定的情况,也很少有企业将其投入到生产环境使用,而且其工作原理也较为复杂,所以在这里并不深入说明。
实例的动态注册
上面已经介绍了LOCAL_LISTENER和REMOTE_LISTENER两个和动态注册有关的参数,那我们看看它们在数据库中的表现形式:
本地监听器注册是由实例的LOCAL_LISTENER参数所控制的:
SQL> set line 150
SQL> show parameter local_listener
NAME TYPE VALUE
———————————— ———————- ——————————
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=192.
168.0.194)(PORT=1521))))
– 这是我管理的一套RAC上的配置,当然我已经处理好IP地址了。
LOCAL_LISTENER设置为向本地VIP地址进行注册,由于本地监听器是在本地的PUBLIC IP和VIP上监听,所以向VIP监听注册就能保证成功向本地监听器注册。
查看本地监听器的状态:
[grid@pos2 ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 23-OCT-2012 12:01:21
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 19-JUL-2012 15:31:45
Uptime 95 days 20 hr. 29 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/pos2/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.192)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.194)(PORT=1521)))
Services Summary…
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service…
Service "pos" has 1 instance(s).
Instance "pos2", status READY, has 1 handler(s) for this service…
Service "posXDB" has 1 instance(s).
Instance "pos2", status READY, has 1 handler(s) for this service…
The command completed successfully
– 这里注意:查看本地监听器信息的时候每个节点只能看到其上运行的实例。
SCAN监听器的注册是由REMOTE_LISTENER参数控制的,任何实例都会向所有的SCAN监听器注册:
SQL> show parameter remote_listener
NAME TYPE VALUE
———————————— ———————- ——————————
remote_listener string pos-cluster-scan:1521
下面是LISTENER_SCAN1的一个状态信息,当然你也可以查看LISTENER_SCAN2和LISTENER_SCAN3的状态。
[grid@pos2 ~]$ lsnrctl status listener_scan1
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 23-OCT-2012 12:06:56
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
————————
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 19-JUL-2012 15:31:45
Uptime 95 days 20 hr. 35 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/pos2/listener_scan1/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.195)(PORT=1521)))
Services Summary…
Service "pos" has 2 instance(s).
Instance "pos1", status READY, has 1 handler(s) for this service…
Instance "pos2", status READY, has 1 handler(s) for this service…
Service "posXDB" has 2 instance(s).
Instance "pos1", status READY, has 1 handler(s) for this service…
Instance "pos2", status READY, has 1 handler(s) for this service…
The command completed successfully
由于任何实例启动都会向所有的SCAN监听器动态注册,从LISTENER_SCAN1的SCAN监听器运行状态来看,SERVICE pos包括了所有的实例名称。
就像我昨天回答那位朋友的时候简单说“是通过内部机制”一样,大家可能看到上面的内容并不知道SCAN监听器如何找到比较空闲的实例的。
其实SCAN监听器是实时了解所有实例的运行情况的,因此它能够准确地将连接重定向到空闲服务器的本地监听器上。
下面我们通过日志查看实例的动态注册与动态更新
<span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">)本地监听器动态注册日志:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@pos2 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="pln">$ cd $ORACLE_BASE</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">diag</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">tnslsnr</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">pos2</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">listener</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">alert
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@pos2 alert</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="pln">$ grep service_register log_1</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml </span><span class="pun" style="color: rgb(102, 102, 0);">|</span><span class="pln"> head </span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">18</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">JUN</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">58</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">23</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">LsnrAgt</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">18</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">JUN</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">58</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">30</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">+</span><span class="pln">ASM2 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">18</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">JUN</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">15</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">54</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">15</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> pos2 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">--</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">之所以选择</span><span class="pln">log_1</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml</span><span class="pun" style="color: rgb(102, 102, 0);">历史文件是因为发现我的</span><span class="pln">log</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml</span><span class="pun" style="color: rgb(102, 102, 0);">里基本都是更新日志,没有注册日志。</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">2</span><span class="pun" style="color: rgb(102, 102, 0);">)本地监听器动态更新日志:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@pos2 alert</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="pln">$ grep service_update log</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml </span><span class="pun" style="color: rgb(102, 102, 0);">|</span><span class="pln"> head </span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">OCT</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">07</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">09</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> pos2 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">OCT</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">07</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">33</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> pos2 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">OCT</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">16</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">08</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">03</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> pos2 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">SCAN</span><span class="pun" style="color: rgb(102, 102, 0);">监听器动态注册日志:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="pln">$ cd $ORACLE_BASE</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">diag</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">tnslsnr</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">rac1</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">listener_scan2</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">alert</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="pln">$ grep service_register log</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml </span><span class="pun" style="color: rgb(102, 102, 0);">|</span><span class="pln"> head </span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">05</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">25</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">00</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">LsnrAgt</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">20</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">29</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">07</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> luocs1 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">20</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">58</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">05</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_register </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> luocs1 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">--</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">这是我另一套测试</span><span class="pln">RAC</span><span class="pun" style="color: rgb(102, 102, 0);">环境。</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">4</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">SCAN</span><span class="pun" style="color: rgb(102, 102, 0);">监听器动态更新日志:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">grid@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="pln">$ grep service_update log</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">xml </span><span class="pun" style="color: rgb(102, 102, 0);">|</span><span class="pln"> head </span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">20</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">29</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">19</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> luocs1 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">20</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">30</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">19</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> luocs1 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span><span class="pln">
</span><span class="str" style="color: rgb(0, 136, 0);"><txt></span><span class="lit" style="color: rgb(0, 102, 102);">13</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">AUG</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="lit" style="color: rgb(0, 102, 102);">2012</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">20</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">30</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">46</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> service_update </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> luocs1 </span><span class="pun" style="color: rgb(102, 102, 0);">*</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">0</span>
注意,如果你的RAC是通过hosts解析了SCAN域名的,那么系统里就找不到上面的SCAN监听器日志的路径。
实例的动态注册和动态更新过程是由实例的PMON进程完成的,正是因为SCAN监听器能够实时了解实例的负载情况,所以SCAN监听器能够负载均衡地将连接请求转发给合适实例的本地监听器来处理。
这里谈到负载均衡,那么就说下负载均衡中的优先级
共享服务器配置中:
- 低负载节点
- 低负载实例
- 实例相关的低负载调度器
专用服务器配置中:
- 低负载节点
- 低负载实例
SCAN兼容性配置
介绍SCAN差不多了,这里还有个兼容性问题不能不说。
要完美实现SCAN功能特性,其实对客户端的要求也是存在的。下面看下不同版本和SCAN之间的兼容性
编号 |
客户端软件版本 |
服务器端软件版本 |
SCAN特性的使用 |
1 |
11g R2 |
11g R2 |
能够充分使用SCAN的特性 |
2 |
早于11g R2版本 |
11g R2 |
不能充分感受到SCAN特性 |
3 |
11g R2 |
早于11g R2版本 |
在服务器端没有SCAN的概念 |
4 |
早于11g R2版本 |
早于11g R2版本 |
在服务器端没有SCAN的概念 |
这里稍微详细说一下第2种情况,如果客户端低于11g R2的版本,在DNS解析的3个VIP地址中,可能只能固定地使用第一个SCAN VIP连接数据库;如果该SCAN VIP对应的监听器出现故障,那么整个连接将会失败,客户端也会收到到错误信息。
那针对兼容性问题我们拿出各种客户端配置方法
<span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">)客户端和服务器端软件版本都是</span><span class="lit" style="color: rgb(0, 102, 102);">11g</span><span class="pln"> R2</span><span class="pun" style="color: rgb(102, 102, 0);">的时候</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Tnsnames</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">ora
RACSCAN </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">DESCRIPTION </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">cluster</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">grid</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">CONNECT_DATA </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> DEDICATED</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVICE_NAME </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs10g</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">2</span><span class="pun" style="color: rgb(102, 102, 0);">)客户端是早于</span><span class="lit" style="color: rgb(0, 102, 102);">11g</span><span class="pln"> R2</span><span class="pun" style="color: rgb(102, 102, 0);">的版本,服务器端是</span><span class="lit" style="color: rgb(0, 102, 102);">11g</span><span class="pln"> R2</span><span class="pun" style="color: rgb(102, 102, 0);">的时候</span><span class="pln">
RACSCAN </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">DESCRIPTION </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS_LIST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">LOAD_BALANCE</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">on</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">FAILOVER</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">on</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.193</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.194</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.195</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">CONNECT_DATA </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVICE_NAME </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs10g</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">为了确保在早于</span><span class="lit" style="color: rgb(0, 102, 102);">11g</span><span class="pln"> R</span><span class="pun" style="color: rgb(102, 102, 0);">版本的客户端负载均衡和失败切换,我们需要在</span><span class="pln">tnsnames</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">ora</span><span class="pun" style="color: rgb(102, 102, 0);">中添加</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pun" style="color: rgb(102, 102, 0);">个</span><span class="pln">SCAN VIP</span><span class="pun" style="color: rgb(102, 102, 0);">。</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pun" style="color: rgb(102, 102, 0);">)传统的</span><span class="pln">RAC</span><span class="pun" style="color: rgb(102, 102, 0);">客户端配置方法</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">先从客户端正常地解析服务器所有节点的主机名称和相应的</span><span class="pln">VIP</span><span class="pun" style="color: rgb(102, 102, 0);">名称,最好和服务端/</span><span class="pln">etc</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">hosts</span><span class="pun" style="color: rgb(102, 102, 0);">一致。</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">当然,我们不解析名称的情况下还可以使用</span><span class="pln">VIP</span><span class="pun" style="color: rgb(102, 102, 0);">地址,比如:</span><span class="pln">
LUOCSRAC </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">DESCRIPTION </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS_LIST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.193</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.194</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">LOAD_BALANCE </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> yes</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">FAILOVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> on</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">CONNECT_DATA </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> DEDICATED</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVICE_NAME </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">本地客户端</span><span class="pln">hosts</span><span class="pun" style="color: rgb(102, 102, 0);">解析之后,使用名称:</span><span class="pln">
LUOCSRAC </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">DESCRIPTION </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS_LIST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> rac1</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">vip</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> rac2</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">vip</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">LOAD_BALANCE </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> yes</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">FAILOVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> on</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">CONNECT_DATA </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> DEDICATED</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">SERVICE_NAME </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">注意:传统的客户端配置方法其实还有多种,这个在这里不细说。</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">4</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">JDBC</span><span class="pun" style="color: rgb(102, 102, 0);">字符串配置</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">早期版本:</span><span class="pln">
jdbc</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">oracle</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">thin</span><span class="pun" style="color: rgb(102, 102, 0);">:@(</span><span class="pln">DESCRIPTION </span><span class="pun" style="color: rgb(102, 102, 0);">=(</span><span class="pln">ADDRESS_LIST </span><span class="pun" style="color: rgb(102, 102, 0);">=(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> rac1</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">vip</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))(</span><span class="pln">ADDRESS </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">PROTOCOL </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">HOST </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> rac2</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">vip</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">PORT </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">))(</span><span class="pln">LOAD_BALANCE </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> yes</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">FAILOVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> on</span><span class="pun" style="color: rgb(102, 102, 0);">))(</span><span class="pln">CONNECT_DATA </span><span class="pun" style="color: rgb(102, 102, 0);">=(</span><span class="pln">SERVER </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> DEDICATED</span><span class="pun" style="color: rgb(102, 102, 0);">)(</span><span class="pln">SERVICE_NAME </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> luocs</span><span class="pun" style="color: rgb(102, 102, 0);">)))</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">11g</span><span class="pln"> R2</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">
jdbc</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">oracle</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">thin@luocs</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">cluster</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">luocs</span>
注意:JDBC是不支持TAF的,所以通过JDBC连接无法实现Failover,那有没有解决方法,我们可以使用应用的连接池来实现,也就是当连接的时候发现某些连接有故障,那自动切换到正常实例的连接。
最后我贴一下SCAN配置信息的检查方法和DNS、GNS方式SCAN解析实例:
首先SCAN配置信息的检查。
<span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">)查看</span><span class="pln">SCAN</span><span class="pun" style="color: rgb(102, 102, 0);">解析的</span><span class="pln">VIP</span><span class="pun" style="color: rgb(102, 102, 0);">地址:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup scan.luocs.com</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">2</span><span class="pun" style="color: rgb(102, 102, 0);">)查看</span><span class="pln">SCAN</span><span class="pun" style="color: rgb(102, 102, 0);">配置信息:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># cd /u01/app/11.2.0/grid/bin</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 bin</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># ./srvctl config scan</span><span class="pln">
SCAN name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">,</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Network</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.0</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="lit" style="color: rgb(0, 102, 102);">255.255</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">255.0</span><span class="pun" style="color: rgb(102, 102, 0);">/</span><span class="pln">bond0
SCAN VIP name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> scan1</span><span class="pun" style="color: rgb(102, 102, 0);">,</span><span class="pln"> IP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="str" style="color: rgb(0, 136, 0);">/scan.luocs.com/</span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
SCAN VIP name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> scan2</span><span class="pun" style="color: rgb(102, 102, 0);">,</span><span class="pln"> IP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="str" style="color: rgb(0, 136, 0);">/scan.luocs.com/</span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span><span class="pln">
SCAN VIP name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> scan3</span><span class="pun" style="color: rgb(102, 102, 0);">,</span><span class="pln"> IP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="str" style="color: rgb(0, 136, 0);">/scan.luocs.com/</span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3</span><span class="pun" style="color: rgb(102, 102, 0);">)查看</span><span class="pln">SCAN</span><span class="pun" style="color: rgb(102, 102, 0);">监听器配置信息:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 bin</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># ./srvctl config scan_listener</span><span class="pln">
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN1 exists</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Port</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pln">
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN2 exists</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Port</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pln">
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN3 exists</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Port</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> TCP</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="lit" style="color: rgb(0, 102, 102);">1521</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">4</span><span class="pun" style="color: rgb(102, 102, 0);">)查看</span><span class="pln">SCAN VIP</span><span class="pun" style="color: rgb(102, 102, 0);">的节点分配:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 bin</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># ./srvctl status scan</span><span class="pln">
SCAN VIP scan1 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN VIP scan1 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac1
SCAN VIP scan2 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN VIP scan2 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac2
SCAN VIP scan3 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN VIP scan3 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac2
</span><span class="lit" style="color: rgb(0, 102, 102);">5</span><span class="pun" style="color: rgb(102, 102, 0);">)查看</span><span class="pln">SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pun" style="color: rgb(102, 102, 0);">的运行节点:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 bin</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># ./srvctl status scan_listener</span><span class="pln">
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN1 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN listener LISTENER_SCAN1 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac1
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN2 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN listener LISTENER_SCAN2 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac2
SCAN </span><span class="typ" style="color: rgb(102, 0, 102);">Listener</span><span class="pln"> LISTENER_SCAN3 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> enabled
SCAN listener LISTENER_SCAN3 </span><span class="kwd" style="color: rgb(0, 0, 136);">is</span><span class="pln"> running on node rac2</span>
DNS方式配置SCAN:
<span class="pun" style="color: rgb(102, 102, 0);">以下操作在</span><span class="pln">DNS</span><span class="pun" style="color: rgb(102, 102, 0);">服务器上进行:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">安装</span><span class="pln">bind</span><span class="pun" style="color: rgb(102, 102, 0);">三个包</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh bind-9.3.6-4.P1.el5_4.2.x86_64.rpm</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm </span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">配置主区域</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cd /var/named/chroot/etc</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.caching-nameserver.conf named.conf</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># vi named.conf </span><span class="pln">
options </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
listen</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">on port </span><span class="lit" style="color: rgb(0, 102, 102);">53</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
listen</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">on</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">v6 port </span><span class="lit" style="color: rgb(0, 102, 102);">53</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">::</span><span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
directory </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="kwd" style="color: rgb(0, 0, 136);">dump</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/cache_dump.db"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
statistics</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/named_stats.txt"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
memstatistics</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/named_mem_stats.txt"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">query </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">query</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">cache </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
logging </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
channel default_debug </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
file </span><span class="str" style="color: rgb(0, 136, 0);">"data/named.run"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
severity </span><span class="kwd" style="color: rgb(0, 0, 136);">dynamic</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
view localhost_resolver </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
match</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">clients </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
match</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">destinations </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
recursion yes</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
include </span><span class="str" style="color: rgb(0, 136, 0);">"/etc/named.zones"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.rfc1912.zones named.zones</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># vi named.zones</span><span class="pln">
zone </span><span class="pun" style="color: rgb(102, 102, 0);">“</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="str" style="color: rgb(0, 136, 0);">" IN {
type master;
file “luocs.com.zone"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">update </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> none</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
zone </span><span class="str" style="color: rgb(0, 136, 0);">"77.168.192.in-addr.arpa"</span><span class="pln"> IN </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
type master</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
file </span><span class="str" style="color: rgb(0, 136, 0);">"77.168.192.local"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">update </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> none</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cd /var/named/chroot/var/named</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.zero luocs.com.zone</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.local 77.168.192.local </span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># vi luocs.com.zone</span><span class="pln">
$TTL </span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">@</span><span class="pln"> IN SOA dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> root</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">42</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> serial </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">d</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> adams</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3H</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> refresh
</span><span class="lit" style="color: rgb(0, 102, 102);">15M</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="kwd" style="color: rgb(0, 0, 136);">retry</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">1W</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> expiry
</span><span class="lit" style="color: rgb(0, 102, 102);">1D</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> minimum
IN NS dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
scan IN A </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
scan IN A </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
scan IN A </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># vi 77.168.192.local</span><span class="pln">
$TTL </span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">@</span><span class="pln"> IN SOA dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> root</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">1997022700</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Serial</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">28800</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Refresh</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">14400</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Retry</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3600000</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Expire</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Minimum</span><span class="pln">
IN NS dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">195</span><span class="pln"> IN PTR scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">196</span><span class="pln"> IN PTR scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">197</span><span class="pln"> IN PTR scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># service named restart</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># chkconfig named on </span><span class="pln">
nslookup</span><span class="pun" style="color: rgb(102, 102, 0);">或</span><span class="pln">dig</span><span class="pun" style="color: rgb(102, 102, 0);">检查,通过检查我们也可以判断</span><span class="pln">DNS</span><span class="pun" style="color: rgb(102, 102, 0);">提供</span><span class="pln">rr</span><span class="pun" style="color: rgb(102, 102, 0);">方式:</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup scan.luocs.com</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup scan.luocs.com</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@rac1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup scan.luocs.com</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"></span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.145</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.195</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.196</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln">scan</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">luocs</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.197</span>
然后我们在安装GI的时候使用scan.luocs.com即可,当然要不选择Configure GNS。
– 如果有不知道我在说什么的朋友请尝试一遍Oracle 11g R2 RAC的安装。
GNS方式配置SCAN:
<span class="pln">DNS</span><span class="pun" style="color: rgb(102, 102, 0);">配置部分</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh bind-9.3.6-4.P1.el5_4.2.x86_64.rpm </span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm </span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># rpm -ivh caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm </span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># cd /var/named/chroot/etc</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 etc</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.caching-nameserver.conf named.conf</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 etc</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># vi named.conf </span><span class="pln">
options </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
listen</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">on port </span><span class="lit" style="color: rgb(0, 102, 102);">53</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
listen</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">on</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">v6 port </span><span class="lit" style="color: rgb(0, 102, 102);">53</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">::</span><span class="lit" style="color: rgb(0, 102, 102);">1</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
directory </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="kwd" style="color: rgb(0, 0, 136);">dump</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/cache_dump.db"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
statistics</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/named_stats.txt"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
memstatistics</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">file </span><span class="str" style="color: rgb(0, 136, 0);">"/var/named/data/named_mem_stats.txt"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);">// Those options should be used carefully because they disable port</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);">// randomization</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);">// query-source port 53;</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);">// query-source-v6 port 53;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">query </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">query</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">cache </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
logging </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
channel default_debug </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
file </span><span class="str" style="color: rgb(0, 136, 0);">"data/named.run"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
severity </span><span class="kwd" style="color: rgb(0, 0, 136);">dynamic</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
view localhost_resolver </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
match</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">clients </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
match</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">destinations </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> any</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
recursion yes</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
include </span><span class="str" style="color: rgb(0, 136, 0);">"/etc/named.zones"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.rfc1912.zones named.zones</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 etc</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># vi named.zones </span><span class="pln">
zone </span><span class="str" style="color: rgb(0, 136, 0);">"rac.com"</span><span class="pln"> IN </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
type master</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
file </span><span class="str" style="color: rgb(0, 136, 0);">"rac.com.zone"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">update </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> none</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
zone </span><span class="str" style="color: rgb(0, 136, 0);">"77.168.192.in-addr.arpa"</span><span class="pln"> IN </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln">
type master</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
file </span><span class="str" style="color: rgb(0, 136, 0);">"77.168.192.local"</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln">
allow</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">update </span><span class="pun" style="color: rgb(102, 102, 0);">{</span><span class="pln"> none</span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">};</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 etc</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># cd /var/named/chroot/var/named</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.zero rac.com.zone</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># cp -p named.local 77.168.192.local</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># vi rac.com.zone</span><span class="pln">
$TTL </span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln">
$ORIGIN rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">@</span><span class="pln"> IN SOA dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> root</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">42</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> serial </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">d</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> adams</span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3H</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> refresh
</span><span class="lit" style="color: rgb(0, 102, 102);">15M</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="kwd" style="color: rgb(0, 0, 136);">retry</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">1W</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> expiry
</span><span class="lit" style="color: rgb(0, 102, 102);">1D</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> minimum
IN NS dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
dns IN A </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">100.145</span><span class="pln">
gns IN A </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">100.200</span><span class="pln">
grid IN NS gns
$ORIGIN host</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">@</span><span class="pln"> IN NS gns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 named</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># vi 100.168.192.local </span><span class="pln">
$TTL </span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">@</span><span class="pln"> IN SOA dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> root</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">1997022700</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Serial</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">28800</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Refresh</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">14400</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Retry</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">3600000</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Expire</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">86400</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">)</span><span class="pln"> </span><span class="pun" style="color: rgb(102, 102, 0);">;</span><span class="pln"> </span><span class="typ" style="color: rgb(102, 0, 102);">Minimum</span><span class="pln">
IN NS dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">145</span><span class="pln"> IN PTR dns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">200</span><span class="pln"> IN PTR gns</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">~</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># service named restart</span><span class="pln">
</span><span class="com" style="color: rgb(136, 0, 0);"># chkconfig named on</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">测试</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 named</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup gns-server.rac.com</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">127.0</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.1</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">127.0</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.1</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Name</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> gns</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">server</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">192.168</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">77.95</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 named</span><span class="pun" style="color: rgb(102, 102, 0);">]</span><span class="com" style="color: rgb(136, 0, 0);"># nslookup 192.168.77.95</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Server</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">127.0</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.1</span><span class="pln">
</span><span class="typ" style="color: rgb(102, 0, 102);">Address</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> </span><span class="lit" style="color: rgb(0, 102, 102);">127.0</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">0.1</span><span class="com" style="color: rgb(136, 0, 0);">#53</span><span class="pln">
</span><span class="lit" style="color: rgb(0, 102, 102);">95.77</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="lit" style="color: rgb(0, 102, 102);">168.192</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="kwd" style="color: rgb(0, 0, 136);">in</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">addr</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">arpa name </span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="pln"> gns</span><span class="pun" style="color: rgb(102, 102, 0);">-</span><span class="pln">server</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">rac</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">com</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln">
DHCP</span><span class="pun" style="color: rgb(102, 102, 0);">配置部分</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># yum install dhcp</span><span class="pln">
</span><span class="pun" style="color: rgb(102, 102, 0);">[</span><span class="pln">root@oel1 </span><span class="pun" style="color: rgb(102, 102, 0);">~]</span><span class="com" style="color: rgb(136, 0, 0);"># cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf</span><span class="pln">
cp</span><span class="pun" style="color: rgb(102, 102, 0);">:</span><span class="pln"> overwrite </span><span class="str" style="color: rgb(0, 136, 0);">`/etc/dhcpd.conf'? y
[root@oel1 ~]# vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.77.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.77.250;
option subnet-mask 255.255.255.0;
option nis-domain "rac.com";
option domain-name "rac.com";
option domain-name-servers 192.168.77.145;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.77.193 192.168.77.199;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
#host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
#}
}
[root@oel1 ~]# service dhcpd start
[root@oel1 ~]# chkconfig dhcpd on</span>
然后我们在安装GI的时候使用SCAN Name填写:rac-cluster-scan.gns-server.rac.com,选择Configure GNS,GNS Sub Domain填写gns-server.rac.com,GNS VIP Address填写192.168.77.95。其中SCAN Name的填写有讲究的,就是再不包含域名的情况下前面的字符不能超过15个,另外192.168.77.95就是GNS VIP。
至于上面的操作具体细节我就不深入说明了。
参考: