From http://community.spiceworks.com/scripts/show/1768-subnet-scan