Add or delete static routes Apple Mac OS X Mountain Lion

Well this is most of the time easy but useful when need and you can’t remind the command you have to use to add a static route in a Mac OS X Mountain Lion installation. ( Beside the command can be used to older Mac OS X version also :) )

Open fist the terminal session.
Use the following command: ” sudo route -n add x.x.x.x/24 x.x.x.x ( like the example below )”  You have to enter your password.

To delete a route you have to use the following command:
” sudo route -n delete x.x.x.x/24 x.x.x.x ”

 

To view you route table on you Mac you use the following command:
” netstat -nr ”

4 thoughts on “Add or delete static routes Apple Mac OS X Mountain Lion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s