Mac not receiving IP address through DHCP properly

Here's the problem: I have a wireless ActionTec router connected to my fiber-optic line, an AirPort Extreme base station physically plugged into the router, and an AirPort Express using WDS to extend the AirPort network. Normally I connect all of my home machines to the AirPort network and don't use the wireless capabilities of the ActionTec, but recently I have had to have some of my machines directly (wirelessly) connected to the ActionTec from time to time in order to more easily do some firewall modifications and enable some services. The problem is that when I try to wirelessly connect one of my machines to the ActionTec, the machine joins the new network properly but then has a self-assigned (169.) IP address. if I log out and log back in I can sometimes force the Mac to obtain a new IP address from the ActionTec via DHCP, but sometimes that doesn't even work. Turning off the AirPort card on the machine and then turning it back on doesn't reliably do the trick either. Indeed, sometimes I have only been able to properly join the ActionTec network by logging in as another user, joining, logging out, and then logging into my own proper account!

So: is there some way to force the Mac and/or the ActionTec router to properly connect? Is my Mac somehow retaining the address it had received via DHCP from the AirPort Extreme, and not properly joining the ActionTec-generated network?

MacBook Pro Mac OS X (10.4.9)

Posted on May 2, 2007 9:16 AM

Reply
10 replies

May 2, 2007 9:46 AM in response to Patrick Thaddeus Jackson

HI Patrick,

I think your problem is that you have multiple DHCP servers on your subnet. I think you need to turn off DHCP on the AEBS, then it should work. At least that's how I've always read the rfc. It's here at http://www.ietf.org/rfc/rfc2131.txt

One thing to do is to run Terminal and enter

$sudo tcpdump -X -s0 -ien1 'port 67 or 68'

and renew your DHCP lease. Actually, you can skip the -X and -s0 and just use -q and count the packets. 0 packets mean you have a problem with your Mac. 1 packet means you have a problem with one or more servers. Two packets and...well, you should be fine.

AFAIK this is how it's supposed to work. If a DHCP server senses another on the same subnet it's not supposed to respond.

May 2, 2007 10:14 AM in response to philsmith_

Phil:

When I renew the DHCP lease on a machine connected to the AEBS, I get two packets. Similarly on a machine wirelessly connected to the ActionTec.

The AEBS is not using DHCP to connect to the router; it's using PPPoE, and then sharing out 10. addresses to the other machines in the house via DHCP.

I'm just not sure why when I have a machine that is getting a 10. address from the AEBS via DHCP and then I switch networks from the AirPort menu to the ActionTec network, I don't get an address from the ActionTec via DHCP. I have another machine presently connected wirelessly to the ActionTec, address obtained through DHCP, and it doesn't seem to be having any problems -- so clearly the ActionTec router has no problem distributing addresses, despite the AEBS. Is there some way to purge the prior address obtained through DHCP from my Mac? Shutting off the AirPort card and then turning it back on does not seem to reliably do the trick.

May 2, 2007 10:45 AM in response to Patrick Thaddeus Jackson

Hi Patrick,

If you're getting two packets, it means that the actiontec (I assume..check the IP address of the src in the 2nd packet) got the DHCPDISCOVER or DHCPREQUEST packet, and responded with a DCHPREPLY. The next step is to make sure the ciaddr field was filled in. That's byte 13 of the second packet. If there's no valid address in there, the next step is to find out why.

DHCP requests are sent from IP address 0.0.0.0 and sent to broadcasthost (255.255.255.255). Since we've determined one host has responded (not the situation I was thinking) it's a matter of determining if the response was invalid (there are reasons, like no arp) or if the client threw the response away.

May 2, 2007 1:15 PM in response to philsmith_

Phil:

You're losing me a bit here…from the tcpdump I can see that both the AEBS and the ActionTec are replying to requests from 0.0.0.0 with something. I don't know how to "make sure the ciaddr field is filled in," though.

Maybe I'm not explaining the situation properly. I do not
(as far as I know) have two DHCP hosts operating on the same network; I have a ActionTec router connected to the outside fiber line which is wirelessly generating a network of 192. addresses (via DHCP) while also enabling my AEBS, which is physically plugged into that ActionTec router, to connect to the wider 'Net and then distribute 10. addresses (via DHCP) to the various machines in the house. But these are two separate wireless networks, aren't they? I can be connected to the AEBS or to the ActionTec wirelessly, but to not both at the same time. There was no problem until I found it necessary to enable some services via port remapping, which proved easier to do by wirelessly connecting one of my machines to the ActionTec. It connected fine. The problem is when I want to take one of my other machines and put it on the ActionTec network so that I can transfer files between the two machines -- my MacBook does not seem to easily receive an address from the ActionTec, although it gets one from the AEBS without a hitch.

Am I just completely misunderstanding the issue here? Is this in practice one wireless network, or two? The ActionTec distributes 192. addresses and the AEBS distributes 10. addresses, so it looks like two networks to me. But I could easily be wrong.

May 2, 2007 1:53 PM in response to Patrick Thaddeus Jackson

No, I think you're right, there are two wireless networks. It also sounds as if the actiontec is responding to DHCP requests from the MacBook and the MacBook is not responding. In the response from the actiontec there is a field which contains the new address. I should be in byte 13 of the response, and should look something like "0ca80002" (192.168.0.2). If it's not there, there are legitimate reasons the actiontec might not be handing out addresses.

May 6, 2007 9:23 PM in response to Patrick Thaddeus Jackson

I think I may have solved my problem by changing the router's encryption scheme to 128-bit WEP (it doesn't support WPA, unfortunately). It had been set on 40-bit WEP, which seemed to be giving my Mac trouble. Switching to 128-bit seems to have allowed the connection to work properly.

I don't understand why, but it seems to be working all right for the moment…

May 7, 2007 8:38 AM in response to philsmith_

I did a little poking around online and discovered people reporting a similar problem with various wireless routers, especially since the last AirPort driver update. Apparently there's something screwy with the communication between an AirPort card and a wireless router when the router is using 40-bit WEP. The fact that I didn't have a choice for 40-bit from the drop-down menu when trying to connect in the first place -- I had a generic "WEP password", and then 128-bit hex and ASCII options -- was my first clue that something might be off. Changing the router so that it expected 128-bit WEP seems to have enabled the machines to connect properly.

I guess this "answers" my question, in the same way that a shaman gets their question answered by looking at goat entrails: sometimes it works, but no one can really explain how or why 😉

MacBook Pro Mac OS X (10.4.9)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac not receiving IP address through DHCP properly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.