Link to home
Start Free TrialLog in
Avatar of frankbustos
frankbustosFlag for United States of America

asked on

how to change the dns entries on AIX Version 5.2?

hi experts,


  I need to change dns entries on some linux, unix servers. How do I do that? so for example change dns 192.168.88.1 to 192.168.88.2? I have no experience with this OS , so please be specific.
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

edit /etc/resolv.conf
----------
nameserver 192.168.88.2
Avatar of dfke
dfke

For  Debian based linux distros as well as AIX edit the file /etc/resolv.conf. You'll find the DNS setting there.

In Linux you'll need to restart your network afterwards: /etc/init.d/networking restart
Hi,

do you mean you changed the address of your DNS server and now you have to make this new nameserver address known to AIX?

If so - that's just easy:

Edit /etc/resolv.conf and change the address beneath "nameserver" according to your needs.

That's all. No need to recycle any daemon process, the resolver reads the contents of /etc/resolv.conf at any new request, and there is no dns cache (nscd) in AIX.

wmp
Avatar of frankbustos

ASKER

when I enter the command nameserver 192.168.88.39 and hit return I get nameserver: not an editor command. What am i doing wrong?


this is what I get after I enter the Edit /etc/resolv.conf  command....


irvqavu03 # edit /etc/resolv.conf
"/etc/resolv.conf" 2 lines, 48 characters
:
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK.
1. backup /etc/resolv.conf (as root)
cp /etc/resolv.conf /etc/resolv.conf_backup

2.
echo "nameserver  192.168.88.2" > /etc/resolv.conf
cat /etc/resolv.conf_backup >> /etc/resolv.conf
wesly_chen,

this way frankbustos will end up with two "nameserver" entries in /etc/resolv.conf.
I don't think this is desired.
That's true. However, it uses the top one first, which is 192.168.88.2.

For better one,
echo "nameserver  192.168.88.2" > /etc/resolv.conf
grep -v "nameserver" /etc/resolv.conf_backup >> /etc/resolv.conf

Thanks for the advice.
this worked for me!! was able to make the changes in a fly! thanks!!!!