Glazenbakje's Weblog

Just another way to express myself

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 “

About these ads

2 responses to “Add or delete static routes Apple Mac OS X Mountain Lion

  1. Gary Grenier 8 January 2014 at 22:41

    Will these routes be “persistent” or will I have to add them every day?

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

Follow

Get every new post delivered to your Inbox.

Join 419 other followers

%d bloggers like this: