What is Subnet Mask?

A subnet is a part of the overall address space. A subnet mask indicates to which subnet a device belongs. A common subnet mask is 255.255.255.0, which indicates that the last byte of an IP address contains host information. You can obtain the actual subnet mask as a string with the read-only SubnetMask property. You can set the subnet mask explicitly with the EnableStaticIP method.