Static IPs on the host?

Discussions about using Windows guests in VirtualBox.
Post Reply
kdar1987
Posts: 9
Joined: 30. Mar 2012, 17:19

Static IPs on the host?

Post by kdar1987 »

My host is Windows 7, and my guest is Windows XP. I am trying to run Win XP in Virtualbox because one application that I need to support doesn't work in Windows 7 (too old). For that application to work, I need two COM ports working (one is RS-232 and another is RS-422), it also needs access to one particular static ip connection (which I have set up on my host). I was able to get RS-232 COM port, I am having a bit of problem with RS-422 COM port and I am also having a problem with static ip in VirtualBox.

I have two network cards (one is built-in on motherboard, and another is PCI NIC).

One used to connect to internal network and internet.
Another, which is set up with static ip, only used by one application to communicate with computer through Ethernet. So computer has ip 182.18.18.69, and device has ip 182.18.18.68 (just example).

When I set up first network adapter, as bridged adapter or as NAT, I am able to get connect to internal network and to internet. Also, if I set it to NAT, I can ping static ips 182.18.18.69 and ip 182.18.18.68 (from host), without having them registered in virtualbox.

However, no matter what I tried with add 2nd adapter, I can't get same static ip in VirtualBox. I really need for this static ip to be the same, otherwise application that I need to run will not work.
I tried to use Bridged adapter, host-only adapter, internal.. it didn't work.
What can I do about static ip?
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Static IPs on the host?

Post by BillG »

You cannot have two machines with the same IP address running on the same network. This has nothing to do with VirtualBox. It is a basic rule of TCP/IP. The only way to have the same IP would be for the two NICs to have the same MAC (hardware) address, and that would be catastophic. Which machine received which packet would be completely random because the networking software would think that they were the same NIC (because they had the same address).
Bill
kdar1987
Posts: 9
Joined: 30. Mar 2012, 17:19

Re: Static IPs on the host?

Post by kdar1987 »

What if I disable one on the host and then try to run virtual guest with the ip that I need? Would this work? (so that only guest would have access to this NIC card or that ip)

Can I do this automatically somehow? when I start guest session? or (if it would work) would I have to do it manually every time?

===
I got it to work today, I turned off static ip on host and used it instead in guest.
Post Reply