Skip to content

Instantly share code, notes, and snippets.

@dougborg
Forked from blimmer/fixMavericksUnicastIssue
Last active December 27, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougborg/7388217 to your computer and use it in GitHub Desktop.
Save dougborg/7388217 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Mavericks has a nasty issue regarding ARPs in corporate networks.
# It appears that they have tried to reduce bandwidth utilization by caching
# the results of ARPs. Unfortunately, this causes big problems with corporate
# networks with Virtual IPs or other corporate network redundancy measures.
# There exist other patches for this issue
# (see https://github.com/MacMiniVault/Mac-Scripts/blob/master/unicastarp/unicastarp-README.md)
# but they write a value that will be pulled everytime the machine reboots. Because
# we are assuming Apple will fix this in a future Mavericks update, we don't want this
# setting to last after a reboot. This script writes the fix, but it doesn't persist past a reboot.
# Author: Ben Limmer | hello@benlimmer.com
if [[ "$(sw_vers -productVersion)" =~ 10\.9 ]]; then
if [[ "$(sysctl -n net.link.ether.inet.arp_unicast_lim)" == "0" ]]; then
echo "System is already properly configured."
exit 1
else
echo "Your system is caching ARP updates."
sudo sysctl -w net.link.ether.inet.arp_unicast_lim=0
echo "Fixed ARP issue"
exit 0
fi
else
echo "This patch does not apply to your operating system."
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment