IP別名的IPAT的接管測試

westzq1984發表於2009-05-09

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.3.101     svc_1           P61A   
10.10.3.102     svc_2           P61B
10.10.3.201     P61A_p
10.10.3.202     P61B_p 

測試前:
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
        inet 10.10.3.101 netmask 0xffffff00 broadcast 10.10.3.255    -- 持續IP
en1: flags=4e080863,80
        inet 10.10.1.61 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.201 netmask 0xffffff00 broadcast 10.10.3.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
        inet 10.10.3.202 netmask 0xffffff00 broadcast 10.10.3.255   --持續IP
en1: flags=4e080863,80
        inet 10.10.1.62 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.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

測試1:宕掉P61B的en1
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.62 netmask 0xffffff00 broadcast 12.0.0.255
        inet 10.10.3.202 netmask 0xffffff00 broadcast 10.10.3.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.255
en1: flags=4e080862,80
        inet 10.10.1.62 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

測試2:啟動P61B的en1
-bash-3.00# ifconfig en1 up

服務IP依然駐留在en0上

測試3:宕掉P61B的en0,en1
-bash-3.00# ifconfig en1 down
-bash-3.00# ifconfig en0 down
P61A的IP
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
        inet 10.10.3.101 netmask 0xffffff00 broadcast 10.10.3.255
en1: flags=4e080863,80
        inet 10.10.1.61 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.201 netmask 0xffffff00 broadcast 10.10.3.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.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掛到了P61A的en1上面

測試4:我在把P61A的en1也宕掉
-bash-3.00# ifconfig en1 down
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
        inet 10.10.3.101 netmask 0xffffff00 broadcast 10.10.3.255
        inet 10.10.3.201 netmask 0xffffff00 broadcast 10.10.3.255
en1: flags=4e080862,80
        inet 10.10.1.61 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.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

持續IP可以跳到en0上,而服務IP102是無法跳過去的,102不可用

測試5:啟動P61A的en1
-bash-3.00# ifconfig en1 up
-bash-3.00# ifconfig -a
en0: flags=4e080863,80
        inet 12.0.0.61 netmask 0xffffff00 broadcast 12.0.0.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.255
en1: flags=4e080863,80
        inet 10.10.1.61 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.201 netmask 0xffffff00 broadcast 10.10.3.255
        inet 10.10.3.101 netmask 0xffffff00 broadcast 10.10.3.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對調了(出去本來的IP地址)

測試6:重啟P61B,重啟HACMP
-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.61 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.201 netmask 0xffffff00 broadcast 10.10.3.255
        inet 10.10.3.101 netmask 0xffffff00 broadcast 10.10.3.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
        inet 10.10.3.202 netmask 0xffffff00 broadcast 10.10.3.255
en1: flags=4e080863,80
        inet 10.10.1.62 netmask 0xffffff00 broadcast 10.10.1.255
        inet 10.10.3.102 netmask 0xffffff00 broadcast 10.10.3.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

IP已經切換回來了

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-594577/,如需轉載,請註明出處,否則將追究法律責任。

相關文章