Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In order to create some special routes for debugging I used the following command on my linux server:

sudo route add -net netmask gw

which works, and sets up the routes I need. But when I run the same command on my Mac I get:

route: bad address: netmask

I'm guessing that the version of route that is included in OS X requires a different format but I'm at a loss to figure it out.

share|improve this question
Manpages are your friend :) – MDMarra Mar 15 '11 at 21:28
up vote 5 down vote accepted

Your Linux-style route command should translate to the following BSD-style command:

route add -netmask

Or even shorter:

route add
share|improve this answer

If I remember well, the Netmask to 10.x.x.x addresses is usualy did you tried that?

Or did you divided your 10. range into multiple nets?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.