On my MacBook Pro laptop, I've found that whenever a VPN connection, which I establish through Juniper Networks VPN client software, times out, or is dropped for some other reason prematurely, I lose network access. From a shell prompt, I can ping the system's own address, but I can't ping any other system and all network access via the Safari browser, email access, etc. doesn't work.
If I try pinging an IP address other than the system's own address, I see "cannot allocate memory" messages. E.g., an attempt to ping the router would give me the results below:
$ ping 192.168.0.1 PING 192.168.0.1 (192.168.0.1): 56 data bytes ping: sendto: Cannot allocate memory ping: sendto: Cannot allocate memory Request timeout for icmp_seq 0 ping: sendto: Cannot allocate memory Request timeout for icmp_seq 1 ^C --- 192.168.0.1 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss
I tried disabling and re-enabling Wi-Fi by going into the network settings and selecting "Turn Wi-Fi Off", but turning it off and on didn't help. The following steps did work, though, from an account with admin privileges:
- Click on the Apple icon in the upper-left corner of the screen and select System Preferences.
- Select Network.
- Click on the Advanced button near the bottom, right-hand corner of the window next to the question mark button.
- Click on the TCP/IP tab.
- For "Configure IPv4", change the setting from "Using DHCP" to "Off" and then click on the OK button then click on Apply. Then click on the Advanced button again and change the setting back to "Using DHCP" and click on OK and Apply again.
"Cannot Allocate Memory" error when trying to ssh or ping or curl due to
Date: January 22, 2013