04-10-2021 05:31 PM - edited 04-10-2021 07:25 PM
Hello,
I own a domain name, let's call it mydomain.us, and I have a few hosts that are multihomed and have a public IP as well as a private IP, and I am trying to see if I can do the following on a Cisco 2951 router.
If I want to use the same hostname/domain name, in the local/private network, and try to enter something like:
Charon-2951(config)#ip host thathost@mydomain.us 192.168.1.113
edit: oops.. I meant thathost.mydomain.us...
I get:
%IP: Bad hostname format
Is that because the "domain-name localdomain" setting on the router?
(the question actually is, can I get around that?)
thanks,
Ron
Solved! Go to Solution.
04-11-2021 09:34 AM
how about configuring like below example :
ip domain name mydomain.us
ip host thathost 192.168.1.113
04-10-2021 06:40 PM
Ron
I am not authoritative on this (and if someone who is authoritative would jump in that would be good) but I believe that the issue is that the ip host command expects a simple host name (not associated with a domain name). I do not believe that there is a way around this.
04-10-2021 07:38 PM
Hi Rick,
when I revisited the config, I think I made a typo, that's posibly why I saw the error.
Also, pretty much all hostnames, for lookups, I have in there are like:
ip host thathost.localdomain 192.168.x.y
It seems the router does accept config lines like:
ip host thathost.mydomain.us 192.168.a.b while ... if I didn't it would resolve to thathost.mydomain.us p.q.r.s, a public address, which I wanted to prevent.
So what happens is, I think, that if you tell the router it is 'located' in localdomain, it being it's domain-name is localdomain, it treats that as the default domain search. so if I would like to 'go to' thathost, my router's domain-name being used as the default search domain, it assumes I am looking for thathost.localdomain. (I think if domain-name was set to 'mydomain.us' it would assume the hostname i was looking for would be thathost.mydomain.us.)
some of it (above) is what I see, and it looks like that is how it works?
Ron
04-10-2021 10:59 PM
Ron
I am not clear about your follow up question and am not able to give you an answer for it. Perhaps someone else in the community can help with this.
04-11-2021 09:34 AM
how about configuring like below example :
ip domain name mydomain.us
ip host thathost 192.168.1.113
04-17-2021 10:14 AM
that is what I started doing, somehow I was thinking to use two domain names, but that didn't make much sense.
thanks,
Ron
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide