LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-28-2017, 12:13 PM   #1
\_(ツ)_/
LQ Newbie
 
Registered: May 2017
Distribution: Ubuntu 16.04
Posts: 5

Rep: Reputation: Disabled
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
 
Old 05-28-2017, 03:43 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
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?
 
Old 05-28-2017, 08:00 PM   #3
\_(ツ)_/
LQ Newbie
 
Registered: May 2017
Distribution: Ubuntu 16.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-28-2017, 08:26 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
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?
 
Old 05-29-2017, 03:12 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
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.
 
Old 05-29-2017, 09:52 PM   #6
\_(ツ)_/
LQ Newbie
 
Registered: May 2017
Distribution: Ubuntu 16.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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
 
Old 05-29-2017, 10:05 PM   #7
\_(ツ)_/
LQ Newbie
 
Registered: May 2017
Distribution: Ubuntu 16.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
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
 
Old 05-30-2017, 02:13 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
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?
 
Old 05-30-2017, 05:38 PM   #9
\_(ツ)_/
LQ Newbie
 
Registered: May 2017
Distribution: Ubuntu 16.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
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?
 
Old 05-30-2017, 06:36 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
traceroute doesn't find all hops - tracert does hua Linux - Networking 10 01-15-2015 06:10 AM
how can i block traceroute or tracert with iptables? mizogomo Linux - Security 7 05-21-2013 08:13 PM
BASH command tracert/traceroute not recognized phantom_cyph Linux - General 6 02-19-2007 10:34 AM
tracert/traceroute dav_y2k Linux - Networking 1 12-06-2006 11:25 AM
Traceroute, tracert??? MattLaw Linux - General 9 05-02-2004 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration