1832779 Members
3321 Online
110045 Solutions
New Discussion

View routes

 
SOLVED
Go to solution
Brian Lucas_1
New Member

View routes

I have an HPUX running 11.11 OS and am a little confused. How can I view the routing table currently in effect? I can see how to add/delete routes but how do I view the current route?

Also, is there a way to save the configuration after doing an ifconfig? I have modified lan0 from command line and then did a shutdown -r but it came back with the old configuration information?

I need this to be able to pass information from the subnet of the HPUX to a different subnet.
6 REPLIES 6
Jeff Schussele
Honored Contributor
Solution

Re: View routes

Hi,

The command to see routes is

netstat -rn
or netstat -rvn

for more detail.

ifconfig only controls cards. The route add/delete commands handles routes. But you're correct i.e. they don't survive reboots. To do that you need to edit the /etc/rc.config.d/netconf file and add the equivalent route entries there. You should already have one there for the default route. Use that as a template, with two caveats, that route has a hop count of one, most static routes are directed to a specific I/F on the system & when you do that the hop count will be zero and this is where the subnet mask is important if you're dealing with supernets.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
I.Delic
Super Advisor

Re: View routes

Hi,

Command you are looking for is:
netstat

For more detail you kan check "man netstat"




Idriz
SS_6
Valued Contributor

Re: View routes

To see routing information
#netstat -rvn
You must modify /etc/rc.config.d/netconf file to change configuration for lan card permanently.This file also has routing,gateway and other information.
you can also use netstat -in or netstat -in to see lancard v/s IP configuration etc.
Following will reread netconf file but a little risk is involved if somthing wrong is configured in netconf file so do it when no impact to user.
#/sbin/init.d/net start
By providing solutions I am helping myself
Tim D Fulford
Honored Contributor

Re: View routes

netstat -rn
netstat -r

Tim
-
G. Vrijhoeven
Honored Contributor

Re: View routes

Hi,

Try ping -o

HTH,

Gideon
Brian Lucas_1
New Member

Re: View routes

Thanks, everyone! The netstat -rn and modification of the netconf file did the trick.