How to stop NetworkManager from frobbing my /etc/resolv.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After copiously scouring links all over the place, I think that I've succesfully managed to set up a bridge between my real network interface and the virtual network interface used by virtmanager-hosted virtual machines. I now have F13 hosting a virtualized machine with full network connectivity. Yay.

One glitch remains that I can't fix. After a reboot, /etc/resolv.conf has nothing useful, even though dhclient came up fine on the bridge. Experimentation uncovered NetworkManager as the guilty party.

NetworkManager, AFAIK, doesn't know anything about virtual bridges. I had to set it up by hand:

[root@monster network-scripts]# cat ifcfg-vnet0
DEVICE=vnet0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

eth0 is bridged:

[root@monster network-scripts]# cat ifcfg-eth0
# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BRIDGE=vnet0
#BOOTPROTO=dhcp
HWADDR=00:30:48:FC:83:FA
ONBOOT=yes
OPTIONS=layer2=1
TYPE=Ethernet
NM_CONTROLLED=no

[ bunch more stuff snipped ]

I also have eth1, which I would like to be owned by NetworkManager:

[root@monster network-scripts]# cat ifcfg-eth1
# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth1
HWADDR=00:30:48:FC:83:FB
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
NM_CONTROLLED=yes
PEERDNS=yes

What's happening is this. The S10network script runs first, and brings up eth0 than vnet0; and configures the interface and /etc/resolv.conf from DHCP. Later S23NetworkManager runs, and removes my DNS server from resolv.conf, because none of the NetworkManager-owned network interfaces are up.

I want to use NetworkManager for eth1, but I'll have to either disable it, or bounce the network initscript after NetworkManager, which might cause some confusion elsewhere.

Is there a way to force NetworkManager not to touch /etc/resolv.conf.

Attachment: pgp9aeyKXVyob.pgp
Description: PGP signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux