Operating System - HP-UX
1752626 Members
4818 Online
108788 Solutions
New Discussion юеВ

Re: Traceroute multiple interface

 
file system
Frequent Advisor

Traceroute multiple interface

Hi all
I'm going to configure 2 NICs
Server has 2 lancards.

here is network info..
[rx2:/]netstat -ni
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan0 1500 130.21.0.0 130.21.0.17 3824559 0 2519256 0 0
lo0 4136 127.0.0.0 127.0.0.1 307255 0 307255 0 0
lan5 1500 192.168.10.0 192.168.10.2 17964 0 16453 0 0

[rx2:/]netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
130.21.0.17 130.21.0.17 UH 0 lan0 4136
192.168.10.2 192.168.10.2 UH 0 lan5 4136
192.168.10.0 192.168.10.2 U 2 lan5 1500
130.21.0.0 130.21.0.17 U 2 lan0 1500
192.168.10.0 192.168.10.254 UG 0 lan5 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 130.21.0.61 UG 0 lan0 0

When I used to traceroute 192.168.10.254, I'm getting back like below.

[rx2:/]traceroute 192.168.10.254
traceroute: Warning: Multiple interfaces found; using 130.21.0.17 @ lan0
traceroute to 192.168.10.254 (192.168.10.254), 30 hops max, 40 byte packets

I wonder that obviously ip 192.168.10.254 is routed on @lan5, but it responds from @lan0

I think it should respond from @lan5. am I thinking wrong?

how can I get back from @lan5 whenever I traceroute 192.168.10.x network interface @lan5
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Traceroute multiple interface

man traceroute

Look for "multi".
sujit kumar singh
Honored Contributor

Re: Traceroute multiple interface

use -s as the source IP address:

man traceroute
-s addr Use the IPv4 or IPv6 address addr (which usually is given
as an IPv4/IPv6 number, not a hostname) as the source
address in outgoing probe packets. On hosts with more
than one IPv4/IPv6 address, this option can be used to
force the source address to be something other than the
IPv4/IPv6 address of the interface the probe packet is
sent on. If the IPv4/IPv6 address is not one of this
machine's interface addresses, an error is returned and
nothing is sent. (See the -i flag for another way to do
this.)
Regards
sujit