Page 1 of 1

IP in Network - name bind problem

Posted: 09 Feb 2012, 13:53
by viking60
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... :wall:
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-lap


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:

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-lap

And I connect with no problem.

This is probably just a simple thing but I should not have to do that :snooty:
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 file


My suspicion is that a new router is in order....

Re: IP in Network - name bind problem

Posted: 09 Feb 2012, 16:08
by rolf
:think: Well, the 'hosts' concept is something I've managed to avoid, so far, and this post might not be too helpful, however!:

In my Linksys running Tomato, I associate the 'static' dhcp addresses for different machines with the MAC of the connected NIC. Is that an option worth pursuing? Seems, perhaps, a directive that carries more digital authority than such as "heidi-lap" :love How cute! Just saying. :berserk2

Re: IP in Network - name bind problem

Posted: 09 Feb 2012, 17:10
by viking60
It does not have the MAC address binding option :berserk2
Image
I will eventually change my router anyway.

Re: IP in Network - name bind problem

Posted: 09 Feb 2012, 22:35
by R_Head
I use Address Reservation and ACL on my Netgear.
Both are done by MAC Address.

Works quiet well. The only problem is with new devices (DVD Players, Roku, PS3, Wii, phones, etc...), sometimes they seems to be suborn and snatches a different IP or the Router gives them the next available IP if the device is not present.

Once the Router has the ACL and Address Reservation done it will go back to normal operation. :coffee_smile:

Re: IP in Network - name bind problem

Posted: 10 Feb 2012, 01:03
by viking60
Yes mine seems to give those newcomers the reserved/static IP if that box is turned off. The router does recognize the MAC address because it puts it in the generated names.
But it seems to fail to reserve the IP's if the box is turned off.