Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

sudo route add -net 10.78.0.0 netmask 255.255.0.0 gw 10.101.1.1

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

2 Answers 2

up vote 5 down vote accepted

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

route add 10.78.0.0 10.101.1.1 -netmask 255.255.0.0

Or even shorter:

route add 10.78.0.0/16 10.101.1.1
share|improve this answer

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

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

share|improve this answer

Your Answer

 
discard

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.