Operating System - HP-UX
1819749 Members
3220 Online
109606 Solutions
New Discussion юеВ

Re: How to show metric in routing table?

 
SM_3
Super Advisor

How to show metric in routing table?

How can you display the metrics in a routing table?

For example in WinXp I can
>route print
Which will display the metric in the right most column.

Thanks.
8 REPLIES 8
Jannik
Honored Contributor

Re: How to show metric in routing table?

netstat -rn
or
netstat -r
jaton
Ravi_8
Honored Contributor

Re: How to show metric in routing table?

Hi,

netstat -rn

to list all

netstat -a
never give up
Nguyen Anh Tien
Honored Contributor

Re: How to show metric in routing table?

like this:
[server:/] netstat -nra
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.0.0.99 10.0.0.99 UH 0 lan3 4136
192.168.0.3 192.168.0.3 UH 0 lan0 4136
10.0.0.0 10.0.0.99 U 2 lan3 1500
192.168.0.0 192.168.0.3 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.0.0.1 UG 0 lan3 0
HP is simple
Peter Leddy_1
Esteemed Contributor

Re: How to show metric in routing table?

Hi,

I don't have access to a HP-UX server at the moment but I know that on Tru64 "netstat -rv" will display the metric results, it could be same.

Regards,

Peter
SM_3
Super Advisor

Re: How to show metric in routing table?

What's the Refs or Ref column stand for?
SM_3
Super Advisor

Re: How to show metric in routing table?

Can someone post the output from netstat with the metric column.

Convice me that the column exists.

Thanks.
Ron Kinner
Honored Contributor

Re: How to show metric in routing table?

It doesn't really exist unless perhaps you run gated. In Hpux the metric is either 0 meaning a local subnet address or not 0 meaning it's not local. Look in the Flags column. If you see a G then the metric is is greater than 0. Don't think a backup default route using a higher metric really works in HPUX. You could try it and see. Ideally it would not show up in netstat -rn until after the prime default stopped working. This would require that you not have turned off Dead Gateway Detection.

The REFs column is supposed to tell you how many times the TCP/IP stack used this particular entry to go somewhere. Don't think it works reliably if you have more than one NIC.

Ron
SM_3
Super Advisor

Re: How to show metric in routing table?

Thanks Ron.