ISC DHCP on a Solaris 10 Container

Gordon A. Lang glang at goalex.com
Fri Mar 24 07:34:51 UTC 2006


I got the dhcpd to run in a Solaris zone by doing the following things:

comment out the #define for ALIAS_NAMES_PERMUTED in includes/cf/sunos5-5.h
uncommented the #define for USE_SOCKETS in includes/site.h
configure;make;make install
add a net interface to the target zone lo0:1 with address of 
10.252.252.11/32
add the following lines to dhcpd.conf:
    server-identifier 10.252.252.11;
    local-address 10.252.252.11;
    subnet 10.252.252.11 netmask 255.255.255.255 {}
modify start script to include the interface name:
    dhcpd -q -cf dhcpd.conf -lf dhcpd.leases lo0:1


I have yet to actually see if it functions properly, but at least it appears 
to work!

--
Gordon A. Lang


----- Original Message ----- 
From: "Mike Diggins" <diggins at McMaster.CA>
To: <dhcp-users at isc.org>
Sent: Thursday, March 16, 2006 2:59 PM
Subject: Re: ISC DHCP on a Solaris 10 Container


>
> On Wed, 15 Mar 2006, Bruce Hudson wrote:
>
>>
>>    The problem, to the extent that this is a DHCP problem, seems to be
>> in "common/discover.c"; which discovers the network interfaces on the
>> system. The critical code is:
>>
>> #ifdef ALIAS_NAMES_PERMUTED
>>                if ((s = strrchr (ifp -> ifr_name, ':'))) {
>>                        *s = 0;
>>                }
>> #endif
>>
>> This throws away the ":1" from the interface name. ALIAS_NAMES_PERMUTED 
>> is
>> defined for Solaris. I am not sure what will happen if you simply turn it
>> off but it may be worth a try.
>>
>>    Failing that, replacing the "*s = 0;" with "continue;" will skip the
>> aliased interfaces instead of shortening the name. This will fix the 
>> "lo0"
>> problem but will probably not fix your problem is your "real" interface 
>> is
>> also an alias.
>> --
>
> Thanks for the replies. I took your advice and tried commenting out this
> section but dhcpd exits with:
>
>  diggins at netreg1<dhcp/bin># ./dhcpd -lf /usr/local/dhcp/etc/dhcpd.leases
>  -cf /usr/local/dhcp/etc/dhcpd.conf
>  Internet Systems Consortium DHCP Server V3.0.3
>  Copyright 2004-2005 Internet Systems Consortium.
>  All rights reserved.
>  For info, please visit http://www.isc.org/sw/dhcp/
>  Wrote 0 leases to leases file.
>  Can't open DLPI device for bge0:1: No such file or directory
>
> I also changed the '*s = 0' to 'continue;'. I no longer get that error but
> dhcpd exits with:
>
>
>  Internet Systems Consortium DHCP Server V3.0.3
>  Copyright 2004-2005 Internet Systems Consortium.
>  All rights reserved.
>  For info, please visit http://www.isc.org/sw/dhcp/
>  Wrote 0 leases to leases file.
>
>  Not configured to listen on any interfaces!
>
>
> Oh well, I think this is a issue with Sun Containers. Not quite as
> versatile as I first hoped. Thanks for the help anyway.
>
> -Mike
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 



More information about the dhcp-users mailing list