The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Networking (http://hintsforums.macworld.com/forumdisplay.php?f=14)
-   -   Mac takes a long time to get internet connection (http://hintsforums.macworld.com/showthread.php?t=71719)

arcturus 02-09-2008 02:34 AM

bump


The above scenario occurs when the Mac is connected directly to the modem.

When there is a router in between the modem and the Mac, the problem is very similar.

The router must be restarted to re-establish a good connection.

This is inconvenient and time-consuming.

Is there a solution?



anyone?

Las_Vegas 02-09-2008 05:55 AM

When the Mac "self-assigns" an IP address, it does so because an active connection is found but polling for a DHCP address failed. The Mac continues to pole until a valid response occurs giving the Mac an IP, Mask and Router address.

If the modem is failing to renew the address to the Mac & the router, then I would suspect the modem itself. Does recycling the modem restore the IP address?

tlarkin 02-09-2008 10:05 AM

there are a couple things that can happen when you have full signal on a network but no IP. If its a managed network, they could be out of IP addresses, so your machine just self assigns.

If you are running WEP, you could have compatibility issues and I have seen macs take forever to connect to a WEP protected network.

arcturus 02-09-2008 04:48 PM

Quote:

Originally Posted by Las_Vegas (Post 449717)
When the Mac "self-assigns" an IP address, it does so because an active connection is found but polling for a DHCP address failed.

Thank you for that info, it explains part of the behavior we have seen but did not fully understand.

Quote:

Originally Posted by Las_Vegas (Post 449717)
The Mac continues to pole until a valid response occurs giving the Mac an IP, Mask and Router address.

We do not see any successful results from this activity, if it occurs. We cannot confirm that it occurs.

It seems that once the Mac settles on a 192 address, it does not proceed to obtain a better address. That is where things get stuck, without hands-on intervention.


Quote:

Originally Posted by Las_Vegas (Post 449717)
If the modem is failing to renew the address to the Mac & the router, then I would suspect the modem itself. Does recycling the modem restore the IP address?

Yes, recycling the modem restores the IP address. We are seeking a solution to avoid the inconvenience and the hands-on requirement of recycling the modem.

arcturus 02-09-2008 04:57 PM

Not a managed network. No WEP, either.

This is just a simple cable internet connection.

Correction

This is just a simple cable internet connection with occasional connection failures which are annoyingly too frequent, and require hands-on intervention which is inconvenient and time-consuming. argh.

cwtnospam 02-09-2008 05:43 PM

Quote:

Originally Posted by Las_Vegas (Post 449717)
If the modem is failing to renew the address to the Mac & the router, then I would suspect the modem itself. Does recycling the modem restore the IP address?

Unless you've got hardware problems with both your Mac and and your router, it's got to be your modem or your cables. As Las_Vegas points out, it's more likely your modem.

arcturus 02-09-2008 06:14 PM

Quote:

Originally Posted by cwtnospam (Post 449848)
Unless you've got hardware problems with both your Mac and and your router, it's got to be your modem or your cables. As Las_Vegas points out, it's more likely your modem.

cwtnospam, thanks for your suggestions, but please read the thread before commenting. I know you are trying to be helpful, but as can be seen previously, you have been completely wrong on numerous times in this thread. I appreciate your helpfulness, but it is frustrating to explain again and again that your understanding of the problem(s) is not correct.

The specific problems and a workaround has been well established here. The workaround is annoying and frustrating, and we are seeking a better solution to the particular problem.


Thank you for your patience and understanding.

I am hopeful that someone with a fresh approach and more knowledge than you or I will help address these items... :)

cwtnospam 02-09-2008 06:21 PM

LOL! I read the entire thread before posting, and I see nothing in it that doesn't lead to the conclusion that you either have a bad modem, or there is a problem with the coaxial cables in your house or between your house and the street. I told you last May that you needed to call the cable company and get a tech out to check your modem and wiring. You still need to call them, and you will not solve this problem until you do.

tlarkin 02-09-2008 06:40 PM

Sometimes with cable it can be a bad filter as well. Last winter I had a filter freeze and crack on me and that was the root of all my connection problems. Cable guy came out and replaced the filter and haven't really had any major issues since.

arcturus 03-03-2008 05:13 PM

bump for another attempt to get this thread back on-topic.

the issue here is solely a Mac-related issue (possibly in combination with semi-brain-dead router and similarly handicapped cable modem)


still looking for a real solution

hayne 03-03-2008 05:26 PM

I'm coming in late here but you seem to have said above that when you have a router in play, you need to restart the router in order to fix things.
That would seem to indicate that the problem is with the router and or the cable modem (their interaction) since the router is either working or not working - it doesn't require a Mac to be connected in order for the router to work.
If, for example, the DHCP server in the router is not working correctly, it has nothing to do with the Mac.

arcturus 03-03-2008 06:01 PM

Quote:

Originally Posted by hayne (Post 455739)
I'm coming in late here but you seem to have said above that when you have a router in play, you need to restart the router in order to fix things.
That would seem to indicate that the problem is with the router and or the cable modem (their interaction) since the router is either working or not working - it doesn't require a Mac to be connected in order for the router to work.
If, for example, the DHCP server in the router is not working correctly, it has nothing to do with the Mac.

Yes, that is all correct.

The problem is in the interaction.

After an intermittent internet outage, the Mac receives a local IP from the cable modem's internal router. (I'm not being too clear here, I apologize. Suffice to say, the cable modem generates a "dead-end" local IP address for itself and the machine it is connected to (computer or router), and the Mac gets stuck on this connection, even after the internet service is restored, the cable modem gets a "live" internet IP address from the ISP's network router.)

Even if the internet service is restored and the cable modem re-establishes its connection to ISP, the Mac does nothing, because it thinks it has a good IP address. Which, technically, it is, although it prevents any internet communications.

The solution to the problem is for the Mac to request another IP address. Manual intervention via System Preferences:Network will do this. Manual attempts to use internet services (mail, browsing) will also work, with varying success.

However, unattended operation (such as automatically checking for mail periodically) will not cause the Mac to request a new IP address, and that is where the problem seems to be, AFAIK.

cwtnospam 03-03-2008 09:36 PM

Quote:

Originally Posted by arcturus (Post 455754)
The solution to the problem is for the Mac to request another IP address.

That would not be a solution. It would be a work-around and a kludge.

The solution is to get the router (or more likely the modem) to properly maintain the connection. As tlarkin pointed out, that might require replacing a filter. It also might require replacing coaxial cable, or stopping signal leaks inside the house. These are all things that your cable guy can fix.

arcturus 03-03-2008 10:15 PM

Quote:

Originally Posted by cwtnospam (Post 455824)
That would not be a solution. It would be a work-around and a kludge.

I don't care what anyone wants to call it, but that is the only solution that I am seeking (as was politely suggested to you previously).

hayne 03-04-2008 12:35 AM

Quote:

Originally Posted by arcturus (Post 455754)
Manual intervention via System Preferences:Network will do this.

Then perhaps the easiest solution would be to write a script that automates what you do manually. Have this script run every so often and all should be well.
It is quite likely that merely turing the Ethernet (or Airport) connection off and on again (on the Mac) will suffice. If that is the case, your script could just invoke 'ifconfig en0 down; ifconfig en0 up' - you could test this by issuing those commands in a Terminal window.
(or en1 for Airport)

Las_Vegas 03-04-2008 12:46 AM

If the Mac gets a 192 address, it's not a self assigned address, but one from a router. Self assigned addresses on Macs are always in the 169.254.xx.xx range.

arcturus 03-04-2008 01:14 AM

Quote:

Originally Posted by hayne (Post 455855)
Then perhaps the easiest solution would be to write a script that automates what you do manually. Have this script run every so often and all should be well.

good suggestion (if only I knew how to make scripts), thanks :)

Quote:

Originally Posted by hayne (Post 455855)
turing the Ethernet (or Airport) connection off and on again

thx for terminal cmds

but wouldn't that interrupt internet service?

i think what I would like is for the Mac to periodically request DHCP (or renewal) at a shorter interval than the lease normally provided by each of the router/cable modem/isp.

clicking on System Preferences:Network:Renew DHCP seems to work well:

#1 it does not seem to interrupt an existing "good" DHCP lease, and

#2 it does seem to activate a "good" DHCP lease to replace a "bad" local-only/no-internet-service lease, which is exactly what we want to happen.

I don't know if this is scriptable?

Some kind of setting or ability for the Mac to do this automatically is what I was looking for, from the beginning of this thread. Reluctantly, I can understand why it might not be default behavior, or even in accord with standard networking protocols. But, for this instance, it would be very desirable behavior. Is there a possible configuration to accomplish this, without resorting to scripting- some Mac-based DHCP auto-renewal setting, perhaps? (Even though i understand that is normally controlled by router.)

hayne 03-04-2008 01:22 AM

I don't know of any way to get this without scripting (or of course, finding some 3rd-party utility that does the scripting for you).

cwtnospam 03-04-2008 12:35 PM

Here's a kludge that you could set up launchd to call periodically:

Code:

#!/bin/bash
png=`ping -c 1 www.cnn.com | grep '100% packet loss'`
if [ "$png" != "" ]; then
ifconfig en0 down
sleep 1
ifconfig en0 up
fi

If you ping cnn.com, it will always fail, so it will always reset the connection. You'd want to ping a site that will respond if you have a connection, but I don't want to single one out. ;)

arcturus 03-04-2008 10:04 PM

Is there a cmd for DHCP request?

Then could just cron the request periodically, which would be same as scripting "Renew DHCP" button.



The ping condition test helps avoid unwanted disconnect. good idea, cwtnospam.


The problem still remains with the lag time before resuming internet connectivity.



Is there another way to approach this, by identifying a failure somehow?

For example, the error page Safari generates when trying to load a page after there is no internet connection. I don't know if something is written to a logfile, or some internal message(s) might be observable without much overhead somehow?

or when Mail or Chat or whatever lose internet connectivity, where a continuous connection is used and expected...



I guess a completely opposite approach might be to force the Mac to retain the old good settings, even after loss of connectivity, to prevent getting stuck on the bad local ip address... yes, that would be even kludgier, but might even work better here...

(I think I tried manually setting the IP address to match the one issued by DHCP when there is a good connection... but that particular approach did not work, unfortunately. So a different variation is needed, if this direction is to succeed...)


It still seems strange to me that the Mac will not try harder to get an internet connection, when all the apps are trying to use one and the Mac is aware it is missing an internet connection...




???


All times are GMT -5. The time now is 08:57 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.