IPCONFIG question

Paithar

[H]ard|Gawd
Joined
Jul 17, 2003
Messages
1,049
I am a noob when it comes to networking. I have used the command ipconfig only a couple of times and then only because some tech support person suggested I try it but I've never seen an explanation as to what this command actually does. I was going to google it but decided that I like the explanations that I get for things from people here on the [H]ardforums better.

I've used ipconfig /flushdns but that's all. I know there are other options for ipconfig but I really have no idea what any of them are for including the flushdns option. So, if someone could explain at least the /flushdns option and the /renew option and possibly when a good time to try those two commands would be I would greatly appreciate it.

Thanks,
Paithar
 
Paithar said:
I am a noob when it comes to networking. I have used the command ipconfig only a couple of times and then only because some tech support person suggested I try it but I've never seen an explanation as to what this command actually does. I was going to google it but decided that I like the explanations that I get for things from people here on the [H]ardforums better.

I've used ipconfig /flushdns but that's all. I know there are other options for ipconfig but I really have no idea what any of them are for including the flushdns option. So, if someone could explain at least the /flushdns option and the /renew option and possibly when a good time to try those two commands would be I would greatly appreciate it.

Thanks,
Paithar

As they say in the linux world, RTFM!! :p

Basicly "ipconfig" by itself simply reports the basic IP settings of a PC. It displays IP, subnet mask, and gateway. The more useful option is "ipconfig /all" which displays much more info such as MAC address, name servers and much more. The "ipconfig /flushdns" does just what it says - flushes the dns cache. The other most usefull are "ipconfig /release" and "ipconfig /renew" which releases and renews a DHCP address manually.



Code:
C:\>ipconfig /?

Windows 2000 IP Configuration


USAGE:
   ipconfig [/? | /all | /release [adapter] | /renew [adapter]
            | /flushdns | /registerdns
            | /showclassid adapter
            | /setclassid adapter [classidtoset] ]

   adapter    Full name or pattern with '*' and '?' to 'match',
              * matches any character, ? matches one character.
   Options
       /?           Display this help message.
       /all         Display full configuration information.
       /release     Release the IP address for the specified adapter.
       /renew       Renew the IP address for the specified adapter.
       /flushdns    Purges the DNS Resolver cache.
       /registerdns Refreshes all DHCP leases and re-registers DNS names
       /displaydns  Display the contents of the DNS Resolver Cache.
       /showclassid Displays all the dhcp class IDs allowed for adapter.
       /setclassid  Modifies the dhcp class id.

The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For SetClassID, if no class id is specified, then the classid is removed.

Examples:
    > ipconfig                       ... Show information.
    > ipconfig /all                  ... Show detailed information
    > ipconfig /renew                ... renew all adapaters
    > ipconfig /renew EL*            ... renew adapters named EL....
    > ipconfig /release *ELINK?21*   ... release all matching adapters,
                                         eg. ELINK-21, myELELINKi21adapter.
 
The flush command is typicaly used when there may be a name change for a device.

For example one day you go to www.hardocp.com . Your PC Caches the fact that www.hardocp.com is actualy IP address 10.2.3.4 . Later that day they decide to move the server to 192.168.1.2. Since your PC has cached that entry it still thinks it's address is still 10.2.3.4 and will not get to the new address. Flushing the DNS cache would then make your PC go out and requery the DNS server and get the proper address for it. If you want to see what's in the Cache you can do a ipconfig /displaydns

NOTE: This is a simplified version and is missing about 20-30 If's And's or But's . It's a general idea of why you would want to use the command.
 
Back
Top