How To Calculate Network Id From Ip Address