what is modifying etc/sysconfig/network?

curlingcanteen

New Member
Feb 28, 2013
27
1
1
after reboot my routing scheme breaks:
Code:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.0.110    172.16.0.109    255.255.255.255 UGH   0      0        0 venet0
10.24.106.0     0.0.0.0         255.255.254.0   U     0      0        0 eth0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth0

becomes:
Code:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.0.110    172.16.0.109    255.255.255.255 UGH   0      0        0 venet0
10.24.106.0     0.0.0.0         255.255.254.0   U     0      0        0 eth0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 [B][COLOR=#b22222]venet0[/COLOR][/B]

centos-6-x86_64-minimal was the template and I enabled venet during creation.
After first boot I added veth for external network access, then created a routing file route-venet0:0 with 172.16.0.110 via 172.16.0.109,
and modified /etc/sysconfig/network to define the default gateway device as follows:
Code:
NETWORKING="yes"
GATEWAYDEV="eth0"
NETWORKING_IPV6="yes"
IPV6_DEFAULTDEV="eth0"
HOSTNAME="xxxxxxxx.xxx.xxx.xxx"
NOZEROCONF=yes

After a reboot, the file looks like this:
Code:
NETWORKING="yes"
GATEWAYDEV="[B][COLOR=#b22222]venet0[/COLOR][/B]"
NETWORKING_IPV6="yes"
IPV6_DEFAULTDEV="eth0"
HOSTNAME="xxxxxxxx.xxx.xxx.xxx"
NOZEROCONF=yes

Why is this file being re-written during reboot?
 
Okay thanks. So what is the OpenVZ standard way to add eth0 and allow traffic to use it as the primary gateway device?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!