Diagnosis and possible workarounds
This post does not solve everyone's problems within this thread as there would seem to be at least 3 problems described. This post stays on topic and addresses only markogier's specific problem.
For possible solutions see list at bottom of this post.
I have had some 20 years experience as an I.T. professional so these facts are not opinion. Just facts.
The problem is due to the DHCP timeout in AirPort. Basically it doesn't wait long enough to receive an IP address so instead it does the most useless thing it can: make one up and pretend all is well.
I have experienced this problem now in two separate instances on two separate unrelated networks with entirely different configurations. In each case the industry leading technologies work fine, but the Macs don't.
The problem is seemingly due to network traffic at the DHCP server end (or some busy point in between the MAC and DHCP server more precisely). The DHCP server is unable to response within a timeout (which seems to be around 2-3 seconds) and thus the MAC assigns itself an IP address. The problem is predictably reproduceable.
Getting mad at Apple is pointless. The OP is attempting to set up a non-standard network, using a router in a role it wasn't designed to perform. Please stop wasting Apple's time. Not only did they not sell him this setup or promise him that it would work, nobody would sell him a router and guarantee it could be used like this. It's not Apple's fault he's having trouble with this and it's not their responsibility to fix the problem.
This is a typical example of useless, uneducated nonsense. There are clues contained within one of markogier's previous posts which clearly show that hardware (ie. the 'router' or 'AP') is NOT AT FAULT. Observe;
Just to be clear
1. This works fine if I connect an ethrnet cable to the MacBook
2. The DHCP over the wireless works fine on my Acer PC laptop running XP and other people using Sony or Dell PC paltops and XP are fine too.*
3. The MacBook connects wirelessly to my (D-Link) router at home perfectly and I get the IP address no problem. (At home I am using 192.168.2.x addressing)
[*emphasis added]
After reading point 2 above, the obvious question would be; If the 'router' is being used in a way in which it wasn't designed - why then would the Acers, Sonys or Dells of this world have no trouble accessing it? This point alone negates jtown's entire post. Suggesting the purchase of additional hardware for no good reason is just odd.
The actual problem being experienced would seem to be as described by possibly the only logical person in this particular forum, 'rdepom' who correctly describes an observed, real-world, recreatable problem. I'll reiterate his words for clarity (the entire post is well worth a read);
I am pretty sure that the problem is OS X's DHCP timeout. Basically it requests an IP address and if the server/router is too slow to respond it gives up and assigns itself one. The issue is that it's giving up too fast.
Interestingly this was rdepom's single and only contribution to this forum. He probably left because nobody else was on his level.
Funnily enough I came to find this thread/forum due to the google search "mac airport dhcp timeout" as I'd already come to this as the correct diagnosis. If one wishes to continue using MacOS is would appear your only solutions would be points 1 or 2 below. Unless of course you decide to create a different subnet on your network or start buying more hardware just to connect your Mac which of course is silly for so many reasons I shall not even start to list them.
The wireless connectivity problems are compounded with the inconsistent nature of the AirPort configuration panel itself. It has three bugs that I have found which involve not saving settings or retrieving settings which I've tried to delete. You may therefore find your problems are in both pots.
To solve the problem here, I simply waited until my colleague had finished copying files over the network. Once he had finished, I turned the airport off and then on. Problem solved for me. Although in the real world, one cannot rely upon this - in a corporate/work LAN for example there's always network traffic and you may not have sufficient authority to do anything about the topology of the network. If however I was in a high enough position of authority in the company I'd do one of two things (and have done):
1. Remove the Apple computers
2. Create a separate network not using DHCP and assign each machine manually (good solution actually).
I wish you all the best of luck with your continued support of Apple.
Problem: A bug in MacOSX/Airport
Solutions:
1. Use a network cable, not wireless
2. Locate where the DHCP timeout is specified (perhaps in a config file) and change it.
3. Wait until no network traffic exists and then connect.
4. Sometimes it's possible to specify your own DHCP + manual address but in practice it is not a solution but a workaround.
5. Use Windows or Linux.