Ubuntu 18.04 internet issue

Discussions about using Linux guests in VirtualBox.
Post Reply
xMARVELx
Posts: 4
Joined: 6. May 2018, 09:57
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Ubuntu (>=16.04) / CentOS 7 (>=1708)

Ubuntu 18.04 internet issue

Post by xMARVELx »

[ModEdit: Split from viewtopic.php?f=3&t=87820]

The same problem with Ubuntu Desktop 18.04. Ubuntu Desktop/Server 16.04/17.10 works fine.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu Server 18.04 DHCP issue

Post by socratis »

xMARVELx wrote:The same problem with Ubuntu Desktop 18.04.
I have Ubuntu 18.04. I installed 18.04. There is no problem with 18.04.

If you have Bridged-over-WiFi, that may be another problem altogether. Could you please clarify your setup @"xMARVELx"?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
xMARVELx
Posts: 4
Joined: 6. May 2018, 09:57
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Ubuntu (>=16.04) / CentOS 7 (>=1708)

Re: Ubuntu Server 18.04 DHCP issue

Post by xMARVELx »

host: Windows 10 1803 (17134.1)
host network: via ethernet
guest: Ubuntu Desktop 18.04
guest network: NAT or Bridge adapter
VirtualBox 5.2.10 (r122406)

logs and screenshots:
Attachments
ubuntu-18.04-log-after-install.zip
After install: logs for NAT and Bridge, screenshots
(232.5 KiB) Downloaded 122 times
ubuntu-18.04-log-before-install.zip
Before install: logs for NAT and Bridge, screenshots
(237.63 KiB) Downloaded 93 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu Server 18.04 DHCP issue

Post by socratis »

First of all, if you can avoid it, do not include screenshots when you can simply include the text. It's smaller, you can copy/paste it, and it's searchable. Always prefer that, it saves a (virtual) tree or two... ;)

Second, I'm not sure I follow. What's the problem? I see that you successfully got an IP address in all cases.

And what's the "before install"/"after install". Install of what? Before/after what?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
xMARVELx
Posts: 4
Joined: 6. May 2018, 09:57
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Ubuntu (>=16.04) / CentOS 7 (>=1708)

Re: Ubuntu Server 18.04 DHCP issue

Post by xMARVELx »

1. Logs preferred!
2. That's it! Got an IP, DNS but no internet access at all.
3. My bad. Here I had to explain.
Before install: created new vm setup, inserted ISO image and passed to "Try Ubuntu" with NAT / Bridge network
After install: installed Ubuntu with Guest Additions, start OS with NAT / Bridge network
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu Server 18.04 DHCP issue

Post by socratis »

xMARVELx wrote:1. Logs preferred!
Not always. I can not see the "transactions"/"discussion" between the guest and the DHCP server if you are in Bridged mode.
xMARVELx wrote:2. That's it! Got an IP, DNS but no internet access at all.
Then you do NOT have the same issue. I'm splitting your post. Read the thread the I split you from. There was a DHCP problem. It was even in the title!!! That's why it's a bad idea to post a "me too", when you haven't actually read the thread carefully...
xMARVELx wrote:Before install ... After install
Ah, OK, you talk about the LiveDVD, versus the actually installed in the VM, OK, got it...



Try the following commands from a Terminal on your guest. I've included sample output that you should be focusing on:
$ ifconfig
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:40:51:1a  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0

$ route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3

$ ping <DefaultGateway>    <-- tests your connectivity
$ ping 8.8.8.8             <-- tests outgoing connectivity
$ ping google.com          <-- tests name resolution
Report any misconfiguration, or any errors from the "ping" commands.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
xMARVELx
Posts: 4
Joined: 6. May 2018, 09:57
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Ubuntu (>=16.04) / CentOS 7 (>=1708)

Re: Ubuntu 18.04 internet issue

Post by xMARVELx »

I did everything you asked for.

And this is what I noticed:
  • Ping by domain name failed. Then I decided to check the local DNS server with nslookup. The result was positive. After that all the other sites started to ping - internet is appears.
  • Also if I manually set the DNS server in the connection - internet is appears.
All my actions and results in the attachment.

Code: Select all

$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::214b:1391:7cf:d51a  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:4f:3a:33  txqueuelen 1000  (Ethernet)
        RX packets 261  bytes 187717 (187.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 253  bytes 31634 (31.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 100  bytes 7788 (7.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 100  bytes 7788 (7.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
10.0.2.0        0.0.0.0         255.255.255.0   U     100    0        0 enp0s3
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s3

$ ping -c 4 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=0.193 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=64 time=0.408 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=64 time=0.294 ms
64 bytes from 10.0.2.2: icmp_seq=4 ttl=64 time=0.298 ms

--- 10.0.2.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3074ms
rtt min/avg/max/mdev = 0.193/0.298/0.408/0.077 ms

$ ping -c 4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=20.4 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=19.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=21.9 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=20.2 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3169ms
rtt min/avg/max/mdev = 19.653/20.557/21.960/0.855 ms

$ ping -c 4 google.com
ping: google.com: Name or service not known

$ nslookup -q=A google.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 108.177.14.102
Name:	google.com
Address: 108.177.14.101
Name:	google.com
Address: 108.177.14.100
Name:	google.com
Address: 108.177.14.139
Name:	google.com
Address: 108.177.14.138
Name:	google.com
Address: 108.177.14.113

$ nslookup -q=A google.com 192.168.1.1
Server:		192.168.1.1
Address:	192.168.1.1#53

Non-authoritative answer:
Name:	google.com
Address: 108.177.14.102
Name:	google.com
Address: 108.177.14.113
Name:	google.com
Address: 108.177.14.138
Name:	google.com
Address: 108.177.14.139
Name:	google.com
Address: 108.177.14.100
Name:	google.com
Address: 108.177.14.101

$ ping google.com
PING google.com (108.177.14.102) 56(84) bytes of data.
64 bytes from lt-in-f102.1e100.net (108.177.14.102): icmp_seq=1 ttl=46 time=36.8 ms
64 bytes from lt-in-f102.1e100.net (108.177.14.102): icmp_seq=2 ttl=46 time=34.4 ms
64 bytes from lt-in-f102.1e100.net (108.177.14.102): icmp_seq=3 ttl=46 time=36.8 ms
64 bytes from lt-in-f102.1e100.net (108.177.14.102): icmp_seq=4 ttl=46 time=36.8 ms

--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3055ms
rtt min/avg/max/mdev = 34.488/36.262/36.899/1.024 ms
Last edited by socratis on 6. May 2018, 20:41, edited 2 times in total.
Reason: Replaced attachment with actual text.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu 18.04 internet issue

Post by socratis »

I replaced your attachment with the actual text, it was much easier and the text wasn't that huge. Thank you for the commands/replies!

The problem I see is in your DNS. In that case, read ch. 9.11.6 Using the host’s resolver as a DNS proxy in NAT mode, and issue the command:
  • VBoxManage modifyvm "<VM name>" --natdnshostresolver1 on
where that "1" you should replace with the Adapter number where NAT is. So, if you have your "Adapter 2" set up to be as NAT, then that number becomes "2", etc.

And "<VM name>" is ... your VM name. In the last log that you attached that was "ubuntu-18.04-clean".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply