LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   public IP and Private IP (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/public-ip-and-private-ip-4175460666/)

mysqldb02018 05-04-2013 04:25 AM

public IP and Private IP
 
I have installed Oracle Linux on virtual Box

Problem that I am facing

Network Interface is : Adapter (NAT)

When Internet connected it shows IP from the ifconfig output but when Internet is disconnected Ifconfig does not show any IP

When I change IPv4 setting from Automatic(DHCP) to Manual and enter IP manually but in this case my internet does not works

catkin 05-04-2013 06:06 AM

A VirtualBox VM with network adapter configured for NAT and guest OS configured as a DHCP client should get its address from the DHCP server built into VirtualBox running on the host.

So it's unexpected that the guest does not get an address depending on whether the Internet connection is up.

How do you connect to the Internet?

Is there anything unusual about your VirtualBox installation on the host?

Can you re-check the VM's network adapter configuration?

mysqldb02018 05-04-2013 07:34 AM

1 Attachment(s)
Quote:

Originally Posted by catkin (Post 4944686)
A VirtualBox VM with network adapter configured for NAT and guest OS configured as a DHCP client should get its address from the DHCP server built into VirtualBox running on the host.
So it's unexpected that the guest does not get an address depending on whether the Internet connection is up.

I am using root user that is getting IP automatically when internet runs

Quote:

How do you connect to the Internet?
There wired internet connection and it connect automatically when oracle linux runs in virtual Box
If this is disable the click on right top for "Auth eth1"

Quote:

Is there anything unusual about your VirtualBox installation on the host?
I don't find such thing

Quote:

Can you re-check the VM's network adapter configuration?
Adapter(NAT) Cable connected shows this status

I have attached screenshot also

jefro 05-04-2013 03:24 PM

I think we need to start over at some basics.

Virtual machines have a number of ways to provide a network. Bridged, NAT, local and not connected are common. Then we need to be sure the OS has support for the Virtual machine's virtual nic.

Maybe start with sudo ifconfig results.


In NAT, the VM has a virtual router software that acts like a real router to connect to your hosts nic ip. That assumes that your OS has enabled a network card too.

catkin 05-07-2013 10:49 PM

Quote:

Originally Posted by mysqldb02018 (Post 4944718)
I am using root user that is getting IP automatically when internet runs

What does "the internet runs" mean? How does your VirtualBox host computer connect to the Internet? "Always on" Internet connections are common. Your posts suggest yours is sometimes on and sometimes off. How does that work?

The operating system running in a VirtualBox virtual machine has to connect to the Internet via the VirtualBox host computer's Internet connection.

Quote:

Originally Posted by mysqldb02018 (Post 4944718)
There wired internet connection and it connect automatically when oracle linux runs in virtual Box
If this is disable the click on right top for "Auth eth1"

Looking at the screen shot, it looks as if you mean a wired network connection, not a wired internet connection ... ?

Maybe when you wrote "When Internet connected" you meant when the VirtualBox virtual machine has its virtual network adapter disabled or the virtual cable unplugged ... ?

Also it's unusual that your ifconfig output shows eth1 but not eth0.

We seem to be having some difficulty using words. Maybe best to use screen shots and copy/paste.

Please post:
  • Two screen shots, taken on the VirtualBox host, showing the virtual machine's first and second network adapters.
  • A screen shot like the last one but with the windows moved so the ifconfig output can be fully seen. WOuld be nice to see the other partly hidden window, too.
  • The output of lspci, run on the VirtualBox guest. This could be copied from the terminal and pasted into this LQ thread or it could be a screen shot.


All times are GMT -5. The time now is 10:33 PM.