bug in route command? - BSD

This is a discussion on bug in route command? - BSD ; Hi. Is there a bug in the route command that causes the specification of the address family to be ignored? According to the man page if you only want info on the inet family the following should work but it ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: bug in route command?

  1. bug in route command?

    Hi. Is there a bug in the route command that causes the specification
    of the address family to be ignored? According to the man page if you
    only want info on the inet family the following should work but it
    doesn't:

    $ route -n show inet

    It produces a syntax error message.

    The 3.7 manual clearly provides this syntax:

    route [-n] show [family]

    And then,

    To allow addresses to be interpreted as belonging to a particular
    address
    family (as well as for use in the family arguments to some
    commands), the
    following modifiers may be used:

    -inet Internet Protocol version 4 (IPv4) addresses (see ip(4))
    -inet6 Internet Protocol version 6 (IPv6) addresses (see ip6(4))
    -ipx Novell's Internet Packet Exchange (IPX) addresses
    -link Hardware (link-level) addresses
    -sa Actual sockaddr data, in hexadecimal format
    -x25 CCITT X.25 addresses


    Any comments?


  2. Re: bug in route command?

    mr_scary wrote:
    > Hi. Is there a bug in the route command that causes the specification
    > of the address family to be ignored? According to the man page if you
    > only want info on the inet family the following should work but it
    > doesn't:
    >
    > $ route -n show inet
    >
    > It produces a syntax error message.
    >
    > The 3.7 manual clearly provides this syntax:
    >
    > route [-n] show [family]
    >
    > And then,
    >
    > To allow addresses to be interpreted as belonging to a particular
    > address
    > family (as well as for use in the family arguments to some
    > commands), the
    > following modifiers may be used:
    >
    > -inet Internet Protocol version 4 (IPv4) addresses (see ip(4))
    > -inet6 Internet Protocol version 6 (IPv6) addresses (see ip6(4))
    > -ipx Novell's Internet Packet Exchange (IPX) addresses
    > -link Hardware (link-level) addresses
    > -sa Actual sockaddr data, in hexadecimal format
    > -x25 CCITT X.25 addresses
    >
    >
    > Any comments?


    try prepending inet with a dash, like you read from the manual, i.e.

    $ route -n show -inet

  3. Re: bug in route command?

    Ouch.


  4. Re: bug in route command?

    On 23/07/2005 7:08 PM, mr_scary wrote:
    > Hi. Is there a bug in the route command that causes the specification
    > of the address family to be ignored? According to the man page if you
    > only want info on the inet family the following should work but it
    > doesn't:
    >
    > $ route -n show inet
    >
    > It produces a syntax error message.
    >
    > The 3.7 manual clearly provides this syntax:
    >
    > route [-n] show [family]
    >
    > And then,
    >
    > To allow addresses to be interpreted as belonging to a particular
    > address
    > family (as well as for use in the family arguments to some
    > commands), the
    > following modifiers may be used:
    >
    > -inet Internet Protocol version 4 (IPv4) addresses (see ip(4))
    > -inet6 Internet Protocol version 6 (IPv6) addresses (see ip6(4))
    > -ipx Novell's Internet Packet Exchange (IPX) addresses
    > -link Hardware (link-level) addresses
    > -sa Actual sockaddr data, in hexadecimal format
    > -x25 CCITT X.25 addresses
    >

    Read the pages more carefully. [family] is an option or modifier to
    route, not an argument to show.

    [...]
    clvrmnky@martini:~ # route -n show -inet
    Routing tables

    Internet:
    Destination Gateway Flags
    default xx.yy.aa.bb UG
    10.0.0.0 link#1 U
    10.0.0.1 0:40:63:d8:1a:e4 UH
    10.0.0.2 0:11:24:3:4b:84 UH
    10.0.0.199 link#1 UH
    10.0.0.254 0:a0:24:e9:b6:1 UH
    10.255.255.255 link#1 UH
    xx.yy.aa.bb qq.ww.ee.rr UH
    127.0.0.0 127.0.0.1 UG
    127.0.0.1 127.0.0.1 UH
    224.0.0.0 127.0.0.1 U
    clvrmnky@martini:~ #
    [...]

  5. Re: bug in route command?

    mr_scary wrote:
    > Ouch.
    >


    Been there, done that. :-)

+ Reply to Thread