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 firstname.lastname@example.org 192.168.1.113
edit: oops.. I meant thathost.mydomain.us...
%IP: Bad hostname format
Is that because the "domain-name localdomain" setting on the router?
(the question actually is, can I get around that?)
Solved! Go to Solution.
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.
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?
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.