使用Windows Arp命令显示,添加和删除Arp信息

Arp is a protocol used to determine host IP addresses from their physical MAC or Ethernet address. Windows operating systems provides arp command in order to manage arp related information. With arp command we can display, add and remove arp entries in ARP cache.

Arp是一种协议,用于根据其物理MAC或以太网地址确定主机IP地址。 Windows操作系统提供arp命令以管理与arp相关的信息。 使用arp命令,我们可以显示,添加和删除ARP缓存中的arp条目。

ARP缓存 (ARP Cache)

ARP and IP entries are hold  in ARP cache every time we want to communicate over network and need IP address we look to the ARP cache. ARP cache is populated with ARP request or manually with static ARP entries

每当我们想通过网络进行通信并且需要IP地址时,我们都会将ARP和IP条目保存在ARP缓存中。 ARP缓存中填充了ARP请求,或者手动填充了静态ARP条目

ARP条目类型(ARP Entry Types)

ARP cache have two type of entries. They are called static and dynamic .

ARP缓存具有两种类型的条目。 它们被称为staticdynamic

动态ARP表项 (Dynamic ARP entry)

Dynamic entries are populated by operating system after ARP request. The returned ARP responses are put into the ARP cache.

ARP请求后,动态条目由操作系统填充。 返回的ARP响应将放入ARP缓存中。

静态ARP条目 (Static ARP Entry)

Static entries are populated by manually without any network traffic and can be removed manually which means not deleted automatically after specific duration.

静态条目是通过手动填充的,没有任何网络流量,可以手动删除,这意味着在特定持续时间后不会自动删除。

列出并显示ARP条目 (List and Display ARP Entries)

We can list currently available ARP entries in cache with -a option. This will list entries according to related interfaces. In this example we have two interfaces and this will create two table

我们可以使用-a选项列出缓存中当前可用的ARP条目。 这将根据相关接口列出条目。 在此示例中,我们有两个接口,这将创建两个表

List and Display ARP Entries
List and Display ARP Entries
列出并显示ARP条目

添加静态ARP条目(Add Static ARP Entry)

Another useful feature of arp command is adding static ARP entries. This will add a given IP address and Mac address to the ARP cache. This entry will be stored up to the computer restart. This type of entries also listed as Type static while listing entries. We will provide the IP address and the mac address like below. We will use -s parameter.

arp命令的另一个有用功能是添加静态ARP条目。 这会将给定的IP地址和Mac地址添加到ARP缓存。 该条目将被保存直到计算机重新启动。 列出条目时,此类型的条目也列为“静态类型”。 我们将提供如下所示的IP地址和mac地址。 我们将使用-s参数。

> arp -s 192.168.122.50 00-aa-00-62-c6-09
Add Static ARP Entry
Add Static ARP Entry
添加静态ARP条目

We can see the entry as static type.

我们可以将条目视为静态类型。

删除ARP条目 (Remove ARP Entry)

We can also remove existing ARP entries. The entry type can be static or dynamic . We will use -d option and the IP address of the entry we want to delete. In this example we will remove ARP entry related with IP address 192.168.122.50 .

我们还可以删除现有的ARP条目。 条目类型可以是staticdynamic 。 我们将使用-d选项和要删除的条目的IP地址。 在此示例中,我们将删除与IP地址192.168.122.50相关的ARP条目。

> arp -d 192.168.122.50
Remove ARP Entry
Remove ARP Entry
删除ARP条目
LEARN MORE  10 Things To Do After Fedora Installation
了解更多Fedora安装后要做的10件事

翻译自: https://www.poftut.com/display-add-remove-arp-information-windows-arp-command/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值