Is there a way to lock my screen but not sleep my network connection? I step away from desk quite a bit and I lock the screen pretty much every time. When I come back I always from stepping away for like 5 minutes it seems like my machine has to reacquire an IP. This via ethernet. This is on a 2010 13' unibody macbook pro running Lion.
3 Answers
If your MacBook is plugged in I would try the following.
Change the Engery Prefs to not spin down the disk or sleep the computer when it's plugged in.
Activate the Screen Saver to turn on at a hot corner.
Set the Screen Saver prefs to require password to log back in.
Now see if activating the Screen Saver causes you to loose your assigned IP.
The alternate method is to manually assign an IP to your MacBook while you're at work.

- 2,501
Late answer, but in case anybody finds this via Google, as I did, entering the following in Terminal worked for me:
cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources; sudo ./airport en1 prefs DisconnectOnLogout=NO
This changes the system pref that tells Airport to disconnect when the session is suspended (locked).

- 232
-
2This should work for WiFi connection but what about cable eth connection? – mixtly87 Jan 27 '19 at 13:53
User Geraard's answer in this forum posting might help. The suggested settings changes seems to have fixed his problem:
- Click the Apple Icon at top left of your screen.
- Select
System Preferences
.- Select and open
Network
- At the lower right select
Advanced
- This will bring up the PPPoE screen with a menu bar showing TCP/IP, DNS, WINS, Proxies, PPP
- Select
PPP
to access the drop down menu and then you can make changes. On the SECOND LINE PROMPTS: I change the value from0
minutes to999
minutes. This cured the Pop-up Message to Reconnect that was happening.
Apple support seems to concur:
If you keep disconnecting from the Internet
If you have to redial your dial-up modem Internet connection after not using your computer for a few moments, or reconnect your PPPoE connection, your computer may be set to disconnect automatically when the connection is idle.
- Choose
Apple menu > System Preferences
, and then clickNetwork
.- Select your modem port (internal or external) or your PPPoE configuration from the Services list, and then click
Advanced
.- Click
PPP
, and then make sure the“Disconnect if idle for __ minutes”
checkbox is not selected, or if it is selected, increase the number of minutes before that the computer will remain idle before disconnecting.
With luck, this setting change will solve your problem.

- 5,134
-
2Is this still accurate? I do not see a "PPP" option under Advanced network settings for an Ethernet connection. – FGreg Jun 27 '14 at 19:01
-
2
-
2This answer is now incorrect as the PPP option no longer exists. Any idea what the modern solution is? – Chris Calo Oct 27 '14 at 17:38