You have two possibilities (for an IPv4 address) :
- a
varchar(15), if your want to store the IP address as a string
192.128.0.15 for instance
- an
integer (4 bytes), if you convert the IP address to an integer
3229614095 for the IP I used before
The second solution will require less space in the database, and is probably a better choice, even if it implies a bit of manipulations when storing and retrieving the data (converting it from/to a string).
About those manipulations, see the ip2long() and long2ip() functions, on the PHP-side, or inet_aton() and inet_ntoa() on the MySQL-side.