• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 546
  • Last Modified:

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.
0
frankbustos
Asked:
frankbustos
  • 3
  • 3
  • 2
  • +1
1 Solution
 
wesly_chenCommented:
edit /etc/resolv.conf
----------
nameserver 192.168.88.2
0
 
dfkeCommented:
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
0
 
woolmilkporcCommented:
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
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
frankbustosAuthor Commented:
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
:
0
 
woolmilkporcCommented:
Rather use vi.

Enter

vi /etc/resov.conf

Position the cursor under the part of your IP address which you want to change, hit <shift><R>, then type the new number(s) until there's the complete new address.

Hit <esc> (the "escape" key) when finished, then type :wq!

That's all.
0
 
wesly_chenCommented:
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
0
 
woolmilkporcCommented:
wesly_chen,

this way frankbustos will end up with two "nameserver" entries in /etc/resolv.conf.
I don't think this is desired.
0
 
wesly_chenCommented:
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.
0
 
frankbustosAuthor Commented:
this worked for me!! was able to make the changes in a fly! thanks!!!!
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now