Saturday, 6 August 2016

Creating map of local network

There is this cool little that helps us create map of local area network. As a bonus, we get the mac and the IP addresses of all the devices in the network. It passively listens for all network traffic and creates a image file for the network map.
Well, the utility is called lanmap.
if you run it without any arguments, it will use the defaults and will create a png image in the current directory named lanmap.png using the first network interface.


Network map using lanmap
To use a specific interface, use the -i switch
lanmap -i eth1
or you can use wildcard for the interface name, for example,
lanmap -i *3Com*
will use the first interface having the name *3Com* in it.
If you want the image in another format. You can create images in png, gif and svg format.
lanmap -T gif
By default, lanmap generates a report every 60 seconds, use -r to change the default interval.
lanmap -r 30
Lanmap also supports filtering traffic with -f string switch. The string is in libpcab syntax formt.