common ip arithmetics