Page 1 of 1
Static IP Host & Guest
Posted: 24. Nov 2010, 15:54
by Henning
How can I make this work for UDP?
Host XP
Guest XP
Host IP 192.168.0.3:8101
Guest IP 192.168.0.1:8100
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 01:46
by Perryg
Not enough information to be able to help.
Forum Posting Guideline
- What have you tried?
What have you selected for the virtual adapter?
Do you have a router in the network?
Where does this need to work? Between host and guest only?
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:08
by Henning
Hi Perryg,
After posting I've been searching, reading all over inet.
Partly solved by:
Install MS LoopBack adapter in the host. Set IP 192.168.0.3
Set one NIC in VBox to Bridge to the LoopBack ctrl. Set IP to 192.168.0.1
Now I can communicate btw two of my own apps.
One problem left, The "real" (3.d part app) in the guest needs to ping my (host) IP to see if there is a connection. Ping from guest to host doesn't work.
From guest Ping 192.168.0.3 results in time-out.
From host Ping 192.168.0.1 works ok.
The setup is for testing the .net based "real" app in guest that is communicating with hardware devices. My app in non-.net host simulates the hardware, so I don't have to setup real hardware to test different setups.
Any idea why host loopback doesn't reply to ping from the guest? No fw active.
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:15
by Perryg
Instead of the loopback and bridged adapter you can use the host-only adapter in VirtualBox. Same concept and type of connection but should allow what you need.
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:24
by Henning
I have tried that.
HostOnlyadapter:
Guest IP 192.168.0.1
Host IP 192.168.0.3
Then there is no communication either way... Can't ping other side.
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:30
by Perryg
Did you look in the preference section of VirtualBox main program and the network to see what the actual address scheme is? Usually it is 192.168.56.X
You can of course edit it but it should not ever be in the same address scheme as your local network.
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:40
by Henning
In the preference the IP I give the HOA in the host is what I see there. Inactivated DHCP.
I'll play around a little more with the HOA, then I will report back what happens.
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 02:58
by Henning
Negative,
With the HOA, no communication. Can't ping guest to host or host to guest. Can ping own IP both host and guest.
Network prefs say IPv4 192.168.0.3 255.255.255.0 same as set in host.
Using the HOA should be *the* way to setup guest/host communication, but...
Are there any restrictions on IP's? If so, I'm busted, the 3:d party app is hardcoded to communicate UDP with 192.168.0.3:8101, and own IP 192.168.0.1:8100.
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 03:09
by Perryg
I have no idea what your problem is. Using the host-only works in every case that I have ever put it in for direct host to guest and guest to host communications.
Bridging the MS loopback adapter can have its own issues from a network aspect.
Look at firewall or virus issues is all that I can think of of hand. And it can not be in the same address scheme as you local network or you will have problems.
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 03:33
by Henning
I did set my physical NIC's to 192.168.100.2 and 192.168.99.2 to get them out of the way.
I have also restarted both VBox and the host XP.
I'll keep trying to find what causes this, will report back.
Thanx for all advice!
Just for the record. In the guest there are 2 more NIC's set to NAT. At least one is needed for internet, I'll inactivate them just to check.
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 03:54
by Henning
Jeezzzz...
The network settings fooled me.
When hoovering the mouse over the adapter, VBox adapter #1 was presented as adapter #2, adapter #2 as unnumbered.
All the time i've set the unnumbered adapter beleving it was adapter #1...
Problem solved.
Why does VBox and XP number them different?
/Henning
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 04:59
by Perryg
VirtualBox numbers them as the first, second, Etc..
Windows however numbers them to how many you have tried and failed. There is a registry hack to start them over but that is something to ask Microsoft.
Linux does something similar so it is not just Windows, although it is easier to fix in Linux.
Glad to see you have this worked out.
Re: Static IP Host & Guest
Posted: 25. Nov 2010, 15:07
by Henning
What I did was to uncheck cable connected, and the adapter disconnected was not the one I expected...
I thank you again for beeing with me, and your replies led me to the solution!
Regards/ Henning