Saturday, September 6, 2008

DHCP problems with Win2k8

Last weekend I brought home the Portable Server of Powah! home to do some work over the weekend and when I fired things up I wasn't getting an IP addressed assigned by the DHCP server on my FreeBSD box that is the gateway to the intarweb here at the house.

I thought that very odd and when I checked /var/log/dhcpd.log it appeared that a request was going out for an IP address and being sent back but was never accepted by Win2k8. How odd...

Here is what I saw in the logs:

8<---------------------------------
Sep 6 14:42:09 firewall dhcpd: DHCPDISCOVER from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:10 firewall dhcpd: DHCPOFFER on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:13 firewall dhcpd: DHCPDISCOVER from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:13 firewall dhcpd: DHCPOFFER on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:22 firewall dhcpd: DHCPDISCOVER from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:22 firewall dhcpd: DHCPOFFER on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:39 firewall dhcpd: DHCPDISCOVER from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:42:39 firewall dhcpd: DHCPOFFER on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
--------------------------------->8

There should have been an DHCPACK after the first two messages. Now this really confused me as I have had the Portable Server of Powah! home many times and had never had any problems getting an IP address before.

But, through playing around I found out that the wireless interface could get an IP address lickitysplit and being the slacker that I am, I kept on trucking with the wifi so that I could get my work done over the holiday.

I once again brought home the Portable Server of Powah! and once again, no IP address. This made me very sad as I wanted to have a wired connection to use the Gigabit goodness, that and it was just odd that I couldn't get an IP address.

I bowed down before the Great Google and queried it's great knowledge and came across this KB. Here is the problem in a nutshell: "Windows Vista cannot obtain an IP address from certain routers or from certain non-Microsoft DHCP servers"

If you follow the directions of the KB the problem can be fixed but they leave out a very important part of the puzzle. Basically, you drill down into the registry to where the various TCP/IP settings are stored and you have to find the GUID of the interface. Since you don't have "friendly" interface names like xl0, xl1 (FreeBSD interface drivers for 3Com NICs) or even friendlier Linux names like eth0, eth1, etc this becomes quite a chore.

Here is what I was looking at:



At this point I'm doing a Kelly-esque "What the hell?" Which one of these GUIDs represents my physical NIC and which one represents my virtual NIC that Hyper-V uses? Do I modify the entry for the physical NIC or the Hyper-V NIC? Confusion abounds!

I manually assigned an IP address and found the GUID entry that represented the Hyper-V virtual NIC and made the changes in the Registry that the above mentioned KB required.

I closed regedit, attempted to do a ipconfig /release && ipconfig /renew and watched the /var/log/dhcpd.log as Win2K8 tried to get an IP address with no love. Then I remembered, this is Windows...

I reboot the machine and sure enough, as it is firing up I see this entry come across /var/log/dhcpd.log:

8<-------------------------------
Sep 6 14:44:48 firewall dhcpd: DHCPDISCOVER from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:44:49 firewall dhcpd: DHCPOFFER on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:44:49 firewall dhcpd: DHCPREQUEST for 10.0.0.204 (10.0.0.1) from 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
Sep 6 14:44:49 firewall dhcpd: DHCPACK on 10.0.0.204 to 10:80:f4:6f:0c:23 (auswipelaptop) via xl0
------------------------------->8

Hazzah! It works!

Apparently during an update something got tweaked and I could no longer pull an IP address from the FreeBSD dhcpd and had to apply this KB hack to get things to work. Or it could have been when I found how to get the Client for Microsoft Networks working with Hyper-V again. No matter, something got tweaked and now it is fixed which is good 'nuff for me. I'm easy like that.

No comments: