Generation IV and V Pokemon games communicate with Nintendo's Wi-Fi servers for various parts of the games.
Nintendo's Wi-Fi servers run Microsoft's IIS and use ASP.NET as the primary language. This data can be confirmed based on the headers sent to the Nintendo DS as well as through error messages sent via browser. The main hostnames of each of these servers are subdomains of nintendowifi.net.
The connection test servers are the simplest servers. They contain a single webpage which is retrieved to check that Wi-Fi is working properly. The page can be reached with normal HTTP URL retrieval. This address refers to two servers (184.108.40.206; 220.127.116.11) whose DNS records cycle every 30 seconds to keep the load balanced.
Protocol specific information about this server can be found in GTS protocol.
This gamestats server is used for the GTS in both Generation IV and V primarily. This address refers to a single server (18.104.22.168) whose DNS record updates every 300 seconds.