IP替換的IPAT的接管測試

westzq1984發表於2009-05-11

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章