undo arp anti-attack valid-check enable命令用于关闭ARP源MAC地址一致性检查功能。
【举例】
# 开启交换机ARP报文源MAC地址一致性检查功能。
<sysname>system-view
[sysname] arp anti-attack valid-check enable
2、gratuitous-arp-learning enable命令用来开启免费ARP报文的学习功能。开启该功能后,交换机对于收到的免费ARP报文,如果自身ARP表中没有与此报文源IP地址对应的ARP表项,就将免费ARP报文中携带的源IP地址,源MAC地址信息添加到动态ARP映射表中。
undo gratuitous-arp-learning enable命令用来关闭免费ARP报文的学习功能。
3、arp static命令用来配置ARP映射表中的静态ARP表项。
undo arp命令用来删除ARP表项。
4、arp check enable命令用来开启ARP表项的检查功能。
undo arp check enable命令用来关闭ARP表项的检查功能。
5、arp timer aging命令用来配置动态ARP表项的老化时间。
undo arp timer aging命令用来恢复动态ARP表项的老化时间为缺省值。
6、display arp命令用来显示ARP表项。当不带任何可选参数的时候,将显示所有ARP表项。
display arp | 命令用来显示指定内容的ARP表项。
display arp count命令用来显示指定类型的ARP表项的数目;当不带任何可选参数时,用来显示所有ARP表项的数目。
display arp timer aging命令用来显示动态ARP表项的老化时间。
7、reset arp命令用来清除符合条件的ARP表项。
【举例】
# 清除静态ARP表项。
<Sysname>reset arp static
你好,你的需求是定时清空,思科有条命令是手工设置动态arp条目的存活时间。
思科从端口学到arp条目后,存在一定的默认保存时间(具体多少不知道),但是我们可以手动指定,由此达到定时删除动态arp条目的目的。
手工设定arp条目在cisco路由器arp列表中的保存时间配置如下:
应用于端口:
cisco-3845-a#config
t
enter
configuration
commands,
one
per
line.
end
with
cntl/z.
cisco-3845-a(config)#interface
gigabitethernet
0/0
cisco-3845-a(config-if)#arp
timeout
?
<0-2147483>
seconds
cisco-3845-a(config-if)#arp
timeout
1200
//设置来自该接口的arp信息在路由器arp列表中保存周期为20分钟
应用于vlan:
cisco-3845-a#config
t
enter
configuration
commands,
one
per
line.
end
with
cntl/z.
cisco-3845-a(config)#int
vlan
6
cisco-3845-a(config-if)#arp
timeout
?
<0-2147483>
seconds
cisco-3845-a(config-if)#arp
timeout
1200
//设置来自该vlan的arp信息在路由器arp列表中保存时间为20分钟
请注意,此命令不是定时清空,而是针对每一个学到的arp条目设置其存活时间。若需定时清空,可以靠定时运行脚本文件来执行。
以上
供参考,有问题m我。
三层交换机一样的:
3550b#config
t
enter
configuration
commands,
one
per
line.
end
with
cntl/z.
3550b(config)#int
vlan
4
//vlan设置
3550b(config-if)#arp
timeout
?
<0-2147483>
seconds
3550b(config)#int
g0/11
//端口设置
3550b(config-if)#arp
timeout
?
<0-2147483>
seconds
ARP静态绑定:输入命令:ARP -S 主机IP MAC
例如:
进入“MS-DOS方式”,在命令提示符下输入命令:ARP -S 192.168.100.01 00-01-02-03-04-05,即可把MAC地址(00-01-02-03-04-05)和IP地址(192.168.11.01)捆绑在一起。
用“arp -s”可以手动在ARP表中指定IP地址与MAC地址的对应。
用“arp -d”命令可以删除ARP表中某一行的内容.
效果:
这样局域网内就无法进行ARP欺骗以致达到ARP攻击的目的了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)