hostname resolution locally
I have two IP's configured on same port eth0-169.254.100.10 and eth0:1 - 169.254.100.110.
I would like to assign two hostnames to them say tinku.myhost.com and tinku-secondry.myost.com and two processes using them. I would like to get 169.254.100.10 when using host tinku.myhost.com and 169.254.100.110 when using hostname tinku-secondry.myhost.com. Is there a way apart from setting up a local dns server. |
You can enter the resolution in each computers /etc/hosts file
|
add it on your /etc/hosts
ip address1 hostname1 ip address2 hostname2 from where you are accessing these servers you will have to add these entries on each servers /etc/hosts file |
Thank you simon and kirukan. I did that b4 posting but didn't help. :-( I am using rhel 4.6
|
what do you mean "didn't work", what is in /etc/hosts and how did you test it?
You have two IPs for the same nic? There are several ways to do this - which did you use? |
added following in /etc/hosts
169.254.100.10 tinku-myservertinku.myhost.com 169.254.100.110 tinku-secondary.myhost.com And then restarted network service and ran $>host tinku-secondary.myhost.com Host tinku-secondary.myhost.com not found: 3(NXDOMAIN) I get similar error with host tinku.myhost.com. When i run hostname i get tinku.myhost.com |
Quote:
Code:
169.254.100.10 tinku-myservertinku tinku-myservertinku.myhost.com. |
In addition to Suncoast...
you did not soy how you set up the interface to have two IPs. you did not provide the rest of the hosts file ... is tinku.myhost.com an alias for loopback? properly set up, this host should present two IPs to the network. Have you tried altering the hosts file for other hosts on the network? See if you can, thus. ping by hostname? |
All times are GMT -5. The time now is 06:38 PM. |