I think the DHCP lease time is a maybe good workaround but not the solution:
I caught the problem in the system.log
This was the last message before the sleep:
Oct 26 12:42:38 imac kernel: Ethernet [AppleBCM5701Ethernet]: Link down on en0
Oct 26 13:01:01 imac kernel: Wake reason: EHC2
Oct 26 13:01:04 imac kernel: Ethernet [AppleBCM5701Ethernet]: Link up on en0, 1-Gigabit, Full-duplex, Symmetric flow-control, Debug [796d,2700,0c01,0200,cde1,3c00]
Oct 26 13:01:08 imac.intranet.ronaldo.nl configd: network changed: v4(wc4:22.214.171.124, en0-:192.168.1.2) DNS! Proxy- SMB-
Oct 26 13:01:08 imac.intranet.ronaldo.nl mDNSResponderHelper: do_mDNSInterfaceAdvtIoctl: ioctl call SIOCGIFINFO_IN6 failed - error (22) Invalid argument <<<<<----- This is the one
This is absolutely a bug!!!
And then again:
ifconfig en0 down
ifconfig en0 up
solves the problem for this moment.
which is also found in the system.log
Oct 26 13:05:45 imac kernel: Ethernet [AppleBCM5701Ethernet]: Link down on en0
Oct 26 13:05:46 imac.local configd: network changed: v4(wc4:126.96.36.199, en0-:169.254.140.71) DNS+ Proxy- SMB-
Oct 26 13:05:59 imac kernel: Ethernet [AppleBCM5701Ethernet]: Link up on en0, 1-Gigabit, Full-duplex, Symmetric flow-control, Debug [796d,2301,0c01,0200,cde1,3c00]
Oct 26 13:05:59 imac.local configd: network changed: v4(en0+:192.168.1.2, wc4) DNS! Proxy+ SMB+
No entry of the mDNSResponderHelper now, but I noticed it is reported in the system.log regularly.
I beginning to suspect that the link takes too much time to come online (4 seconds in my case). Maybe not always but sometimes.
By the way setting the speed to manual did not help, proved my problem today.
Also the lease time can't be the issue if you have a manual ip. And I also have this set with manual ip adres.
finally, I found the solution,
changing lease time of DHCP server, from 2hours to 1week.
I think this is the problem of compatibily beetween router and osx.
maybe, osx doesn't request again dhcp ip when he wake up,
and routher disconnect osx and loose his IP.
Do you know how to change the DHCP lease time with a Cisco/Linksys router? I don't see any setting for that when I I view the router in Safari.
sorry, I dont know, however the following will be helpful.
Alas, the Cisco commands listed in the search results don't seem to be of any use to me: The only way I know to interact with my Cisco Linksys E3000 router is through the graphical interface when I point my browser to the IP for the router.
Is there some other way? Note that I do not want to replace the firmware with some 3rd party firmware.
In my case I had troubles before with my iMac over WiFi. But now, everything works fine. I didn't change anything to my router or Mac settings. And it doesn't disconnect anymore.
The only thing I remember was to activate "Back to my Mac".
Now, the thing I have to figure out, is how to configure my router and iMac, to access via SSH tunnel... Cause now and then, my router change its IP, so if I want to access it on the go with my iPhone, and if the IP changed, it doesn't work...
I am in the same situation. I have just installed the free App PleaseSleep trying to solve the issue while waiting for a bug correction.
PleaseSleep is usualy used to force sleep a Mac. However it has an eleguant option "not to force sleep" while running selected Apps. I'll be trying this.
PleaseSleep is here.
Same problem here...
I have an iMac 3,06 2009 and MBpro 13" 2,4 2010 with Mountain Lion. Both losses network connections in sleep mode.
Tried everything suggested here.
I have an external hard drive connected to iMac, with Snow Leopard on iMac i could acess that drive from my MBpro even with iMac in sleep mode. Now, with MOuntain Lion on iMac, it doesn´t work...
I am really thinking of getting back to Snow Leopard again....
I hope you'll be happy, but I may have found the solution. At least it worked for me during the last couple of days.
When I use Back to my Mac from my Mac or any other VNC software on my iPad or iPhone, sometimes my iMac at home doesn't want to wake up, and it tells me that my iMac isn't available for the moment. As you noticed, after a few hours of sleep, the iMac dissapears from network and you cannot access it whether you're home or away.
Here is the solution: When I know that I'll need to access my iMac for a reason or another, I go to Safari on my other Mac, or any other device (iPad, iPhone, etc) with iCloud enabled. Then I go to any webpage, google.com for instance. Once there, I simply add this page to my reading list. Then I remove it (or keep it if I was surfing on a great blog or whatever).
After 2 to 3 min, I can access my iMac, I think that the fact to add a page to my reading list, wakes up the iMac to sync it and thanks to that, the iMac is reachable. I tried to add notes, reminders, etc but it doesn't work. The reading list thing seems to be the only turnaround until Apple fix this iMac's sleeping issue.
I tried this solution during an entire week while I wasn't home. Each morning I tried to access my iMac but it didn't work. I tried again and again... nothing. And as soon as I added a page to my reading list, the iMac appears like magic.
Let me know if it works for you!
I started reading this post, b/c I work for a corporation that is connected to Windows servers via ethernet. After updating to Mountain Lion, my computer would lose connection EVERY time it went to sleep. After calling apple several times, with no solution, I think they figured it out the other day.
Go to System preferences, Network Settings, Click on the gear on the lower left hand corner, set service order, change the order to show Ethernet at the top (mine was defaulted at Bluetooth DUN). I would think the same for wifi but not sure, b/c I am not faced with that problem.
I left my computer on during the Thanksgiving holidays, deep sleep, and came back still connected to all servers and no documents affected!!! RELIEF!
So far, so good. I hope this helps.
Thanks, I'll try that. Cause I'm trying to solve this issue for months. Sometimes I think it's OK for 2 or 3 days, then the problem comes back.
3 days ago I noticed that the iMac was reachable over internet even after deep sleep when many apps were lauched on it. For instance, I let Safari, Mail, Calendar, iTunes, iMessages lauched. Maybe one of these apps keep the connexion in order to update the new content.
Anyway, I'll try yours to be sure. But this issue is crazy. My MacBook Pro works well and I can leave it asleep an entire week it's always available and wakes on lan if I need it.