Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Is there a traceroute equivalent in F5 like the format of ping -I <source ip> <destination ip>

T0nyP
Cirrus
Cirrus

Hi F5 Community,

Is there a traceroute equivalent in F5 like the format of ping -I <source ip> <destination ip>?

Can I ask what is the exact command for traceroute or tracepath?

Or it is not possible?

Thanks much in advance.

1 ACCEPTED SOLUTION

Hi T0nyP,

Yes, this should work if the self IP is in route domain 0. 

Cheers, Kai


iRule can do… 😉

View solution in original post

8 REPLIES 8

mihaic
MVP
MVP

you should be able to do this:

run util traceroute -s self_non-floating_IP destination_IP

Kai_Wilke
MVP
MVP

Hi T0nyP,

you need to start a SSH connection to your LTM using either the build-in "root" account or a custom user account with "advanced shell" permissions.

Then you could issue either a "PING" or "TRACEROUTE" command. To specifiy a source IP your have to use the command line switches outlined in the sample below:

 

[itacs@kw-f5-dev:Active:Standalone] ~ # traceroute -s 10.0.0.1 8.8.8.8
[itacs@kw-f5-dev:Active:Standalone] ~ # ping -I 10.0.0.1 8.8.8.8

 

To understand the valid command line options of those commands you can read the man pages of the command via:

 

[itacs@kw-f5-dev:Active:Standalone] ~ # man ping
[itacs@kw-f5-dev:Active:Standalone] ~ # man traceroute

 

Special Note: If you are working with route domains you may need to prefix the "ping" or "traceroute" command with the "rdexec" command. See the samples below how to execute command for e.g. Route-Domain 20: 

 

[itacs@kw-f5-dev:Active:Standalone] ~ # rdexec 20 traceroute -s 10.0.0.1 8.8.8.8
[itacs@kw-f5-dev:Active:Standalone] ~ # rdexec 20 ping -I 10.0.0.1 8.8.8.8

 

Cheers, Kai


iRule can do… 😉

Hi Kai, appreciate the reply. This is the correct format right when you try to your F5 LTM?

example
traceroute -s <F5 self_IP>  <destination_IP or fqdn>

Hi T0nyP,

Yes, this should work if the self IP is in route domain 0. 

Cheers, Kai


iRule can do… 😉

Hi @T0nyP , 
F5 is Linux based so you can use normal Linux traceroute and all of its switches : 
check below urls contain Traceroute with more and more details , you can use it with F5 bash shell : 

https://www.computerhope.com/unix/utracero.htm

 

https://www.geeksforgeeks.org/traceroute-command-in-linux-with-examples/


I use it and it is very useful. 
regards 

_______________________
Regards
Mohamed Kansoh

Thank you and really appreciate the feedback.

Just want to check. I don't have a linux as of the moment.

Would this run using below command?

traceroute -s <source ip> -g <gateway ip>  <destination ip or fqdn>

 

Hey T0nyP,

The -g option is enabling soure-route IP option which is most likely banned from local or internet routers anyway...  

Afaik there is no such option to overwrite the next-hop of the tracert command. Its always based on your local routing table. I might be wrong in this case tho... 

Cheers, Kai

 


iRule can do… 😉

Hello @T0nyP , 
No need to identify your gateway when performing traceroute , 
F5 does this path trace according to Routing table. 
> you can force your F5 appliance to check the path by using "traceroute -s " as you did. 

> I checked this option in F5 bash and it doesn’t work as you said , but there is no need to identify the gateway or next hop , F5 uses ( the gateway or next hop from the "forced source ip " subnet that you identified in your command ". 

> I want to say even if you specified the gateway , and overwrite the one which specified in f5 routing table/next hop , it is a wrong practise to use and it shouldn’t work.

> this is my explanation according to what I understood.
Kindly clarify more , I will follow  up with you. 
Regards 

_______________________
Regards
Mohamed Kansoh