OpenVZ Forum - RDF feed
type: channel
items: OpenVZ + VPS +dhclient
items: Re: OpenVZ + VPS +dhclient
items: RE: OpenVZ + VPS +dhclient

OpenVZ + VPS +dhclient
type: item
description: 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
creator: Eric Sammons
date: 2005-11-19T01:26:26-00:00

Re: OpenVZ + VPS +dhclient
type: item
description: 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 >
creator: dev
date: 2005-11-19T09:35:19-00:00

RE: OpenVZ + VPS +dhclient
type: item
description: 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 a…
creator: Eric Sammons
date: 2005-11-20T02:09:19-00:00