LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-29-2008, 07:32 AM   #1
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Rep: Reputation: 15
How to determine vacant IP addresses


I was looking at the IP of our backup server just now, and realized it didn't conform to the numbering scheme used for the other servers. If was about to ifconfig it to match the scheme. I was going to check the DHCP list to see which IP #s are still available, and that got me wondering. Is there any command I can use to determine if an IP # is free?
 
Old 07-29-2008, 07:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, you ping it and get no response.
 
Old 07-29-2008, 08:27 AM   #3
grejon04
Member
 
Registered: Jun 2008
Posts: 43

Rep: Reputation: 15
for something as simple as checking your own network, a ping should do fine. In other cases, you might want something like a port scanner or Nessus, or even just hping set to different common ports, to make sure that something is not just dropping ICMP (ping) packets.
 
Old 07-29-2008, 08:45 AM   #4
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Original Poster
Rep: Reputation: 15
Yes, pinging comes to mind, but one problem I see with this if reliability. What if I'm checking if 192.10.134.3 is free? I ping it, and if it's free I get icmp_seq=1 Destination Host Unreachable, right? The problem is, I would get this exact same error message, in the event of this IP already having been assigned to a machine, and the machine happens to be unplugged for a given reason.
That's why I was hoping for something for definitive than ping.
 
Old 07-29-2008, 08:57 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Use nmap to quickly scan the entire subnet..

nmap -sP 192.10.134.0/24


Host name and IP address info..
.

Nmap done: 256 IP addresses (78 hosts up) scanned in 14.327 seconds



When dealing with Static IP addresses, it's up to the Network administrator to DOCUMENT the used IP addresses, and keep that documentation up to date. The documentation should be your definitive resource.

Last edited by farslayer; 07-29-2008 at 08:59 AM.
 
Old 07-29-2008, 11:20 AM   #6
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Rep: Reputation: 32
have you tried ping ip_address_here? Again you can also try using nmap as earlier advised. That way you get a response then the ip is not free and you can further use nmap to roughly try and pin-point which machine is using the ip.

If not then the machine is off at that moment or the ip is not in use at all.
 
Old 07-30-2008, 01:27 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well of course you can't tell if an IP address is "vacant" compared to "switched off" there is absolutely no *technical* difference whatsoever.
 
  


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
Broadband Modem, Vacant USB Connection, How To Use It? Novatian Linux - Hardware 1 05-11-2008 08:27 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
How do you determine how many IP addresses, which should be private and how to instal Cannan2468 Linux - Server 6 02-22-2008 09:09 AM
mechanics of mapping process memory addresses to physical addresses on amd64 Tischbein Linux - Kernel 2 02-01-2007 08:09 PM
Vacant Email ganninu Linux - Software 4 08-25-2003 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 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