Static DNS using NetwotkManager

Hi
I installed my Huawei E220 USB card for HSDPA connection on opensuse 11.0 and it worked out of the box with NetworkManager.
I want to use OpenDNS name servers :wink: and not the name servers dinamically set by my provider.
I tryed setting the keyword

MODIFY_RESOLV_CONF_STATIC_DNS

with the IP of the OpenDNS but it doesn’t work the DNS used was the ones supplied by the provider.
Is it possible to solve the problem?

Hi. If you can’t tell Knetworkmanager (or gnomenetworkmanager) to use your preferred nameserser you can modify “NETCONFIG_DNS_STATIC_SERVERS” in “/etc/sysconfig/network/config”. Maybe that helps…

thank you but on my Opensuse 11.0 I wasn’t able to find any key like:

“NETCONFIG_DNS_STATIC_SERVERS”

roberto60 wrote:

> I installed my Huawei E220 USB card for HSDPA connection on opensuse
> 11.0 and it worked out of the box with NetworkManager.
> I want to use OpenDNS name servers :wink: and not the name servers
> dinamically set by my provider.
> I tryed setting the keyword
>
> MODIFY_RESOLV_CONF_STATIC_DNS
>
> with the IP of the OpenDNS but it doesn’t work the DNS used was the
> ones supplied by the provider.
> Is it possible to solve the problem?

Not sure if this would help, but if you are using dhcp, you can try to
edit /etc/dhclient.conf by adding:


supersede domain-name-servers 208.67.222.222, 208.67.220.220;


And then restarting network service with “rcnetwork restart” command.

Greetings,

–
CamaleĂłn

Hi
I tryed modify dhcp.conf but it hanged up networkmanager while connecting to the gsm network >:(

roberto60 wrote:

> I tryed modify dhcp.conf but it hanged up networkmanager while
> connecting to the gsm network >:(

I said nothing about “dhcp.conf” but “dhclient.conf” :-?. Just verify you
edited the right file.

What error message are you getting from networkmanager?

Greetings,

–
CamaleĂłn

Sorry my typing mistake I edited “dhclient.conf”.

I got no error message but I cannot access networkmanager, clicking its icon on the gnome panel, it hangs while trying to establish the connection.

roberto60 wrote:

> Sorry my typing mistake I edited “dhclient.conf”.

O.k. No problem.

“dhcp.conf” is the file that controls dhcp server, so I asked :slight_smile:

> I got no error message but I cannot access networkmanager, clicking its
> icon on the gnome panel, it hangs while trying to establish the
> connection.

It is strange… can you please post the content of /etc/dhclient.conf?

Also, take a quick look at networkmanager log located
in /var/log/NetworkManager and post here any suspicious error you are
getting (if any).

Greetings,

–
CamaleĂłn

I’m sorry to be plain I cant find the keyword you pointed to me so I modified the

prepend domain-name-servers

# dhclient configuration file
# see "man dhclient.conf" for further details
# file: /etc/dhclient.conf
#


######################################################
# Suggested configurations for Cable Modem providers #
#
# uncomment and fill in the appropriate section

#####################################################
# @Home -- TCI, etc
#
# Uncomment the following line and enter your Client ID, which should
# have come in your mail from @Home
#
# send dhcp-client-identifier "c32423-a"

#send host-name "andare.fugue.com";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 208.67.222.222, 208.67.220.220;

send dhcp-lease-time 3600;
request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, host-name, nis-domain,
	nis-servers, ntp-servers, netbios-name-servers;
# We request above options, require only the IP configuration:
require subnet-mask;
# To enforce the availability of the dns server list, set to:
#require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;

# Default location of the dhclient-script. Note: Setting
# it in the config, disables the -sf command line option!
#script "/sbin/dhclient-script";

#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

roberto60 wrote:

> I’m sorry to be plain I cant find the keyword you pointed to me so I
> modified the
>
> prepend domain-name-servers

Restore the original line and just “add” the one I told you, so you get
something like this:


#prepend domain-name-servers 127.0.0.1;
supersede domain-name-servers 208.67.222.222, 208.67.220.220;


Then, restart the network service and test again.

Greetings,

–
CamaleĂłn

Thank you very much now it worked and sorry for my misunderstanding.