NetworkManager and custom resolv.conf options

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

NetworkManager and custom resolv.conf options

Postby Fac3kk » Mon Feb 08, 2010 21:29

Hi,

I need to have certain custom options permanently in my /etc/resolv.conf.
They are
Code: Select all
options timeout:1 attempts:3


Up until today I have been using wicd to manage my connections which used resolvconf to rebuild resolv.conf every time connection was established.

In that config I just needed one line in /etc/resolvconf.conf
Code: Select all
lapek etc # cat /etc/resolvconf.conf
resolv_conf=/etc/resolv.conf
resolv_conf_options="timeout:1 attempts:3"


Today I decided to give NetworkManager a try especially as it seems to work flawlessly with my E620 3G card.
The only problem I ran into was that is seems that resolvconf is no longer used thus I lack my custom options.

Does anyone know, what to do to get same functionality?

Thanks in advance.
Fac3kk
Simple Hen
 
Posts: 67
Joined: Fri Oct 16, 2009 16:26

Re: NetworkManager and custom resolv.conf options

Postby Fitzcarraldo » Tue Feb 16, 2010 2:40

I'm not sure, but I wonder if you need to do this in the /etc/conf.d/net file. Have a look at Part 4 of the Gentoo Handbook (although I believe the syntax in that document is pre OpenRC/Baselayout-2, so might need modifying for a Gentoo/Sabayon Linux installation using OpenRC/Baselayout-2).
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7978
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: NetworkManager and custom resolv.conf options

Postby Fac3kk » Tue Feb 16, 2010 7:43

Thanks for hint Fitzcarraldo. I`ll investigate that :)
Fac3kk
Simple Hen
 
Posts: 67
Joined: Fri Oct 16, 2009 16:26

Re: NetworkManager and custom resolv.conf options

Postby Fitzcarraldo » Tue Feb 16, 2010 10:36

The other files I know of for NetworkManager are the following:

/etc/dbus-1/system.d/knetworkmanager.conf
/etc/dbus-1/system.d/nm-system-settings.conf
/etc/NetworkManager/nm-system-settings.conf

but I don't know what, if anything, the user can or should put in those. You may be lucky and discover something by googling. The NetworkManager site (part of the GNOME project) does not appear to have documentation for the latest version.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7978
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: NetworkManager and custom resolv.conf options

Postby Fitzcarraldo » Tue Feb 16, 2010 14:06

By the way, the syntax change that I mentioned earlier for Gentoo/Sabayon Linux using OpenRC/Baselayout-2 installations is that you don't use brackets any more. See Code Listing 2.11 in the Gentoo Baselayout and OpenRC Migration Guide.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7978
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: NetworkManager and custom resolv.conf options

Postby Fac3kk » Tue Feb 16, 2010 20:43

Fitzcarraldo wrote:. See Code Listing 2.11 in the Gentoo Baselayout and OpenRC Migration Guide.


This is very interesting article indeed.

in /usr/share/doc/openrc-<version>/net.example I found what I believe is appropriate

Code: Select all
# System
# For configuring system specifics such as domain, dns, ntp and nis servers
# It's rare that you would need todo this, but you can anyway.
# This is most benefit to wireless users who don't use DHCP so they can change
# their configs based on SSID.

# If you omit the _eth0 suffix, then it applies to all interfaces unless
# overridden by the interface suffix.
#dns_domain_eth0="your.domain"
#dns_servers_eth0="192.168.0.2 192.168.0.3"
#dns_search_eth0="this.domain that.domain"

#dns_options_eth0="timeout:1 rotate"

#dns_sortlist_eth0="130.155.160.0/255.255.240.0 130.155.0.0"
# See the man page for resolv.conf for details about the options and sortlist
# directives



According to the same file, it should be possible to use resolvconf as before (actually one should do that not to loose dhcp configuration)

Code: Select all
# NOTE: Setting any of these will stamp on the files in question. So if you
# don't specify dns_servers but you do specify dns_domain then no nameservers
# will be listed in /etc/resolv.conf even if there were any there to start
# with.
# If this is an issue for you then maybe you should look into a resolv.conf
# manager like resolvconf-gentoo to manage this file for you. All packages
# that baselayout supports use resolvconf-gentoo if installed.


Thanks Fitzcarraldo, you have been most helpful.
Fac3kk
Simple Hen
 
Posts: 67
Joined: Fri Oct 16, 2009 16:26


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest