IPNetwork
IPNetwork command line and C# library take care of complex network
...The library can parse networks and calculate values such as network address, CIDR, netmask, broadcast, first usable address, last usable address, and total address count. It also supports containment and overlap checks, which are useful for validation, routing tools, firewall rules, and network planning. The project provides a clean API and is fully unit-tested. It is especially helpful when applications need reliable IP math without custom networking logic.