Add static route on Mac OSX and Windows

Add static route on windows is very easy. Run command prompt as Administrator.

route -p add mask

Add static route on OS x, need the following steps

  1. Find the network service which can access gateway
mac-mini:~ ladmin$ networksetup -listallnetworkservices

An asterisk (*) denotes that a network service is disabled.




Bluetooth DUN


*Bluetooth PAN 2



mac-mini:~ ladmin$ networksetup -getinfo LAN

Manual Configuration

IP address:

Subnet mask:


IPv6: Automatic

IPv6 IP address: none

IPv6 Router: none

Ethernet Address: 00:1f:5b:33:1d:75
  1. set additional gateway on the network service
mac-mini:~ ladmin$ sudo networksetup -setadditionalroutes LAN


mac-mini:~ ladmin$ networksetup -getadditionalroutes LAN
  1. Check the route list
mac-mini:~ ladmin$ netstat -rn

Routing tables



Destination        Gateway            Flags        Refs      Use   Netif Expire

default      UGSc           18        0   vlan0

default       UGScI           0        0     en0

default       UGScI           0        0     en1

default       UGScI           0        0     en2

10/24         UGSc            0        0     en1

127                UCS             0        0     lo0          UH             75  2330825     lo0

169.254            link#8             UCS             1        0   vlan0

169.254            link#4             UCSI            0        0     en0

169.254            link#5             UCSI            0        0     en1

Add more routing paths:
[email protected]:/dev$ sudo networksetup -setadditionalroutes “Ethernet Pantalla Trabajo”

[email protected]:/dev$ sudo networksetup -getadditionalroutes “Ethernet Pantalla Trabajo”



[\_tcpip\_pro_addstaticroute.mspx?mfr=true](</li> </ol>
Written on February 17, 2017