Network Interfaces Configuration [message #34463] |
Wed, 07 January 2009 19:01 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
laotse
Messages: 35 Registered: December 2008
|
Member |
|
|
Hi there,
I have a VE using veth and bridging, which works fine. However, after reboot, the veth interface is down and the old venet interface is there instead. Since I have already done --ipdel, this venet has some internal address, but wins the default route.
I edited /etc/network/interfaces.template as shown below:
auto eth0
iface eth0 inet static
address 172.16.8.7
netmask 255.255.255.0
up route add default gw 172.16.8.1
auto eth3
iface eth3 inet static
address 172.16.2.1
netmask 255.255.255.0
However, after reboot the following /etc/network/interfaces is found in the container, which has eth3 but lacks eth0.
# This configuration file is auto-generated.
# WARNING: Do not edit this file, otherwise your changes will be lost.
# Please edit template /etc/network/interfaces.template instead.
auto eth3
iface eth3 inet static
address 172.16.2.1
netmask 255.255.255.0
# Auto generated interfaces
auto lo
iface lo inet loopback
auto venet0
iface venet0 inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
up route add default gw 192.0.2.1
How do I get rid of venet0 and have eth0 instead?
Regards,
- lars.
|
|
|
|
|
Re: Network Interfaces Configuration [message #34499 is a reply to message #34463] |
Mon, 12 January 2009 19:37 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
ulver
Messages: 12 Registered: July 2008
|
Junior Member |
|
|
Hmmm, it is strange.
When I don't have any IP_ADDRESS in my conf file, i can modify the /etc/network/interfaces in the VPS (debian), and if i reboot, the change is persistent.
But, when you use veth, do you still use the .template file ?
Maybe i'm wrong, but with veth, you have to use /etc/network/interfaces directly (in the vps).
So, delete any mention of IP_ADDRESS in the vps conf (on the HN), and change manually the /etc/network/interfaces in the VPS instead of the .template.
I think it will be good
|
|
|
Re: Network Interfaces Configuration [message #34500 is a reply to message #34463] |
Mon, 12 January 2009 19:41 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
januszzz
Messages: 50 Registered: January 2007 Location: Opole, Poland
|
Member |
|
|
Have you got Gentoo as your VE?
With OpenRC-0.4.1 it defaults to hotplug interfaces and it finds venet0 and assigns ip address from dhcp.
To solve this you need to edit /etc/rc.conf and disable hotplugging the venet0 device:
rc_hotplug="!net.venet0"
|
|
|