by lunarg on September 27th 2018, at 10:35

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 to gateway

sudo route -n add -net

To remove a route:

sudo route -n delete -net

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

netstat -nr