Networking :: Static IP - Multiple DNS's - saving settings



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....

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

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.

original here.