[KLUG Members] WINS using old IP address question

Adam Tauno Williams awilliam at whitemice.org
Wed Jul 13 22:50:20 EDT 2005


> >Sometimes when I log in to a network with a computer I get a different
> >IP address than I did logging in last time with the same computer.  This
> >might happen by logging in wirelessly or logging in remotely with
> >OpenVPN.
> >For example: 
> >First time:  192.168.0.100
> >Second time: 192.168.0.200
> >The network has a SMB server and a WINS server.
> OK, but not relevant to IP addresses.  Those are handed out by a dhcp 
> server.

Do we know that this addresses is dolled out by a DHCP server?  Or
simply handed out from a pool on the VPN server (I don't recall how
OpenVPN does this)?

What does "host mycomputer" say?  In the Samba configs what is the name
resolution order?

> >When I do 
> >smbclient -L mycomputer
> >it tries to connect to the old IP address, even when the box is on the
> >network with a new IP address.
> The dhcp and DNS server are supposed to be able to talk to each other, 
> and the dhcp server will update dynamic DNS records on the DNS server so 

True. (1) Is this lookup occuring via WINS or DNS?  If it is WINS then
updating the DNS doesn't get you anything. (2) Registering a name to a
new addresses doesn't necessarily deregister that name for the other
address.

> that you can find dynamic IP machines by their name, whatever their 
> current IP address is.  The key phrase here is "supposed to", though.  
> I've gotten it to work maybe half the time.  I've heard Adam suggest 
> that this is much easier and more reliable if done through LDAP.

It is better (IMHO) to drive WINS updates into DNS than DHCP into DNS.

> >Where do I look to find where it is storing this old IP information?

Either in DNS or in WINS (wins.dat)

> >How do I get it to -check first- before it tries to connect to the old
> >address?

You need to generate a deregistration event when the client goes away.

> >Is there a way to announce when logging in, "Hey, I'm over here now!"  ?

This is the purpose of WINS.

> Depends a bit on what version of Windows / samba you're using.  Old 
> versions of Windows (pre-2000) didn't use DNS much, so they'd look based 
> on NetBIOS names (ask the WINS server).  When NetBIOS names are working 
> properly, the machine does announce itself when it powers up, but this 
> is a very broken system, and you're better off without it.  Windows 2000 
> and later, and Linux/samba prefer DNS lookups to NetBIOS broadcasts or 
> WINS queries..
> The easiest solution would be to give the samba server a static IP 
> address.  Either by not using dhcp on that box or setting up a reserved 
> address for that machine on the dhcp server.  A reserved address means 
> that this the dhcp server will only give this particular IP to this 
> particular MAC address.

Is the problem that the client IP address changes or the server?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.kalamazoolinux.org/pipermail/members/attachments/20050713/75f47978/attachment.bin


More information about the Members mailing list