do your routers have a web interface enabled? If so it can be done through there. Otherwise you can
thank kenboonejr for this walk through.
kenboonejr:First log on to the router either via telnet, ssh or through the console port.
It should prompt you for a login.
Once you are logged in you will need to be in enable mode.
If you see the prompt like this:
hostname>
Note that is a greater than sign - then you are not in enable mode so if that is the case type
"enable" and hit enter
If you are at enable mode it will look like this:
hostname#
With a # sign after the name
Now you type "config t" and hit enter
Your prompt will change to hostname(config)#
ip name-server x.x.x.x y.y.y.y
where x.x.x.x and y.y.y.y are you primary and secondary name servers.
Hit enter after you type that in, then type exit and enter
Then type "wr mem" and enter to save the config.