You are getting the IP address of your VM via Shared Networking (NAT) - you need to change the Settings for the VM so that it is the same network adapter that you get your local area connection for D2 from, selected as Networking, Network Adapter 1:
Your DHCP server will then set the IP address for the VM in the same range (172.18.25.xxx), and you will be able to ping and share files from the VM with D2 and the XP machine. You will need to set the Windows 7 network as a Work Network (not Home or Public) and disable the Homegroup from control panel. You won't need IPv6 or Link Layer Topology discovery protocols etc either. You may need to reduce the encryption in the advanced sharing settings to 40- or 56-bit and not 128-bit.