View Issue Details

IDProjectCategoryView StatusLast Update
0007855CentOS-7NetworkManagerpublic2014-11-09 13:34
Reportersontags Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformVMware Virtual PlatformOSCentOS Linux 7OS Version7.0.1406
Product Version7.0-1406 
Summary0007855: Network Manager ignores GATEWAY from /etc/sysconfig/network
DescriptionGiven a machine with two NIC's, one of the inferfaces will be used as default gateway (ip r s | grep default).

    [root@host1 ~]# ip r s
    default via 10.100.7.1 dev ens160 proto static metric 1024
    10.100.7.0/24 dev ens160 proto kernel scope link src 10.100.7.31
    10.100.20.0/22 dev ens192 proto kernel scope link src 10.100.20.204

Network configurations are:

     [root@node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens192
    DEVICE="ens192"
    ONBOOT=yes
    NETBOOT=yes
    UUID="e634ce78-f5ea-4b3c-b3ea-1e40ef0b11ac"
    BOOTPROTO=none
    IPADDR="10.100.20.204"
    NETMASK="255.255.252.0"
    GATEWAY="10.100.20.1"
    HWADDR="XXX"
    TYPE=Ethernet
    NAME="ens192"
    DNS1="193.12.103.2"
    
    [root@node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160
    DEVICE="ens160"
    ONBOOT=yes
    NETBOOT=yes
    UUID="bee8e636-80b4-45f3-9b74-eb9eb0fed38d"
    BOOTPROTO=none
    IPADDR="10.100.7.31"
    NETMASK="255.255.255.0"
    GATEWAY="10.100.7.1"
    HWADDR="XXX"
    TYPE=Ethernet
    NAME="ens160"
    DNS1="193.12.103.2"

Assumed that the default gateway choosen by the OS does not match your intention, you would add the IP of the gateway that should be used instead to /etc/sysconfig/network.

   [root@host1 ~]# cat /etc/sysconfig/network
   GATEWAY="10.100.20.1"

Expected would be to have the following routing configured after a reload of the network service or a reboot:

    [root@host1 ~]# ip r s
    default via 10.100.20.1 dev ens192 proto static metric 1024
    10.100.7.0/24 dev ens160 proto kernel scope link src 10.100.7.31
    10.100.20.0/22 dev ens192 proto kernel scope link src 10.100.20.204

This is not the case, the configuration still holds the following line:

    default via 10.100.7.1 dev ens160 proto static metric 1024
Steps To ReproduceSee above
Additional InformationCurrent workaround is to explicitely set DEFROUTE=no|yes in the /etc/sysconfig/network-scripts/ifcfg-ensXXX files. See http://serverfault.com/questions/642940/etc-sysconfig-network-is-ignored-on-centos7/64306
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2014-11-09 13:34 sontags New Issue