I'm having trouble trying to setup carp(4) to provide fail-over redundancy for two web servers running in jails.
guest1: 192.168.255.100
/etc/rc.conf:
guest2: 192.168.255.101
/etc/rc.conf
host: 192.168.255.226
/etc/rc.conf
I cannot access the servers via 192.168.255.226 (re0).
I followed the tutorial from the Handbook.
I am also not sure the rc.conf files in the jails should have the interface aliases there, since those interfaces are not configured via local rc.conf files, but on the host (/etc/rc.conf and /usr/local/etc/ezjail/www_localdomain).
I'm definitely doing something the wrong way, but I can't figure out what. Any suggestions would be much appreciated!
guest1: 192.168.255.100
/etc/rc.conf:
Code:
ifconfig_re0_alias0="vhid 1 pass secret alias 192.168.255.140 netmask 255.255.255.255"
ifconfig
Code:
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
inet 192.168.255.100 netmask 0xffffff00 broadcast 192.168.255.255
carp: MASTER vhid 1 advbase 1 advskew 100
carp: MASTER vhid 2 advbase 1 advskew 100
guest2: 192.168.255.101
/etc/rc.conf
Code:
ifconfig_re0_alias0="vhid 2 pass secret alias 192.168.255.141 netmask 255.255.255.255"
ifconfig
Code:
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
inet 192.168.255.101 netmask 0xffffff00 broadcast 192.168.255.255
carp: MASTER vhid 1 advbase 1 advskew 100
carp: MASTER vhid 2 advbase 1 advskew 100
host: 192.168.255.226
/etc/rc.conf
Code:
ifconfig_re0="inet 192.168.255.226 netmask 255.255.255.0"
#Network interfaces for jailed nginx
ifconfig_re0_alias3="inet 192.168.255.100 netmask 255.255.255.0"
ifconfig_re0_alias4="inet 192.168.255.101 netmask 255.255.255.0"
ifconfig_re0_alias5="inet vhid 1 advskew 100 pass secret alias 192.168.255.140 netmask 255.255.255.255"
ifconfig_re0_alias6="inet vhid 2 advskew 100 pass secret alias 192.168.255.141 netmask 255.255.255.255"
ifconfig
Code:
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
inet 192.168.255.226 netmask 0xffffff00 broadcast 192.168.255.255
inet 192.168.255.100 netmask 0xffffff00 broadcast 192.168.255.255
inet 192.168.255.101 netmask 0xffffff00 broadcast 192.168.255.255
inet 192.168.255.140 netmask 0xffffffff broadcast 192.168.255.140 vhid 1
inet 192.168.255.141 netmask 0xffffffff broadcast 192.168.255.141 vhid 2
carp: MASTER vhid 1 advbase 1 advskew 100
carp: MASTER vhid 2 advbase 1 advskew 100
I cannot access the servers via 192.168.255.226 (re0).
I followed the tutorial from the Handbook.
I am also not sure the rc.conf files in the jails should have the interface aliases there, since those interfaces are not configured via local rc.conf files, but on the host (/etc/rc.conf and /usr/local/etc/ezjail/www_localdomain).
I'm definitely doing something the wrong way, but I can't figure out what. Any suggestions would be much appreciated!