automatic veth setup [message #7353] |
Wed, 11 October 2006 16:12 |
Bowser Bizowser
Messages: 3 Registered: October 2006
|
Junior Member |
|
|
I'm trying to setup a veth only server, and I think I'm just about there.
The new vznetcfg script is helpful for setting up the vethX.0 interface when
running vzctl start. I have modified this script to setup forwarding &
proxy arp as well. I would like to assign the route at the same time, but
if I specify IP_ADDRESS in the .conf file, it tries to assign it to venet
(which isn't there) and fails. I'm not sure what other place would be good
to stick the ip. It seems like the vznetcfg is the place to setup the
route, as it is after vethX.0 has been setup on the host, but still runs in
the host context. (using a .mount script wouldn't work because
vethX.0isn't up yet)
It seems like the infrastructure for veth is still being worked out.. Is
there a standard way to set this up that I'm missing?
|
|
|
|
Re: automatic veth setup [message #7444 is a reply to message #7416] |
Fri, 13 October 2006 12:51 |
Bowser Bizowser
Messages: 3 Registered: October 2006
|
Junior Member |
|
|
On 10/13/06, Kirill Korotaev <dev@sw.ru> wrote:
>
> AFAICS,
>
> vznetcfg is to configure host end of veth device.
> you can put it into the bridge or setup the routing - whatever you want.
> Just add routing with something like:
> # ip r a <ve ip> dev <out-device>
How to add routing isn't so much of the problem, but where to add it, and
where to get the ip used to add it. The above ip command should work fine,
and I'm fine with putting it in the vznetcfg script, but the question is
"where do I get the veip from?" Like I said, it seems the IP_ADDRESS in the
.conf would be the place for it. However, with the ip there, it tries to
add to venet, and the vps _does not start_ without the venet interface
setup. I could create another variable for the IP, or get it in another
roundabout fashion, but it seems that there should be an elegant way for
vznetcfg to get the ip. Even a way to disable IP_ADDRESS from being added
to venet would work. (or a way that causes it to just fail at venet network
setup instead of preventing the vps from starting at all).
However, the second veth device in VE should be configured as well.
> And this can be done with srd distribution scripts.
> for example, in Redhat based distributions you can
> create appropriate ifcfg-vethX file with settings.
I have no problems setting up the interface on the VE side.
|
|
|