I know I can ping a server name and determine the IP address. But are there commands I can use to determine the subnet? I'm using Windows XP.
I know I can ping a server name and determine the IP address. But are there commands I can use to determine the subnet? I'm using Windows XP.
No. Subnetting is generally hard/impossible to determine from afar - why do you need it?
Strictly speaking, you don't determine the IP address of the server using ping either - ping just uses the normal resolver to determine the IP address and prints it out before going on to do its main task, testing whether a host is up by sending an ICMP echo request message and awaiting ICMP echo reply messages.
A tool that's actually built to find name mappings from DNS is host, or, more recent, dig, from the BIND DNS server client tools. Dig is a fantastically useful tool and every sysadmin should be able to use it.
Bonus information: You can find out who owns the IP block to which the address belongs and how big it is using whois on an IP address, just like you would on a domain.
Write a script to psexec ipconfig on the remote server and parse the output for the subnet mask.
With some trial and error, you can use "tracert" from the command line to ping neighboring IP addresses to see where the route ends up. That is, assuming there's no firewall blocking ICMP requests.
If the second-to-last IP stays the same, you're in the subnet. Of course, with NAT and the fact that many hosts block these requests, you're probably out of luck.
In theory a type '17' ICMP (ping) request should work for you, but I don't know how widely supported this is anymore.