Operating System - HP-UX
1829767 Members
6240 Online
109992 Solutions
New Discussion

ROUTE ADD troubleshooting !

 
Thomaz Portella_2
Occasional Contributor

ROUTE ADD troubleshooting !

When I try to add a conection using command
# route add [destination] [gateway] 0
My destination is directly connected to the gateway. The reason of count 0.
Thanks for help.
2 REPLIES 2
Sundar_7
Honored Contributor

Re: ROUTE ADD troubleshooting !

Are you trying to figure out the reason for hop count of "0" ?

This is how it works

You can add either host route or a network route - a host route is a route to a reach a specific host - a network route is a route to reach a network.

HOP count is based on the number of gateways between your host and the destination.

If the gateway is one of your local IP addresses, then you would have HOP count of 0.

If the gateway is a remote gateway that can be reached by one your lan interfaces then you would increase the HOP count to 1.

If there are more than one gateway between your host and the destination then you would increase the HOP count equal to the number of gateways to pass to reach the destination.

Hope this helps ?
Learn What to do ,How to do and more importantly When to do ?
Ron Kinner
Honored Contributor

Re: ROUTE ADD troubleshooting !

The gateway counts as one hop. In fact you always use a 1 when adding a route. That just tells HPUX that the destination is not local. The only time you would use 0 is if you were using proxy arp in which case you put your own IP address in as the gateway. Then HPUX just arps for the MAC of the destination and the local router will reply with his own MAC. This is a bit slower than having a default gateway so isn't used much any more. The only time you might use something other than a 0 or a 1 for the metric is when you are running gated (rip or OSPF routing protocols) then you might want to reflect the actual number of hops to a destination.

Ron