Operating System - HP-UX
1832469 Members
2708 Online
110043 Solutions
New Discussion

How to change the default source ip for traceroute?

 
MA Qiang
Regular Advisor

How to change the default source ip for traceroute?

'traceroute -s sourceip targetip' can work.
But 'traceroute targetip' always use MC/SG's pkg_IP. How to set the default source ip for traceroute?

Thanks.
7 REPLIES 7
Warren_9
Honored Contributor

Re: How to change the default source ip for traceroute?

hi,

use "-i" option if having multiple network interfaces.

Good Luck!
Armin Kunaschik
Esteemed Contributor

Re: How to change the default source ip for traceroute?

There is no way to change the default behavior of traceroute. There is no config file!

You have to add -s and/or -i option always if you desire that functionality!

My 2 cents,
Armin
And now for something completely different...
Kofi ARTHIABAH
Honored Contributor

Re: How to change the default source ip for traceroute?

Have you considered creating an alias to handle this?

nothing wrong with me that a few lines of code cannot fix!
Sยภเl Kย๓คг
Respected Contributor

Re: How to change the default source ip for traceroute?

Look at the man page, that itself clarify your doubts

Use need to specify the network interface card thorugh with which the tarceroute should work using -i option

-i iface : Specify a network interface to obtain the source IPv4 or IPv6 address for outgoing probe packets. This is normally only useful on a multi-homed host. (See the -s flag for another way to do this.)

Regards,
Sunil


Your imagination is the preview of your life's coming attractions
Patrick Preuss
Trusted Contributor

Re: How to change the default source ip for traceroute?

Hi

it might be sufficent to change the metric of the other interfaces so the kernel can decide the SG interface is the best exit point from the system. depends on you enviroment.

hth

patrick marc
Goodbye Douglas! Whereever you are now, keep your towel and don't panic.
MA Qiang
Regular Advisor

Re: How to change the default source ip for traceroute?

Dear patrick,
Could you tell me how to change the metric of the other interfaces?

Thanks.

Steven E. Protter
Exalted Contributor

Re: How to change the default source ip for traceroute?

I close look with tcpdump or ethereal will show the actual source of the traffic is the Master NIC card, not the floating IP.

I'm mystified as to why this is so important anyway. Please elaborate.

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