Avatar of chalie001
chalie001
 asked on

no internat in vm

hi there is no internet in my vm but my host got internat
hostnetwwkhost3332.PNG
Linux* Virtual BoxVirtualizationNetworkingLinux Networking

Avatar of undefined
Last Comment
chalie001

8/22/2022 - Mon
noci

Is the "Remote NDIS based Internet Sharing Device #3'  the network adapter where your interconnection is at?
With bridged you normally need to be on the host network.
chalie001

ASKER
am in host
and host got internat
host

Is the "Remote NDIS based Internet Sharing Device #3'  the network adapter where your interconnection is at?=yes
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

can you ping 8.8.8.8 ?

does your VM get a DHCP IP Address from your Network LAN?

what other options have you got if you click the drop down ?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
noci

Why aren't you using enp3s0 / emp8s0 on with host system (in the drop down for the bridged interface?) but  "Remote NDIS based Internet Sharing Device #3"
arnold

Look at /etc/resolv.conf to see if you have name servers defined.

What is 1.1.1.1?
Ping 8.8.8.8
Compare the ip you got on the host and what you have in the VM, they shoukd be on the same network.
If they are not, you have an issue that would explain the issue.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

one.one.one.one (internet!)

8.8.8.8 for the newbies!

quicker and easier to type...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
arnold

Thanks Andrew for the clarification.
The confusing and reason for my question, the lookup was for Google, yet ping was directed at 1.1.1.1.
noci

Some well known DNS servers:
1.1.1.1 is  operated by cloudflare, the IP is borrowed from Chinanet ( owns the networks 1.0.0.0, 1.1.2.0)
9.9.9.9 is operated by Quad 9.
4.2.2.2 is Level 3 DNS service.

There were a few more (4.4.4.4 used to be another, seems non-functional now)
chalie001

ASKER
am geting
pinghost32hostt
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
arnold

Please post the following from host and VM

netstat -rn

Ping often is blocked on certain isp's.

I am looking what IPs the host has and what ip does the VM has as well as the default gateway is for both

Ping the default gateway from host and vm
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

what is IP Address 192.168.56.104

Also does your VM get an IP Address DHCP from your LAN ?
noci

@arnold: google (8.8.8.8) & cloudflare (1.1.1.1) and Level 3 (4.2.2.2) do allow ping .

ping is just a check for reachability. traceroute will better show  the route and where it blocks.

Host is the machine running VirtualBox
Guest is the machine running inside VirtualBox

interface info:
Windows: ipaddr /all  & netstat -rn
Linux:  ifonconfig -anetstat -rn    on some systems: ip addr showip route show

For ipv4 only give: -4 on netstat & ip commands or IPv6 use -6 on nestat & ip commands.

In this case the router 192.168.56.104 is so friendly to tell it cannot send a packet to the host ... most probably a route failing to send to next gateway.
which might be a problem on the host, or the local adapter.
We are missing info about the network.... (host network range & netmask & default gateway addresses
We are missing info about the host adapter that is connected to the network
We are missing info about: "Remote NDIS based Internet Sharing Device #3"   which might be the same as previous item (should be) but might not.
We are missing info about the guest interface(s)   in the guest: ifconfig -a
What are interfaces enp0s3 & enp0s8? and what are their settings?  ifconfig -a on the system
What is the expected traceroute -I 1.1.1.1
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
arnold

Thanks, noci, I am aware..

I posed the request to get the IPs/routing table from the asker.

Andrew provided similar guidance.
chalie001

ASKER
host
>netstat -rn
===========================================================================
Interface List
  7...40 8d 5c eb c2 b1 ......Realtek PCIe GBE Family Controller
 15...0a 00 27 00 00 0f ......VirtualBox Host-Only Ethernet Adapter #3
 21...00 a0 c6 00 00 00 ......Remote NDIS based Internet Sharing Device #3
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.100    331
          0.0.0.0          0.0.0.0     192.168.56.1    192.168.0.100    331
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      192.168.0.0    255.255.255.0         On-link     192.168.0.100    331
    192.168.0.100  255.255.255.255         On-link     192.168.0.100    331
    192.168.0.255  255.255.255.255         On-link     192.168.0.100    331
     192.168.56.0    255.255.255.0         On-link    192.168.56.103    281
     192.168.56.0    255.255.255.0         On-link     192.168.0.100    331
   192.168.56.103  255.255.255.255         On-link    192.168.56.103    281
   192.168.56.115  255.255.255.255         On-link     192.168.0.100    331
   192.168.56.255  255.255.255.255         On-link    192.168.56.103    281
   192.168.56.255  255.255.255.255         On-link     192.168.0.100    331
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link    192.168.56.103    281
        224.0.0.0        240.0.0.0         On-link     192.168.0.100    331
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link    192.168.56.103    281
  255.255.255.255  255.255.255.255         On-link     192.168.0.100    331
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0      192.168.0.1  Default
          0.0.0.0          0.0.0.0     192.168.56.1  Default
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    331 ::1/128                  On-link
 15    281 fe80::/64                On-link
 21    331 fe80::/64                On-link
 21    331 fe80::3c6f:b892:2c04:6c57/128
                                    On-link
 15    281 fe80::6462:52e5:4a56:1ec6/128
                                    On-link
  1    331 ff00::/8                 On-link
 15    281 ff00::/8                 On-link
 21    331 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

host43host321ping322vmnethost.PNG
client322.jpg
ifconfig32.PNG
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

use this device...

Realtek PCIe GBE Family Controller

this is the physical interface you need to bridge to.

So back to very beginning, edit the VM settings, network interface and select Realtek PCIe GBE Family Controller in the drop down.

Restart the VM.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
arnold

you need to post the output from the VM netstat -rn not netstat -n
-n just tells netstat not to resolve IPs/Names
-r tells it to print routing table

Andrew pointed out that you are bridging the VM's network to an incorrect device.

When you adjust as he suggested, your LAN ip on the VM will match the LAN IP on the host, 192.168.0.x
noci

Multiple default gateways are a recipe for trouble ahead...
Use only one active interface and as a result only ONE default gateway. (after implementing Andrews advice).
If you use your server as a Gateway of some kind (proxy server etc.) then the Internal interface MUST not be configured with a default gateway.
chalie001

ASKER
i get
adpterroutt3routt43
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
noci

and how about enp0s8? (or adapter 2, 3, 4?)
chalie001

ASKER
adpter 3,4 is empty
adpter421.PNG
noci

So you need an on host network for adapter 2? (the 10.0.3.0/24 one)... You do NOT want it to be NAT (as that is connected to the larger network).
Please remove the Default gateway for that on the guest.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
arnold

You do not want to attach it to nat, nat means the traffic will go through the host that will function as the router and then out through the physical router in your environemtn.

Change option attached to: bridged
in the third drop down instead of the NDIS  select the Realtec as you have in your last post.
Note you may have to reset/refresh the IP on the VM to get a new IP from the bridged LAN and IP 192.168.0.x.

you could go through the virtualbox console and run
ifconfig enp0s3 down
ifconfig enp0s3 up
that should refresh the IP which is managed through NetworkManager.
noci

@arnold: adapter 1 = bridged, adater 2 = NAT.. so imho adater 2 should be off ... or unconfigured inside the client.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Do you ever get a IP Address in this VM ?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
chalie001

ASKER
there is no realtec realtec
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

you are selecting the WRONG drop down....

try above.....next to NAME

that option you are selecting is the Virtual Adaptor in the VM! e.g. the virtual interface!
arnold

need to see the VM;s netstat -rn to see whether the automatic metric assigned to each virtual adapter properly refects that the one on adapater #1 is the preferred path and the one that has the 192.168.0. IP address.

not sure what the purpose of the second one is.

The issue since NetworkManager manages these it could very well be that the wrong adpater is set as primary and in this configuration both get a default gateway and the path is thus set as well by the wrong adapter.

manual configuration of the network interfaces will assure that the NATEd to host adapter will not have a default gateway and would resolve the issue that way.
Your help has saved me hundreds of hours of internet surfing.
fblack61
chalie001

ASKER
checknetsatrttech
noci

Lets clean this up a little:
Shutdown the guest.
start from the basic:
On the Host:
    In The virtual box VM setup:
         disable network adapter 2, 3 & 4.
         Enable adapter 1
              Chose the Bridged mode, Realtec  connection.
         (adapter type etc. use defaults).
Startup the Guest:
   Verify:
   - only ONE default gateway exists, (through netstat -rn)
   - that the system has an IP address belonging to the host network connected on the Realtec adapter.

Then try to ping the world...
IF there are problems we need:
  from the host:
 * ipconfig /all
 * netstat -rn
 from the Guest
 * ifconfig -a  
 * ip addr show
 * netstat -rn
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

that is the correct nic you should be using.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
chalie001

ASKER
arnold

What is the purpose for the second Nic?
Try disabling the second Nic since currently it seems it is the only Nic that gets an ip,
chalie001

ASKER
i did adpter
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
noci

How did the  guest get the IP address?
DHCP?
Static?

The host network seems to be 192.168.0.0/24   ...
Soo i would also expect a briged guest get  192.168.0.?
also with gateway 192.168.0.100.

So If you have DHCP then the interface in the guest needs to be restarted. ifdown enp0s3 ; ifup enp0s3

If you have a static address then configure the right IP addresses .. in the right network & netmask.
Netmask = 255.255.255.255   (or CIDR =24)
Default gateway  = 192.168.0.100 (just like the host).
The address must be unique on the network.

If your host get the address using DHCP, reconfigure your Guest to also use DHCP.
arnold

Echo noci's sentiment

The ip in the VM with the primary default gateway on the bridged network, 192.168.0.0/24

That is what is being the obstacle in your VMs access to the Internet.
chalie001

ASKER
How did the  guest get the IP address?
DHCP?=yes
Static?=no
dwn
If your host get the address using DHCP, reconfigure your Guest to also use DHCP. how do i do this
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
arnold

Please note that the fact that your system fails to access the outside provide absolutely no useful information outside the confirmation that you are experiencing issues.

In order to help you resolve your issue there were several requests for info.
From the VM, since the host has access, after the first info from the host, there are no further info needed IMHO.
Ifconfig -a
Netstat -rn

From all being seen is that while your VM was enabled both network interfaces, the functionality is not inherited from the host such that potentially during the install, the "wrong" network card as active and as primary.
Thus is based on your VM being initially configured with two network cards, while the ip it was getting was a natted ip from the host.

One thing to try is to switch the roles on the VM settings nic1 -natted nic2 -briged
This if OS install remains as is, shoukd switch the IPs in use on the VM.
You can later on go through NetworkManager (though often, when I setup a server, I disable the network monitor in favor of other/more basic network handler.)

To handle the second Nic.
noci

Oracle Linux is a derivative of RHEL (Like CentOS).....

So  in /etc/sysconfig/network-scripts
there is a ifcfg-enp0s3  script file.

Inside there is a set of symbol assignments:
Inside there is one: entry
BOOTPROTO=static
(IPADDRESS, NETMASK or PREFIX) etc.
or
BOOTPROTO=dhcp

You want to set BOOTPROTO todhcp using an editor (nano, vi, etc.)

then do:
ifdown enp0s3
ifup enp0s3

and it should start working
chalie001

ASKER
boostrat the vm is not starting is doing this forever
inet
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
noci

No.... !
You didn't get any instruction to put ifup/ifdown in the config script... you were instruct to DO (aka run) the commands.
Now when running ifup (the first time) it will try to run ifup and run ifup and run ifup..... and thus never end running ifup.

Stop the VM. Disable ALL network interfaces.  restart the VM (without network interfaces!!!).

The script ifcfg-enp0s3 is called (or rather sourced) when ifup/ifdown is called from the commandline.
BOOTPROTO=none is in the config script... ==> it will fail to do anything in the future on reboot.

So please edit the ifcfg-enp0s3 script and change BOOTPROTO=none -> BOOTPROTO=dhcp
remove the ifup/ifdown there....
SAVE THE SCRIPT.

Shutdown the VM. Enable network interface 1, restart the VM.
chalie001

ASKER
i did this still samedisabled
chalie001

ASKER
thanks i have this now
bootstari did its taking long
dhcp
still no internat
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
noci

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chalie001

ASKER
i did this also
internat32
noci

Answered via private session. Duration 00:00:07

No effective communication in chat session.
noci

What is the value of BOOTPROTO in ifcfg-enp0s3?

After you changed this to the dhcp value you need to enable the networkinterface #1 on the vm config.
And restart the machine.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
chalie001

ASKER
thanks noci