Clear or Flush ARP/DNS Cache in OSX

To clear the address resolution protocol cache, simply enter the following command in the terminal.

sudo arp -a -d

To clear the domain name system cache, simply enter the following command in the terminal.

dscacheutil -flushcache