Autoblog reviews all the hottest cars

Find all the MAC and IP addresses on a LAN

Robert Citek wrote about this on the CWE-LUG list a while back, & I thought y'all might find it interesting.

For example, when I want to know all the MAC address and IP addresses on my LAN, I do the following:

# ping -b -c 2 -W 1 192.168.1.255
# arp | grep eth

although I find this for-loop gives me more complete results:

# for i in $(seq 1 254) ; do ping -c 2 -W 1 192.168.1.$i >& /dev/null & done
# arp | grep eth

The above works great if I know the network I'm on. But what if there is a device that is using a different network IP, e.g. 10.1.1.1? For example, we discovered serendipitously through using ethereal that one of our wireless switches was doing just that.

Now, here's how I would do the same thing, using the fantabulous nmap:

# nmap -sP -PI -PT 192.168.0.1/24

Of course, Robert's examples assume that his network's addressing uses 192.168.1.x, while mine assumes 192.168.0.x, but you probably saw that anyway. :)

By the way: anyone got an answer for Robert's question?

(Check out all of my posts on networking.)

concepts
blogging (1)
books (2)
howto (0)
humor (1)
licensing (0)
networking (2)
odf (1)
presentations (1)
programming (1)
review (2)
rss (1)
security (6)
switching (0)
wireless (1)
distros
auditor (1)
debian (2)
fedora core (2)
k/ubuntu (12)
knoppix (2)
libranet (1)
mac os x (2)
solaris (1)
suse (3)
format
flac (1)
mp3 (1)
odf (0)
ppt (0)
hardware
cpu (0)
dvd (1)
keyboard (1)
mouse (1)
printing (1)
microsoft
bullying (0)
ntfs (1)
office (2)
windows (3)
multimedia
imagemanagement (1)
music (3)
podcast (1)
rip-mix-burn (1)
video (0)
people
daveraggett (1)
ericmeyer (1)
software
amarok (0)
azureus (3)
bash (4)
bittorrent (4)
bloglines (1)
clamav (1)
css (1)
ethereal (1)
firefox (11)
gmail (1)
gnome (3)
html (1)
java (2)
kde (2)
kmail (1)
openoffice.org (3)
picasa (1)
regex (1)
rubyonrails (1)
ssh (3)
thunderbird (0)
vim (3)
vmware (0)
wordpress (1)
companies
google (2)
microsoft (0)
novell (0)
red hat (0)
sun (1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: