Mac : Add a static route in OSX

By | September 12, 2011

To add a static route in Mac OSX, do the following as root in the terminal :

route -n add "network/prefix" "gateway"

Example :

route -n add 10.0.0.0/8 10.16.1.1

To print the routine table, use the following command :

netstat -nr