Thank you Chris! I come from the Cisco world with a little Linux experience
but It does make sense to me. It looks like I could run two DHCP processes
this way.

However the problem is that I still can't set the rtable.. Also tried the
"rdomain" but got the same error. It took the "set flag" command though. I
also tried "rcctl set dhcpd200 status on" and it took it too.

Is it problem with my openbsd or dhcpd version?

Thanks,
Difan

-----Original Message-----
From: Chris Cappuccio [mailto:ch...@nmedia.net]
Sent: Tuesday, July 12, 2016 10:25 AM
To: Difan Zhao <difan.z...@pason.com>
Cc: Pierre Emeriaud <petrus.lt+open...@gmail.com>; misc@openbsd.org
Subject: Re: ratble and rdomain support on dhcpd and openvpn

Difan Zhao [difan.z...@pason.com] wrote:
> Thanks Pierre! However the command does not work for me... Do I need to
upgrade my openbsd box? I am on 5.8 right now.
>
> # rcctl set dhcpd rtable 200
> usage: rcctl [-df] action|get|getdef|ls|order|set
>                 [service | daemon [variable [arguments]] | daemons |
> lsarg] # rcctl get dhcpd dhcpd_class=daemon
> dhcpd_flags=vr1
> dhcpd_timeout=30
> dhcpd_user=root
>
> If it works, does it mean that dhcpd will only operate on rtable 200? It
will be nice if it can run on both rtable 200 and the default rtable 0...
>

I believe under -current, you'd just:

ln -s /etc/rc.d/dhcpd /etc/rc.d/dhcpd200

rcctl set dhcpd200 rtable 200
rcctl set dhcpd200 flags "-f /etc/dhcpd.conf.200"

and use dhcpd200 and /etc/dhcpd.conf.200 to start for rtable 200, use dhcpd
and /etc/dhcpd.conf for rtable 0

Chris

Reply via email to