In SLE 11 we have a new (better) way to set up automatic network configuration.

It’s called netconfig (man 8 netconfig). Its a “modular tool to modify network configuration”.

Well on my SLED 11 RC1 Box it pretty much worked out of the box. Except:

Netconfig uses a bunch of scripts in /etc/netconfig.d to do the actual work. Its configuration resides in /etc/sysconfig/network/config

The following tries to fully explains what is happening. If you’re just interested in the Solution skip down to Summary.

The modem device Problem

I use a Nokia E51 for UMTS/3G Internet connection when on the road. The setup is fairly easy using a USB Cable. Just plug in the Phone and configure it as if it was a USB Modem. (for Bluetooth setup see Accessing the Internet via Bluetooth and Mobile Phone )

Unfortunately when I do that I never got DNS servers put into /etc/resolv.conf.

What is happening

netconfig uses a bunch of script (modules) to decide what to do in certain situations. The Modules are configured using the NETCONFIG* Variables in /etc/sysconfig/network/config.

The variable NETCONFIG_DNS_POLICY is used to control how netconfig should set up Name Servers in /etc/resolv.conf

Excerpt from /etc/sysconfig/network/config (default):

## Type:        string
## Default:     "auto"
# Defines the DNS merge policy as documented in netconfig(8) manual page.
# Set to "" to disable DNS configuration.

Unfortunately man 8 netconfig only has this to say about NETCONFIG_DNS_POLICY:

NETCONFIG_DNS_POLICY -Defines the DNS merge policy.

Nothing about what the actual Values could be.

The /etc/netconfig.d/dns-resolver script is responsible for setting resolv.conf so we find our possible values here:

Excerpt from /etc/netconfig.d/dns-resolver (SLED 11 Rc1 Version):

# just for the case we need the original value...
if [ "$_NETCONFIG_DNS_POLICY" = "auto" ]; then
    if [ "x$NETWORKMANAGER" = "xyes" ] ; then
        # Use NetworkManager policy merged data
        # We use static settings and extend them
        # with interface specific if available
elif [ "x$_NETCONFIG_DNS_POLICY" = "x" ]; then
    # empty policy means do not touch anything.
    # successful exit.
    exit 0;
# A * or ? is evaluated in the "for loop", so we need to replace it
        sed 's/\*/__ALL__/g' | sed 's/\?/__ONE__/g'`

    case "$POL" in
        if [ "x$NETWORKMANAGER" = "xyes" ] ; then
            debug "Use NetworkManager policy merged settings"
            if [ -r "$CFG" ] ; then
                get_dns_settings "$CFG"
        debug "Keep Static"
        debug "Static Fallback"
        # revert the replacement; now we want the evaluation
        POL=`echo "$POL" | sed 's/__ALL__/*/g' | sed 's/__ONE__/?/g'`
        debug "Other: $POL"
        for IFDIR in $STATEDIR/$POL; do
            test -d "$IFDIR" -a \
                 -d "/sys/class/net/${IFDIR##*/}" || continue
            # proceed every interface we find with this match
            manage_interfaceconfig  "$IFDIR"

This tells us that we can use the values auto, STATIC, STATIC_FALLBACK, NetworkManager and /sys/class/net/ Interfaces ( with * and ? wildcards ).

The Cause

What it also tells us is that the default auto only is translated to STATIC_FALLBACK NetworkManager and no devices.

This is why any ppp or modem device connections will not be used for Name Server setup in the default configuration.

There is a good reason for that. /etc/resolv.conf only supports up to 3 nameserver Entries.

This means if you have for instance 2 DNS Servers in ppp and 2 more coming from NetworkManager one is going to fall off the grid.

So for the sake of a stable NetworkManager setup the default was chosen to not include ppp* or modem* devices. See bnc#429772)

The Solution

Configure NETCONFIG_DNS_POLICY to include all Network Devices we need. In my case I need modem0. Of cource preserve STATIC and NetworkManager as well. Put NetworkManager last. Its a bit of a Bully and wants to be the last one to do things.

Excerpt from /etc/sysconfig/network/config


Et voila! Working DNS resolving when dialing in via Modem.


To be able to have DNS resolution when dialed in via modem configure netconfig to look for your (ppp or modem) devices:

Excerpt from /etc/sysconfig/network/config


Please be aware that all sources might provide Name Servers. This could mean that there will be more that the max of 3 for /etc/ressolv.conf.

(Visited 1 times, 1 visits today)
Tags: ,
Category: SUSE Linux Enterprise Desktop, Technical Solutions
This entry was posted Tuesday, 24 March, 2009 at 11:30 am
You can follow any responses to this entry via RSS.


  • tsurmacz says:

    More convenient is to use UMTSMon application which handles the GSM modem connections.

    For SLED 11 you can try the build:

  • Leave a Reply

    Your email address will not be published. Required fields are marked *