Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1) edited /etc/sysconfig/network-scripts/ifcfg-xxx
2) Set PEERDNS=no
3) ran
# /etc/rc.d/init.d/network restart
4) edited /etc/resolv.conf
typing nameservers as needed there
That is all.
Tested with;
# /etc/rc.d/init.d/network restart
twice to confirm /etc/resolv.conf not overwritten.
After editing /etc/sysconfig/network-scripts/ifcfg-xxx I found
them on; /etc/resolv.conf on fisrt restarting;
/etc/rc.d/init.d/network
Hi Satimis, looks like your name servers given there point to http://www.netvigator.com/ Seems to be a broadband supplier/web portal...the site's default language is Chinese.
I don't think it realy matter which order you put name servers in /etc/resolv.conf
The propper way to use one or more servers is to load balance between them. That is, with two servers, the questions should be divided between them, even if one is down or has other problems.
So your solution would be to dropp 111.111.111.111 all together and only use 222.222.222.222
You might have missunderstod me. I wasn't that clear in my answer to you.
The servers I mean in my answer is the dns servers your ISP gives you.
If you have two DNS servers in your /etc/resolv.conf, your machine should ask each one every second time. That is, first DNS question should go to 111.111.111.111, next DNS question to 222.222.222.222, third to 111.111.111.111 and so on.
So you can't tell your machine (without a hack any way) to ask only 111.111.111.111 and only 222.222.222.222 when 111.111.111.111 has problems (which ever that could be).
So it doesn't matter which order you specify your DNS-servers in /etc/resolv.conf You will hit the bad server with problems each second time you do a DNS-question whichever order you use.
So you can't tell your machine (without a hack any way) to ask only 111.111.111.111 and only 222.222.222.222 when 111.111.111.111 has problems (which ever that could be)
I expect it hits the 2nd nameserver assigned first.
Which option shall I set on /etc/sysconfig/network-scripts/ifcfg-xxx
Code:
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
IPV6INIT=no
USERCTL=no
PEERDNS=yes
TYPE=xDSL
DEVICE=ppp0
BOOTPROTO=dialup
PIDFILE=/var/run/pppoe-adsl.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
PERSIST=no
SYNCHRONOUS=no
DEFROUTE=yes
USER='satimis'
ETH=eth0
PROVIDER=xxx
DEMAND=no
ONBOOT=yes
You can't select order to ask or which name server to ask first hand.
Your system will ask each name server in turn. One after the other in a round robin way. No option (that I know of any way).
If you don't want to use a name server, don't put it in /etc/resolv.conf
Oh yes, you need to tell pppd to not set dns server in /etc/resolv.conf by seting PEERDNS to no, as you have been told earlier. If you have PEERDNS=yes, pppd will ask for a list of DNS servers when you connect and use them.
That is if you use pppd or dhcp to get internet connection. Isn't it documented in /usr/share/doc/initscripts-*/sysconfig.txt ?
But this look like a Red Hat type of configuration. And I only uses Debian. But the way name reolution behaves is the same between RH and Debian. It's only the way system configuration is set up that is different.
And I only uses Debian. But the way name reolution behaves is the same between RH and Debian. It's only the way system configuration is set up that is different.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.