Page 1 of 1
Host/Guest Networking
Posted: 17. Jun 2008, 15:26
by OmahaVike1
Hello,
If there is an existing thread, I apologize in advance for not being able to find it.
I am experiencing some very intriguing results with my setup, and am curious if anyone has had experience in this and would be willing to help.
Problem:
Guest CAN connect to host, host CANNOT connect (directly) to guest.
Facts:
Host = Ubuntu Hardy (desktop)
Guest = Ubuntu Hardy (server)
Guest can connect to host and general internet without incident. It's working great.
Host cannot directly connect to guest, but can connect to guest through hardware router port forwarding.
Host has two NIC cards installed. One for its primary use, and the other is bridged to the guest.
Before I spill a load of network settings or XML files, has anyone seen problems with the host not being able to connect to the guest, while the rest of the world can connect to the guest?
If I can supply any helpful information, please let me know.
Thanks in advance for any and all consideration!
Posted: 17. Jun 2008, 16:21
by Graff
hi!
you have to setup a bridge to and connect virtual nics of your guests to it, and then statically assign net parametrs as in local net, that's all.
in this situation the good chiose is using scripts for creating tun/tap devices and connecting them to the bridge.
Posted: 18. Jun 2008, 05:41
by OmahaVike1
i guess an easier way to state the problem is like this: everyone else on my network (router and a vista machine) can connect to the guest, but the host cannot.
thanks for the follow-up Graff. i believe i do have a bridge set up, but perhaps not correctly.
check it out...
host ifconfig
Code: Select all
br0 Link encap:Ethernet HWaddr 00:50:04:62:70:ff
inet addr:192.168.1.210 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:4ff:fe62:70ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:704 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:62470 (61.0 KB) TX bytes:5867 (5.7 KB)
eth0 Link encap:Ethernet HWaddr 00:50:8d:73:88:1c
inet addr:192.168.1.201 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:8dff:fe73:881c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11430 errors:0 dropped:0 overruns:0 frame:0
TX packets:10959 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10186903 (9.7 MB) TX bytes:2040141 (1.9 MB)
Interrupt:18 Base address:0x7000
eth1 Link encap:Ethernet HWaddr 00:50:04:62:70:ff
inet6 addr: fe80::250:4ff:fe62:70ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:697 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:73074 (71.3 KB) TX bytes:11043 (10.7 KB)
Interrupt:20 Base address:0x8000
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:1090 errors:0 dropped:0 overruns:0 frame:0
TX packets:1090 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56138 (54.8 KB) TX bytes:56138 (54.8 KB)
vbox0 Link encap:Ethernet HWaddr 00:ff:4c:37:a3:7f
inet6 addr: fe80::2ff:4cff:fe37:a37f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:41 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:634 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:5146 (5.0 KB) TX bytes:2972 (2.9 KB)
Machine's XML file (note that i'm using an irregular port, which i can still connect to through my router's external IP -- which is then forwarded to 192.168.1.210):
Code: Select all
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http1/HostPort" value="50888"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http1/GuestPort" value="50888"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http1/Protocol" value="TCP"/>
now, something of note might be that the VM's ifconfig is 192.168.1.210, which matches the br0 interface. other than this, i am at a total loss for words.
thanks again for helping me through this.
Posted: 18. Jun 2008, 11:23
by Graff
hm...
i think the problem is in routing.
as i understand, on host you have 2 nics connected to netwok 192.168.1.x
show "route" command output from the host.
Posted: 18. Jun 2008, 11:33
by Sasquatch
OmahaVike1 wrote:now, something of note might be that the VM's ifconfig is 192.168.1.210, which matches the br0 interface. other than this, i am at a total loss for words.
thanks again for helping me through this.
Now there is your problem. It's the same problem as this thread:
http://forums.virtualbox.org/viewtopic.php?t=7317
You can't use one IP address for two machines. Set them correctly and it will work again. Easiest way is to change the Host bridge to 209 or someting. Don't use the same address that already exist in your network and because the Guest will be part of your network, you can't set it the way you have. That is also why your Host could not connect to the guest, it tried to connect to itself.
Posted: 18. Jun 2008, 17:44
by OmahaVike1
(solved)
thank you, Sasquatch. that did the trick.
i had remembered reading about the actual interface conflicting with the guest IP, but nothing of sort on the bridge. seems that all three need to be independent of one another.
thanks again!