LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   traceroute command showing only 2 hops on Ubuntu 16.04 (VirtualBox); tracert works on host OS (Win10) (https://www.linuxquestions.org/questions/linux-networking-3/traceroute-command-showing-only-2-hops-on-ubuntu-16-04-virtualbox-%3B-tracert-works-on-host-os-win10-4175606831/)

¯\_(ツ)_/¯ 05-28-2017 12:13 PM

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

-Thanks

yancek 05-28-2017 03:43 PM

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?

¯\_(ツ)_/¯ 05-28-2017 08:00 PM

Alright so I used 'traceroute google.com'
using if config i get: 10.0.2.15; this is the IP I am comparing it to
and yes it is bridged

yancek 05-28-2017 08:26 PM

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?

jefro 05-29-2017 03:12 PM

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.

¯\_(ツ)_/¯ 05-29-2017 09:52 PM

Quote:

Originally Posted by yancek (Post 5716358)
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

¯\_(ツ)_/¯ 05-29-2017 10:05 PM

Quote:

Originally Posted by jefro (Post 5716644)
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

jefro 05-30-2017 02:13 PM

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?

¯\_(ツ)_/¯ 05-30-2017 05:38 PM

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?

yancek 05-30-2017 06:36 PM

Check the link below which gives a brief description of NAT vs. Bridged, need to scroll down the page a bit.

https://askubuntu.com/questions/9502...g-should-i-use

The link below explains Bridged in the VirtualBox Manual.

https://www.virtualbox.org/manual/ch...etwork_bridged


All times are GMT -5. The time now is 01:53 AM.