Read ethernet subnet mask and gateway

Here are the network settings you can access:

IPAddress localIP();
IPAddress subnetMask();
IPAddress gatewayIP();
IPAddress dnsServerIP();

Access them like

Serial.println(Ethernet.gatewayIP());