Here are a bunch of useful commands that you can run to help your troubleshoot network programs like connectivity to your default gateway and the internet.
ipconfig /all
This command shows a lot of useful information such as your IP address, subnet, gateway and your DNS and DHCP servers.
ipconfig /displaydns
This command shows you the DNS cache on your local machine, giving you IP address to name mapping.
ipconfig /flushdns
This command will flush the DNS cache on the local machine.
netstat -a
This command will show all the open tcp/udp ports on your machine
arp -a
This command will show you your arp cache which gives you IP to MAC address mappings.
tracert -d 8.8.8.8
This command send a traceroute to 8.8.8.8(google) and show you all the hops the packet took on its way there. The -d option prevents name resolution which speeds up the command.
pathping -n 8.8.8.8
This command is similar to tracert and will show you all the hops the packet took on its way to 8.8.8.8(google). The -n option prevents name resolution.
nslookup 8.8.8.8
This command will give you the hostname of 8.8.8.8(Google) or if used with a hostname will give you the IP address.
nbtstat -a
This command will give you the NetBIOS name associated with the IP address.