traceroute command showing only 2 hops on Ubuntu 16.04 (VirtualBox); tracert works on host OS (Win10)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
traceroute command showing only 2 hops on Ubuntu 16.04 (VirtualBox); tracert works on host OS (Win10)
Hey, I'm extremely new so maybe there's something really simple I'm missing but traceroute shows 2 hops that are the same IP (10.0.2.2)
I was thinking it was maybe because I'm running this on VirtualBox? However, that's not my IP either
Post the exact command you used.
When booted to Ubuntu in VirtualBox and running either: ifconfig OR ip addr what IP address do you get? Is that how you got the IP address? It's not going to be the same as the host. Do you have the network set to bridged?
I don't know what the problem would be. Running "traceroute google.com" as you did from Linux Mint on VBox, I get 9 hops, the first being the local gateway. Can you ping your gateway from ubuntu?
10.0.2.15 is a virtual router IP isn't it? (NAT connection in VM) If you set static and then bridged it may not work as planned.
That isn't really an issue because normally one can easily let the VM provide this virtual router and it is supposed to usually connect. In linux you may have to set dns name if it isn't getting it from router.
I don't know what the problem would be. Running "traceroute google.com" as you did from Linux Mint on VBox, I get 9 hops, the first being the local gateway. Can you ping your gateway from ubuntu?
Yes I'm able to ping my gateway and I see what you're saying because that's how the tracert worked on win10
10.0.2.15 is a virtual router IP isn't it? (NAT connection in VM) If you set static and then bridged it may not work as planned.
That isn't really an issue because normally one can easily let the VM provide this virtual router and it is supposed to usually connect. In linux you may have to set dns name if it isn't getting it from router.
So what you're saying is that the dns query is failing because it isn't really getting it from the router?
As said before I'm extremely new so sorry of how I'm interpreting your reply sounds weird and maybe really wrong :P
We all need help sometimes so don't worry. We'll try to figure this otu.
I'm saying bridged and nat are two different things. It could be that your ip range is really bridged. Sooo... I think we need to go back to the way the VM connects the client to the host maybe?
Ok so I checked the network settings in of my Ubuntu and it is attached to NAT, not the bridged adapter.
So if you don't mind, what would be the difference if it was set to bridged versus nat?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.