Kim Attree
2007-Jun-07 08:10 UTC
Server setup as a Diskless Server on reboot sends DHCP Discover packets out
Hey Guys, I have a strange one: I've setup a machine as a diskless server, using PXEBoot with ihc-dhcpd to offer dhcp and dhcp configuration information. I did a test reboot on the server, and found to my dismay that the server NIC's are sending out dhcp discover packets and trying to get an address. The NIC's IP info is captured correctly in /etc/rc.conf: <snip> ifconfig_bge0="inet 196.30.157.162 media 100baseTX mediaopt full-duplex netmask 255.255.255.192" ifconfig_bge1="inet 196.31.157.162 media 100baseTX mediaopt full-duplex netmask 255.255.255.0" <snip> and the /etc/dhclient.conf file is empty. I thought maybe it was the /conf directory used in the diskless Root structure creation, so I renamed it out of the way, but that made no difference. I can't seem to find where the definition is that makes the NIC's ask for DHCP info. Shortened output of /var/run/dmesg.boot pertaining to the DHCP Discover packets: <snip> Sending DHCP Discover packet from interface bge0 (00:0b:db:e6:a9:33) Sending DHCP Discover packet from interface bge1 (00:0b:db:e6:a9:35) DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 Received DHCP Offer packet on bge0 from 196.30.157.161 (accepted) (no root path) Sending DHCP Request packet from interface bge0 (00:0b:db:e6:a9:33) DHCP/BOOTP timeout for server 255.255.255.255 Received DHCP Ack packet on bge0 from 196.30.157.161 (accepted) (got root path) DHCP timeout for interface bge1 bge0 at 196.30.157.149 server 196.30.157.161 server name diskless.csc.jnb6.za.uu.net boot file pxeboot subnet mask 255.255.255.192 router 196.30.157.129 rootfs 196.30.157.161:/diskless_root Adjusted interface bge0 Shutdown interface bge1 Trying to mount root from ufs:/dev/aacd0s1a <snip> 9 times out of ten the DHCP will just sit and timeout (it gets a DHCP return from my other diskless server running DHCPD) and then the 1 time out of 10 will mount the hard drive / partition. Thanks Kim Attree
Oliver Fromme
2007-Jun-08 10:22 UTC
Server setup as a Diskless Server on reboot sends DHCP Discover packets out
Kim Attree wrote: > I've setup a machine as a diskless server, using PXEBoot with ihc-dhcpd > to offer dhcp and dhcp configuration information. I did a test reboot on > the server, and found to my dismay that the server NIC's are sending out > dhcp discover packets and trying to get an address. > > The NIC's IP info is captured correctly in /etc/rc.conf: > [...] > and the /etc/dhclient.conf file is empty. I thought maybe it was the > /conf directory used in the diskless Root structure creation, so I > renamed it out of the way, but that made no difference. > > I can't seem to find where the definition is that makes the NIC's ask > for DHCP info. > > Shortened output of /var/run/dmesg.boot pertaining to the DHCP Discover > packets: > > <snip> > Sending DHCP Discover packet from interface bge0 (00:0b:db:e6:a9:33) > Sending DHCP Discover packet from interface bge1 (00:0b:db:e6:a9:35) That's the kernel itself trying to perform BOOTP/DHCP. It does that before mounting the root file system (which might be mounted via NFS anyway, requiring an IP address to be obtained via BOOTP or DHCP). If you don't want that, then remove "options BOOTP" from your kernel config file and rebuild your kernel. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "To this day, many C programmers believe that 'strong typing' just means pounding extra hard on the keyboard." -- Peter van der Linden