# cd /usr/ports/net/ifstated # make install clean # vim /etc/rc.conf 加入以下資料 ## ifstated ifstated_enable=”YES” ifstated_flags=”-f /usr/local/etc/ifstated.conf” # vim /usr/local/etc/ifstated.conf # We want to startup init-state starting # net.inet.carp.preempt must be enabled (set to 1) # for this to work correctly. carp_up = “carp0.link.up” state starting { init { # Here we boot the box. if [...]
posted in FreeBSD by johnpupu
1. 角色分為 Provider, Host Provider 就是設定當Host 失連後可以取得原先在Host 上的ip 的主機 Host 就是我們的Client 2. 先 compile Kernel 加入 ( Provider, Host 都要) device carp 3. 設定 rc.conf 設定 host hostname=”hosta.example.org” ifconfig_fxp0=”inet 192.168.1.3 netmask 255.255.255.0″ ## 原本的網卡設定 cloned_interfaces=”carp0″ ## carp 網卡 ifconfig_carp0=”vhid 1 advskew 10 pass testpass 192.168.1.50/24″ ## vhid 在host/provider 都要一致 pass 的部份 兩台也要一樣 設定 provider hostname=”provider.example.org” [...]
posted in FreeBSD by johnpupu