2

I've re-installed my main database server with CentOS 6.5 . I've configured the relevant NIC's including 3 virtual interfaces, called em2:0, em2:1 and em4:0. For some unknown reason the NetworkManager daemon was not installed by the default installation (I chose "SQL Server"). Here are the configuration files for the virtual network interfaces: ifcfg-em2:0:

DEVICE="em2:0"
ONBOOT=no
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.1.2.20
PREFIX=24
NN_CONTROLLED=no

ifcfg-em2:1:

DEVICE="em2:1"
ONBOOT=no
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.1.2.2
PREFIX=24
NN_CONTROLLED=no

ifcfg-em4:0:

DEVICE="em4:0"
ONBOOT=no
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.1.10.20
PREFIX=24
NN_CONTROLLED=no

Before I realized that NetworkManager daemon is not installed I've added NN_CONTROLLED=no to each one of the configs. The problem is that after reboot or after /etc/init.d/network restart the virtual interfaces are turned on automatically even though they are configured not to start. In addition, I've created a route-em1 file in order to add a route to our OpenVPN network but after reboot or service network restart the route-em1 file is being ignored because the route is not added automatically and I have to run it manually. Do you have an idea why the system behaves like that? Thanks

Itai Ganot
  • 10,424
  • 27
  • 88
  • 143

1 Answers1

4

It is expected behavior.

You can see from "sysconfig.txt"

ONBOOT=yes|no (not valid for alias devices; use ONPARENT)

Now, why to use ONPARENT, because of this stanza down the same file:

Alias specific items:
    ONPARENT=yes|no
      Whether to bring up the device when the parent device is brought
      up.
      Default: yes

So even if you have "ONBOOT=no" "ONPARENT=yes" will prevail and activate your virtual interfaces.

Danila Ladner
  • 5,241
  • 21
  • 30