VLAN + CARP ?

Freddie Cash fjwcash at gmail.com
Mon Feb 27 23:37:16 UTC 2017


On Mon, Feb 27, 2017 at 3:16 PM, Julien Cigar <julien at perdition.city> wrote:


> I wondered if it is possible to use CARP with VLAN interfaces?
>

​Yes, CARP-over-vLAN works well.  Used just such a setup at work for a
couple years.

Would something like this work (on 10.3)..?:
>
> = /etc/rc.conf ============
>
> vlans_em0="neta netb"
> create_args_neta="vlan 101"
> create_args_netb="vlan 102"
>
> ifconfig_em0_neta="inet 192.168.1.253/24"
> ifconfig_em0_netb="inet 10.209.1.253/24"
>
> ifconfig_em0_neta_alias0="inet vhid 3 advskew 10 pass xx alias
> 192.168.2.254/32"
> ifconfig_em0_netb_alias0="inet vhid 4 advskew 10 pass xx alias
> 10.209.1.254/32"
>
> ===========================
>

​This is the setup we used (snipped for brevity):

# em2 is the 3rd NIC port from the top of the quad-port NIC
ifconfig_em2="up"
vlans_em2="vlan110 vlan2000 vlan1000 vlan1010 vlan1110"

create_args_vlan1000="vlan 1000"
ifconfig_vlan1000="vhid 9 pass nxsp4ss
​1​
advskew 128 10.1.0.1/16"

create_args_vlan2000="vlan 2000"
ifconfig_vlan2000="vhid 20 pass nxsp4ss2 advskew 128 12.24.13.97/27"

create_args_vlan1010="vlan 1010"
ifconfig_vlan1010="vhid 21 pass nxsp4ss
​3
 advskew 128 12.24.12.129/26"

create_args_vlan1110="vlan 1110"
ifconfig_vlan1110="vhid 11 pass nxsp4ss
​4
 advskew 128 12.24.10.1/26"

​em2 had no IPs associated with it, it was just the physical interface that
the vlans and carp traffic went over.  We also only had a single subnet per
vlan, so only a single IP per carp instance on each vlan.  But you can do
multiples using the alias syntax like you have.​

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-net mailing list