餱ȥƥȤͫݵ

⤷ƤȤɽεϿøȽ񤯡

2006ǯ07

Microsoft Virtual PC 2004̵

Virtual PCWindowsǤ̵줿MacǤϤޤΤ褦

äVirtual Server̵ƤΤǡɽVirtual ServerФVitual PCΥåȤϥХꡢֲФ뤳ȡסVirtual ServerϥǥǥХΥߥ졼󤬾ʤƤΤDzФʤVirtual ServerϥӥȤưƤ뤫鲻ФФǺɤ⡣

ʤ櫓ǡWindows98MeǤưʤ쥬ʥץꥱVirtual Server98/MeΥ󥹥󥹤⡢Virtual PCǺäФ뤷OSۥOS1ץȤưΤǻȤ䤹

WindowsʤɤξOS򥲥OSȤƥ󥹥ȡ뤹硢饤󥹤ˤաVirtual Server/PCβۥޥ1ĤΥԥ塼ȤƥȤ礬롣Windows VistaǤ1饤󥹤ʣ󥹥(4?)򥤥󥹥ȡ뤹뤳ȤǤ餷ĿӤɾȯӤǻȤΤǤMSDN Operating System SubscriptionѤϤǤʤΤΡۤƤMicrosoftOS10饤󥹤ŤͿ롣֥ץǯ蹹ɤ⡢ѤʤֽͭλѤ뤳ȤǤ

Movable Type 3.3˥åץ졼

3.2-ja-2Υåץ졼ɤ˼ԡ

MySQLΥ顼ʤɡ֤󤳤졢ե¦걾ǤɤʤǤϤʤƥåѡȤ̤ƤäƤޤûŪˡ顼Фʤʤޤǥơ֥빽¤ѤꤹФɡܲˤϤʤʤΤǡ

ɤ褦ʤΤǡȤꤢ3.2-ja-2ڤᤷmysqldumpΥdbƹۤ⡢ȥɲûid0ޤǴäƤϿ褦ȤȤޤMySQL顼Ǥ٤ϤɤǤɤƧǤޤäΤ顦ľˤʤꥤ󥹥ȡ뤷ƤϤʤɤʤ

ڤᤷƻäͻҤ򸫤Ƥߤ褦ʤƻפäƤޤԶǤä餷礦ʤƥץ졼ȤΥХåå׼äơȥν񤭽Фơ3.2Ķ3.3󥹥ȡ뢪ޥޥꥹȥޤ

줿Τǿޤ䤹ߤʤ

3ξĹץȥ롢CARP

CARP(Common Adress Redundancy Protocol)ȤOpenBSDͳΥоĹץȥ롣ƱͤʤΤCisco SystemsHSRPVRRP롣ʤǤޤ3Ĥ褦ʥץȥ뤬ΤȸС˽˸äƤʲΤ褦ʰ㤤褦

  • HSRP Cisco SystemsΥѥƥȡ
  • VRRP ѥƥȥե꡼HSRPΤϤäɤޤѥƥʬĤäƤ餷
  • CARP Υѥƥȥե꡼μܻؤƼ줿Ρ

ơFreeBSDǤCARPμɤ⡢桼ɤǤμȥͥǤμ褦桼ɤǤμUCARPfreevrrpdƱ褦ʰ֤Ť(ä)ϸȤơOpenBSDΥͥ뤫ݡƥ󥰤줿ȱͥǤμƸ빽ǶμǡоݤFreeBSD 5.4ʹߤΥͥˤʤ롣С66.1-STABLE

ͥǤμȸäƥͥκƹۤɬסΤȤɸ֤ǤLKMѰդƤʤ褦ʤΤǡľ˺ƹۤƤʲιԤɲäƥͥƹۤ롣

 device	carp

freevrrpdǤ϶ͭɥ쥹륢ɥ쥹ʪͥåȥǥХ(fxp0Ȥrl0Ȥde0Ȥ)Υꥢɥ쥹Ȥ줿carp?ȤѤΥͥåȥǥХѰդ롣/etc/rc.conf˰ʲΤ褦˵ҡ192.168.1.253ۥɥ쥹Ȥ

masterˤۥȤǤ

 cloned_interfaces="carp0"
 ifconfig_carp0="vhid 1 pass hogehoge 192.168.1.253/24"

backupˤۥȤǤ

 cloned_interfaces="carp0"
 ifconfig_carp0="vhid 1 advskew 100 pass hogehoge 192.168.1.253/24"

vhidϲۥۥȤ¥ۥȤΥ롼IDfreevrrpǸȤserverid

advskewϻƻؤα֡1/256äݤͤٱ䤷ǽ˱¥ۥȤۥۥȤѤ¼Ūͥ٤ȹͤƤǥեȤ0ʤΤǡbackupۥȤΤ߻ꤹФ

pass̿Υѥɡ롼ƱΤꤹɤ

advbaseϺꤷƤʤƻδֳ֡ǥեȤ1äֳ֤Ĺϻꤹɬפ(255)

/etc/rc.confʳˡsysctl⤤Ĥܤ롣ɬפʤ/etc/sysctl.confǻꤹ롣

 net.inet.carp.allow=1		#carpѥåȤ롣ǥեȤ1
 net.inet.carp.preempt=1	#ʣvhidޤȤƥե륪ФȤ(localglobalΥե륪ФƱʤ)ꡣǥեȤ0
 net.inet.carp.arpbalance=0	#Ʊ󥯤ǡarpαȤäƥХ󥷥󥰤Ǥ餷ξѤˤǤäݤ̤ڡǥեȤ0
 net.inet.carp.log=1		#顼ʤɡϿǥեȤ1

äȤʤȤξ֤master¦ifconfigƤߤȡ

 carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
         inet 192.168.1.253 netmask 0xffffff00
         carp: MASTER vhid 1 advbase 1 advskew 0

ʤ󤫤äbackup¦Ǥϡ

 carp0: flags=8<LOOPBACK> mtu 1500
         inet 192.168.1.253 netmask 0xffffff00
         carp: INIT vhid 1 advbase 1 advskew 100

ȤʤäƤ롣¤Ϥξ֤Ǥmaster̿ǽˤʤäƤե륪ФǤʤifconfigȤäcarp0upƤɬפ롣ʤ/etc/rc.confǰupꤷƤäݤ̤Υץ󤬤Τ⤷ʤõƤޤ󡣤ʤ

 # ifconfig carp0 up
 # ifconfig carp0
 carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
         inet 192.168.1.253 netmask 0xffffff00
         carp: BACKUP vhid 1 advbase 1 advskew 100

INITBACKUPˤä괰λե륪ФˤϡʪŪȴƤ⤤ۤƱͤifconfigcarp󥿡եup,downƤɤ

 (master)# ifconfig carp0 down
 (master)# ifconfig carp0
 carp0: flags=8<LOOPBACK> mtu 1500
         inet 192.168.1.253 netmask 0xffffff00
         carp: INIT vhid 1 advbase 1 advskew 0

 (backup)# ifconfig carp0
 carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
         inet 192.168.1.253 netmask 0xffffff00
         carp: MASTER vhid 1 advbase 1 advskew 100

MASTERθ夬ԤƤ褦master¦carp0upȡnet.inet.carp.preempt0ΤȤ¨¤MASTERڤᤵ졢1λڤᤷϵbackup¦MASTERΤޤޤä(狼ˤʡ)

꤬syslog򸫤ȡ

 kernel: arp_rtrequest: bad gateway 192.168.1.253 (!AF_LINK)

ʥåϤƤ롣äƤߤֵʬ͡פߤʻ񤤤Ƥ뤬Gratuitous ARP褦ȤƤäƤ褦˸롣MAC00:00:5e:00:01:01Ȥɥ쥹ȤäƤ褦δĶǤϤɤ⤳˥å󥰥ϥ֤դƤƤʤߤcarp0ʤƥ󥿥եƤ뤯餤ʤΤǡroute˻ꤷƤ⤦ޤ¼ʪ󥿥եalias꿶äΤƱ褦ưʤ褦ǤʪŪʥå󥰥ϥ֤¾ˡVirtual Server 2005βۥåʤ󤫤Ǥ뤫顢ڤʬΤɤʤäƺϽλ(ġ)³

freevrrpdΤ褦˥ե륪лΥץȤñ˻Ǥ櫓ǤϤʤΤ(ޤ줬桼ɼζߤ)ºݤ˱ѤˤϤȺߤѤcarparpХ󥹵ǽˤ϶̣šΤؤδԤơUCARPƤߤ뤫⡣