Sketch working on Mega 2560 R3 but not on R1/2

No Uno.
As i wrote both are Megas - just different revisions.

What looks alien maybe is that i use a DS18B20 to generate a unique MAC address
on all my Ethernet Arduinos.
This way you always have unique MAC address's without taking care of them.