frankbustos
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.
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.
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
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
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
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
:
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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.
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.
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.
ASKER
this worked for me!! was able to make the changes in a fly! thanks!!!!
----------
nameserver 192.168.88.2