IP in Network - name bind problem
Posted: 09 Feb 2012, 13:53
I have a router and some 5 boxes in the network. All are Linux some are Mandriva and some Arch. They use dhcp where the IP is given from the router in the 10.0.0.x range.
I give the boxes names in the router corresponding to the the names in /etc/hosts when the boxes are online. and I set the router to give the same IP every time (static).
But then once in a while the systems decides to make a new unit and assigns a new IP and the name is something like unknown64*#493849 etc.
So I dance to my main Mandriva box and decide to ssh into one lap and...
This is because /etc/hosts contains something like this:
Now heidi-lap has made herself independent by fetching the IP 10.0.0.10 - and Mandriva conciders that to be rude (it should be 10.0.0.12) so ssh viking@heidi-lap is refused. This is logical because Mandriva does only recognize 10.0.0.10 as heidi-lap - so ssh viking@10.0.0.12 will work.
To fix it I go into my Mandriva box and alter /etc/hosts to:
And I connect with no problem.
This is probably just a simple thing but I should not have to do that
So how can I fix it?
This is /etc/hosts on heidi-lap
My suspicion is that a new router is in order....
I give the boxes names in the router corresponding to the the names in /etc/hosts when the boxes are online. and I set the router to give the same IP every time (static).
But then once in a while the systems decides to make a new unit and assigns a new IP and the name is something like unknown64*#493849 etc.
So I dance to my main Mandriva box and decide to ssh into one lap and...
This is because /etc/hosts contains something like this:
Code: Select all
# generated by drakconnect
127.0.0.1 thomas-pc
127.0.0.1 localhost
10.0.0.5 viking60-server
10.0.0.12 heidi-lapNow heidi-lap has made herself independent by fetching the IP 10.0.0.10 - and Mandriva conciders that to be rude (it should be 10.0.0.12) so ssh viking@heidi-lap is refused. This is logical because Mandriva does only recognize 10.0.0.10 as heidi-lap - so ssh viking@10.0.0.12 will work.
To fix it I go into my Mandriva box and alter /etc/hosts to:
Code: Select all
# generated by drakconnect
127.0.0.1 thomas-pc
127.0.0.1 localhost
10.0.0.5 viking60-server
10.0.0.10 heidi-lapAnd I connect with no problem.
This is probably just a simple thing but I should not have to do that
So how can I fix it?
This is /etc/hosts on heidi-lap
Code: Select all
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost heidi-lap
#10.0.0.10 localhost.localdomain localhost heidi-lap
10.0.0.9 thomas-pc
10.0.0.5 viking60-server
::1 localhost.localdomain localhost
# End of fileMy suspicion is that a new router is in order....
