Email this to a friend
 
posted on September 27th 2018, at 10:35
by lunarg

Similar as on FreeBSD and Linux, you can add/remove static network routes through the command line with the route command. The syntax somewhat differs from Linux, though.

To add a route (e.g. subnet 192.168.3.0/24 to gateway 192.168.1.254):

sudo route -n add -net 192.168.3.0/24 192.168.1.254

To remove a route:

sudo route -n delete -net 192.168.3.0/24

To show the current route table, you can use netstat:

netstat -nr

Send a link to this post to yourself or a friend.

Send to e-mail:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
/get/captcha/1732182517
Not readable? Get another.
 
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
 
 
 
 
« November 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
 
Links
 
Quote
« When a bird does poo poo in your eye, be happy elephants don't fly. »