arp命令使用详解
ARP命令

ARP命令一、ARP病毒现在已知的ARP欺骗分为二种,一种是对路由器ARP表的欺骗;另一种是对内网PC的网关欺骗。
ARP(Address Resolution Protocol,地址解析协议)是一个位于TCP/IP协议栈中的低层协议,负责将某个IP地址解析成对应的MAC地址。
第一种ARP欺骗的原理是——截获网关数据。
它通知路由器一系列错误的内网MAC地址,并按照一定的频率不断进行,使真实的地址信息无法通过更新保存在路由器中,结果路由器的所有数据只能发送给错误的MAC地址,造成正常PC无法收到信息。
第二种ARP欺骗的原理是——伪造网关。
它的原理是建立假网关,让被它欺骗的PC向假网关发数据,而不是通过正常的路由器途径上网。
在PC看来,就是上不了网了,―网络掉线了‖。
一般来说,ARP欺骗攻击的后果非常严重,大多数情况下会造成大面积掉线。
而且如果第一种ARP欺骗发生时,只要重启路由器,网络就能全面恢复。
防范ARP的方法:1、在路由器中把所有PC的IP-MAC输入到一个静态表中,这叫路由器IP-MAC绑定。
有的路由器可以避免网关ARP欺骗,也避免维护网关的路由表。
原理是:为对抗假冒网关的ARP欺骗,采用网关的ARP广播机制,它以一个可选定的频次,向内网宣布正确的网关地址,维护网关的正当权益。
在暂时无法及时清除ARP病毒,网管员还没有做PC上的IP -MAC绑定时,它能在一定程度上维持网络的运行,避免灾难性后果,赢取系统修复的时间。
这就是ARP 主动防范机制。
为了一劳永逸,还是为每台PC做IP-MAC绑定,这样可以彻底避免ARP欺骗。
2、在内网所有PC上设置网关的静态ARP信息,这叫PC机IP-MAC绑定。
设置方法:arp –a /*显示现有的ARP表*/arp –d /*删除所有*/arp -s 192.168.0.1 00-17-16-01-79-9b /*静态添加*/二、ARP命令详解显示和修改“地址解析协议(ARP)”缓存中的项目。
Arp命令用法大全

以下资料来源:/anlyren/archive/2007/10/08/study_arp.htmlIP数据包常通过以太网发送。
以太网设备并不识别32位IP地址:它们是以48位以太网地址传输以太网数据包的。
因此,IP驱动器必须把IP目的地址转换成以太网网目的地址。
在这两种地址之间存在着某种静态的或算法的映射,常常需要查看一张表。
地址解析协议(Address Resolution Protocol,ARP)就是用来确定这些映象的协议。
ARP工作时,送出一个含有所希望的IP地址的以太网广播数据包。
目的地主机,或另一个代表该主机的系统,以一个含有IP和以太网地址对的数据包作为应答。
发送者将这个地址对高速缓存起来,以节约不必要的ARP通信如果有一个不被信任的节点对本地网络具有写访问许可权,那么也会有某种风险。
这样一台机器可以发布虚假的ARP报文并将所有通信都转向它自己,然后它就可以扮演某些机器,或者顺便对数据流进行简单的修改。
ARP 机制常常是自动起作用的。
在特别安全的网络上,ARP映射可以用固件,并且具有自动抑制协议达到防止干扰的目的。
显示和修改“地址解析协议(ARP)”缓存中的项目。
ARP 缓存中包含一个或多个表,它们用于存储IP 地址及其经过解析的以太网或令牌环物理地址。
计算机上安装的每一个以太网或令牌环网络适配器都有自己单独的表。
如果在没有参数的情况下使用,则arp 命令将显示帮助信息。
Arp是一个重要的TCp/Ip协议,并且用于确定对应Ip地址的网卡物理地址。
使用arp 命令,我们能够查看本地计算机或另一台计算机的ARp高速缓存中的当前内容。
此外,使用arp命令,也可以用人工方式输入静态的网卡物理/Ip地址对,我们可能会使用这种方式为缺省网关和本地服务器等常用主机进行这项作,有助于减少网络上的信息量。
按照缺省设置,A r p高速缓存中的项目是动态的,每当发送一个指定地点的数据报且高速缓存中不存在当前项目时,A r p便会自动添加该项目。
arp命令使用详解

arp命令使用详解(1)显示和修改“地址解析协议 (ARP)”缓存中的项目。
ARP 缓存中包含一个或多个表,它们用于存储 IP 地址及其经过解析的以太网或令牌环物理地址。
计算机上安装的每一个以太网或令牌环网络适配器都有自己单独的表。
如果在没有参数的情况下使用,则 arp 命令将显示帮助信息。
语法arp[-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]] [-s InetAddr EtherAddr [IfaceAddr]]参数-a[ InetAddr] [ -N IfaceAddr]显示所有接口的当前 ARP 缓存表。
要显示特定 IP 地址的 ARP 缓存项,请使用带有InetAddr 参数的 arp -a,此处的 InetAddr 代表 IP 地址。
如果未指定 InetAddr,则使用第一个适用的接口。
要显示特定接口的 ARP 缓存表,请将 -N IfaceAddr 参数与 -a 参数一起使用,此处的 IfaceAddr 代表指派给该接口的 IP 地址。
-N 参数区分大小写。
-g[ InetAddr] [ -N IfaceAddr]与 -a 相同。
-d InetAddr [IfaceAddr]删除指定的 IP 地址项,此处的 InetAddr 代表 IP 地址。
对于指定的接口,要删除表中的某项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表指派给该接口的 IP 地址。
要删除所有项,请使用星号 (*) 通配符代替 InetAddr。
-s InetAddr EtherAddr [IfaceAddr]向 ARP 缓存添加可将 IP 地址 InetAddr 解析成物理地址 EtherAddr 的静态项。
要向指定接口的表添加静态 ARP 缓存项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表指派给该接口的 IP 地址。
arp命令的使用方法

arp命令的使用方法ARP(Address Resolution Protocol)是一种用于将IP地址映射到物理MAC地址的协议。
在计算机网络中,每个设备都有一个唯一的MAC地址和一个IP地址。
ARP命令可以用来查询和操作本地ARP缓存,以及发送ARP请求和应答。
在本文中,我们将介绍ARP命令的使用方法,以及一些常见的应用场景。
一、查询本地ARP缓存使用ARP命令可以查看本地ARP缓存中的信息。
ARP缓存是一个存储IP地址和对应MAC地址的表格,用于加快IP地址到物理地址的映射过程。
要查询本地ARP缓存,可以使用以下命令:arp -a该命令将显示本地ARP缓存中的所有条目,包括IP地址、MAC地址和类型(静态或动态)。
通过查看ARP缓存,我们可以了解当前网络中的主机和其对应的MAC地址。
二、发送ARP请求使用ARP命令可以发送ARP请求,从而获取指定IP地址对应的MAC 地址。
发送ARP请求的命令格式如下:arp -s IP地址 MAC地址其中,IP地址是要查询的目标IP地址,MAC地址是目标IP地址对应的物理MAC地址。
通过发送ARP请求,我们可以主动获取指定主机的MAC地址。
三、清空本地ARP缓存有时候,由于网络配置或其他原因,本地ARP缓存中的信息可能会过期或不准确。
在这种情况下,我们可以使用ARP命令来清空本地ARP缓存,以便重新获取最新的MAC地址信息。
清空本地ARP缓存的命令如下:arp -d该命令将清空本地ARP缓存中的所有条目。
清空ARP缓存后,下次进行ARP查询时将重新获取最新的MAC地址信息。
四、设置静态ARP缓存除了动态获取MAC地址外,我们还可以手动设置静态ARP缓存。
静态ARP缓存是一种手动添加的ARP条目,可以在本地缓存中指定IP 地址和对应的MAC地址。
设置静态ARP缓存的命令格式如下:arp -s IP地址 MAC地址其中,IP地址是要设置的目标IP地址,MAC地址是目标IP地址对应的物理MAC地址。
linuxarp命令常用参数详解

linuxarp命令常⽤参数详解linux arp 命令常⽤参数详解显⽰和修改地址解析协议(ARP)使⽤的“IP 到物理”地址转换表。
ARP -s inet_addr eth_addr [if_addr]ARP -d inet_addr [if_addr]ARP -a [inet_addr] [-N if_addr] [-v]-a 通过询问当前协议数据,显⽰当前 ARP 项。
如果指定 inet_addr,则只显⽰指定计算机的 IP 地址和物理地址。
如果不⽌⼀个⽹络接⼝使⽤ ARP,则显⽰每个 ARP 表的项。
-g 与 -a 相同。
-v 在详细模式下显⽰当前 ARP 项。
所有⽆效项和环回接⼝上的项都将显⽰。
inet_addr 指定 Internet 地址。
-N if_addr 显⽰ if_addr 指定的⽹络接⼝的 ARP 项。
-d 删除 inet_addr 指定的主机。
inet_addr 可以是通配符 *,以删除所有主机。
-s 添加主机并且将 Internet 地址 inet_addr与物理地址 eth_addr 相关联。
物理地址是⽤连字符分隔的 6 个⼗六进制字节。
该项是永久的。
eth_addr 指定物理地址。
if_addr 如果存在,此项指定地址转换表应修改的接⼝的 Internet 地址。
如果不存在,则使⽤第⼀个适⽤的接⼝。
⽰例:添加静态项。
这个很有⽤,特别是局域⽹中中了arp病毒以后> arp -s 123.253.68.209 00:19:56:6F:87:D2> arp -a .... 显⽰ ARP 表。
但是arp -s 设置的静态项在⽤户登出之后或重起之后会失效,如果想要任何时候都不失效,可以将ip和mac的对应关系写⼊arp命令默认的配置⽂件/etc/ethers中例如:引⽤root@ubuntu:/# vi /etc/ethers211.144.68.254 00:12:D9:32:BF:44写⼊之后重起以下⽹络就好了。
arp、tracert、route这几个命令的用法

arp、tracert、route这几个命令的用法ARP(地址解析协议)是用于将IP地址转换为MAC地址的协议。
ARP命令用于在本地网络中查询或发布ARP缓存中的IP地址和MAC 地址映射。
用法:1.查询ARP缓存表:在命令提示符下输入“arp-a”命令,可以查看本机ARP缓存表中的IP地址和MAC地址映射关系。
2.添加静态ARP条目:使用“arp-s”命令可以手动添加静态AR P条目,指定IP地址和MAC地址的映射关系。
3.删除ARP条目:使用“arp-d”命令可以删除ARP缓存表中的指定条目。
Tracert(跟踪路由)命令用于检测IP数据包在到达目标主机的过程中经过的路由节点。
该命令通过发送ICMP回显请求并等待每个节点的响应来确定数据包的路径。
用法:1.检测本地计算机到目标主机的路由:在命令提示符下输入“t racert[目标主机IP地址或域名]”命令,该命令将列出数据包经过的每个跃点及其响应时间。
2.指定最大跃点数:使用“tracert[目标主机IP地址或域名][最大跃点数]”命令,可以限制经过的跃点数。
3.显示数据包序列号:使用“tracert-d[目标主机IP地址或域名]”命令,可以显示数据包的序列号而不是IP地址。
4.检测IPv6路由:使用“tracert-6[目标主机IPv6地址或域名]”命令,可以检测IPv6数据包的路由。
Route命令用于管理和配置本地计算机上的路由表。
该命令用于添加、删除、修改或显示IP路由表中的条目。
用法:1.显示路由表:在命令提示符下输入“route print”命令,可以显示本地计算机上的路由表。
2.添加路由:使用“route add[目标网络地址]mask[子网掩码] [网关地址]”命令,可以将一个新的路由添加到路由表中。
3.删除路由:使用“route delete[目标网络地址]mask[子网掩码]”命令,可以从路由表中删除指定的路由条目。
4.重定向数据包:使用“route change[目标网络地址]mask[子网掩码][网关地址]”命令,可以修改现有路由条目以重定向数据包。
如何使用arp命令在Linux中手动添加和删除ARP缓存项

如何使用arp命令在Linux中手动添加和删除ARP缓存项ARP(Address Resolution Protocol)是一个用于将IP地址转换为MAC地址的网络协议,它在局域网中起着至关重要的作用。
在Linux 系统中,我们可以使用arp命令来手动添加和删除ARP缓存项,以解决网络通信故障或安全问题。
本文将为您详细介绍如何在Linux中使用arp命令来手动添加和删除ARP缓存项,帮助您更好地管理网络连接和保证网络安全。
一、ARP(Address Resolution Protocol)概述ARP(Address Resolution Protocol)是一种用于将IP地址转换为对应的物理MAC地址的网络协议,它在TCP/IP协议族中属于链路层协议,用于解析IP地址和MAC地址之间的映射关系。
当一台主机需要与同一网络中的另一台主机进行通信时,它会首先在自己的ARP缓存表中查找目标主机的MAC地址,如果找到则直接发送数据,如果没有找到则通过广播的方式发送ARP请求,请求目标主机回应其MAC地址。
二、arp命令基本用法在Linux系统中,我们可以使用arp命令来查看、添加和删除ARP 缓存项。
下面是arp命令的基本用法:1. 查看ARP缓存表要查看当前主机的ARP缓存表,只需在终端中输入以下命令:```arp -n```该命令将显示出当前主机ARP缓存表中的内容,包括IP地址和对应的MAC地址。
2. 添加ARP缓存项如果需要手动添加ARP缓存项,可以使用以下命令:```sudo arp -s <IP地址> <MAC地址>```其中,<IP地址>为目标主机的IP地址,<MAC地址>为目标主机的MAC地址。
使用此命令可以将目标主机的IP地址和对应的MAC地址手动添加到ARP缓存表中。
3. 删除ARP缓存项如果需要手动删除ARP缓存项,可以使用以下命令:```sudo arp -d <IP地址>```其中,<IP地址>为目标主机的IP地址。
利用arp命令在Linux中查看和管理ARP缓存表

利用arp命令在Linux中查看和管理ARP缓存表ARP(Address Resolution Protocol)是一种用于将IP地址转换为MAC地址的协议,在计算机网络中起着重要的作用。
在Linux系统中,我们可以使用arp命令来查看和管理ARP缓存表,该命令提供了一些功能强大的选项,可以帮助我们更好地了解和管理网络连接。
一、查看ARP缓存表使用arp命令可以查看当前系统中的ARP缓存表,该表中记录了IP 地址与MAC地址之间的对应关系。
通过以下命令可以查看ARP缓存表:$ arp -n该命令会显示出ARP缓存表的详细信息,包括IP地址、MAC地址、类型等。
这些信息可以帮助我们了解当前系统中的网络连接状态。
二、清除ARP缓存表有时候,由于网络连接的变化或其他原因,ARP缓存表中的某些条目可能已经过期或者现在无效。
我们可以使用arp命令来清除这些无效的条目,保持ARP缓存表的更新。
$ sudo arp -d <IP地址>使用上述命令可以清除ARP缓存表中特定IP地址的条目。
需要注意的是,需要使用sudo来获取管理员权限执行该命令。
同时,我们也可以使用以下命令清除整个ARP缓存表:$ sudo ip -s -s neigh flush all该命令会立即清除整个ARP缓存表,并将其重置为空表。
需要使用sudo来获取管理员权限执行该命令。
三、动态添加ARP缓存表项除了自动通过网络连接来添加ARP缓存表项外,我们还可以手动添加ARP缓存表项,以实现更精确的网络连接控制。
$ sudo arp -s <IP地址> <MAC地址>使用该命令可以将指定的IP地址与MAC地址添加到ARP缓存表中。
需要使用sudo来获取管理员权限执行该命令。
需要注意的是,手动添加的ARP缓存表项只在当前系统重启前有效,重启后会被清除。
四、其他ARP命令选项除了上述常用的命令选项外,arp命令还提供了其他一些功能强大的选项,用于更灵活地管理ARP缓存表。
试题 ARP命令详解.doc

欢迎您加入我们的论坛,和大家一起共同探讨无限精彩的计算机世界。
1. 具体功能该命令用于显示和修改“ 地址解析协议(ARP)” 缓存中的项目。
ARP 缓存中包含一个或多个表,它们用于存储IP 地址及其经过解析的以太网或令牌环物理地址。
计算机上安装的每一个以太网或令牌环网络适配器都有自己单独的表。
如果在没有参数的情况下使用,则ARP 命令将显示帮助信息。
2. 语法详解arp [-a [inetaddr] [-n ifaceaddr] [-g [inetaddr] [-n ifaceaddr] [-d inetaddr [ifaceaddr] [-s inetaddr etheraddr [ifaceaddr]3. 参数说明-a [inetaddr] [-n ifaceaddr] 显示所有接口的当前ARP 缓存表。
要显示指定IP 地址的ARP缓存项,请使用带有inetaddr 参数的“arp -a” ,此处的inetaddr 代表指定的IP 地址。
要显示指定接口的ARP 缓存表,请使用“-n ifaceaddr” 参数,此处的ifaceaddr 代表分配给指定接口的IP 地址。
-N 参数区分大小写。
-g [inetaddr] [-n ifaceaddr] 与-a 相同。
-d inetaddr [ifaceaddr] 删除指定的IP 地址项,此处的inetaddr 代表IP 地址。
对于指定的接口,要删除表中的某项,请使用ifaceaddr 参数,此处的ifaceaddr 代表分配给该接口的IP 地址。
要删除所有项,请使用星号(*) 通配符代替inetaddr 。
-s inetaddr etheraddr [ifaceaddr] 向ARP 缓存添加可将IP 地址inetaddr 解析成物理地址etheraddr的静态项。
要向指定接口的表添加静态ARP 缓存项,请使用ifaceaddr 参数,此处的ifaceaddr 代表分配给该接口的IP 地址。
ARP 命令详解

ARP 命令详解ARp(地址转换协议)的使用技巧ARp是一个重要的TCp/Ip协议,并且用于确定对应Ip地址的网卡物理地址。
实用arp 命令,我们能够查看本地计算机或另一台计算机的ARp高速缓存中的当前内容。
此外,使用arp命令,也可以用人工方式输入静态的网卡物理/Ip地址对,我们可能会使用这种方式为缺省网关和本地服务器等常用主机进行这项作,有助于减少网络上的信息量。
按照缺省设置,ARp高速缓存中的项目是动态的,每当发送一个指定地点的数据报且高速缓存中不存在当前项目时,ARp便会自动添加该项目。
一旦高速缓存的项目被输入,它们就已经开始走向失效状态。
例如,在Windows NT/2000网络中,如果输入项目后不进一步使用,物理/Ip地址对就会在2至10分钟内失效。
因此,如果ARp高速缓存中项目很少或根本没有时,请不要奇怪,通过另一台计算机或路由器的ping命令即可添加。
所以,需要通过arp命令查看高速缓存中的内容时,请最好先ping 此台计算机(不能是本机发送ping命令)。
ARp常用命令选项:·arp -a或arp –g 用于查看高速缓存中的所有项目。
-a和-g参数的结果是一样的,多年来-g一直是UNIX平台上用来显示ARp高速缓存中所有项目的选项,而Windows用的是arp -a(-a可被视为all,即全部的意思),但它也可以接受比较传统的-g选项。
·arp -a Ip 如果我们有多个网卡,那么使用arp -a加上接口的Ip地址,就可以只显示与该接口相关的ARp缓存项目。
·arp -s Ip 物理地址我们可以向ARp高速缓存中人工输入一个静态项目。
该项目在计算机引导过程中将保持有效状态,或者在出现错误时,人工配置的物理地址将自动更新该项目。
·arp -d Ip 使用本命令能够人工删除一个静态项目。
例如我们在命令提示符下,键入Arp –a;如果我们使用过ping 命令测试并验证从这台计算机到Ip 地址为10.0.0.99 的主机的连通性,则ARp 缓存显示以下项:Interface:10.0.0.1 on interface 0x1 Internet Address physical Address Type 10.0.0.9900-e0-98-00-7c-dc dynamic在此例中,缓存项指出位于10.0.0.99 的远程主机解析成00-e0-98-00-7c-dc 的媒体访问控制地址,它是在远程计算机的网卡硬件中分配的。
实验3 ARP命令的使用和端口操作

实验3 1、ARP命令的使用2、TCP/IP端口筛选和对端口的操作一、实验目的1、掌握ARP命令的使用方法2、熟悉TCP/IP端口筛选的方法3、掌握一些常见端口的操作方法二、实验内容1、ARP命令的使用2、TCP/IP端口的筛选3、对端口的一些基本操作三、实验步骤1、arp命令的使用步骤:(1)查看你所在计算机的Arp的所有表项;(2)添加一个静态Arp表项(其IP:172.16.0.39,MAC地址:00-03-0D-34-1D-67);(3)利用Arp –a命令查看arp表项;(4)删除你刚添加的静态arp表项;(5)删除所有arp表项。
(6)说明:(7)A rp –a:显示高速cache中的ARP表(8)A rp –s IP地址MAC地址:添加ARP静态表项(9)A rp –d IP地址:删除ARP表项(10)Arp – d *:删除所有ARP表项注意:记录每一步骤的结果!2、TCP/IP端口筛选(11)右击“网上邻居”,选择“属性”。
(12)在打开的对话框中,选择“本地连接”,右击“本地连接”,选择“属性”。
(13)在“本地连接”属性对话框中,双击“Internet协议(TCP/IP)”。
(14)在出现的对话框中选择“高级”按钮。
(15)在“高级TCP/IP设置”对话框中,选择“选项”标签在此标签下,打开“属性”按钮。
(16)在打开的对话框中即可以进行设置。
3、对端口的操作常见的端口有:21、23、25、80、135、445、3389、139(1)查看本机打开了哪些端口打开“开始—>运行”,输入cmd,打开DOS命令对话框。
输入:netstat —an这就是本机开放的所有端口,下面我们来将一些没有必要开启的端口关闭。
(2)关闭端口①21端口端口说明:ftp最常见的攻击者用于寻找打开“anonymous”的ftp 服务器的方法。
这些服务器带有可读写的目录。
Hackers或Crackers 利用这些服务器作为传送warez(私有程序)和pr0n(故意拼错词而避免被搜索引擎分类)的节点。
实验五 网络命令(ARP、PING)的使用分析

实验五网络命令(ARP、PING)的使用分析一、实验目的掌握掌握ARP、PING命令的操作使用二、实验环境用以太网交换机连接起来的WIN2000操作系统计算机三、实验内容及步骤:1、ARP命令的使用2、PING命令的操作使用四、实验过程1、ARP命令1)arp命令的功能:查看、添加和删除高速缓存区中的ARP表项2)Windows 2000 ARP高速缓冲区∙动态表项(dynamic):随时间推移自动添加和删除∙静态表项(static):一直存在,直到人为删除或重新启动3)arp命令操作:(1)显示高速cache中的ARP表:命令 arp -a添加ARP静态表项:arp-s inet_addr ether_addr在 ARP 缓存中添加项,将 IP 地址 inet_addr 和物理地址 ether_addr 关联。
例:arp -s 192.168.0.100 00-d0-09-f0-33-71添加ip为192.168.0.100,与其对应的MAC为00-d0-09-f0-33-71的表项删除ARP表项:arp -d inet_addr 删除由inet_addr指定的项2、PING命令Ping命令的全称叫做 Ping.exe,是微软提供用来进行网络连接测试的十分有用的工具,能准确快速地判断出网络故障。
1)Windows 2000的ping命令形式ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] 目的主机/IP地址2)连续发送ping探测报文: ping –t 192.168.0.88Ctrl+Break查看统计信息,Ctrl+C结束命令3)自选数据长度的ping探测报文: ping 目的主机/IP地址 -l size 4).修改“ping”命令的请求超时时间ping 目的主机/IP地址 -w指定等待每个回送应答的超时时间,单位为毫秒,默认值为1000毫秒5)假设目前使用的服务器设置如下:DNS 服务器的 IP 地址:202.99.96.9861.136.18.10网关:10.10.0.1本机 IP 地址:10.10.0.77子网掩码:255.255.255.0(1)验证网卡工作正常与否:点击“开始”→“程序”→“MS-DOS 方式” ,提示符后输入“ Ping 10.10.0.77(本机IP地址)”回车运行 ,若出现如下图 A ,则说明网卡工作正常。
arp命令使用详解(TheARPcommandusesdetail)

arp命令使用详解(The ARP command uses detail)The ARP command uses the detailed ARP command using detail (1)Displays and modifies items in the cache of the address resolution protocol (ARP) cache. The ARP cache contains one or more tables that are used to store IP addresses and their parsed Ethernet or token ring physical addresses. Each Ethernet or token ring network adapter installed on the computer has its own separate table. If it is used without arguments, the ARP command displays help information.grammarArp[-a, [InetAddr], [-N, IfaceAddr]], [-g, [-N, IfaceAddr]], [InetAddr], [-d, InetAddr, [IfaceAddr]],, [-s, InetAddr, EtherAddr, [IfaceAddr]]parameter-a[InetAddr] [-N IfaceAddr]Displays the current ARP cache table for all interfaces. To display the ARP cache entries for a particular IP address, use the ARP -a with the InetAddr parameter, where the InetAddr stands for the IP address. If no InetAddr is specified, the first applicable interface is used. To display the ARP cache table for a specific interface, use the -N IfaceAddr parameter with the -a parameter, where the IfaceAddr represents the IP address assigned to the interface. The -N parameter is case sensitive.-g[InetAddr] [-N IfaceAddr]Same as -a.-d InetAddr [IfaceAddr]Removes the specified IP address entry, where the InetAddr stands for the IP address. For the specified interface, to delete an item in the table, use the IfaceAddr parameter, where the IfaceAddr represents the IP address assigned to the interface. To delete all items, use the asterisk () wildcard instead of InetAddr.-s InetAddr EtherAddr [IfaceAddr]Add a static item that can parse the IP address InetAddr into the physical address EtherAddr to the ARP cache. To add a static ARP cache entry to a table of the specified interface, use the IfaceAddr parameter, where the IfaceAddr represents the IP address assigned to the interface.Displays help at the command prompt.NotesThe IP addresses of InetAddr and IfaceAddr are represented in decimal decimal notation.The physical address of EtherAddr consists of six bytes represented by sixteen decimal notation and separated by a hyphen (e.g., 00-AA-00-4F-2A-9C).ARP commandThe ARP cache of the processing system clears the address mappings in the cache and creates new address mappings;Syntax: ARP, [-v][-n][-H, type][-i, if], -a, [hostname]ARP, [-v][-i, if], -d, hostname, [pub]ARP, [-v][-H, type][-i, if], -s, hostname, hw_addr, [temp]ARP, [-v][-H, type][-i, if], -s, hostname, hw_addr, [netmask, pub, nm]ARP, [-v][-H, type][-i, if], -Ds, hostname, IFA, [netmask, pub, nm]ARP, [-v][-n][-D][-H, type][-i, if], -f, [filename]The options for the command have the following meanings:-v displays detailed information;-n is displayed in digital address form;-i If selection interface;Check the address of the type type when setting -H and querying the ARP cache. Type;-a [hostname] displays all the entries for the specified hostname;The ARP command uses detail (2)-d hostname deletes all the entries for the specified hostname;-D uses the IFA hardware address interface;-s hostname hw_addr manually joins the address mapping of hostname;-f filename reads the hostname and hardware address information from the specified file-s hostname hw_addr manually joins the address mapping of hostname;Bidirectional binding is used to resolve and prevent ARP spoofing.1. Bind the IP and MAC addresses of the security gateway on the PC:1) first, obtain the MAC address of the intranet of the security gateway (for example, the MAC address of the HiPER gateway address 192.168.16.254 is 0022aa0022aa).2) write a batch file, rarp.bat, which reads as follows:@echo offARP -dARP -s 192.168.16.254 00-22-aa-00-22-aaChange the gateway, IP address, and MAC address in the file to the actual gateway IP address and MAC address.The batch processing software onto the windows, start a program to start ".3) if it is Internet cafes, you can use the charging software server program (pubwin or Vientiane can) send batch file rarp.bat to all client's startup directory.The default startup directory for Windows2000 is the CDocuments and SettingsAll Users start menu program".We, are, also, finding, something, a, beautiful, feeling... It, is, easy, to, know, u, are, happy, so,, I, am, happyThe ARP binding feature uses helpARP protocol is a network communication protocol in data link layer. It completes the conversion function of IP address to physical address (i.e. MAC address). The ARP virus is through forged IP address and MAC address to achieve ARP spoofing, can lead to the packet to the correct MAC address, will produce a large number of ARP traffic in the network congestion, which causes the network not normal communication.The main symptoms of ARP virus is the normal machine on the Internet before, suddenly can not access the Internet phenomenon (not Ping through the gateway), or restart the machine running under MS-DOS window command "ARP - D" after a period of time and to restore the internet. In some cases, you can access the Internet, but the Internet is very slow.At present, with the functions of the software ARP spoofing "QQ sixth", "law enforcement officer," P2P network "terminator", "Internet legend killer", these software, some manual operation to destroy the network, some as a virus or Trojan, users may not know it's there this ARP virus can not be lethal.From the network connections to smooth the way of view, there are two kinds of ARP spoofing attack, a kind of router table ARP deception; the other is on the computer network ARP deception, and may two attack at the same time. No management. When the fraud happens, the data sent between the computer and the router is sent to the wrong MAC address. Which results in the symptoms above.ARP binding is an effective way to prevent ARP spoofing by binding the IP address to the corresponding MAC address to avoid ARP spoofing. ARP spoofing has two types: Spoofing router, ARP table and spoofing computer ARP, so MAC address binding also has the binding of router ARP table and the binding of ARP table on computer. Two aspects of the settings are required, or if you just set the router to prevent ARP spoofing function without setting computer, the computer will not be cheated after sending packets to the router, but sent to a wrong place, of course, do not have access to the Internet and access router.The ARP command uses detail (3)- router ARP table binding settingsDepending on the specific router. For example, the Anqing education network uses the Quidway Eudemon 5001000 firewall. Dual router. His order is:# configure the client IP address and MAC address to the address binding relationship.[Eudemon], firewall, mac-binding, 202.169.168.1,00e0-fc00-0100# enable address binding function.[Eudemon] firewall mac-binding enableTwo, the computer ARP binding settingsThe Windows operating system, with the ARP command program, can use this command to complete the ARP binding at the command prompt at the Windows.Open the Windows command prompt and enter ARP - A to see the ARP mapping table on the current computer. You can see that the type of the current ARP table is "dynamic", that is, dynamic through"ARP - s w.x.y.z aa-bb-cc-dd-ee-ff" command to add static ARPto implement ARP binding. Where w.x.y.z stands for the router's IP address, and aa-bb-cc-dd-ee-ff stands for the router's MAC address.For example: ARP, -s, 192.168.1.1, 00-02-b3-3c-16-95With the "ARP -a", you can see the static ARP entry just added.In order not to restart the computer every time, you need to re-enter the commands above to prevent ARP spoofing. You can create a new batch file, such as arp_bind.bat. Join in our orders just now:ARP -s 192.168.1.1 00-02-b3-3c-16-95Save it, then you can double-click it to execute this command, you can also put it into the system's startup directory to achieve its own execution at startup. Turn on the computer, start < > program, double-click start, open the startup folder directory, and copy the arp_bind.bat you just created. This will execute the ARP binding command every time it restarts,With these settings, you can prevent ARP attacks very well.-LAN appears "ARP spoofing" Trojan horse users can not access the Internet to solve (turn)This morning a lot of friends unit computer suddenly can not access, please I asked to look at the past, after the contrast,the situation appeared on more than one computer, and a lot of computer system is XP SP2, and open the firewall.But careful observation found that the majority of computer are opening the file and printer sharing service, because the service open 137, 138, 139, 445 port is common virus invasion port, so in particular, if not necessary, or suggestions don't open, or close the service in the firewall settings on the port.Some users do not have access to the Internet today appears before frequently encountered phenomenon and collective paralysis are different, with sniffer after a period of observation of symptoms is not obvious, ARP Spoofing Trojan to Lenovo is now more popular for a computer to access and run CMD, input ARP -a found multiple address, and the corresponding IP different address is the same as MAC, so it is essential to determine the ARP spoofing.The following describes how to deal with this situation:First, enter command line modeThen run the ARP -a command, which looks at the current ARP table and can confirm the gateway and the corresponding MAC addressThe ARP command uses detail (4)Normally, a hint like this follows:Interface192.168.1.5 --- 0x2, Internet, Address, Physical, Address, Type192.168.1.1 00-01-02-03-04-05 dynamicIf the 192.168.1.1 gateway, then 00-01-02-03-04-05 is the gateway server MAC address of network card, the ratio of MAC and whether the real server NIC MAC is consistent, if not to be deceived, will cause the user can not access.And a computer that has been tricked may have multiple IP, the same MAC, and confusion. This time remember to write down the gateway IP corresponding error MAC address, this address is likely to be in the Trojan computer, this can facilitate the next killing.After confirmation, you can enter the ARP -d command to delete the ARP table of the current computer to facilitate the re establishment of the ARP table.Next, you can bind the correct ARP gateway and enter ARP -s 192.168.1.1 00-0e-18-34-0d-56Check with ARP -a againInterface 192.168.1.5 --- 0x2, Internet, Address, Physical, Address, Type192.168.1.1 00-0e-18-34-0d-56 staticAt this time, type into static (static), you will no longer attack effect.So far this computer can access, but to completely solve the problem we need to find the Taichung Trojan (general computer is that Taiwan forged the corresponding computer MAC gateway), the anti-virus before they can solve the problem, recommend the use of Qihoo security guards with a Trojan nemesis kill Trojan software killing Trojans, because many antivirus software can find Trojan now. Specific killing process also involves all system knowledge and processing experience, here is no longer detailed table.Finally introduce the ARP deception Trojan, trojan is generally more popular game;Principle is:When a host in the LAN runs ARP spoofing Trojan program, it will deceive all hosts and routers in the LAN, so that all traffic on the Internet must go through the virus host. Other users directly through the router on the Internet, now transferred from the host through the virus, when switching, the user will break a line.Switch to the virus host on the Internet, if the user is logged in the legend server, then the virus host will often break the fake fake like, then the user will have to re login legend server, so the virus can host hacking.。
arp命令详解

我们知道,当我们在浏览器里面输入网址时,DNS服务器会自动把它解析为IP地址,浏览器实际上查找的是IP地址而不是网址。
那么IP地址是如何转换为第二层物理地址(即MAC 地址)的呢?在局域网中,这是通过ARP协议来完成的。
ARP协议对网络安全具有重要的意义。
通过伪造IP地址和MAC地址实现ARP欺骗,能够在网络中产生大量的ARP通信量使网络阻塞。
所以网管们应深入理解ARP协议。
一、什么是ARP协议ARP协议是“Address Resolution Protocol”(地址解析协议)的缩写。
在局域网中,网络中实际传输的是“帧”,帧里面是有目标主机的MAC地址的。
在以太网中,一个主机要和另一个主机进行直接通信,必须要知道目标主机的MAC地址。
但这个目标MAC地址是如何获得的呢?它就是通过地址解析协议获得的。
所谓“地址解析”就是主机在发送帧前将目标IP地址转换成目标MAC地址的过程。
ARP协议的基本功能就是通过目标设备的IP地址,查询目标设备的MAC地址,以保证通信的顺利进行。
二、ARP协议的工作原理在每台安装有TCP/IP协议的电脑里都有一个ARP缓存表,表里的IP地址与MAC地址是一一对应的,如附表所示。
附表我们以主机A(192.168.1.5)向主机B(192.168.1.1)发送数据为例。
当发送数据时,主机A会在自己的ARP缓存表中寻找是否有目标IP地址。
如果找到了,也就知道了目标MAC 地址,直接把目标MAC地址写入帧里面发送就可以了;如果在ARP缓存表中没有找到相对应的IP地址,主机A就会在网络上发送一个广播,目标MAC地址是“FF.FF.FF.FF.FF.FF”,这表示向同一网段内的所有主机发出这样的询问:“192.168.1.1的MAC地址是什么?”网络上其他主机并不响应ARP询问,只有主机B接收到这个帧时,才向主机A做出这样的回应:“192.168.1.1的MAC地址是00-aa-00-62-c6-09”。
网络命令(ARP、PING)的使用分析

实验三网络命令(ARP、PING)的使用分析一、实验目的熟练掌握ARP、PING命令的操作使用二、实验环境用以太网交换机连接起来的WINDOWS XP SP3操作系统计算机三、实验内容1、ARP命令的使用2、PING命令的操作使用四、实验步骤(一)、ARP命令1、arp命令的功能:查看、添加和删除高速缓存区中的ARP表项,即arp命令显示和修改"地址解析协议(ARP)"缓存表,ARP缓存中包含一个或多个表,它们用于存储IP地址及其经过解析的网络物理地址.计算机上安装的每一个网络适配器都有自己单独的表.2、WINDOWS XP SP3 ARP高速缓冲区∙动态表项(dynamic):随时间推移自动添加和删除∙静态表项(static):一直存在,直到人为删除或重新启动3、arp命令操作:(1)显示高速cache中的ARP表:使用命令 arp -a,结果如图一:图一(2)添加ARP静态表项:命令格式:arp -s inet_addr ether_addr其功能在 ARP 缓存中添加项,将 IP 地址 inet_addr 和物理地址 ether_addr 关联。
先向ARP表项中添加ip为192.168.0.100,与其对应的MAC为00-d0-09-f0-33-71的表项,如图二:图二再用arp –a查看添加后ARP表,会发现192.168.0.100被添加进入,且表项类型为静态static。
再向ARP表项中添加ip为192.168.2.250,与其对应的MAC为00-e0-81-d9-68-c5的表项,同样用arp –a查看添加后ARP表,结果如下图(图三):图三(3)删除ARP表项:命令格式为:arp -d inet_addr 删除由inet_addr指定的项先用该命令删除IP为192.168.2.250的表项信息,使用arp –a查看ARP表的变化;在使用arp –d *删除所有表项信息,结果如图四(由于是在我院机房做的实验,全县有所限制,所以最后无法删除默认网关的表项信息):图四(二)、PING命令Ping命令的全称叫做 Ping.exe,是微软提供用来进行网络连接测试的十分有用的工具,能准确快速地判断出网络故障。
Linux基础命令---arp

Linux基础命令---arparparp指令⽤来管理系统的arp缓冲区,可以显⽰、删除、添加静态mac地址。
ARP以各种⽅式操纵内核的ARP缓存。
主要选项是清除地址映射项并⼿动设置。
为了调试⽬的,ARP程序还允许对ARP缓存进⾏完全转储。
此命令的适⽤范围:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1、语法arp [-evn] [-H type] [-i if] -a [hostname]arp [-v] [-i if] -d hostname [pub]arp [-v] [-H type] [-i if] -s hostname hw_ addr [temp]arp [-v] [-H type] [-i if] -s hostname hw_ addr [netmask nm] pubarp [-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pubarp [-vnD] [-H type] [-i if] -f [filename]2、选项列表在所有需要主机名的地⽅,⼈们也可以⽤虚线⼩数点表⽰法输⼊IP地址。
作为兼容性的特例,主机名和硬件地址的顺序可以交换。
ARP 缓存中的每个完整条⽬都将被标记为C标志。
永久条⽬⽤M标记,已发布的条⽬带有P标志。
3、实例1)添加静态映射[root@localhost ~]# arp -i eth0 -s 192.168.1.6 ff:ee:ee:ee:ee:ee //将⽬标ip地址映射固定mac[root@localhost ~]# arp –a //查看arp缓冲区(10.0.2.2) at 52:54:00:12:35:02 [ether] on eth0(192.168.1.6) at ff:ee:ee:ee:ee:ee [ether] PERM on eth02)以数字⽅式显⽰[root@localhost ~]# arp -vnAddress HWtype HWaddress Flags Mask Iface10.0.2.2 ether 52:54:00:12:35:02 C eth0 192.168.1.6 ether ff:ee:ee:ee:ee:ee CM eth0 Entries: 2 Skipped: 0Found: 2。
ARP命令使用方法

ARP命令使用方法ARP(地址解析协议)是一种用于将IP地址解析为MAC地址的网络协议。
它在局域网中用于查找目标设备的MAC地址,以便发送网络数据包。
ARP命令可用于查看和管理局域网中的ARP缓存。
以下是ARP命令的使用方法。
1.查看ARP缓存要查看ARP缓存中的条目,可以使用以下命令:arp -a此命令将显示ARP缓存中的所有条目,包括IP地址和对应的MAC地址。
此信息对于诊断网络问题和查找其他设备的物理地址非常有用。
2.清除ARP缓存如果您希望清除ARP缓存,可以使用以下命令:arp -d这将清除ARP缓存中的所有条目。
在一些情况下,清除ARP缓存可能有助于解决网络连接问题。
3.添加静态ARP条目如果您希望手动添加静态ARP条目,可以使用以下命令:arp -s <IP地址> <MAC地址>将IP地址替换为目标设备的IP地址,将MAC地址替换为目标设备的MAC地址。
添加静态ARP条目可以确保在ARP缓存中有一条指定的MAC地址。
4.修改静态ARP条目如果您需要修改静态ARP条目中的IP地址或MAC地址,可以使用以下命令:arp -s <IP地址> <MAC地址>此命令将更新指定IP地址的MAC地址。
5.删除静态ARP条目如果您想删除静态ARP条目,可以使用以下命令:arp -d <IP地址>将IP地址替换为要删除的静态ARP条目的IP地址。
这将从ARP缓存中删除指定的IP地址。
6.强制ARP缓存刷新如果您的网络中存在IP地址冲突或其他问题,您可能希望强制刷新ARP缓存。
要执行此操作,可以使用以下命令:arp -d * & arp -a此命令将删除ARP缓存中的所有条目,并重新填充最新的ARP缓存。
7.显示详细的ARP信息如果您需要更详细的ARP信息,可以使用以下命令:arp -g <IP地址>将IP地址替换为要查看详细信息的设备的IP地址。
arp基本用法

arp基本用法ARP(Address Resolution Protocol)基本用法与双语例句一、ARP基本用法ARP主要用于将网络层(如IP地址)与链路层(如MAC地址)进行映射。
在一个局域网(LAN)中,当设备A想要与同一局域网中的设备B 通信时,设备A知道设备B的IP地址,但不知道其MAC地址。
这时设备A就会发送一个ARP请求广播,询问“谁拥有这个IP地址,告诉我你的MAC地址”。
网络中的所有设备都会收到这个请求,但只有设备B会识别出这是在询问自己的IP地址,然后设备B会向设备A发送一个ARP应答,其中包含自己的MAC地址。
这样设备A就知道了设备B的MAC地址,从而可以在链路层进行数据帧的封装和发送。
二、固定搭配1. “ARP cache”(ARP缓存):设备存储ARP映射信息的地方,就像一个小本子记录着IP地址和MAC地址的对应关系。
2. “ARP request”(ARP请求):主动去询问某个IP地址对应的MAC地址的消息。
3. “ARP reply”(ARP应答):对ARP请求作出回应,告知自己MAC地址的消息。
三、双语例句例句1英语:I'm trying to figure out how ARP works. It's like a detective trying to find the hidden identity (MAC address) of a suspect (IP address).中文:我正在试图弄清楚ARP是如何工作的。
这就像一个侦探试图找出嫌疑人(IP地址)隐藏的身份(MAC地址)。
例句2英语:Hey, do you know that ARP cache can sometimes be a bit of a mess? It's like a junk drawer where things get all jumbled up.中文:嘿,你知道吗?ARP缓存有时候可能有点乱。
linux arp命令的功能及使用方法

linux arp命令的功能及使用方法摘要:1.Linux ARP命令概述2.ARP命令的功能3.ARP命令的使用方法4.ARP命令在网络故障排查中的应用5.总结正文:**Linux ARP命令的功能及使用方法**在Linux系统中,ARP(Address Resolution Protocol)命令是一个用于解析IP地址与MAC地址之间关系的实用工具。
本文将详细介绍ARP命令的功能、使用方法以及在网络故障排查中的应用。
**一、Linux ARP命令概述**ARP命令是Linux系统中一个重要的网络管理工具,它通过发送ARP请求和响应报文来解析目标设备的IP地址与MAC地址的映射关系。
在网络通信中,ARP协议发挥着至关重要的作用,因为它使得网络设备能够根据IP地址找到对应的MAC地址,从而完成数据包的发送和接收。
**二、ARP命令的功能**1.查询目标设备的MAC地址:通过输入arp -a或arp -n命令,可以查看本地ARP缓存中的IP地址与MAC地址的映射关系。
2.添加、删除或修改ARP缓存:使用arp -s或arp -d命令,可以手动添加、删除或修改ARP缓存中的条目。
3.查询指定IP地址的MAC地址:通过arp -a命令,可以查询指定IP地址对应的MAC地址。
4.显示帮助信息:输入arp --help或arp -h命令,可以查看ARP命令的帮助信息。
**三、ARP命令的使用方法**1.查询本地ARP缓存:```arp -a```2.查询指定IP地址的MAC地址:```arp -a <目标IP地址>```3.手动添加ARP缓存:```arp -s <目标IP地址> <目标MAC地址>```4.手动删除ARP缓存:```arp -d <目标IP地址>```**四、ARP命令在网络故障排查中的应用**1.排查网络连通性问题:通过ping命令检查网络连通性,可以帮助我们分析和判定网络故障。
Netstat及arp命令用法全解

Netstat及arp命令用法全解本文是小编带来的Netstat及arp命令用法全解,欢迎大家阅读借鉴,希望能帮到你。
经常上网的人一般都使用ICQ的,不知道我们有没有被一些讨厌的人骚扰,想投诉却又不知从和下手?其实,我们只要知道对方的IP,就可以向他所属的ISP投诉了。
但怎样才能通过ICQ知道对方的IP呢?如果对方在设置ICQ时选择了不显示IP地址,那我们是无法在信息栏中看到的。
其实,我们只需要通过Netstat就可以很方便的做到这一点:当他通过ICQ或其他的工具与我们相连时(例如我们给他发一条ICQ信息或他给我们发一条信息),我们立刻在DOS 命令提示符下输入netstat -n或netstat -a就可以看到对方上网时所用的IP或ISP域名了,甚至连所用Port都完全暴露了。
IP数据包常通过以太网发送。
以太网设备并不识别32位IP地址:它们是以48位以太网地址传输以太网数据包的。
因此,IP驱动器必须把IP目的地址转换成以太网网目的地址。
在这两种地址之间存在着某种静态的或算法的映射,常常需要查看一张表。
地址解析协议(Address Resolution Protocol,ARP)就是用来确定这些映象的协议。
ARP工作时,送出一个含有所希望的IP地址的以太网广播数据包。
目的地主机,或另一个代表该主机的系统,以一个含有IP和以太网地址对的数据包作为应答。
发送者将这个地址对高速缓存起来,以节约不必要的ARP通信如果有一个不被信任的节点对本地网络具有写访问许可权,那么也会有某种风险。
这样一台机器可以发布虚假的ARP报文并将所有通信都转向它自己,然后它就可以扮演某些机器,或者顺便对数据流进行简单的修改。
ARP机制常常是自动起作用的。
在特别安全的网络上,ARP映射可以用固件,并且具有自动抑制协议达到防止干扰的目的。
现在将Netstat和ARP的基本用法整理一下,希望对没用过的朋友有点帮助。
stat – a显示一个所有的有效连接信息列表,包括已建立的连接(ESTABLISHED),也包括监听连接请求(LISTENING)的那些socket。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
语法
arp[-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]] [-s InetAddr EtherAddr [IfaceAddr]]
参数
-a[ InetAddr] [ -N IfaceAddr]
显示所有接口的当前 ARP 缓存表。
要显示特定 IP 地址的 ARP 缓存项,请使用带有 InetAddr 参数的 arp -a,此处的 InetAddr 代表 IP 地址。
如果未指定 InetAddr,则使用第一个适用的接口。
要显示特定接口的 ARP 缓存表,请将 -N IfaceAddr 参数与 -a 参数一起使用,此处的 IfaceAddr 代表指派给该接口的 IP 地址。
-N 参数区分大小写。
-g[ InetAddr] [ -N IfaceAddr]
与 -a 相同。
-d InetAddr [IfaceAddr]
删除指定的 IP 地址项,此处的 InetAddr 代表 IP 地址。
对于指定的接口,要删除表中的某项,请使用 IfaceAddr 参数,此处的IfaceAddr 代表指派给该接口的 IP 地址。
要删除所有项,请使用星号 (*) 通配符代替 InetAddr。
-s InetAddr EtherAddr [IfaceAddr]
向 ARP 缓存添加可将 IP 地址 InetAddr 解析成物理地址EtherAddr 的静态项。
要向指定接口的表添加静态 ARP 缓存项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表指派给该接口的IP 地址。
/?
在命令提示符下显示帮助。
注释
? InetAddr 和 IfaceAddr 的 IP 地址用带圆点的十进制记数法表示。
? EtherAddr 的物理地址由六个字节组成,这些字节用十六进制记数法表示并且用连字符隔开(比如,00-AA-00-4F-2A-9C)。
arp命令
处理系统的 ARP 缓存,可以清除缓存中的地址映射,建立新的地址映射;
语法:arp [-v][-n][-H type][-i if] -a [hostname]
arp [-v][-i if] -d hostname [pub]
arp [-v][-H type][-i if] -s hostname hw_addr [temp]
arp [-v][-H type][-i if] -s hostname hw_addr [netmask nm] pub
arp [-v][-H type][-i if] -Ds hostname ifa [netmask nm] pub
arp [-v][-n][-D][-H type][-i if] -f
[filename]
该命令的各选项含义如下:
-v 显示详细信息;
-n 以数字地址形式显示;
-i If选择界面;
-H type设置和查询arp缓存时检查 type 类型的地址;
-a [hostname] 显示指定 hostname 的所有入口;-d hostname 删除指定 hostname 的所有入口;
-D 使用ifa硬件地址界面;
-s hostname hw_addr 手工加入 hostname 的地址映射;
-f filename 从指定文件中读入 hostname 和硬件地址信息
-s hostname hw_addr 手工加入 hostname 的地址映射;
采用双向绑定的方法解决并且防止ARP欺骗。
1、在PC上绑定安全网关的IP和MAC地址:
1)首先,获得安全网关的内网的MAC地址(例如HiPER网关地址192.168.16.254的MAC地址为0022aa0022aa)。
2)编写一个批处理文件rarp.bat内容如下:
@echo off
arp -d
arp -s 192.168.16.254 00-22-aa-00-22-aa
将文件中的网关IP地址和MAC地址更改为实际使用的网关IP 地址和MAC地址即可。
将这个批处理软件拖到“windowsà开始à程序à启动”中。
3)如果是网吧,可以利用收费软件服务端程序(pubwin或
者万象都可以)发送批处理文件rarp.bat到所有客户机的启动目录。
Windows2000的默认启动目录为“C:\Documents and Settings\All Users「开始」菜单程序启动”。