1//IP addresses are stored as an array, you can just say
2
3IPAddress my_IPAddress(162.198.2.3);
4Serial.println(my_IPAddress[1]);
5
6//Output
7--------------------------------------------------------
8 > 198
1String IpAddressToString(const IPAddress& ipAddress) {
2 return String(ipAddress[0]) + String(".") +\
3 String(ipAddress[1]) + String(".") +\
4 String(ipAddress[2]) + String(".") +\
5 String(ipAddress[3]) ;
6}