---------------------------------
Looking for a X-Mas gift? Everybody needs a Flickr Pro Account!
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-22-2007, 08:09 PM
Cameron Simpson
script or other suggestion
On 22Nov2007 15:35, chloe K <chloekcy2000@yahoo.ca> wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that there
must be exactly three terminations: one on one end of the cable, one on the
far end, and the goat, terminated over the SCSI chain with a silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 01:30 PM
"Broekman, Maarten"
script or other suggestion
Why not just do DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane. If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K <chloekcy2000@yahoo.ca> wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 01:35 PM
"Vivek J. Patankar"
script or other suggestion
chloe K wrote:
I have ip list in my network
I need to check which ip is unused
what is better solution?
Write the ping script or use other command
eg:
for i in ip.txt
ping -c 3 $i
If you have nmap installed you can use that to do the job. From the nmap
man page...
$ nmap -v -sP 192.168.0.0/16
--
Regards,
विवेक ज. पाटणकर (Vivek J. Patankar)
Registered Linux User #374218
Fedora release 7 (Moonshine)
Linux 2.6.22.4-65.fc7 x86_64
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 01:47 PM
"Herta Van den Eynde"
script or other suggestion
On 23/11/2007, Broekman, Maarten <Maarten.Broekman@fmr.com> wrote:
> Why not just do DNS lookups to see which ones are assigned?
>
> To build on what Cameron mentioned, just put in "host $i" in the loop
> and check to see it returns anything sane. If so, you might want to
> ping it to see if it's up, but as Cameron said, the system could be down
> or off so that's not 100% reliable.
>
> Maarten Broekman
> Email: maarten.broekman@fmr.com
>
> -----Original Message-----
> From: redhat-list-bounces@redhat.com
> [mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
> Sent: Thursday, November 22, 2007 4:10 PM
> To: General Red Hat Linux discussion list
> Subject: Re: script or other suggestion
>
> On 22Nov2007 15:35, chloe K <chloekcy2000@yahoo.ca> wrote:
> | I have ip list in my network
> | I need to check which ip is unused
> | what is better solution?
> |
> | Write the ping script or use other command
> |
> | eg:
> |
> | for i in ip.txt
> | ping -c 3 $i
>
> That would be:
>
> for i in `cat ip.txt`
> do ping -c 3 $i || { echo "IP $i is not in use."; break; }
> done
>
> Of course, if a machine happens to be down/off, if will look
> like its IP is not in use...
>
> You could possibly do something clever with nmap or "ping -b",
> but your approach is simple and effective.
> --
> Cameron Simpson <cs@zip.com.au> DoD#743
> http://www.cskk.ezoshosting.com/cs/
To make matters worse, a system may be up but firewalls may block pings.
Kind regards,
Herta
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 01:55 PM
chloe K
script or other suggestion
Thank you
how to use dns lookups
thank you again
"Broekman, Maarten" <Maarten.Broekman@FMR.COM> wrote: Why not just do DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane. If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 02:00 PM
"Broekman, Maarten"
script or other suggestion
The command 'host' will look up an ip address and return the associated
hostname (if there is one).
The manpage should help.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of chloe K
Sent: Friday, November 23, 2007 9:55 AM
To: General Red Hat Linux discussion list
Subject: RE: script or other suggestion
Thank you
how to use dns lookups
thank you again
"Broekman, Maarten" <Maarten.Broekman@FMR.COM> wrote: Why not just do
DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane. If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Instant message from any web browser! Try the new Yahoo! Canada
Messenger for the Web BETA
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 03:04 PM
Jim Canfield
script or other suggestion
or...just use nmap to ping a range.
EX:* nmap -sP 192.168.1.1-254
----- Original Message -----
From: chloe K
Sent: Fri Nov 23 2007 08:56:31 GMT-0600 (CST)
To: General Red Hat Linux discussion list
Subject: RE: script or other suggestion
Thank you
how to use dns lookups
thank you again
"Broekman, Maarten" <Maarten.Broekman@FMR.COM> wrote: Why not just do DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane.**If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K**wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
**for i in `cat ip.txt`
**do**ping -c 3 $i || { echo "IP $i is not in use."; break; }
**done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson**DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles.** - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
******
---------------------------------
Instant message from any web browser! Try the new**Yahoo! Canada Messenger for the Web BETA
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-23-2007, 03:17 PM
chloe K
script or other suggestion
this is very fast
how come sometimes I get the hostname, most of the time it can't
how can I have hostname to print it out?
Host 192.168.63.245 appears to be up.
Host 192.168.63.246 appears to be up.
Host 192.168.63.247 appears to be up.
Host 192.168.63.248 appears to be up.
Host zzz.com (192.168.63.249) appears to be up.
Host 192.168.63.250 appears to be up.
Host 192.168.63.251 appears to be up.
Thank you
Jim Canfield <jcanfield@tshmail.com> wrote: or...just use nmap to ping a range.
EX: nmap -sP 192.168.1.1-254
----- Original Message -----
From: chloe K
Sent: Fri Nov 23 2007 08:56:31 GMT-0600 (CST)
To: General Red Hat Linux discussion list
Subject: RE: script or other suggestion
Thank you
how to use dns lookups
thank you again
"Broekman, Maarten" wrote: Why not just do DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane. If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@fmr.com
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Looking for a X-Mas gift? Everybody needs a Flickr Pro Account!
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
11-26-2007, 10:21 PM
"Herta Van den Eynde"
script or other suggestion
On 23/11/2007, chloe K <chloekcy2000@yahoo.ca> wrote:
> this is very fast
>
> how come sometimes I get the hostname, most of the time it can't
>
> how can I have hostname to print it out?
>
>
> Host 192.168.63.245 appears to be up.
> Host 192.168.63.246 appears to be up.
> Host 192.168.63.247 appears to be up.
> Host 192.168.63.248 appears to be up.
> Host zzz.com (192.168.63.249) appears to be up.
> Host 192.168.63.250 appears to be up.
> Host 192.168.63.251 appears to be up.
>
> Thank you
>
> Jim Canfield <jcanfield@tshmail.com> wrote: or...just use nmap to ping a range.
>
> EX: nmap -sP 192.168.1.1-254
If the host is not defined in dns, you won't get a translation of the
ip address to hostname.
Just compare the output of these commands:
'host 192.168.63.247'
'host 192.168.63.249'
Kind regards,
Herta
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list