Trying to find 69.4.176.178 mysql> select router,INET_NTOA(route),mask,route_type,INET_NTOA(route_end),dstip from entries where route <= INET_ATON('69.4.176.178') and route_end >= INET_ATON('69.4.176.178') and route_type like '%ospf%' ; +-----------+------------------+------+------------+----------------------+-----------+ | router | INET_NTOA(route) | mask | route_type | INET_NTOA(route_end) | dstip | +-----------+------------------+------+------------+----------------------+-----------+ | 7200-SF01 | 69.4.176.176 | 28 | OSPF exter | 69.4.176.191 | 10.1.25.2 | +-----------+------------------+------+------------+----------------------+-----------+ 1 row in set (0.01 sec)