Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange behavior for route(8)



> {184} route show -inet net 192.168.0/24
> route: botched keyword: 192.168.0/24
> Usage: route [-dfLnqSsTtv] cmd [[-<qualifiers>] args]

[After reading both route(8) and the source:]

The "show" sub command just accepts a few of the initial "[-dfLnqSsTtv]"
options, a few "-<qualifiers", and no further "args" at all.  One cannot
pick/investigate individual routes with "show".

The "get" cmd might help you more.  You'll get a decent response for

	route -n get -net 192.168.0
	route -n get 192.168.0.0
	route -n get 192.168.0.0 -prefixlen 24

Note that there's no "loose" matching for networks.  A query for

	route -n get 192.168.0.0 -prefixlen 25

will yield nothing with the table your listed.

I usually use "get" with host targets which will always indicate
the chosen route (and src address!):

% route -n get 1.2.3.4
   route to: 1.2.3.4
destination: default
       mask: default
    gateway: 217.13.65.1
 local addr: 217.13.65.133
  interface: vioif0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0         0         0 

							Martin Neitzel


Home | Main Index | Thread Index | Old Index