windows command

来源:互联网 发布:淘宝开店卖情趣用品 编辑:程序博客网 时间:2024/05/21 18:30

1. tracert -d  host                           ##trace the route path

   tracert is based on ICMP protocol

   (ICMP belongs to IP protocol)

2. ipconfig /renew                 #make the ip change applied.

 ipconfig /release和ipconfig /renew——这是两个附加选项,只能在向dhcp服务器租用其ip地址的计算机上起作用。如果你输入ipconfig /release,那么所有接口的租用ip地址便重新交付给dhcp服务器(归还ip地址)。如果你输入ipconfig /renew,那么本地计算机便设法与dhcp服务器取得联系,并租用一个ip地址。请注意,大多数情况下网卡将被重新赋予和以前所赋予的相同的ip地址。


3.

arp -a 显示当前电脑的arp表项arp -s 手工绑定ip地址和mac地址arp -d 删除当前的arp表项
arp -s 157.55.85.212   00-aa-00-62-c6-09.... 添加静态项。arp -a                                  .... 显示 ARP 表

ARP cache entries can be deleted manually by using the arp command with the-d option.

Example: arp -d 192.168.0.1Removes ARP mappings for 192.168.0.1 on all interfaces.

For example, if you recently used the ping command to test and verify connectivity from this computer to a host computer at IP address 10.0.0.99, the ARP cache displays the following entry:

Interface: 10.0.0.1 on Interface 0x1  Internet Address      Physical Address      Type  10.0.0.99             00-e0-98-00-7c-dc     dynamic
In this example, the cache entry indicates that the remote host computer at 10.0.0.99 resolved to a media access control address of 00-e0-98-00-7c-dc assigned in the network adapter hardware of the remote computer. The media access control address is the address that your computer used to physically communicate with this remote TCP/IP host on your network.

Notes

  • To open a command prompt, click Start, point toAll programs, point to Accessories, and then clickCommand prompt.

  • To minimize ARP broadcast traffic on your network, a cache of hardware-to-software address mappings is maintained for future use. This cache contains the following two types of entries:

    • Dynamic ARP cache entries

      These entries are added and deleted automatically during normal use of TCP/IP sessions with remote computers. Dynamic entries age and expire from the cache if not reused within 2 minutes. If a dynamic entry is reused within 2 minutes, it may remain in the cache and age up to a maximum cache life of 10 minutes before being removed or requiring cache renewal by using the ARP broadcast process.

    • Static ARP cache entries

      These entries are added manually by using the arp command with the-s option. Static entries remain in the ARP cache until either the computer is restarted, or the interface is reinitiated. Examples of some of the events that cause an interface to be reinitiated are:
原创粉丝点击