Internet connection lost after sleep - Ethernet

I have just started using a new router (a Linksys). My problem is that after the iMac comes out of sleep I cannot get an internet connection using ethernet. It is not the router, a PC connected at the same time does not lose its connection and the internet light on the router stays lit.

When I lose the connection I cannot access the router's web page @ 192.168.1.1. The admin login box appears but with a name that relates to a previous router I used. I assume that this is part of the problem.

Any ideas?

iMac, Mac OS X (10.6.2)

Posted on Dec 8, 2009 9:01 AM

Reply
390 replies

Jan 25, 2012 11:50 AM in response to inhalewaste

I continue to have frequent loss of ethernet connection after wake from sleep. Unfortunately, mine will not come back by turning on WiFi. FWIW, WiFi connects first time, everytime. Sometimes turning on WiFi, turning it back off, then sleeping the computer, then awakening it again will re-establish ethernet connection. Not always, though. I fairly frequently have to either sleep/awaken the computer two or three times, or physically unplug and replug my ethernet cable, which will then connect. VERY ANNOYING.I fear my ethernet connector is going to break soon from all the plugging and unplugging, which will be another pain in the backside to deal with.


Here's a list of all the things I've tried with no long term improvement, not including some things mentioned in this forum that I've forgotten about (I've been dealing with this for so long):


I've plugged the cable directly into my machine, bypassing the router.

I've purchased a new cable modem.

I've moved my Airport express further away from my iMac.

I've completely rearranged all my cables, electrical cords, etc.

I've unplugged all peripherals.

I've updgraded to all the latest software.

I've deleted or disabled any superfluous software.

I've doubled my memory from 4G to 8G.

I've changed Network preferences.


I'm now considering shaking or kicking the machine. I often use Caffeine to keep my Mac awake, because I know I'll likely lose my internet connection if it goes to sleep. I never thought I'd say this, but this loss of ethernet connection along with a wonky Finder is about to make me look at Windows 8, and I've been a Mac guy for many years.


CC

Jan 25, 2012 12:50 PM in response to inhalewaste

To inhalewaste: It can't be Lion, since I still have Snow Leopard and have the same or a similar problem.


I think the problem is in iTunes, not the OS, since it started for me after an iTunes upgrade. Moreover, as I've said before, I can get internet radio with iTunes after waking, but then when I bring up Safari, it still thinks it has no internet connection, even though the connection is obviously there.


To Cuochboy, who seems well into this, why not just set the iMac (or whatever you have) never to go to sleep. You can have the screen darken(the display can sleep) without losing the internet connection. I know knowledgeable people who never turn off their computes or put them to sleep since they think the surges on startuup or awakening are harmful.


Is the reference to Caffeine a joke?


SS

Jan 25, 2012 2:05 PM in response to stevenfromvancouver

to stevenfromvancouver,

I know there are pro's and con's to sleeping and not sleeping your computer. I've been in the camp to sleep mine, since I may not come back to my computer for several hours, such as overnight or while gone to work. That would certainly be an option, but it really shouldn't be required, don't you think?


Caffeine is a little cool free application that rests in your title bar and you click it to keep your computer from going to sleep. Obviously not necessary if you have your computer set to never sleep. You can download it from the App Store now.


How's things in Vancouver? Never been to Canada, but hope to visit someday.


CC


PS: I just looked back and my first post regarding loss of ethernet was in October 2010. That's a looooong time to deal with this.

Jan 25, 2012 11:37 PM in response to Couchcowboy

I do put my iMac to sleep at night and then put up with the inconvenience of reconnecting in the morning (or whenever).


It might be more convenient just to shut down each night. I don't know enough to have an informed opinion myself, but the smartest computer guy I know says he never turns his off. I think the initial surge in the booting process is hard on the parts. Maybe we'll get some other views of thiw--with explanations.


Indeed the problem has been going on for me for a long time too. The odd thing is that it changes subtly from time to time. For a long while the reconnection came quite easily, but for the last 10 days it has required several more steps and been less certain. It's perhaps interesting that I'm in Canada, while most of the rest of you are in the US, I suppose. It isn't some peculiarity in the lines of one telephone company.


Vancouver is a lovely city to visit, depending on what your interests are of course. Summer is especially good, since the weather is usually mild and dry.

Jan 26, 2012 3:57 PM in response to stevenfromvancouver

This thread has wandered around quite a lot and it seems to me that it might be helpful to collect some helpful things together.



Firstly, I think we can set aside "hardware failure". There may be some instances with a flakey cable, or a temperature-sensitive component, but that isn't the case with most (all?) of the posts here. The problem clears up and is the connection is solid until a future sleep cycle so hardware failure doen't fit the symptoms.



So let's take a step back and look at what we do have. A Mac of some sort connected by Ethernet to a switch (possibly), then to a router/gateway (probably), next to a modem of some sort and finally the broadband provider's in-station server.



Switch:- not much here. Just a box with no controls or configuration. It might fail but that probably wouldn't be correlated with the Mac's sleep cycle. So this is not a likely cause



Router/gateway: - lots of possibilities and variations here. The typical setup is for it to have a single IPv4 address from the ISP and serve a private network such as 192.168.xxx.xxx for your local devices. It typically provides DHCP to them, and sometimes DNS as well. The connection to the ISP varies too. The simplest is a regular IPv4 connection where the router gets its address etc via DHCP from the ISP. This is usually the case with DSL and Verizon FiOS, amongst others. A second style is used on some cable systems, since the cable itself is a shared (bus) rather than a connection just to you. Since it's shared there must be authentication, so these commonly use PPPoE protocol. There is also a Telstra-special used only in Australia that has authenticalion and heartbeat on the connection.



Modem: sometimes integrated with a router/gateway, or may be separate. These are usually simple but can cause problems in some setups



ISP server: - not usually a problem. If it is then you have bigger issues you need to solve first.



An important part of this chain is that DHCP is usually used between the ISP and the router/gateway, and between it and your Mac. Understanding DHCP is a big help in figuring out what's going on. Your Mac retains its IP address when it goes to sleep, and tries to reacquire it when it wakes up. Mostly it gets the same one but sometimes the lease time expired and the address is now in use by another device on your local network. No big deal - you get a new address and life is good. There was a bug with this several years ago (Tiger, probably) but that has long since been fixed. There is a separate DHCP between the router and the ISP (for the "WAN address") and occasionally this gets into trouble. If it does then you usually have to call the ISP to sort it out. But what sometimes happens is that this DHCP least times out and is not renewed by the router/gateway because there's no traffic. So it has to do that when your Mac wakes up, and sometimes this takes a while. You don't have to call but there will be some delay while the address is re-established. And this is in addition to any delay for getting the local connection going.



Another item to consider is the DNS setting. This usually comes as part of the DHCP info but not all DHCP servers provide it -- sometime you have to configure it manually (ugh).



In order for your Mac to "have an Internet connection", it must have connectivity, and IP address and working DNS. Purists will say that you need only the first two, which is true, but doing anything with, say, Safari requires working DNS. So it's important for troubleshooting to be able to distinguish "no connection" and the Safari-style "no connection to the Internet". There are a couple of things to help you find out if you have connectivity, and DNS.



First is to use System Preferences->Network and check that the connection "Ethernet" has a reasonable IP address, and there is an address shown for "DNS Server". If you are comfortable with Terminal, open a session and try

dig @8.8.8.8 time.apple.com (followed by return, of course)

This is a DNS lookup for the "time.apple.com" address, to be done by the DNS server at 8.8.8.8 which is Google's general DNS server. We can usually assume that to be up and working so if you get no response then that's a big clue that you have no connectivity at all. You should get a response that includes a chunk headed "ANSWER SECTION" with a column on the right with addresses like "17.151.16.31". They're all different but all start with "17." which is Apple's address block. Note also the third-last line "SERVER" which tells you that the query was handled by the 8.8.8.8 server. If this worked then try the local DNS server with

dig time.apple.com (followed by return)

You should get a list that's similar but don't expect it to be identical. If you don't then there's a problem with either the DNS server, or your configuration for which server to use. Check the "SERVER" line to make sure that the response comes from the server you think is configured. If you're not familiar with Terminal then you can do the second check with "Network Utilities" in your Utilities folder. Select the "Lookup" tab in the tool.

Jan 26, 2012 4:16 PM in response to vpndev

A couple more thoughts:-



- the normal thing when you're done with your iMac for a while is sleep. There's no point or advantage in shutting down. My Macs are never shut down unless I go on extended vacation



- Macs are very energy-efficient in sleep



- turning on WiFi may well restore connectivity, but this is a side-effect. What you've done is to switch primary network connections and that triggers a bunch of other things within the network stack



- if connectivity comes only after 30 - 60 seconds, look at the system log to see if there are some clues. Use "Console" in Utilities folder for this. Note that Console will probably first display the console log and that might not be very helpful - click in the toolbar "Show Log List" and then choose "system.log" in the "Files" section

Jan 26, 2012 4:18 PM in response to vpndev

I applaud the logical approach, and I hope others make your investigation. If not, I'll try, but only if I have to. I do not know the details of internet connection and am a bit wary of messing with sutff I don't understand, like DHCP or DNS.


I think we know the answer, however, to part of the question. Even when Safari tells me that it has no connection to the internet, my computer is in fact connected to the internet. I know this because I can use iTunes to listen to internet radio even when I can't use Safari.


It might be helpful to know whether anyone who has this problem is not using a Time Machine. Based on earlier discussions, I thought that some kind of misconnection between an iTunes upgrade and the Time Machine (or some models of it) was a constant factor in the problem.

Jan 26, 2012 5:20 PM in response to vpndev

Sometimes I get up in the morning, wake the iMac, bring up iTunes and beam radio (NPR instead of the CBC) down to my radio in the kitchen (where I have an Airport Express).


Usually when I put the computer to sleep I shut down all, or nearly all, programs. So most of the time I would have to open iTunes in the morning.


Oddly enough, my wife and I bought identical iMacs at the same time, about four years ago. We update applications at about the same time and have the same enviironment, as far as our ISP, the Time Machine, our Airport Expresses, She's never had this problem. Not at all.

Jan 27, 2012 10:40 AM in response to gthull644

My turn to chime in. It seems like whenever I do an update for Lion I lose internet connectivity. I connect via Wi-Fi and am experiencing the same issues.


I do not use time machine, therefore that's not an issue. Something similiar to this happened the last time I did an update on the computer, but at that time I was able to fix it. This time it is hopeless. Just when I think I've fixed it (messing with network settings), I put it to sleep and then reawaken it with lost internet connectivity!


Oh, and it is only on this computer that i have the issue. My iphone can connect, along with my mac desktop computer that is currently running snow leopard.


I've cursed this latest operating system since I've installed it because I seem to have nothing but problems, esp after an update. I'd love to be able to get on the computer again and be able to depend on it's wi-fi connections once again. It's hard to brag about apple products when these updates do a doozy on my computers!


Btw, my laptop is the newer version (bought last June).

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.

Internet connection lost after sleep - Ethernet

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