ITPub博客

首页 > Linux操作系统 > Linux操作系统 > IP替换的IPAT的接管测试

IP替换的IPAT的接管测试

原创 Linux操作系统 作者:westzq1984 时间:2009-05-11 09:58:55 0 删除 编辑

10.10.1.61      P61A_boot
10.10.1.62      P61B_boot      
12.0.0.61       P61A_priv      
12.0.0.62       P61B_priv      
10.10.1.101     svc_1           P61A   
10.10.1.102     svc_2           P61B
10.10.1.201     P61A_p
10.10.1.202     P61B_p 

测试前:
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
en1: flags=4e080863,80
        inet 10.10.1.101 netmask 0xffffff00 broadcast 10.10.1.255     --服务IP
        inet 10.10.1.201 netmask 0xffffff00 broadcast 10.10.1.255     --持续IP
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
-bash-3.00# rsh P61B ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.62 netmask 0xffffff00 broadcast 12.0.0.255
en1: flags=4e080863,80
        inet 10.10.1.102 netmask 0xffffff00 broadcast 10.10.1.255    --服务IP
        inet 10.10.1.202 netmask 0xffffff00 broadcast 10.10.1.255    --持续IP
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
en0为standby网卡

测试1:宕掉P61B的en1
用10.10.1.202连接
-bash-3.00# ifconfig en1 down  --连接断开

重新连接
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 10.10.1.102 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.1.202 netmask 0xffffff00 broadcast 10.10.1.255
en1: flags=4e080863,80
        inet 12.0.0.62 netmask 0xffffff00 broadcast 12.0.0.255
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

en0和en1的IP交换了

测试2:启动P61B的en1
-bash-3.00# ifconfig en1 up
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 10.10.1.102 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.1.202 netmask 0xffffff00 broadcast 10.10.1.255
en1: flags=4e080863,80
        inet 12.0.0.62 netmask 0xffffff00 broadcast 12.0.0.255
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

en0,en1的IP不会交换回来,en1成了standby网卡

测试3:宕掉P61B的en0,en1
-bash-3.00# ifconfig en0 down
-bash-3.00# ifconfig en1 down

P61A的IP
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 10.10.1.102 netmask 0xffffff00 broadcast 10.10.1.255    --服务IP(P61B)
en1: flags=4e080863,80
        inet 10.10.1.101 netmask 0xffffff00 broadcast 10.10.1.255    --服务IP(P61A)
        inet 10.10.1.201 netmask 0xffffff00 broadcast 10.10.1.255
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

P61B的服务IP切换到P61A的standby网卡上

但是查看P61B的errpt,老是报告10.10.1.102这个IP在网络上有重复
于是拔掉P61B的网线

测试4:插上P61B的网线,启动P61B的en0,en1
服务IP(102)并没有重新回到P61B上,2个节点errpt都不停的抱IP重复
关闭P61B的HACMP服务,IP还是不对,IP102还是在P61B。

测试5:重启P61B,重新启动HA
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
en1: flags=4e080863,80
        inet 10.10.1.101 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.1.201 netmask 0xffffff00 broadcast 10.10.1.255
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
-bash-3.00# rsh P61B ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.62 netmask 0xffffff00 broadcast 12.0.0.255
en1: flags=4e080863,80
        inet 10.10.1.102 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.1.202 netmask 0xffffff00 broadcast 10.10.1.255
lo0: flags=e08084b
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

服务IP102重新回到了P61B上,服务IP的重新接管,看来是需要机器的重启的

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-594684/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    953794