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 (22.214.171.124; 126.96.36.199) 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 (188.8.131.52) whose DNS record updates every 300 seconds.