How to extract the last byte out of an IP adress
localIP() returns an IPAddress object.  That object has an operator for [] allowing you to access the individual parts of it.

IPAddress ip = Ethernet.localIP();
Serial.println(ip[3]);