格兰博倒闭:dos 命令中的 arp 是什么?详细解释一下啊

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 22:49:51

地址解析协议,简单的说就是分析IP地址与MAC地址之间关系的
普通个人用户是没什么用处的

使用方法:
C:\Documents and Settings\Administrator>arp -a

Interface: 10.11.1.47 --- 0x2
Internet Address Physical Address Type
10.11.1.1 00-05-3b-5e-01-a2 dynamic

C:\Documents and Settings\Administrator>

可以使用arp -?察看其他功能

LZ 如果想搞网络可以好好研究一下TCP/IP协议,ARP是那个协议集里的一个

在DOS下的Microsoft Network Client和Windows 9x的DOS窗口等环境中,有许多很有用的但不包含在DOS自带的命令中的网络命令。那么,有哪些这样的命令呢?下面将它们中常用的命令介绍一下。

Arp

显示和修改“地址解析协议”(ARP) 所使用的到以太网的 IP 或令牌环物理地址翻译表。该命令只有在安装了 TCP/IP 协议之后才可用。
arp -a [inet_addr] [-N [if_addr]]
arp -d inet_addr [if_addr]
arp -s inet_addr ether_addr [if_addr]
参数
-a
通过询问 TCP/IP 显示当前 ARP 项。如果指定了 inet_addr,则只显示指定计算机的 IP 和物理地址。
-g
与 -a 相同。
inet_addr
以加点的十进制标记指定 IP 地址。
-N
显示由 if_addr 指定的网络界面 ARP 项。
if_addr
指定需要修改其地址转换表接口的 IP 地址(如果有的话)。如果不存在,将使用第一个可适用的接口。
-d
删除由 inet_addr 指定的项。
-s
在 ARP 缓存中添加项,将 IP 地址 inet_addr 和物理地址 ether_addr 关联。物理地址由以连字符分隔的 6 个十六进制字节给定。使用带点的十进制标记指定 IP 地址。项是永久性的,即在超时到期后项自动从缓存删除。
ether_addr
指定物理地址。

arp---地址解析协议

Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).

ARP -s inet_addr eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]

-a Displays current ARP entries by interrogating the current
protocol data. If inet_addr is specified, the IP and Physical
addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP
table are displayed.
-g Same as -a.
inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface specified
by if_addr.
-d Deletes the host specified by inet_addr. inet_addr may be
wildcarded with * to delete all hosts.
-s Adds the host and associates the Internet address inet_addr
with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be modified.
If not present, the first applicable interface will be used.
Example:
> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.