I'm basically looking for something like this but available on Mac.

I am trying to connect a new workstation to our wireless multifunction printer and I'm having a hell of a time getting the device to spit out an IP for me to connect to.

Is there a way I can scan the network somehow?

If it makes a difference, the new workstation is using Mac OS X 10.6.

8 Answers

  1. Ping the broadcast address
    (you can find it with ifconfig | grep broadcast)

  2. and then do an arp -a

7

Where x.x.x is the first three numbers in your ip address.

for ip in $(seq 1 254); do ping -c 1 x.x.x.$ip -o ConnectTimeout=5; [ $? -eq 0 ] && echo "x.x.x.$ip UP" || : ; done 
3

Single Line Answer: [Use NMAP] or Angry IP Scanner

1

Your printer provides a file share for dropping files into or are you just trying to locate the printer on your network?

Does your new multifunction printer support Bonjour/ZeroConf? (Most new network based printers do) If so you can use a program such as Bonjour Browser to see what is available on your network.

On your router does it appear on the DHCP Clients Table (you may have to consult your manual to see how to see this table) - as this will also give you the IP but will also let you know for certain that your printer is actually connected to your network.

From your Mac itself you can use a program such as Nmap from the command line or use a GUI based app (eg. Zenmap - GUI for Nmap or AngryIPScanner) to scan your network and then see what ports are available.

1

NMAP [nmap] is your best friend for all sorts of network devices scans. Use Zenmap if you need GUI [zenmap].

Assuming your local network is 192.168.0.0/24 (where 24 means netmask 255.255.255.0) this will give you online hosts with their IP and MAC addresses:

nmap -sP 192.168.0.0/24

You can download the package from project website or build yourself from sources with MacPorts [macports]. Enjoy! :-)

[nmap]

[zenmap]

[macports]

Fing (mostly known as a mobile network scanner for android/ios) has a freely available macos console version which additionally does some fingerprinting via built-in mac address manufacturer tables. It appears to be faster than nmap and easier to use.

Once installed you can run it with:

sudo fing 

It is apparently closed source so I don't know how safe it is to use. Make sure you are aware of potential risks.

Also available as a homebrew cask:

brew cask install fing 

Works:

$ for ip in $(seq 1 254); do ping -c 1 192.168.0.$ip; done 

or

$ for ip in $(seq 1 254); do ping -c 1 192.168.0.$ip -W 1; done 

Description:

loop from 1 till 254 on each loop ping the ip one after another, to skip press CTRL + C or on each loop -W 1 means auto skip after 1 second 

On the Mac, there is IP Scanner, which looks has a GUI that aggregates arp, bonjour, NBT and some other network scanning technologies.

2