hostname issues

Steve zephod at cfl.rr.com
Tue Feb 3 15:34:28 UTC 2009


---- David Forrest <drf at maplepark.com> wrote: 
> On Tue, 3 Feb 2009, Steve wrote:
> 
> > Hi,
> > I just joined this list to see if I can get some help with an annoying problem.
> >
> > I'm running a Fedora 9 system on an otherwise M$ network. The DHCP server runs on some kind of M$ 2003 server machine. This DHCP server is supposed to dole out both IP addresses and host names. My problem is that sometimes I get a host name and sometimes I don't but I always get an IP address. When I get a host name and when I don't seems fairly random but it is almost every other that I boot I get the other name.
> >
> > My DHCP client is started at boot time and normally looks like this:
> > /sbin/dhclient -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
> >
> > I replaced the -q flag with a -v flag but I still don't see any output in any logs. I've also tried adding '> /var/log/dhclient.log 2>&1' to the line but I just get an empty file.
> >
> > After getting no help on the Fedora list, I downloaded and installed the source dhclient-4.0.0-22.fc9.x86_64 rpm which got installed in /usr/src/redhat/SOURCES/dhcp-4.0.0. There I did a configure followed by a make. configure worked fine but make failed:
> >
> > # make
> > ...
> > make[2]: Entering directory `/usr/src/redhat/SOURCES/dhcp-4.0.0/common'
> > gcc -DHAVE_CONFIG_H -I. -I../includes  -I.. -DLOCALSTATEDIR='"/var"'   -g -O2  -Wall -Werror -fno-strict-aliasing -MT socket.o -MD -MP -MF .deps/socket.Tpo -c -o socket.o socket.c
> > socket.c: In function ‘send_packet6’:
> > socket.c:443: error: invalid application of ‘sizeof’ to incomplete type ‘struct in6_pktinfo’
> > socket.c:480: error: dereferencing pointer to incomplete type
> > socket.c:482: error: dereferencing pointer to incomplete type
> > socket.c:483: error: dereferencing pointer to incomplete type
> > socket.c: In function ‘receive_packet6’:
> > socket.c:542: error: invalid application of ‘sizeof’ to incomplete type ‘struct in6_pktinfo’
> > socket.c:594: error: dereferencing pointer to incomplete type
> > make[2]: *** [socket.o] Error 1
> > make[2]: Leaving directory `/usr/src/redhat/SOURCES/dhcp-4.0.0/common'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/usr/src/redhat/SOURCES/dhcp-4.0.0/common'
> > make: *** [all-recursive] Error 1
> >
> > So, here are my questions:
> > 1 ) Anyone know why I would be getting the host name from the DHCP server about every other time? (Other than the M$ DHCP server is hosed - which leads me to my 2nd question)
> > 2) Why am I seeing no output logging when using the -v flag of dhclient?
> > 3) Why is the make failing?
> >
> > Thanks,
> > Steve
> 
> You can request a specific host name in the config file (which I notice is 
> not being called on your startup command) by creating a config file as 
> /etc/dhclient-eth0.conf containing this line: 
> send host-name "whatever";
> 
> Then it should invoke as:
> 
> /sbin/dhclient -q -cf /etc/dhclient-eth0.conf -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
> 
> see man dhclient.conf

In this case I >>want<< the DHCP server to tell me what host name to use. 

On my home machine I use an entry in /etc/dhclient.conf to have the client tell the DHCP server what the host name should be but that is not the case here.

Thanks,
Steve



More information about the dhcp-users mailing list