Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing IP address in Linux does not change WINS regn

Status
Not open for further replies.
Jul 5, 2001
10
AU
Hi - I have my samba server (redhat) configured to use an external wins server. Each time samba starts up, it registers its netbios name with the wins server. So far so good. Then we wanted to deploy the samba box to a new location and new IP address. We changed the ip address in Linux in /etc/hosts, /etc/sysconfig/network & /etc/sysconfig/network-scripts/ifcfg-eth0. When samba restarts it still registers with wins with the original ip address. Why? and how can I fix it?


Eddy Steenbergen
Team Leader Internal Systems
Corporate IT
Dept Primary Industries Water and Environment
Tasmania, Australia
ph: (03) 6233-3838
 
umm ... is the IP address in your smb.conf?

if not, if this is the same network as it was on with the original IP address, give it time and the problem will probably go away, WINS appears to cache ip addresses and only refresh them at irregular intervals.
 
Eddy,

Is SAMBA configured as a WINS client or WINS server. Also, make sure that the addresses for WINS servers in the smb.conf file are still correct (have you changed WINS server IP addresses as well?). Do an nmblookup 'samba-server-name' and see if the old or new address is returned.

Lee Mason.
 
Lee Mason

SAMBA is configured as a wins client but NOT a wins server. And the addresses for the wins servers are correct.

The nmblookup 'servername' command showed the OLD address! Since I've changed the Linux IP address, where is nmblookup finding the old address?

Either I have not changed the IP add in Linux correctly (ifconfig shows only the new address!) or samba/nmb has the old IP address stored somewhere. Ideas?


Eddy Steenbergen, Team Leader Internal Systems, Corporate IT, Dept Primary Industries Water and Environment, Tasmania, Australia, ph: +61 3 6233-3838
 
jad - I can't find the old ip addr anywhere in the samba source or runtime files.

Eddy Steenbergen, Team Leader Internal Systems, Corporate IT, Dept Primary Industries Water and Environment, Tasmania, Australia, ph: +61 3 6233-3838
 
are you connecting to a different WINS server from before, or is it the same one?

are you using the same 'machine name' for your linux box for on the network?
 
Have checked in the lmhosts file to see if it has the old IP address?
 
jad - I have not changed the WINS server or the 'machine name'.

steinshouerj - I don't have a lmhosts file.

A possibly useful bit of info - I built samba with the options: ––enable-cups ––with-winbind ––with-pam


Eddy Steenbergen, Team Leader Internal Systems, Corporate IT, Dept Primary Industries Water and Environment, Tasmania, Australia, ph: +61 3 6233-3838
 
Have a look on the WINS server (using WINS Manager on Windows) and see if you can see an entry for your machine name. This is where nmblookup gets it's information. If the name is here with the wrong address then try deleting the name from WINS (actually tombstone it because if you have multiple WINS servers it will propogate around again if you just delete it).

Next, shutdown and restart Samba and it should reregister itself with WINS.

Lee.


Lee Mason
Optimal Projects Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top