Operating System - HP-UX
1825775 Members
1945 Online
109687 Solutions
New Discussion

Re: the command route......

 
SOLVED
Go to solution
sandro ginnari_1
Occasional Advisor

the command route......

Hi,
I'm trying to insert a net in my routing table with the route command with the following sintax:
route add [NET IP][GATEWAY IP][SUBNET IP]
after this i type in "route -n" and I don't get any visible output.
I read the man page but it realy didn't (this is quite common:)).
thanks
6 REPLIES 6
Andrew Lartey
Advisor

Re: the command route......

Have you tried netstat -r and netstat -rn
Neil Moore
New Member

Re: the command route......

you can echo $? after the command
1=Not done
0=Done

Also try calling route by its whole path just incase an alias it set up for it

Scott D. Allen
Regular Advisor

Re: the command route......

I encountered this problem today also.

route in HP-UX is only used to add/remove routing table entries dynamically. I don't even believe that it CAN permanently add a routing entry to the routing table.

To answer your question.....use netstat -rn or netstat -r to display the routing information.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Scott D. Allen
Regular Advisor

Re: the command route......

I encountered this problem today also.

route in HP-UX is only used to add/remove routing table entries dynamically. I don't even believe that it CAN permanently add a routing entry to the routing table.

To answer your question.....use netstat -rn or netstat -r to display the routing information.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Emmanuel Eyer
Frequent Advisor
Solution

Re: the command route......

To add temporary routes, use route add, and check with netstat -r[n] (since route does not complain upon errors!)

To add permanent static routes, edit /etc/rc.config.d/netconf. You will find comments explaining what to do exactly.

Good hint: NEVER forget to set HOP_COUNT to 1 (or whatever), since the default is 0 (thus making your route NOT to cross a router!)
Kishor Bagul
Occasional Contributor

Re: the command route......

I think in your syntax you don't have [destination IP], also if you want you can specifiy counts at the end after destination IP.