I am trying to use traceroute as show in linux basic course (network troubleshooting) but when I run this in my own VM ubuntu i am only getting 1st gateway entry then “*” in remaning 29 hopes. but my connection is good and i am able to tracert google.com but can’t traceroute in ubuntu VM.
traceroute google.com
traceroute to google.com (*google_IP*), 30 hops max, 60 byte packets
1 _gateway (*gateway_IP*) 2.793 ms 2.609 ms 2.472 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
Please guide to Understand.
Thank You.
I assume that you are using a VM inside virtualbox. There are some limitations with the protocol used for traceroute
when using this configuration.
There is an alternative to traceroute
called mtr
(my traceroute) which does work, has a nicer output, plus it continuously tests the route until you hit q
to quit the program.
sudo apt install -y mtr
mtr google.com
I am using VMware Workstation for Ubuntu virtualization, and inside it, traceroute
is showing showing above output while mtr
only showing the gateway ip and destination ip (other routes are “*”, may be mtr is using icmp). I think, as with VirtualBox, VMware may have similar limitations. On my other desktop where I have installed Ubuntu as primary OS, both commands work fine.
Maybe that is the case with VMware workstation as well. This and VirtualBox are “Type-2” hypervisors, which means they are not part of the host machine’s kernel. They have to make syscalls to make virtual devices.
If running a “Type-1” hypervisor like ESX-i, Hyper-V, Proxmox or KVM which is built into the host’s kernel, things should work properly.
mtr
works OK for me using virtualbox, and traceroute works properly on my Hyper-V VMs
Yes, I have switched to bridge network connection and its working now. for that also i need to use VMware pro. Thanks for your reply.