Re: networking Problem venet / veth [message #10335 is a reply to message #10331] |
Thu, 15 February 2007 11:39 |
Vasily Tarasov
Messages: 1345 Registered: January 2006
|
Senior Member |
|
|
Quote: |
Secondly, I don't know how to specify that the ipaddress will be bound to the vethdevice and not to the venet. My configuration is like this:
NAME="lanserv"
VETH="veth2.0,00:00:00:00:00:02,eth0,00:00:00:00:00:22"
IP_ADDRESS="172.17.1.242"
After starting the VE, vzlist will show me the correct ipaddress (but not the hostname btw), but neiter VE nor VE0 have the correct routes added:
VE0:/etc/vz/conf# ip route ls
172.17.1.242 dev venet0 scope link [...]
|
IP_ADDRESS parameter is only for venet interface! So don't use it for VE, that has only veth interface.
In order to produce veth interface configuration automatically the following algorithm should be used, I guess:
- vzctl set 101 --netif_add eth0,00:12:34:56:78:9A,veth101.0,00:12:34:56:78:9B --save
- Produce eth0 configuration inside VE by means, that are template-specific. I mean, you should add appropriate IP/route information in certain configuration files. For example, in gentoo there is a file: /etc/conf.d/net. If you add there
config_eth0=( "192.168.0.2/24" )
eth0 interface in VE will be automatically configured. In a similar manner the routing configuration in VE should be made.
- In the last vzctl version vznecfg script is able to call external script $EXTERNAL_SCRIPT, that should be mentioned in /etc/vz/vznet.conf. In this script you should tune appropriate routing on VE0.
Actually a Wiki-page should be written on this subject. May be you? We'll ve appreciate to you
Thanks,
HTH,
Vasily
|
|
|