LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-16-2010, 01:15 AM   #1
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Rep: Reputation: 32
remove ip address from remote host


If I have a dnsmasq server and it dished out a IP address that I don't want it to and it still gives it to my machine no matter how many times I restart windows and issue ipconfig /renew|release or enable/disable the adapter, how do I force it to give my windows machine an IP I want it to have?

I hope that made sense... The only way I've accomplished this in the past is by rebooting my slackware system.
 
Old 04-16-2010, 01:22 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by hedron View Post
If I have a dnsmasq server and it dished out a IP address that I don't want it to and it still gives it to my machine no matter how many times I restart windows and issue ipconfig /renew|release or enable/disable the adapter, how do I force it to give my windows machine an IP I want it to have?

I hope that made sense... The only way I've accomplished this in the past is by rebooting my slackware system.
You can bind your system's physical address to a specific ip address, so that whenever the DHCP server is requested to provide ip, it will give the same ip to that machine.
You can configure it in your dhcp server.
 
Old 04-16-2010, 01:39 AM   #3
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Original Poster
Rep: Reputation: 32
I use dhcp-host option in dnsmasq.conf and it normally works. But sometimes Windows screws up and messes up the cache or something and locks out the IP address somehow.

OK, It says this in syslog:

Code:
not giving name <windows host name> to the DHCP lease of 192.168.1.100 because the name exists in /etc/hosts with address 192.168.1.1

Last edited by hedron; 04-16-2010 at 01:41 AM.
 
Old 04-16-2010, 01:42 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by hedron View Post
I use dhcp-host option in dnsmasq.conf and it normally works. But sometimes Windows screws up and messes up the cache or something and locks out the IP address somehow.

OK, It says this in syslog:

Code:
not giving name <windows host name> to the DHCP lease of 192.168.1.100 because the name exists in /etc/hosts with address 192.168.1.1
Can you post your /etc/hosts file here?
 
Old 04-18-2010, 06:20 AM   #5
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Original Poster
Rep: Reputation: 32
Code:
127.0.0.1               localhost
#127.0.0.1              luskan.faerun.ao luskan
#
192.168.1.1   luskan.faerun.ao        luskan
192.168.1.2   baldursgate.faerun.ao   baldursgate
192.168.1.3   neverwinter.faerun.ao   neverwinter
192.168.1.4   annanarissa.faerun.ao   annanarissa
 
Old 04-18-2010, 09:49 AM   #6
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
I think you answered your own question:

Quote:
192.168.1.1 luskan.faerun.ao luskan
Is the windows host name luskan? If so then it is already defined in /etc/hosts as the message in syslog indicates.
 
Old 04-18-2010, 09:59 AM   #7
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Original Poster
Rep: Reputation: 32
Oh... so like, then I should remove all the entries from my hosts file?

Wait... I never told it to give my Windows machine that address, it's just randomly giving it.

Ok, now it gave me a different IP after I disabled the network device and added the gateway IP to the network properties in Windows. But it's not the IP in dnsmasq.conf or /etc/hosts.

Last edited by hedron; 04-18-2010 at 10:17 AM.
 
Old 04-18-2010, 05:07 PM   #8
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
what is the hostname assigned to the windows machine? if it is luskan then the problem is that hostname is already mapped to an ip in /etc/hosts. you can't have two machines in a lan with the same hostname. i mean you could but what's the point?
 
Old 04-19-2010, 02:57 AM   #9
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Original Poster
Rep: Reputation: 32
My slackware box is luskan and my windows machine is neverwinter. I didn't assign it the same IP address. It's like dnsmasq still thinks that someone has my windows machines IP address, so it gives it a different one. I have set the IP manually in Windows because my windows box needs a specific IP address for certain apps I use, but I'd rather have dnsmasq give me the correct one. I know I could just restart linux and everything will go back to normal, but I don't want to close this app I have running on it.
 
Old 04-19-2010, 02:11 PM   #10
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
So are you configuring staic dhcp addresses with dnsmasq? What I mean by that is do you have a mapping from mac address to ip address somewhere configured with dnsmasq so it knows to give a particular ip to particular device with that mac?
 
Old 04-19-2010, 11:55 PM   #11
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Original Poster
Rep: Reputation: 32
That is correct. I've used numerous guides and it's been working fine, but this is the only issue that I've had so far. I use dhcp-host.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
Can i obtain the --- MAC ADDRESS --- of a remote host?? eder_michael11 Linux - General 6 08-18-2014 03:10 PM
Can't SSH to some remove hosts: Connection Closed by Remote Host kvarkki Linux - Server 5 02-18-2010 06:44 AM
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
Resolving <www.some remote host>.... failed: Host not found. koodoo Linux - Newbie 2 06-27-2005 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration