Message-ID: <4B966A98.4000206@...41...> Date: Tue, 09 Mar 2010 08:34:48 -0700 From: James Yonan MIME-Version: 1.0 References: <4B9515FF.6000704@...41...> <20100308174321.GA25238@...1296...> In-Reply-To: <20100308174321.GA25238@...1296...> Subject: Re: [Openvpn-devel] Supporting "route-gateway dhcp" on non-Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Gert Doering Cc: "openvpn-devel@lists.sourceforge.net" > looking at the multitude of DHCP clients available for unix, the completely > different handling of DHCP on MacOS, and the issues that most unix clients > seem to have with "DHCP active on two different interfaces (ethX and tapY), > and both trying to set a default gateway", ... > > On Mon, Mar 08, 2010 at 08:21:35AM -0700, James Yonan wrote: >> (2) Complex method: Write code in OpenVPN to simulate a DHCP client, >> then translate the settings received in the DHCP reply to OpenVPN >> push-style directives (such as ifconfig, route, etc.) as if they had >> been pushed by the OpenVPN server. > > ... this seems to be the most portable way, as we already have the > ifconfig/route code for all the platforms. > > Well. Let me rephrase. > > The "simple way" is simple as far as the packet flow inside OpenVPN > goes (because OpenVPN only needs to transport packets, but not generate > them or parse them), but is, at the same time, the "most complex way" > as far as getting it to work reliably across all supported operating > systems. Lots of testing and "configure" magic would be necessary to > reliably figure out how to do DHCP properly on each individual system. > > I'm not saying it can't be done :-) - but just that the "simple way" > is not so simple, it's just complex in other places. I would tend to agree. All the discussion about the non-portable semantics of DHCP clients on different platforms makes me think that the "complex" method might really be the correct approach. OpenVPN is already in the business of abstracting platform-specific network configuration complexity to a portable interface, i.e. in the manner of pushable directives such as route, ifconfig, dhcp-option, etc., so I think it makes sense to leverage on this. Implementing a DHCP client within OpenVPN tends to make this a more self-contained problem. James