Flushing the DNS on Mac OS X Lion is quite simple. Just follow the below steps:
1) Change to “root” by using the following command:
Enter the root password when prompted. If you don’t know the “root” password for your system, you can set it by following this Apple KB article: http://support.apple.com/kb/ht1528
2) Type in the following command to flush the DNS:
The DNS has now been flushed.