Skip to main content

tplogin.cn首页 > 新闻资讯 >

构建AIX环境下的RAC之--配置网络

2014-04-05 00:00 浏览:

环境:

操作系统: AIX 5300-09

集群软件: CRS 10.2.0.1

数据库:   Oracle 10.2.0.1

 

10、配置网络环境

[root@aix211 /]# cat /etc/hosts

127.0.0.1               loopback localhost      # loopback (lo0) name/address

 

192.168.8.211  aix211

192.168.8.241  aix211-vip

192.168.8.212   aix212

192.168.8.242   aix212-vip

10.10.10.212    aix212-priv

10.10.10.211    aix211-priv

 

[root@aix211 /]#ifconfig -a

en0:flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>

       inet 192.168.8.211 netmask 0xffffff00 broadcast 192.168.8.255

       inet 192.168.8.241 netmask 0xffffff00 broadcast 192.168.8.255

en1:flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>

       inet 10.10.10.211 netmask 0xffffff00 broadcast 10.10.10.255

注意:

      所有节点的public NIC尽量采用相同逻辑设备名(如均采用en0)

      所有网卡的netmask 相同,如255.255.255.0

11、配置主机间的信任关系(适用于所有node)

 

---全局配置文件 hosts.equiv

 

[root@aix211 /]#cat /etc/hosts.equiv

aix211  root

aix211  oracle

aix212  root

aix212  oracle

 

aix211-priv root

aix212-priv root

aix211-priv oracle

aix212-priv oracle

 

aix211-vip root

aix211-vip oracle

aix212-vip root

aix212-vip oracle

--- root用户配置文件 .rhosts

 

[root@aix211 /]#cat  .rhosts

aix211  root

aix211  oracle

aix212  root

aix212  oracle

 

aix211-priv root

aix212-priv root

aix211-priv oracle

aix212-priv oracle

 

aix211-vip root

aix211-vip oracle

aix212-vip root

aix212-vip oracle

--- oracle 用户配置文件.rhosts

[oracle@aix211 ~]$cat .rhosts

 

aix211  root

aix211  oracle

aix212  root

aix212  oracle

 

aix211-priv root

aix212-priv root

aix211-priv oracle

aix212-priv oracle

 

aix211-vip root

aix211-vip oracle

aix212-vip root

aix212-vip oracle

 

12、配置优化网络参数

 

[root@aix211 /]#

no  -a  |  more        检查网络参数

如果需要修改参数值,先用下面的命令确定系统是否运行在兼容模式:

lsattr  -El  sys0  -a  pre520tune

 

pre520tune disable Pre-520 tuning compatibility mode True 为非兼容模式

pre520tune enable Pre-520 tuning compatibility mode True  为兼容模式

在兼容模式下修改参数的方法:

no  -o  parameter_name=value  如:no  -o  ipqmaxlen =512

将之前修改网络参数的命令行添加到/etc/rc.net文件中,如:

if  [ -f  /usr/sbin/no ] ;  then

/usr/sbin/no  -o  Udp_recvspace=655360

....................

fi

这样修改的数值在系统重启后仍然有效;

 

在非兼容模式下修改参数的方法:

对于ipqmaxlen参数的修改:

no  -r  -o  ipqmaxlen=512        (注意,命令的参数不同)

对于其它参数的修改:

no  -p  -o  parameter=value

如果要修改ipqmaxlen参数,修改后必须重启系统;

上面的命令对/etc/tunables/nextboot文件进行修改,从而使这些参数的值在系

统重启后仍然有效;

------配置网络参数脚本

 

[root@aix211 /]#lsattr  -El  sys0  -a  pre520tune

pre520tune disable Pre-520 tuning compatibility mode True

[root@aix211 /]#cat chnet.sh

no -r -o ipqmaxlen=512

no -p -o rfc1323=1

no -p -o sb_max=1310720

no -p -o tcp_recvspace=65536

no -p -o tcp_sendspace=65536

no -p -o udp_recvspace=655360

no -p -o udp_sendspace=65536

查看网络参数

 

[root@aix211 /]#no -a |grep tcp

      tcp_bad_port_limit = 0

                 tcp_ecn = 0

      tcp_ephemeral_high = 65535

       tcp_ephemeral_low = 32768

            tcp_finwait2 = 1200

          tcp_icmpsecure = 0

         tcp_init_window = 0

   tcp_inpcb_hashtab_siz = 24499

             tcp_keepcnt = 8

            tcp_keepidle = 14400

            tcp_keepinit = 150

           tcp_keepintvl = 150

    tcp_limited_transmit = 1

             tcp_low_rto = 0

            tcp_maxburst = 0

             tcp_mssdflt = 1460

         tcp_nagle_limit = 65535

       tcp_nagleoverride = 0

              tcp_ndebug = 100

             tcp_newreno = 1

          tcp_nodelayack = 0

       tcp_pmtu_discover = 1

           tcp_recvspace = 65536

           tcp_sendspace = 65536

           tcp_tcpsecure = 0

            tcp_timewait = 1

                 tcp_ttl = 60

          tcprexmtthresh = 3

[root@aix211 /]#no -a |grep udp

      udp_bad_port_limit = 0

      udp_ephemeral_high = 65535

       udp_ephemeral_low = 32768

   udp_inpcb_hashtab_siz = 24499

       udp_pmtu_discover = 1

           udp_recvspace = 655360

           udp_sendspace = 65536

                 udp_ttl = 30

                udpcksum = 1

 

13、配置时间同步

  在RAC环境下要求,每个node 时间处于同步状态;利用Unix 系统的ntp协议来完成节点时间的同步,其中aix211 为ntp server,aix212 为ntp client 。

 

1)、设置NTP 服务器 (MASTER)

必须指定一个NTP主服务器,其它NTP客户服务器以此服务器的时间为准,与其进行时间同步。编辑 /etc/ntp.conf 文件, 内容如下:

 

broadcastclient

server  127.127.1.0  

driftfile  /etc/ntp.drift

tracefile  /etc/ntp.trace

 

注意文件中的 server 127.127.1.0 这一行, 此处的127.127.1.0 是一固定的地址,表示NTP主服务器是与自身的系统时钟同步。编辑好/etc/ntp.conf后,启动xntpd守护进程。

 [root@aix205 /]#startsrc -s xntpd

0513-059 The xntpd Subsystem has been started. Subsystem PID is 294974.

[root@aix211 /]#startsrc -s xntpd

0513-059 The xntpd Subsystem has been started. Subsystem PID is 274574.

[root@aix211 /]#netstat -an |grep 123

udp4       0      0  127.255.255.255.123    *.*                  

udp4       0      0  10.10.10.255.123       *.*                  

udp4       0      0  192.168.8.255.123      *.*                  

udp4       0      0  127.0.0.1.123          *.*                  

udp4       0      0  10.10.10.211.123       *.*                  

udp4       0      0  192.168.8.211.123      *.*                  

udp4       0      0  *.123                  *.*                  

 

[root@aix211 /]#lssrc -ls xntpd

Program name:    /usr/sbin/xntpd

Version:         3

Leap indicator:  11 (Leap indicator is insane.)

Sys peer:        no peer, system is insane

Sys stratum:     16

Sys precision:   -17

Debug/Tracing:   DISABLED

Root distance:   0.000000

Root dispersion: 0.000000

Reference ID:    no refid, system is insane

Reference time:  no reftime, system is insane

Broadcast delay: 0.003906 (sec)

Auth delay:      0.000122 (sec)

System flags:    bclient pll monitor filegen  

System uptime:   9 (sec)

Clock stability: 0.000000 (sec)

Clock frequency: 0.000000 (sec)

Peer: 127.127.1.0

     flags: (configured)(refclock)

     stratum:  3, version: 3

     our mode: client, his mode: server

Subsystem         Group            PID          Status

xntpd            tcpip            294974       active

 

[root@aix211 /]#

通过调用smit,使xntpd在以后重启服务器时能自动启动(next System Restart):

smit  xntpd

刚启动xntpd时,sys peer为'insane',表明xntpd还没有完成同步,

#lssrc  -ls  xntpd

Program name: --/usr/sbin/xntpd

Version: -------3

Leap indicator: 11 (Leap indicator is insane.)

Sys peer: ------no peer, system is insane

……

等待5分钟后, sys peer 就不再是'insane'了,

#lssrc  -ls  xntpd

Program name: --/usr/sbin/xntpd

Version: -------3

Leap indicator: 00 (No leap second today.)

Sys peer: ------127.127.1.0

……

2)、NTP客户端的设置

(1)、编辑所有NTP 客户端上的/etc/ntp.conf文件,内容如下:

#broadcastclient

server  192.168.8.211

driftfile  /etc/ntp.drift

tracefile  /etc/ntp.trace

其中的server  192.168.8.211表明,此客户端与IP地址为 192.168.8.211的NTP服务器进行时间同步。

(2)、在NTP客户端启动xntpd守护进程,通过调用smit,使xntpd在以后重启服务器时能自动启动(next System Restart):

# smit  xntpd

(3)、查询xntpd的状态,当 system  peer 不为'insane'时,表明客户端已与服务器端成功地进行了同步(通常启动xntpd服务10分钟后):

# lssrc  -ls  xntpd

Program name: /usr/sbin/xntpd

Version: 3

Leap indicator: 00 (No leap second today.)

Sys peer: dbs1

……

3)、NTP客户端查询NTP服务器

在ntp客户端使用ntpdate命令来确认是否可用指定的ntp服务器进行时间同步。

命令的结果会显示客户端与服务器的时间偏移:

#ntpdate  -d  192.168.8.193

22 May 13:38:57 ntpdate[27108]: adjust time server 192.168.8.194 offset 0.006005

上面例子中的两台服务器时间差了0.000993秒,即0.993 毫秒,这是可以接受的正常偏差。若时间间隔大于1000秒,最好先使用smitty date进行调整;

相关文章

snkrsflow什么意思详细介绍

2022-04-15 08:35:39    浏览: 109

snkrsstash是什么意思详细介绍

2022-04-15 08:35:59    浏览: 85

snkrs养号技巧(附详细教程)

2022-04-15 08:36:20    浏览: 88

手把手教你qq表情怎么删除厘米秀

2022-04-15 08:38:42    浏览: 162

怎么用snkrs抢鞋才能更流畅

2022-04-15 08:38:01    浏览: 67