OpenVZ Forum


Home » Mailing lists » Users » Can I share host ip with guest?
Can I share host ip with guest? [message #25369] Fri, 21 December 2007 10:13 Go to next message
hhding is currently offline  hhding
Messages: 4
Registered: November 2007
Junior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi list

    Because lack of ip address, I want share host os ip with guest os,
howto?

hhding
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFHa5GtJo9Njjkvy34RAuGgAJoDxyKNd/ovlxtib0pa5p1FWxLurwCgz+tT
dhh0mp/4FfXJKmUGW3W6JZg=
=hGTF
-----END PGP SIGNATURE-----
Re: Can I share host ip with guest? [message #25373 is a reply to message #25369] Fri, 21 December 2007 10:40 Go to previous messageGo to next message
Peter Machell is currently offline  Peter Machell
Messages: 5
Registered: December 2007
Junior Member
On 21/12/2007, at 8:13 PM, H.H. Ding wrote:

> Because lack of ip address, I want share host os ip with guest os,
> howto?

You cannot have two devices with the same IP address on one network.  
This is a fundamental law of networking and there is no way around it.

However, by using an internal IP address on the guests, and port  
forwarding from the host, you can still present your services to the  
Internet from the one external IP.

The instructions at http://wiki.openvz.org/Using_NAT_for_VE_with_private_IPs 
  will show you how to do this.

However, I find it easier to have a NAT router above the host  
terminating the external IP, and use internal IPs on the same subnet  
for both the host and the guests.

I hope this helps.

regards,
Peter.
Re: Can I share host ip with guest? [message #25376 is a reply to message #25373] Fri, 21 December 2007 11:34 Go to previous messageGo to next message
hhding is currently offline  hhding
Messages: 4
Registered: November 2007
Junior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can't It work like chroot but with more isolated environment?

Peter Machell 写道:
> On 21/12/2007, at 8:13 PM, H.H. Ding wrote:
> 
>> Because lack of ip address, I want share host os ip with guest os,
>> howto?
> 
> You cannot have two devices with the same IP address on one network.
> This is a fundamental law of networking and there is no way around it.
> 
> However, by using an internal IP address on the guests, and port
> forwarding from the host, you can still present your services to the
> Internet from the one external IP.
> 
> The instructions at
> http://wiki.openvz.org/Using_NAT_for_VE_with_private_IPs will show you
> how to do this.
> 
> However, I find it easier to have a NAT router above the host
> terminating the external IP, and use internal IPs on the same subnet for
> both the host and the guests.
> 
> I hope this helps.
> 
> regards,
> Peter.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFHa6TBJo9Njjkvy34RAgP4AKCLOF0HsnEWJTFcMx6iDsljxBN7nACgiXTY
ZhH0T5EAWkbBsrdZD0v0VV8=
=tHSM
-----END PGP SIGNATURE-----
Re: Can I share host ip with guest? [message #25386 is a reply to message #25376] Fri, 21 December 2007 17:34 Go to previous messageGo to next message
Cliff Wells is currently offline  Cliff Wells
Messages: 30
Registered: June 2006
Member
On Fri, 2007-12-21 at 19:34 +0800, H.H. Ding wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Can't It work like chroot but with more isolated environment?

Probably not, but why would you want that?  If you want chroot, then why
not use chroot?

Regards,
Cliff
Re: Can I share host ip with guest? [message #25391 is a reply to message #25376] Fri, 21 December 2007 21:05 Go to previous message
Benny Amorsen is currently offline  Benny Amorsen
Messages: 20
Registered: December 2006
Junior Member
"H.H. Ding" <hhding.gnu@gmail.com>
writes:

> Can't It work like chroot but with more isolated environment?

Linux-vserver can do that. It does only minor virtualization of the
network, and stuff like routing tables stay in the host.


/Benny
Previous Topic: Live Migration Fails
Next Topic: *SOLVED* howto detect veth ip address
Goto Forum:
  


Current Time: Tue Mar 19 06:55:32 GMT 2024

Total time taken to generate the page: 0.02599 seconds