Static IP - Multiple DNS's - saving settings


Forum: Networking
Topic: Static IP - Multiple DNS's - saving settings
started by: dsquared

Posted by dsquared on Sep. 26 2006,04:57
I have setup bootlocal.sh file for a static IP- everything works except the DNS settings. My internet provider assigns 3 DNS servers xxx.xx.xxx.2  xxx.xx.xxx.4 and xxx.xx.xxx.6. I can configure the eth0 with the 3 DNS addresses through DSL panel & netcardconfig but not through  bootlocal.sh.

I have tried entering the 3 with the following line:
1) echo nameserver xxx.xx.xxx..2 xxx.xx.xxx.4 xxx.xx.xxx.6 > /etc/resolv.conf
-that don't work - only the first DNS  kicks in and with 3 seperate lines:
2) echo nameserver xxx.xx.xxx.2 > /etc/resolv.conf
   echo nameserver xxx.xx.xxx.4 > /etc/resolv.conf
   echo nameserver xxx.xx.xxx.6 > /etc/resolv.conf
that don't work - only the last DNS kicks in
I have searched through the forums and Wiki but cannot find anything on multiple DNS setup anybody have any ideas - they would be appreciated....

Posted by lxzndr on Sep. 26 2006,16:41
You need to change two of your lines:
ok: echo nameserver xxx.xx.xxx.2 > /etc/resolv.conf
change:   echo nameserver xxx.xx.xxx.4 >> /etc/resolv.conf
change:   echo nameserver xxx.xx.xxx.6 >> /etc/resolv.conf

> means put the output into this file (and replace everything in it)
>> means to APPEND the output into this file.

you can also put it all as one line
Code Sample

echo nameserver xxx.xx.xxx.2 xxx.xx.xxx.4 xxx.xx.xxx.6 > /etc/resolv.conf


I have only just started working with DSL for a very specific project this past week, and I've been doing alot of remastering tests, including using fixed IP addresses.  One item you may want to add to that is
Code Sample

echo search yourdomain.com > (or >> if it follows others) /etc/resolv.conf


-Mike

Posted by dsquared on Sep. 26 2006,23:23
Thanks for the quick reply your first option soved it. I had tried putting the DNS servers all in 1 line but it got screwed up.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.