I believe the Arduino Ethernet library is hard coded to use the Linux interface eth0. In order to use the loop back, you would need to use the Linux interface l0.
Re: Adding another Ethernet port to Intel Galileo board In this thread there is a comment pointing to an #ifndef in the Ethernet.cpp file which defines which interface the Arduino sketch uses. You should be able to change the interface to use the loopback interface "l0". I would think that would work, but I have not tried it.
I tried to replace ARDUINO_ETH to "lo" and it proved to be working. The other link you added is very helpful.
One thing I noticed is that the line `Udp.begin(localPort);` needs to use a different port number than the target port in `Udp.beginPacket(ip, targetPort);`, when both sending and receiving are in the same device. It's probably a very stupid error but it took me quite some time to figure out.
And adding another ip address to the eth0 interface seems to be a really good idea(As mentioned by Marclll in the linked post). This way I don't need to change the defined network interface in Arduino library, while still achieving the goal. I'm currently going this way.