Flush DNS Cache in Mac OS X 10.5, Mac OS X 10.6, or OS X 10.7 Lion
Launch Terminal and issue the following command:
dscacheutil -flushcache
All done, your DNS has been flushed. On a side note, the dscacheutil is interesting in general and worth taking a look at, try the -statistics flag instead for some stats.
Flush your DNS Cache in Mac OS X 10.4 Tiger
Type the following command in the Terminal:
lookupd -flushcache
That’s it, that’s all there is to it. Now your DNS settings should be as you intended them to be.