On Jul 18, 2020 3:25 PM, Guy Godfroy <guy.godf...@gugod.fr> wrote:

  Hello,

  I am using two routers on OpenBSD (called mulder and scully), and I
  wish
  to make dhcpd listen on a carp interface between both of them. I am
  using the synchronization mechanism:

  mulder# rcctl get dhcpd flags
  -y em2 -Y em2 carp0

  scully# rcctl get dhcpd flags
  -y em2 -Y em2 carp0

  I tested it and it works great when both routers are up.

  But what is explained in the man page is that it is only a realtime
  sync. So if I understand correctly, when one of the hosts is down,
  there
  is no way for it to get the new leases when it gets back up. My
  thought
  about that is that it defeats the original purpose of the feature. My
  concerns are confirmed by the test:

  1. Make sure that carp0 master is mulder.
  2. Stop dhcpd on scully.
  3. Plug a new machine using a dhcp client on the network of carp0.
  4. Observe that the lease is present in /etc/dhcpd.leases on mulder.
  5. Start dhcpd on scully.
  6. Observe that the lease is missing in /etc/dhcpd.leases on scully.

  I have found no information about leases synchronization other than
  the
  one given in dhcpd man page, but I guess there is no possible leases
  recovery from other routers after a downtime, or when a new router is
  inserted in the stack.

  What is the correct solution to manage this case? Is there a
  possibility
  for a router to ask for its missing leases when it gets up? Something
  like this:

  0. mulder is up, scully is down.
  1. scully gets up and asks on multicast:
  "My last lease was created on date d, what's up since that date?"
  2. mulder answers:
  "Here is the leases created since d: ..."

  Thanks.

  Guy

Not sure how to integrate it properly but this sounds like a job for
ifstated(8).
Edgar 

Reply via email to