cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1750
Views
0
Helpful
4
Replies

Add DNS mapping to router

adamtay82
Level 1
Level 1

Complete networking newbie here, so I'm sure I'm asking something stupid, but I promise I've spent a lot of time searching before asking the question.

All I want to do is have it so that my router (Cisco SR 520) will resolve a hostname to a local IP. The "ip host" command will do this on the router, but I want it for every connected client.

e.g. ip host fileserver 192.168.1.50

And then when a client connects to the router it is able to connect to the fileserver using the hostname rather than the IP. I guess this needs to be done at the DNS level, but any messing around with "ip dns server" doesn't seem to have worked either.

Thanks for your help.

4 Replies 4

Richard Burts
Hall of Fame
Hall of Fame

Adam

I am not familiar with the SR520 but in most IOS routers what you want is accomplished with ip name-server

Can you give that a try and let us know if it works.

HTH

Rick

HTH

Rick

Thanks for responding.

I do have an ip name-server line in my configuration that points to my ISP's DNS servers, but I want to add a custom record that will resolve a new hostname to a specific computer.

e.g.

ping mymadeupname

That this would then ping computer 192.168.1.50, a computer on my LAN.

Adam

I am having some difficulty in figuring out what you are really trying to accomplish and providing a good answer that satisfies your requirements is dependent on understanding what your requirements really are.

- In some of your discussion it sounds like you want to resolve names for the router. In that case the alternatives that work are configuring names servers on the router (which apparently you have done) and configuring ip host on the router for the clients on the LAN.

- And then sometimes it sounds like you want to resolve names for the clients in which case the optimum solution is to provision an internal DNS server on your network.

- or are you trying to accomplish having the clients resolve names using the router as the DNS server?

Perhaps you can clarify what the real objective is.

HTH

Rick

HTH

Rick

Yes, please excuse me - my unfamiliarity with this stuff is meaning I'm making a mess of explaining what i'm trying to do.

I want the client's to resolve names, and given the abscence of a DNS server, I'm hoping the router can do this.

So let's say we have:

- ClientA

- ClientB

- Router

I want a situation where on ClientA I am able to type "ping ClientB", and it will resolve ClientB to ip address 192.168.1.50

Hope that makes sense.

Adam

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco