Logic for IP Map/Calculator