Implementation for Microchip ENC28J60 Ethernet controller

what is the function of the D2 connection on the shield?

Allows you to catch interrupts from the network. D2 is one of the pins that can use "AttachInterrupt()"
It appears to require bridging a small jumper/solderbridge connection before it is actually connected.