Cant reach the network from Virtual box

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Cant reach the network from Virtual box

Post by Vimuth »

Hi
I just installed RHEL-5.2 on virtualbox-2.2 with no problems whatsoever but I cant access my network from RHEL-5.2 . :cry: Both VM OS and the primary OS are assigned with static IP addresses of same range and the VM's network option is set to "Bridged networking". I tried flushing the IP tables and disabling Selinux on RHEL5(Virtual host) but still cant ping the network. Please advice me on this Sir. Many thanks in advance.

Regards
Vimuth :D
PS: Virtualbox 2.2 is installed on Ubuntu 9.04 x32(Jaunty)
A snapshot of my RHEL's IP configuration is as follows,
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cant reach the network from Virtual box

Post by Perryg »

Try rebooting the Host computer.
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Re: Cant reach the network from Virtual box

Post by Vimuth »

Thank you very much for your advices sir. Anyways that was the first thing I did after installing and configuring the network options on RHEL(Virtual host) But never worked. If you have more suggestions I'm more than willing to try em out. Thanks again.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cant reach the network from Virtual box

Post by Perryg »

There were some network issues with Version 2.2.0 of VirtualBox. You can try updating to Version 2.2.2 and see if it clears up your problem. You may need to wait until next week to do so though. The VirtualBox.org download site is experiencing problems.
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Re: Cant reach the network from Virtual box

Post by Vimuth »

Thank you very much for your advice Mr Perry. Well the deb package I have installed is "virtualbox-2.2_2.2.2-46594_Ubuntu_jaunty_i386" and that's the package with the problem :( Is it this package you said that has network issues? Please do reply Mr Perry its very important that I find a solution sooner because I need to take this set up to a production environment. Out of curiosity would it work if I use the virtual box's conventional bridging scripts aproach?(Last thing I want to try out though) Or should I give it another week as you said and see how things are coming? Thanks.

Regards
Vimuth
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cant reach the network from Virtual box

Post by Perryg »

Aside from the obvious things, firewall, the user being in the vboxusers group on the host, bridged mode, and using the VBox PCnet-FastIII network adapter. I am at a loss. Only other thing I can think of is to try to reinstall the host or Guest additions on the guest. Be sure that the IP addresses are in the same scheme and properly setup in the host and guest. I do not have RHEL right now to try.
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Re: Cant reach the network from Virtual box

Post by Vimuth »

Problem still exists even with the latest version of virtualbox. Please try to help out.
typerlc
Posts: 22
Joined: 20. Jun 2009, 15:32
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: WinXP

Re: Cant reach the network from Virtual box

Post by typerlc »

Can you ping the host from the guest?

Run these commands on both the host and guest and post the output here:

Code: Select all

ifconfig -a
netstat -rn
iptables -nL
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Re: Cant reach the network from Virtual box

Post by Vimuth »

Thank you very much for your concern typeric. No I cannot ping from the host. Find below the output you wanted. Please look in to this. Thnks

####Host ifconfig -a####

eth0 Link encap:Ethernet HWaddr 00:15:58:9c:fd:3b
inet addr:192.168.0.34 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::215:58ff:fe9c:fd3b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:987402 errors:0 dropped:0 overruns:0 frame:0
TX packets:243002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:505750979 (505.7 MB) TX bytes:22746160 (22.7 MB)
Interrupt:23 Base address:0xd000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2878 (2.8 KB) TX bytes:2878 (2.8 KB)

pan0 Link encap:Ethernet HWaddr 8e:b9:28:11:26:99
BROADCAST 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
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

vboxnet0 Link encap:Ethernet HWaddr 00:76:62:6e:65:74
BROADCAST 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
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

####Hostnetstat -rn####
vimuth@vimuth-desktop:~$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.200.155 192.168.0.158 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.170 0.0.0.0 UG 0 0 0 eth0
vimuth@vimuth-desktop:~$

####Host iptables -nL#####

vimuth@vimuth-desktop:~$ sudo iptables -nL
[sudo] password for vimuth:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
vimuth@vimuth-desktop:~$

####Guest ifconfig -a#####
eth0 Link encap:Ethernet HWaddr 08:00:27:C4:FB:21
inet addr:192.168.0.232 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::a00:27ff:fec4:fb21/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5960 errors:105 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:366833 (358.2 KiB) TX bytes:972 (972.0 b)
Interrupt:11 Base address:0xc020

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:760 (760.0 b) TX bytes:760 (760.0 b)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

####Guest iptables -nL####
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited



####Guest netstat -rn###

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
Vimuth
Posts: 9
Joined: 1. May 2009, 19:54
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: RHEL5

Re: Cant reach the network from Virtual box

Post by Vimuth »

Correction cannot ping from the guest***
typerlc
Posts: 22
Joined: 20. Jun 2009, 15:32
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: WinXP

Re: Cant reach the network from Virtual box

Post by typerlc »

Correction cannot ping from the guest***
Does that mean you can ping from the host? What ping commands are you running from guest and host? On guest, "ping 192.168.0.34"? On host "ping 192.168.0.232"? Nothing comes back on both?

From the output of ifconfig on the host, I would have expected to see a bridge device, but there doesn't seem to be one. But I've never used VirtualBox in bridged mode before, so I'm not sure if that's a problem or not. It *could* be that you need to reconfigure your kernel on the host to enable the bridged network driver.

Can you try the following...

From the guest, in one window, run this:

Code: Select all

tcpdump -nni eth0 host 192.168.0.34
and on the host, run this:

Code: Select all

tcpdump -nni eth0 host 192.168.0.232
Then on the guest, in a different window, try:

Code: Select all

ping 192.168.0.34
Leave it a few seconds, then hit ctrl-c in the tcpdump windows to stop them. And paste the contents here (assuming not too big).

BTW, have you tried NAT mode? Or re-installing?
Post Reply