Operating System - HP-UX
1833758 Members
2931 Online
110063 Solutions
New Discussion

route and traceroute does not match

 
Adam_106
Occasional Contributor

route and traceroute does not match

This is part of may configuration of net:
/root >ifconfig lan0
lan0: flags=843
inet 10.10.2.19 netmask ffffff00 broadcast 10.10.2.255
/root >ifconfig lan2
lan2: flags=843
inet 10.10.1.19 netmask ffffff00 broadcast 10.10.1.255

And routes:
/root >netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 16424
10.10.1.19 10.10.1.19 UH 0 lan2 16424
10.10.2.19 10.10.2.19 UH 0 lan0 16424
192.168.244.101 10.10.2.2 UGH 0 lan0 0
10.10.2.0 10.10.2.19 U 2 lan0 1500
10.10.1.0 10.10.1.19 U 2 lan2 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.10.2.2 UG 0 lan0 0
default 10.10.1.2 UG 0 lan2 0

Can anybody tell me why if i make traceroute to address listed with routing table system does not use interface i wanted makeing static route?
Ex:
/etc >traceroute 192.168.244.101
traceroute: Warning: Multiple interfaces found; using 10.10.1.19 @ lan2
traceroute to 192.168.244.101 (192.168.244.101), 30 hops max, 40 byte packets
1 10.10.2.2 (10.10.2.2) 1.024 ms 1.551 ms 1.452 ms
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: route and traceroute does not match

Because you have two default routes.

from: http://docs.hp.com/en/B2355-60105/routing.7.html

There may still be multiple routing entries remaining. In that case, the IP packet is routed over the first entry displayed by netstat -r. Such multiple routes include:

* Two or more routes to a host via different gateways.
* Two or more routes to a network via different gateways.
* Two default routes.

live free or die
harry d brown jr
Live Free or Die
Jeff Schussele
Honored Contributor

Re: route and traceroute does not match

Hi Andrzej,

Because you need to tell traceroute which NIC to go out. By default it will use the 1st I/F listed in a netstat -in command.
Use either the -i (I/F example lan2) or -s (IP address) in the command to start the trace on the proper I/F.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ron Kinner
Honored Contributor

Re: route and traceroute does not match

Traceroute is broken in HPUX. It no longer looks at the routing table like it should. As Jeff mentioned you have to tell traceroute which interface to use. Pretty dumb I think which is why I say it's broken. If you want to see how a packet really gets to a target destination then use
ping -o target.

Ron