网管必须熟练掌握的“杀手剪”命令,你会用吗?

write by 洱海月  QQ:254034704
http://blog.youkuaiyun.com/networkcrazy
ipconfig命令是用来查看网络配置基本信息的最有用的命令,可堪称网络命令的“杀手剪”。它一出招,能帮助广大网管解决60%不能上网的原因。下面给出此命令的详细手法,希望能让你如虎添翼。

1 命令帮助查看

C:/Documents and Settings/Administrator>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.

真没有想到这个命令还有这么多的参数。这些参数非常有用哦。下面进行详细讲解。

2 命令使用实例

(1)、查看所有接口的网络配置信息

ipconfig /all( 不用详说了吧,大家一定很常用。)

(2)释放“本地连接”的IP地址(只对动态获得IP地址的接口有效)

C:/Documents and Settings/Administrator> ipconfig /release 本地连接----可以省略(省略则表则释放所有动态接口的IP地址。)

Windows 2000 IP Configuration

IP address successfully released for adapter "本地连接"

(3)、重获“本地连接”的IP地址(只对动态获得IP地址的接口有效)

C:/Documents and Settings/Administrator> ipconfig /renew 本地连接----可以省略(省略则表则重获所有动态接口的IP地址。)

注意:(2)、(3)两条命令常常是搭配使用的,可是经典中的经典哦。对于ARP欺骗攻击,它们也一定效果的哦。值得推荐。。。

下面的命令就是非常有用,但大家并不常用的哦。注意看啊!

(4)、查看DNS解析器缓存

DNS解析器就是我们电脑向DNS服务器进行解析IP地址的客户端软件,没有它,我们将无法解释IP地址,这样一来,我们在地址栏里面输入网址时,也就打不开网页了哦。(注意:有些打不开网页的情况就是DNS解析器出现了问题。)。DNS解析器是系统集成的工具,我们不需要另外安装。

当我们电脑向DNS服务器进行解析时,DNS会把解析的结果返回给客户端,这样我们就知道了网址和IP地址的对就关系。但是,DNS解析器会这个解析的结果保存一定的时间,以免得重复解析,浪费资源。这就构成了DNS解析器缓存。

具体命令如下:

C:/Documents and Settings/Administrator> ipconfig /displaydns

Windows 2000 IP Configuration

   localhost.
   ------------------------------------------------------
     Record Name . . . . . : localhost
     Record Type . . . . . : 1
     Time To Live  . . . . : 31397166
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     A (Host) Record . . . :
                       127.0.0.1


   1.0.0.127.in-addr.arpa.
   ------------------------------------------------------
     Record Name . . . . . : 1.0.0.127.in-addr.arpa
     Record Type . . . . . : 12
     Time To Live  . . . . : 31397166
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     PTR Record  . . . . . :
                       localhost


(5)、清空DNS解析器缓存(注意:用此命令也解新决一些莫名其妙不能打开网页的问题。)

C:/Documents and Settings/Administrator> ipconfig /flushdns

Windows 2000 IP Configuration

Successfully flushed the DNS Resolver Cache.

注意:(4)、(5)两条命令也是一对好搭档哦。

(6)、刷新所有DHCP租约,重新注册DNS名字

C:/Documents and Settings/Administrator> ipconfig /registerdns

Windows 2000 IP Configuration

Registration of the DNS resource records for all adapters of this computer has b
een initiated. Any errors will be reported in the Event Viewer in 15 minutes.

(7)、查看"本地连接"的DHCP classes ID

C:/Documents and Settings/Administrator> ipconfig /showclassid 本地连接----不可省略

Windows 2000 IP Configuration

There are no DHCP classes for adapter "本地连接".

(8)、修改"本地连接"的DHCP classes ID

ipconfig /setclassid

注意:(7)、(8)两条命令也是一对好搭档哦。



 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值