[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

How to use custom gateway with traceroute/ping?

Hello, I feel like I am unable to do ping and traceroute with my default kernel routing table. Is there a way to put the custom router ip (gateway address) while using ping/traceroute. Thanks!
0
beer9
Asked:
beer9
  • 2
2 Solutions
 
Sikhumbuzo NtsadaCommented:
Try the following, substitute the IP addresses with yours and subnet mask:

route add -net 192.168.98.0 netmask 255.255.255.0 gw 192.168.99.1
0
 
Sikhumbuzo NtsadaCommented:
Then  ping / traceroute
0
 
Saikapian_4739Commented:
This is a bit tricky question if you understand. Lets understand it step by step :

You are unable to ping or traceroute using your default routing table, which means that you are unable to connect to particular host you are trying to connect.

So first thing to try out here before changing your router address or default gateway is to test if you are able to ping your Default gateway or  router address, if the ping succeeds that means your router or Default is unable to connect to remote host. But if the ping to Default GAteway also fails it means that there is something wrong at your end since your own system in unable to ping the Gateway.

So in that case you need to check the network connectivity, settings for your network card.

Changing the Default gateway or router will work only if the previous Gateway is not routing the network packets to next destination but it able to recieve packets from your system

I think it will help.
0
 
beer9Author Commented:
Thank you! :-)
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now