Mac OS X: How to get "route" listing? - Unix

This is a discussion on Mac OS X: How to get "route" listing? - Unix ; How do I get the equivalent of "route" (in Linux) or "route print" in Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)? I have scoured the man pages, but found nothing. In ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Mac OS X: How to get "route" listing?

  1. Mac OS X: How to get "route" listing?

    How do I get the equivalent of "route" (in Linux) or "route print" in
    Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)?

    I have scoured the man pages, but found nothing. In particular, the
    "route" command seems only able to "do something", not to report on what
    it currently is.


  2. Re: Mac OS X: How to get "route" listing?

    In article ,
    gazelle@xmission.xmission.com (Kenny McCormack) wrote:

    > How do I get the equivalent of "route" (in Linux) or "route print" in
    > Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)?
    >
    > I have scoured the man pages, but found nothing. In particular, the
    > "route" command seems only able to "do something", not to report on what
    > it currently is.


    netstat -r

    just like other Unixes.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: Mac OS X: How to get "route" listing?

    gazelle@xmission.xmission.com (Kenny McCormack) writes:
    >How do I get the equivalent of "route" (in Linux) or "route print" in
    >Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)?



    Exactl same thing as in linux or any other Unix variant out there.

    Unless they branched off in an odd way, 'route' only adds/deletes
    routes in linux last I looked.

    'netstat -nr' is the one you want.



  4. Re: Mac OS X: How to get "route" listing?

    In article <475c78e9$0$35900$892e0abb@auth.newsreader.octanews .com>,
    Doug McIntyre wrote:
    >gazelle@xmission.xmission.com (Kenny McCormack) writes:
    >>How do I get the equivalent of "route" (in Linux) or "route print" in
    >>Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)?

    >
    >
    >Exactl same thing as in linux or any other Unix variant out there.
    >
    >Unless they branched off in an odd way, 'route' only adds/deletes
    >routes in linux last I looked.


    I'm assuming then that you haven't checked in at least a decade.

    >'netstat -nr' is the one you want.


    Yes, as the other poster mentioned, that seems to be the BSD/Solaris
    standard. I seem to remember having worked that out once for Solaris
    some time ago.


  5. Re: Mac OS X: How to get "route" listing?

    In article ,
    Barry Margolin wrote:
    >In article ,
    > gazelle@xmission.xmission.com (Kenny McCormack) wrote:
    >
    >> How do I get the equivalent of "route" (in Linux) or "route print" in
    >> Windows, in OS X (which is a lot like the BSD flavor of the free Unixes)?
    >>
    >> I have scoured the man pages, but found nothing. In particular, the
    >> "route" command seems only able to "do something", not to report on what
    >> it currently is.

    >
    >netstat -r
    >
    >just like other Unixes.


    Thanks. Although the output is ugly (compared to "route" in Linux)

    These days, I mostly use Linux and Windows qua Unix (neither of which
    are, as you seem intent on pointing out, Unix strictly speaking - the
    later far less so than the former...). But I have a Mac as my main
    laptop these days, and am frequently amazed at how primitive the Unix
    is, both in comparison to Linux and in, of course, comparison to how
    sophisticated the UI is (i.e., what they have built on top of the Unix).


  6. Re: Mac OS X: How to get "route" listing?

    In article ,
    gazelle@xmission.xmission.com (Kenny McCormack) wrote:

    > Thanks. Although the output is ugly (compared to "route" in Linux)
    >
    > These days, I mostly use Linux and Windows qua Unix (neither of which
    > are, as you seem intent on pointing out, Unix strictly speaking - the
    > later far less so than the former...). But I have a Mac as my main
    > laptop these days, and am frequently amazed at how primitive the Unix
    > is, both in comparison to Linux and in, of course, comparison to how
    > sophisticated the UI is (i.e., what they have built on top of the Unix).


    I'm curious, in what sense do you mean? In terms of the quality of the
    Unix commands? There are some cases where the GNU userland tools
    certainly are more powerful than the BSD stuff, but OS X does include
    quite a bit of the GNU system (it uses GNU make instead of BSD make by
    default, for example). And Apple's launchd is much more sophisticated
    than the old-school Linux init scripts.

    Maybe I'm just not seeing OS X as "primitive" because I grew up using
    BSD as well as Linux, and was subconsciously pre-adjusted to its faults
    or whatever. But out of curiosity, could you expound on that statement?

    --
    Mark Shroyer
    http://markshroyer.com/contact/

  7. Re: Mac OS X: How to get "route" listing?

    Found this thread by a query for 'BSD "route get" in Linux'. I was logged into a Linux system today and found that 'route' had been gutted and could only add or delete routes.

    Is there a Linux equivalent for the BSD 'route get a.b.c.d' that would provide, at a minimum, the interface that would be used and the next hop to reach the target address?

    In regard to the original posting, the 'netstat -r[n]' command will provide the current static and dynamic routes that haven't expired known to the Mac OS X system.

    The 'route get a.b.c.d' can, also, be used on a Mac OS X system to identify how a packet destined for the target address would be routed.

    As I, vaguely, recall the functionality of route was expanded in the late Nineties when Merit began charging fees for updated versions of gated.

+ Reply to Thread