1

I am aware that many people prefer to disable NetworkManager, but I don't believe it will be going away and I decided to try to learn how to use it properly. I thought I would begin with something simple, like setting a static IP.

I updated /etc/sysconfig/network-scripts/ifcfg-eth0 to match the settings I want it to have, then saved the file. From what I have read, NetworkManager is supposed to update the settings immediately, but it does not. In fact, after both restarting NM and after a reboot, eth0 keeps using dhcp. I am using a minimal install of Fedora 18 and have installed dhcp, but not yet configured it. ifconfig is no longer part of a minimal install, apparently it is headed towards deprecation.

Below is my ifcfg-eth0 file.

HWADDR=00:0C:29:DF:87:72
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=b15e1bf2-60b5-4469-9c68-88ae05e33301
ONBOOT=yes
IPADDR=10.0.0.1
NETMASK=255.255.255.0
GATEWAY=10.0.0.254
DNS1=10.0.0.1
DNS2=8.8.8.8

Below is output from ip addr:

#ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:24:75:2f brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.129/24 brd 10.0.0.255 scope global eth0
    inet6 fe80::20c:29ff:fe24:752f/64 scope link
       valid_lft forever preferred_lft forever

Below is /etc/sysconfig/network:

NETWORKING=yes
3
  • Can you give some more debug information? - What is in /etc/sysconfig/network? - Output of ifconfig -a
    – Andy Shinn
    Apr 12, 2013 at 3:05
  • Addded your requested info. ifconfig is no longer part of a default minimal install. I provided an ip addr output instead, as it is intended to replace ifconfig going into the future.
    – fishpen0
    Apr 12, 2013 at 3:11
  • Congratulations, you're now beginning to learn why people dislike NetworkManager.
    – MadHatter
    Apr 12, 2013 at 6:06

2 Answers 2

1

The MAC address of your actual interfaces differs from your configured ifcfg script. It is likely ignoring the script because the MAC doesn't match. This is usually a safeguard to avoid adding IP addresses to the wrong interfaces in case the ifcfg-eth# names changed.

Try updating the HWADDR line in your file to be HWADDR=00:0c:29:24:75:2f. If this isn't the MAC you are expecting (as the name could have changed if this system has 2 NICs) you might also be interested in checkout out the /etc/udev/rules.d/70-persistent-net.rules file.

One last thing to note, this is coming from my knowledge of RHEL 5/6 and it looks like there is also a UUID in your more up to date Fedora implementation. If still have issues after fixing the MAC, you might try removing the UUID (I'm not sure how to verify that on Fedora).

1
  • Hmm, good find. This is likely because this is a linked clone. I am betting VMware changed the macs, but doesn't change the files. Everything is set now.
    – fishpen0
    Apr 13, 2013 at 15:35
1

The scripts in that directory are used by the 'network' service, not NetworkManager. You can choose which you would like to use. 'network' is for servers where the networking config changes rarely. You'll need to disable NetworkManager to use network.

To edit NetworkManager settings, use the nmcli tool, or the GUI.

1
  • 1
    Turns out the mac was incorrect in my settings. After fixing that, the changes kicked in immediately. NetworkManager does use those files.
    – fishpen0
    Apr 13, 2013 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .