image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old July 20th, 2004, 04:30 PM
StarBuck's Avatar
Tech
 
Join Date: Sep 2000
Location: United Kingdom
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
StarBuck is on a distinguished road
How to Ping a IP Range in the Terminal?

Hi quick question I hope for someone out there, how do you ping a ip range in the terminal?

I want to ping 192.168.1.1 to 254 via the terminal.

Ta
Reply With Quote
  #2  
Old July 20th, 2004, 05:10 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
I'd use nmap (fink-able package) with the following string:

nmap -sP -T Insane 192.168.1.1-254

You should get an output like:
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Host (192.168.0.1) appears to be up.
Host (192.168.0.100) appears to be up.
Host (192.168.0.110) appears to be up.
Nmap run completed -- 254 IP addresses (3 hosts up) scanned in 3 seconds
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #3  
Old July 20th, 2004, 05:40 PM
StarBuck's Avatar
Tech
 
Join Date: Sep 2000
Location: United Kingdom
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
StarBuck is on a distinguished road
With the help of a friend here is the answer.

ping the address like this ping 192.168.0

this will then scan your network range but this doesn't seem to find everything.
Reply With Quote
  #4  
Old July 20th, 2004, 05:45 PM
twister's Avatar
Howdy
 
Join Date: Oct 2000
Location: Minneapolis MN
Posts: 2,517
Thanks: 0
Thanked 1 Time in 1 Post
twister is on a distinguished road
www.dnsstuff.com maybe that's easier.
__________________
:: TwisterMc ::
:: Wrestling Gear : iPox Firefox Skin ::
Reply With Quote
  #5  
Old July 20th, 2004, 09:07 PM
scruffy's Avatar
Notorious Olive Counter
 
Join Date: Dec 2000
Location: Soviet Canuckistan
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
scruffy is on a distinguished road
as far as I can tell, that doesn't actually work that way - 192.168.0 just gets filled in to 192.168.0.0

You'd be best off using nmap
__________________

What is the robbing of a bank compared to the founding of a bank?
-- Bertold Brecht
Reply With Quote
  #6  
Old July 20th, 2004, 09:53 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
Quote:
Originally Posted by scruffy
as far as I can tell, that doesn't actually work that way - 192.168.0 just gets filled in to 192.168.0.0

You'd be best off using nmap
Also, dnsstuff.com isn't from the Terminal, unless, I guess, you use lynx
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #7  
Old July 20th, 2004, 10:42 PM
Pengu's Avatar
Digital Music Pimp
 
Join Date: Nov 2002
Location: Um.. Here.
Posts: 1,591
Thanks: 0
Thanked 0 Times in 0 Posts
Pengu is on a distinguished road
try using 192.168.0.255 (broadcast address)
__________________
PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9

PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup

Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb
Reply With Quote
  #8  
Old July 21st, 2004, 02:16 AM
scruffy's Avatar
Notorious Olive Counter
 
Join Date: Dec 2000
Location: Soviet Canuckistan
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
scruffy is on a distinguished road
That ought to work in general, but I can see two potential problems:
- if different hosts have different configured subnet masks, some will consider 192.168.0.255 to be a broadcast to the 192.168.0.0/24 network, others will consider it to be a specific computer in the 192.168.0.0/16 network.
- some operating systems or firewalls might drop broadcast echo replies, to avoid traffic multiplication bombs or similar attacks.

I don't know what the reason is, whether it's one of the two I thought of, or some other but: At home I have two macs at 192.168.0.3 and 192.168.0.4, and the router is at 192.168.0.1. If I ping 192.168.0.255, I get responses from the macs, but not the router. I have to ping 192.168.0.1 to get a response from the router.
__________________

What is the robbing of a bank compared to the founding of a bank?
-- Bertold Brecht
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 09:52 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.