OpenVZ Forum


Home » Mailing lists » Users » OpenVZ + VPS +dhclient
OpenVZ + VPS +dhclient [message #382] Sat, 19 November 2005 01:26 Go to next message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
I have installed fedora core 4, followed up with the install of OpenVZ.
Everything seems to work well; however, I have a need to use dhcp rather
than static IP addresses. Can I configure a VPS to use dhclient rather
than a static ip address? If so how? I tried to:

# vzctl enter ###
# dhclient venet0

The guest was never able to contact the dhcp server.

My VPS is also fedora core 4.

Thanks!
eanxgeek
Re: OpenVZ + VPS +dhclient [message #383 is a reply to message #382] Sat, 19 November 2005 09:35 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Hello Eric,

you are the first who wants such configuration :), but I suppose it is
possible to do it if better understand what you are doing and what are
your goals.

Do you want your VPSs to be accessiable outside from the network?

1. If the answer is "no", then you can setup any local IPs to VPSs and
configure NAT in the host system. Thus your VPSs will have local IPs,
will be able to connect to the network, but won't be accessiable from
outside (though you can map one specific port of the host system to VPS
port, i.e. can make VPS http server to appear on some specific port of
host system IP).

2. If the answer is "yes", then I suppose there is definetely something
strange in your configuration, since DHCP can bring you arbitrary IP
address and you will have to have some DNS tricks or otherwise you still
won't be able to determine VPS IP easily from the outside.
But the good news is that it is possible to do either :)
I have no dhclient on my machine, but dhcpcd I use here accepts -T
option which allows (as follows from man page) to get multiple IPs
without setuping them on the interface itself). So you will need to
write some simple script which will reserve IP addresses from DHCP this
way and configure them on VPS with `vzctl set <VPSID> --ipadd <IP>`
command. Remember to delete previous VPS IP before adding a new one.

Hope this will work for you,
Kirill

> I have installed fedora core 4, followed up with the install of OpenVZ.
> Everything seems to work well; however, I have a need to use dhcp rather
> than static IP addresses. Can I configure a VPS to use dhclient rather
> than a static ip address? If so how? I tried to:
>
> # vzctl enter ###
> # dhclient venet0
>
> The guest was never able to contact the dhcp server.
>
> My VPS is also fedora core 4.
>
> Thanks!
> eanxgeek
>
RE: OpenVZ + VPS +dhclient [message #386 is a reply to message #382] Sun, 20 November 2005 02:09 Go to previous message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
My intent is to have my guests (VPS systems) be avaialble to the network
without using iptables, SNAT, or NAT to forward packets. I am using fedora so
I have dhclient available to me and not dhcpcd, at least not with my package
base. Anyone know how to "grab" more than one IP address from a DHCP server
using dhclient. There is no -T option.

Thanks!


>===== Original Message From Kirill Korotaev <dev@sw.ru> =====
>Hello Eric,
>
>you are the first who wants such configuration :), but I suppose it is
>possible to do it if better understand what you are doing and what are
>your goals.
>
>Do you want your VPSs to be accessiable outside from the network?
>
>1. If the answer is "no", then you can setup any local IPs to VPSs and
>configure NAT in the host system. Thus your VPSs will have local IPs,
>will be able to connect to the network, but won't be accessiable from
>outside (though you can map one specific port of the host system to VPS
>port, i.e. can make VPS http server to appear on some specific port of
>host system IP).
>
>2. If the answer is "yes", then I suppose there is definetely something
>strange in your configuration, since DHCP can bring you arbitrary IP
>address and you will have to have some DNS tricks or otherwise you still
>won't be able to determine VPS IP easily from the outside.
>But the good news is that it is possible to do either :)
>I have no dhclient on my machine, but dhcpcd I use here accepts -T
>option which allows (as follows from man page) to get multiple IPs
>without setuping them on the interface itself). So you will need to
>write some simple script which will reserve IP addresses from DHCP this
>way and configure them on VPS with `vzctl set <VPSID> --ipadd <IP>`
>command. Remember to delete previous VPS IP before adding a new one.
>
>Hope this will work for you,
>Kirill
>
>> I have installed fedora core 4, followed up with the install of OpenVZ.
>> Everything seems to work well; however, I have a need to use dhcp rather
>> than static IP addresses. Can I configure a VPS to use dhclient rather
>> than a static ip address? If so how? I tried to:
>>
>> # vzctl enter ###
>> # dhclient venet0
>>
>> The guest was never able to contact the dhcp server.
>>
>> My VPS is also fedora core 4.
>>
>> Thanks!
>> eanxgeek
>>
Previous Topic: Openvirtuozzo kernel patch license questions
Next Topic: X11 and vncserver under VPS
Goto Forum:
  


Current Time: Fri May 10 11:56:08 GMT 2024

Total time taken to generate the page: 0.01469 seconds