why does the "route" command on FreeBSD not support the "show" option?
ie why can't I issue a "route show" like I do on other platforms and
why do I have to use "netstat -r" ?
thank you!
-farshad
Not all commands work exactly the same on the different platforms. For
example, "ping" ends after four attempts on a Windows machine but will
continue forever on most other systems.
route, I suppose, is another example. I primarily work with Linux and
FreeBSD, and neither of them have "show" as a parameter. I do recall that
the Cisco router that I had to reconfigure a couple months ago had the
"show route" command. But it isn't a universal, standardized thing.
Because, basically, that's the way it's been done for years on unices.
Lots of platforms you apparently didn't try also don't support route
show and you'll have to use netstat there, too. Note that those that do
support route show also support netstat -r so the latter command is the
more universal of the two. You might want to get used to it.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
Actually isn't that 'show ip route' or 'show route ip'. And the
Cisco command set seems to resemble nothing I've ever seen. Other
routers are quite close to what appears to be the Cicso defacto
standards.
I had a Cisco 7120 fail two weekends ago. A reboot would keep it
up about 30 minutes. A trip to the colo got it going again, only
to fail.
Trying to get things running again - and considering it's a 20
minute drive to the colo [at 2AM] I had about 2 hours of downtime.
First time I had any interuption in over 3 years. Thanikfully all
this occured between 2AM and 5AM.
But after the second failure, I took about 20 minutes and
reconfigured one of my FreeBSD servers to replace the Cisco.
And the OP is probably Windows oriented as route show works
there. However given the fact the Unix systems were using TCP/IP
before Windows included a lot of the Berkeley code when the first
implemented TCP/IP in 95. Prior to that you had get second party
TCP for connection to the outside world - the most popular being
trumpet. I do NOT miss that at all :-)
Bill
--
Bill Vermillion - bv @ wjv . com
Tried it on a 2600 here: show ip route works and show route ip will be
interpreted as show route-map and will then look for a route named ip.
That is not conclusive though: cisco has a habit of changing this kind
of stuff depending on just what kind of hardware you're talking to.
Other vendors will want to mimic but probably cannot duplicate the cisco
way. Then again, if you're doing command-line style stuff, there's only
so much you can vary without going all the way with shells and vi on the
routers. Or emacs. How many OSen do you need on a router, anyway? :-)
Note that on linux (where their ifconfig is badly broken so instead of
fixing that it's much cooler to write a wildly different command that
does the same and more. twice.) you can probably type "ip route show"
and it'll also work. I'd rather they'd fix their ifconfig though.
> I had a Cisco 7120 fail two weekends ago. A reboot would keep it
> up about 30 minutes. A trip to the colo got it going again, only
> to fail.
[snip: cisco 7120 going down]
> But after the second failure, I took about 20 minutes and
> reconfigured one of my FreeBSD servers to replace the Cisco.
:-)
Any clue what's wrong with the cisco though? I might be interested.
Still want to work on my c1sc0 sk1llz a bit.
> And the OP is probably Windows oriented as route show works
> there.
route print, actually. I run into that now and then. (Still cursing
the contraption because of ``tracert'', it makes me feel dirty when
I mistype that on a unix machine. Usually use mtr though. Shingy!
Interactive! Tracing! Even on X if you let it, which I never do.)
> However given the fact the Unix systems were using TCP/IP
> before Windows included a lot of the Berkeley code when the first
> implemented TCP/IP in 95. Prior to that you had get second party
> TCP for connection to the outside world - the most popular being
> trumpet. I do NOT miss that at all :-)
waterloo tcp for dos, anyone?
>>>route, I suppose, is another example. I primarily work with
>>>Linux and FreeBSD, and neither of them have "show" as a
>>>parameter. I do recall that the Cisco router that I had to
>>>reconfigure a couple months ago had the "show route" command.
>>>But it isn't a universal, standardized thing.
>> Actually isn't that 'show ip route' or 'show route ip'. And the
>> Cisco command set seems to resemble nothing I've ever seen. Other
>> routers are quite close to what appears to be the Cicso defacto
>> standards.
>Tried it on a 2600 here: show ip route works and show route ip will be
>interpreted as show route-map and will then look for a route named ip.
>That is not conclusive though: cisco has a habit of changing this kind
>of stuff depending on just what kind of hardware you're talking to.
I knew it was one of the other ":-). I used to be into a 7513
almost everyday - but that has been a few years back and unused
skill sets get a bit creaky.
>Other vendors will want to mimic but probably cannot duplicate
>the cisco way. Then again, if you're doing command-line style
>stuff, there's only so much you can vary without going all the
>way with shells and vi on the routers. Or emacs. How many OSen do
>you need on a router, anyway? :-)
I only do command line 'stuff' in the routers. The HTTP interface
takes far too long. I just checked into a Foundry Gigabit
Switch/Router and if you know Cisco commands you know the Foundry.
I can't find the exact model number but it's in the 4000 range.
>Note that on linux (where their ifconfig is badly broken so instead of
>fixing that it's much cooler to write a wildly different command that
>does the same and more. twice.) you can probably type "ip route show"
>and it'll also work. I'd rather they'd fix their ifconfig though.
>
>
>> I had a Cisco 7120 fail two weekends ago. A reboot would keep it
>> up about 30 minutes. A trip to the colo got it going again, only
>> to fail.
>[snip: cisco 7120 going down]
>> But after the second failure, I took about 20 minutes and
>> reconfigured one of my FreeBSD servers to replace the Cisco.
>
>:-)
>Any clue what's wrong with the cisco though? I might be interested.
>Still want to work on my c1sc0 sk1llz a bit.
Not sure at the moment. It may be memory. My partner has it at
his place. That model router failed in the first 3 weeks of
service and was replaced under warranty. At that time when it
would boot it would get part way up, and at other times the display
was scrambled.
That model has been discontinued so I don't know if there is an
incipient failure mode or not. It passed the diags that my
partner ran but in doing so it cleaned the NVRAM so the crash file
it wrote is no longer there - unless he can get it to crash again.
They are usually quite stable.
>> And the OP is probably Windows oriented as route show works
>> there.
>route print, actually. I run into that now and then. (Still cursing
>the contraption because of ``tracert'', it makes me feel dirty when
>I mistype that on a unix machine. Usually use mtr though. Shingy!
>Interactive! Tracing! Even on X if you let it, which I never do.)
mtr? I had forgotten all about that. [Once you get a lot of
tools you forget some of the old ones]. A quick 'make' fixed that.
Thanks for reminding me about that one.
>> However given the fact the Unix systems were using TCP/IP
>> before Windows included a lot of the Berkeley code when the first
>> implemented TCP/IP in 95. Prior to that you had get second party
>> TCP for connection to the outside world - the most popular being
>> trumpet. I do NOT miss that at all :-)
>waterloo tcp for dos, anyone?
That name rings a very faint bell.
> Because, basically, that's the way it's been done for years on unices.
> Lots of platforms you apparently didn't try also don't support route
> show and you'll have to use netstat there, too. Note that those that do
> support route show also support netstat -r so the latter command is the
> more universal of the two. You might want to get used to it.
And if the OP is really annoyed with this, he can always do this:
alias route_show='netstat -r'
or equivalent for the shell he is using. (Note the underscore...)
A more "correct" approach (wrapping the route command in a script and
adding the show option (which does 'netstat -r') is left as an exercise
for the OP.
--
Torfinn Ingolfsen,
Norway