Obtaining list of IP addresses from a subnet

I made a script today and I needed to get a list of IP addresses from some subnets. The solution to do this is nmap:

nmap -sL -n $subnet

gives you a lists all the IPs contained by the $subnet subnet.

To actually get a list you can parse the output in a stupid and lazy way like I did:

nmap -sL -n 10.1.1.0/29 | grep "not scanned" | column -t | cut -d ' ' -f 3

10.1.1.0
10.1.1.1
10.1.1.2
10.1.1.3
10.1.1.4
10.1.1.5
10.1.1.6
10.1.1.7
  

GNS3 - Graphical frontend for Cisco emulation

http://www.gns3.net

This is a frontend for dynamips and dynagen. It makes life much easier as it allows graphical design and simulation of your network. It's a very good tool when you study for CCNA or CCNP - routing mainly. The developers say they will incorporate PIX support in future releases.

Watch out for high CPU loads. There's a tutorial about how to configure it so that the CPU levels stay at a reasonable level - in the documentation PDF.

Although current release is pretty buggy it's much easier than working with dynagen's config files.

Follow by Email

Sponsored Links

Labels