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

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.

  • Could you please where I can find the document? – Ask and Learn Mar 28 '18 at 5:23
  • [dladner@server.sec1 ~]$ cat /usr/share/doc/initscripts-9.03.40/sysconfig.txt | grep -E 'ONBOOT.*ONPARENT' ONBOOT=yes|no (not valid for alias devices; use ONPARENT) – Danila Ladner Mar 28 '18 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.