guest with virtual bridge network

This is for discussing general topics about how to use VirtualBox.
Post Reply
zhushazang
Posts: 2
Joined: 9. Jun 2010, 17:45
Primary OS: Linux other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: FreeBSD

guest with virtual bridge network

Post by zhushazang »

Hello, i need configure a guest machine to use the same IP used by host. Is this possible?

I've configured a test enviroment with my gentoo host and a guest windows XP with the same ip. I can ping external machines but appear that i cannot connect using tcp/ip protocol completely. I mean i cannot open web pages and if i try connect with telnet in 80, 25, 110 or 587 ports the connections are terminated by the host.

My needs are to implment a virtual machine that work like a internal service but comunicate directly too the world with the same ip of the host. Is this possible?

Thanks for now.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: guest with virtual bridge network

Post by mpack »

Use NAT mode: it works pretty much as you describe.

Be aware however that giving two machines on the same network the same IP address makes it impossible to distinguish between them easily when deciding where to route an incoming message. NAT works at all because when your guest transmits a packet the NAT layer sets a flag and hence knows to send the reply back to the guest. However protocols which involve the guest receiving packets without an explicit request will not work in the guest. There is simply no way around the fact that two devices can't have the same IP address without consequences. Things like normal internet browsing will work fine. Pinging the guest will not work, nor will things like P2P file sharing apps.

Read the user manual section on virtual networking (chapter 6). In particular the sections on network modes and NAT limitations.
Post Reply