Carp vhid with vlan id's alignment

Alexander V. Chernikov melifaro at ipfw.ru
Mon Jun 20 22:18:36 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rafael Ganascim wrote:
> 1) I had seen the source code, and the doubt was about modifying it to
> support 4096 vlans (12 bits)
> 
> 2) I don't understand this type of implementation. May you explain? How
> obtain the fault-tolerance and HA with this? Or load balancing?
Carp interface is used mostly as detection mechanism.
When master failure is detected, script is called via devd.
I'm using the following solution: small script based on rc.network stuff
parses rc.conf style vlans.conf file, generating cloned_interfaces and
static_routes string and then running typical procedures for vlan
creation/address assignment. After that, arp-sk runs on every interface
announcing new MAC address. All related configuration files are synced
via VCS on every node.

This scheme runs on production routers with several hundred interfaces
without any major issues. However, there are some things that should be
avoided (like some devd /etc/pccard-ether hook).

Switching time seems to be 3 seconds (carp) + 2-3 seconds for vlans
startup and mac address change

I'm not sure if you really need LB on > 255 links, maybe this can be
done some other way?

> 
> Thanks!
> 
> 2011/6/20 Alexander V. Chernikov <melifaro at ipfw.ru>
> 
> Rafael Ganascim wrote:
>>>> Hi list,
>>>>
>>>> I'm planning and testing a new FreeBSD router, with vlans and carp
>>>> interfaces. There are a lot of vlans, with high vlan IDs. We have, for
>>>> example:
>>>>
>>>> dot1q vlan id: 1530
>>>>
>>>> Iface igb0
>>>>  vlan1530
>>>>   carp1530
>>>>    vhid 10
>>>>
>>>> What do you think in change the carp code to support vhid above 255 (just
> to
>>>> align with vlanid, carp vlan name)? I think that it can ease the
>>>> troubleshooting, standardization and documentation (in this scenario).
> It's
>>>> the last piece of the complete 'id' alignment.
> 1) CARP packet format uses 8bit for VHID (see sys/netinet/ip_carp.h for
> packet format)
> 
> 2) Making carp instance for every vlan is (generally) wrong design.
> Making single carp instance for group of interfaces (and
> creating/deleting vlans depending carp instance state) is more
> preferable in most cases. You can get state change events for carp(4)
> interfaces via devd(8).
> 
> Moreover, every carp instance sends multicast packets every 1 second +
> several milliseconds in default scenario. This means a lot of multicast
> traffic in case of many instances which can confuse other devices (or
> another carp implementations like ucarp).
> 
>>>> But I don't know the impact of this change in the source codes (and
> related,
>>>> like the ifconfig).
>>>>
>>>> What do you think?
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Rafael
>>>> _______________________________________________
>>>> freebsd-net at freebsd.org mailing list
>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3/xtIACgkQwcJ4iSZ1q2ksDACgh+5Hke+CpjcoDJ5LSkQ9MxGJ
PUoAnj25XTIw04UWq66orp3OYeS89RFC
=PSub
-----END PGP SIGNATURE-----


More information about the freebsd-net mailing list