Operating System - HP-UX
1819903 Members
1930 Online
109607 Solutions
New Discussion юеВ

Re: Force traceroute to use specific NIC?

 
SOLVED
Go to solution
Matt Hearn
Regular Advisor

Force traceroute to use specific NIC?

I'm trying to trace a route from my server to another server, but traceroute inexplicably defaults to using the NIC that I use for my MC/SG heartbeat. It's clearly not going to get to the other server that way!

Is there any way to tell traceroute to use a specific lan card? The man page is uninformative on the subject.

Note: I know that I CAN get to the other server (pings return just fine), but I want to know HOW.

Thanks!
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Force traceroute to use specific NIC?

In /etc/rc.config.d/netconf

There is a primary lan connection. This is the default that traceroute uses.

Also the default route comes into play, what IP is most compatible with the lan card.

netstat -rn

If the default route changes the traceroute will take a different route. Of course messing with any of this could have an impact on Service Guard, which I'm only just beginning to learn.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mark Greene_1
Honored Contributor
Solution

Re: Force traceroute to use specific NIC?

Use the -i option to specify which NIC


mark
the future will be a lot like now, only later
Jeff Schussele
Honored Contributor

Re: Force traceroute to use specific NIC?

Agree with Mark.

Ue the -i lanX or the -s ip_address parms to denote where to go out.

This is evidently a new "feature" introduced recently & it appears to me that w/o these the first NIC in a netstat -in output is chosen as source.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Kevin Wright
Honored Contributor

Re: Force traceroute to use specific NIC?

you can use traceroute -i or traceroute -s
Ron Kinner
Honored Contributor

Re: Force traceroute to use specific NIC?

I believe traceroute -s A.B.C.D will only tell it to use A.B.C.D as the source address but will not force it to use the correct interface. Best to stick with the -i option.

Ron