The netmasks you’re likely to see for subnets include these:
For groups of 128 (126 machines) - 255.255.255.128 (/25) For groups of 64 (62 machines) - 255.255.255.192 (/26) For groups of 32 (30 machines) - 255.255.255.224 (/27) For groups of 16 (14 machines) - 255.255.255.240 (/28) For groups of 8 (6 machines) - 255.255.255.248 (/29) For groups of 4 (2 machines) - 255.255.255.252 (/30)
You can use ifconfig to set an interface to promiscuous mode with a command such as this:
ifconfig eth0 promisc
Promiscuous mode means the network interface will be able to capture all traffic on the network segment rather than just traffic intended for it. In general, this isn’t a good idea as it enables sniffing, though there are probably times when that is just what you need to do.
Rather than just a command to report on assigned IP addresses, ifconfig can tell you how busy your network interface is, if it permits sniffing, if your network is so busy that packets are colliding, and whether the interface is running into errors.
Sign up for Computerworld eNewsletters.