How to troubleshoot DHCP problems?

3

2

This question was originally titled "How to gather information about suspicious wireless access point?" but then this topic has been moved to another question, leaving here discussion of connection problem.

I cannot connect via my network socket - DHCP gives me wrong settings. My guess is that someone in the LAN took my IP address. This is exactly what happened about half-year ago. ISP told that it was their problem, but it took about a week for them to come and fix it. The situation is pretty the same - my socket is not working, but ohter guys seem to be fine. Let me explain the setup and the symptoms:

  1. Our ISP is the main provider in the area where we live. They installed hardware in the buildings and other providers will use it if we want to switch to them. Moreover, by contract with the landlord we have pay to both the main ISP, and to whatever ISP we want to switch to.

  2. Everyone has one socket per apartment and one IP address provided via DHCP. I have lived in several apartments in the area, and there is always an issue with assigning IP - it takes several days before a new device is given the correct settings via DHCP. Everyone experiences this and I have tried to tell this to ISP - no reaction.

  3. Since we have more than one device to connect to internet, I had to buy a wireless AP and I have chosen a cheep DWL-G700AP of not very high quality as you can see from this wizard emulator. It is not a router, so it assigns an IP in the LAN using ISP's DHCP.

  4. I live in a student area and I believe quite many guys use such cheep AP w/o routing. Since the ISP's settings are quite old, I suspect that the mask of 255.255.255.192 doesn't correspond to the reality when almost every household has about 5 devices requiring own IP address.

  5. Sometimes I loose internet connection via my AP. It can be several times per day, or once per week. The solution I came up to is to turn off/on my D-Link.

  6. This suspicious AP, which I am using now instead of my AP, has also 54Mbps but it works few times faster. I am impressed.

  7. And yes, no surprise, that we loose the connection right when we need it so mad - just before course examinations or project deadlines.

Jack

Posted 2010-09-03T21:37:00.953

Reputation: 63

6Rather than using a suspicious WiFi AP which isn't yours, why not try to troubleshoot why it is your network jack isn't working? What is your network environment - is this a corporate office, a home network, or what? Who manages the DHCP server? Have you tried contacting them? – nhinkle – 2010-09-03T22:16:20.170

+1 @nhinkle - we can help with the lan issue perhaps. – JNK – 2010-09-04T00:10:34.217

1Given how this evolved: what about renaming this question to "How to troubleshoot DHCP problems?", and create a new question for "How to gather information about suspicious wireless access point?" with something like There is a number of wireless access points in my building, and one of them is connectable with no password and encryption, called "default". This looks very suspicious too me, so I would like to know as much as I can about this AP. Like: 1. How can I find out the IP address of the wireless AP I am connected to? 2. Is there a way to see who else is connected to the same AP? – Arjan – 2010-09-04T12:34:28.913

@Arjan, good point! I will try to do this, but I have a screaming baby in my hands so it goes slow :) – Jack – 2010-09-04T13:53:45.120

Answers

2

As for the IP address: things like whatismyip.com might help.

You're using the ISP's DHCP, so you're getting multiple addresses from the ISP, which I doubt will be fixed then. Hence, what if your computer or AP is actually dropping the connection, or trying to use it after the "lease" has expired? Then "your" IP address can indeed be handed to someone else, and if the number of available addresses is limited then there's nothing new to connect to. So, do you still get a new IP address when this happens? Are you sure you did not manually set IP addresses somewhere?

And what if you plugin one device into the LAN socket -- does the connection still drop if you wait a long time?

You're saying:

It is not a router, so it assigns an IP in the LAN using ISP's DHCP.

Those are two different things. I doubt it's not a router. And page 15 of the AP's manual shows it can surely act as a DHCP server as well, hence creating your own private network which is surely to be preferred anyhow. What if you try that? (Be sure to set LAN to dynamic, to make your IP get one IP address from the provider.)

Finally: anything interesting in the AP's log?

Arjan

Posted 2010-09-03T21:37:00.953

Reputation: 29 084

Yes, my IP (.70) is static. But I am curious about IP of the AP ("default"), which I still don't know. Yes, I use automatic IP from DHCP, not manual. Even if I connect by cable (i.e. directly w/o AP) to my socket, then DHCP fails, and OSX sets completely different settings. I have failed to make a private network with the D-Link AP, so I was using ISP's DHCP and yes, it was dynamic. And BTW, I cannot see the log, because since a while ago I cannot connect to the AP even by cable - something went very wrong and I cannot reset it anymore. I guess I need a new AP, huh? :) – Jack – 2010-09-04T09:18:23.993

2I think your IP should not be static: you yourself have connected multiple devices, hence are using multiple IP addresses. Does your ISP reserve static IP addresses for all devices folks ever plugin? But even if it is static, then the DHCP will take care of that. Hence, again, are you sure you did not manually set IP addresses somewhere? Maybe even within your AP, but if the AP cannot even be put back to the factory settings using that reset switch, then it's probably time for a new one indeed. Can you ping "your" IP address from another computer when your Mac is switched off? – Arjan – 2010-09-04T09:27:04.637

At the moment our D-Link is off and we use "default" to connect. Even if me and my wife are both connected, we cannot ping each other. If we go to whatsmyip.com we see IP as in netstat -rn results, i.e. .70 for me and .88 for her. We use automatic DHCP to get IP, no manual at all. – Jack – 2010-09-04T09:38:15.853

@Jack, no more ideas here :-( Do the problems only affect your computer, or you wife's as well? Just to be sure: when saying "something went very wrong and I cannot reset it anymore" then you're referring to the little reset switch on the AP, right? (By the way: the default SID for your AP is "default" too. Hence, that name by itself is not too suspicious and chances are low that this specific open AP and your problems are related.) – Arjan – 2010-09-04T10:14:07.167

@Arjan, thank you for trying to help us so hard! Plugging directly to the socket, DHCP fails for my Mac, for her HP+Win7, and for D-Link. Yes, I mean the little reset switch on the D-Link. Getting IP of the suspicious AP was my original question, but then folks asked me to dig into the problem with connection via the socket, so now there are two questions mixed. Sorry for the mess. A few minutes ago, we had a problem to connect also via "default" due to the same DHCP failure, so I have to write this comment twice. – Jack – 2010-09-04T10:58:48.297

1

@Jack, so both computers fail simultaneously? If not, then it might be interesting to see if you can somehow "ping" your IP address using your wife's computer after your Mac has been kicked of the network. I know you already tried a normal "ping" without success, so maybe we can prepare for the next failure by figuring out why. Or a way to get the MAC address given an IP address, and see if that changes.

– Arjan – 2010-09-04T12:05:29.420

2And as for DHCP failing: I know of ISPs who only allow one device, hence require earlier DHCP leases to expire before another device can get a new lease. (In such cases, using ones own DHCP server prevents a lot of issues.) This is clearly not the case with your ISP, but I could imagine that something gets messed up when connecting some device through some ethernet socket (through the "default" AP), and then suddenly using the same device on some other socket (in your own house, with or without your own AP). But: just guessing, really. – Arjan – 2010-09-04T12:09:23.730

Ah, @Jack, as for my last comment: could it be possible that you're out of wireless reach of your own AP, after which your Mac silently switches to that "default" AP, which then confuses your ISP's DHCP/router? In other words: do you manually switch wireless networks, or might switching occur without you noticing it? – Arjan – 2010-09-04T12:11:32.290

(And as for the original question: that certainly is interesting! Once you fixed the LAN issues, we might simply clean up a lot and get back to that question -- which is really more suitable for Q&A sites like this; your LAN issues might actually becoming "too localized" for Super User...) – Arjan – 2010-09-04T12:13:54.483

@Arjan, Yes, I do manually switch them. Last two days I connect only via "default", and my AP is not even found when it is turned on - probably because ISP's DHCP gives wrong settings to my AP. We will try to contact the ISP again and ask to finally fix this inconvenience. – Jack – 2010-09-04T12:19:35.577

@Jack, and you're holding down that hardware reset button for at least 5 seconds, right? (See page 39 in the manual.)

– Arjan – 2010-09-04T12:19:59.867

1@Jack, if the AP is not running as a DHCP server itself, then it might not need any IP address itself either. So, it should operate even without any ISP, right? And to wirelessly find it, it shouldn't even be required to connect its ethernet cable into the socket, right? So, to summarize, maybe: 1) your AP is faulty, and 2) your ISP's router/DHCP does not like you connecting some device to different sockets in a short period of time (and hence all testing is very difficult and giving us false clues)? (Again: just guessing!) – Arjan – 2010-09-04T12:24:22.477

@Arjan, we called ISP and this time it didn't take a week to fix - just 20 sec. I should have called before. They told us that they allow no more than 4 devices (MAC addresses) per socket and we exceeded the limit. That is still strange why all devices stopped to connect, but the operator cleared the list for our socket, and now we can connect by cable. I obviously need to buy a better wireless router to create our own network. May be you can advice me a good one? – Jack – 2010-09-04T16:38:03.497

@Jack, like I noted before, your current AP does support being a DHCP server by itself. If I understand correctly, then when doing that, your ISP will only see the MAC address of the AP. (That is: if you can somehow configure that AP, or somehow reset it...) – Arjan – 2010-09-04T18:56:49.850

2

Never ever ever ever ever use a wireless AP you don't know and/or explicitly trust. There are indeed some that are set up to lure unsuspecting people to join the network.

Personally I think there is no way to trust it, no matter what utilities you use. There is no program that will tell you the intent of other users on the network.

You are better off focusing your energy on the LAN issue and getting that resolved.

JNK

Posted 2010-09-03T21:37:00.953

Reputation: 7 642

0

I'd recommend Wireshark if you have the time to learn. Else, you can shell out about $50 and get some VPN access so you don't have to worry at all about tampering and sniffing.

digitxp

Posted 2010-09-03T21:37:00.953

Reputation: 13 502