This content has been marked as final. Show 27 replies
You wrote:I'm not sure what your problem is. If you assign a static IP it must be in a valid range that is routed via your network router, using NAT to connect outside or by your ISP. Like I previously mentioned, 192.168 numbers are a private network number and cannot be used on the public Internet without NAT services.
I see eth0 is currently "192.168.168.20" that is the static IP I configured previously.
You still neglected to say how your home network is connecting to your ISP.
A typical example. Router is connected via ADSL. It is configured to automatically connect to ISP. It is configured as a DHCP server.
The router has a private (non-Internet) network address, e.g. 192.168.0.1. When it connects to the ISP, it gets an Internet IP address from the ISP.
PC connects to router and, via DHCP, gets address 192.168.0.100. Automatically, the default gateway is configured as 192.168.0.1 (the router) on the PC - and via it, the PC now has Internet access.
VM is created on PC. VM's network card should be configured as bridged - as this is the easiest ito setup. This means the VM itself is "directly" on your home network. The VM o/s can be configured as DHCP - which means it too (like its host) will get an IP from the router, it too will use the router as default gateway, it too will have Internet access via the router.
No special magical configuration settings needed.
Now if this does not work for you, explain in DETAIL how your home network looks like, HOW you connect to your ISP, and WHAT is used (e.g. PPPoE) to establish that connection.
And keep in mind that these are network issues and not Linux issues and are actually off topic to this forum. So be accurate, be detailed, so we can wrap up this off topic discussion.
There are still too many unknowns.
a) Why do you have setup a virtual interface on the guest system (virbr0)?
b) How did you configure your TCP/IP setup?
c) How did you configure DNS?
d) How did you setup the Virtual Machine Network interface in VirtualBox?
e) Can you connect to the Internet from the host system?
f) Why is device eth0 down?
g) What are you TCP/IP requirements and what are you trying to achieve?
You seem to have a combination of issues and a strange setup.
Strangely, i 2 have the virtual interface setup on the guest.. on both of my VMs.. surely has not been done manually ..
virbr0 Link encap:Ethernet HWaddr FE:3F:23:85:11:D4
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
seems like its been created to make one's life easier - mediocre n/wing? .. frankly i've never used it myself, maybe would give it a try to check out if it really works..
The virbr0 interface comes from the libvirt package and is used as a virtual bridge (NAT) to connect XEN virtual machines.
XEN is a type 1 hypervisor, which is to be installed on a bare metal machine. VirtualBox is a type 2 hypervisor. Running a type 1 hypervisor under a type 2 hypervisor is a bad idea and results in very poor performance and reliability issues.
If you perform a default server installation installation of OL 5 or OL 6 you do not get the virbr0 interface. I have many VirtualBox guest systems and none of them have a virbr0 interface.
Did you install any virtualization like KVM under OL 6? I guess that would be similar to running VirtualBox inside a virtual machine. Using a virtual machine to run a virtual machine cannot be a good idea.
What did you install? Did you perhaps choose "Desktop Virtualization" when installing the OS?. If so, that's a mistake and I suggest to reinstall the system using the default "Server" options.
Thanks for the comprehensive reply dude, i don't exactly remember if i installed KVM or not but yes the installation was customized as i installed most of the stuff present on the DVDs to overcome the situation of installing stuff again around apache, loadbalancing, RHCS etc which are present as separate packages on the media.
i don't think i'll be dismantling any of my VMs as have got lot of stuff working on these ;-) ATM and have spent long hours setting the stuff up, but just to make sure my bonding woes in the other thread is not becaues of this would try it out on a new VM with typical installation.
HuaMin Chen wrote:Then that VM has been incorrectly setup.
OK, other Vboxes (running in OL 5.? or Win 7 64-bit) are all connected fine using Bridged adapter to the host, by TCP/IP. But the current Vbox is having a problem and cannot connect to the Ineternet. How to resolve this?
Internet connectivity is as simple as:
- using a bridge adapter
- VM getting IP from ADSL/Internet home router
- VM automatically setting that router as default gateway
The only interfaces a VM should typically have, is eth0 and lo. No additional interfaces are needed, unless you are using virtualisation for doing clustering or load balancing, or for running special networking features like s/w routing, firewalls, proxy servers, and so on. This also means having more than just bare basic networking experience.
So if you only have basic network knowledge, do not set up more than 1 interface for the VM, make that interface bridged and use DHCP - as then it will work out-of-the-box.
Use NAT only when you want to hide the existence of that VM from your home LAN - which does not make much sense on a home LAN. This option is typically for running a VM on an office machine where there are strict network policies in place (e.g. switch's ports are set to MAC address and adhoc IPs on a port is not allowed).