所以我在我的交换机上设置了一个粘性端口,并为接入点设置了 1 个允许的 MAC。它抓住了 AP 的 Mac,在用 PC 测试端口后,它按原样关闭了端口。
但是后来我重新插入 AP 并且端口仍然关闭,这是应该如何工作的吗?有没有办法在 Mac 地址返回时让端口重新联机
谢谢
所以我在我的交换机上设置了一个粘性端口,并为接入点设置了 1 个允许的 MAC。它抓住了 AP 的 Mac,在用 PC 测试端口后,它按原样关闭了端口。
但是后来我重新插入 AP 并且端口仍然关闭,这是应该如何工作的吗?有没有办法在 Mac 地址返回时让端口重新联机
谢谢
您没有指定交换机品牌和型号,因此我假设是基于问题标签的 Cisco 交换机。
如果 Cisco 交换机上的交换机端口由于某种错误或端口安全违规而关闭,它不会自动恢复。您必须errdisable recovery
按照此处所述启用:https : //www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/69980-errdisable-recovery.html
简而言之,它解释了以下内容:
您可以使用以下命令检查端口恢复的现有状态: show errdisable recovery
在configure
模式下,您可以使用以下命令设置要从中恢复的端口状态:errdisable recovery cause <CAUSE>
在您的情况下,您可能想要打开psecure-violation
恢复:
show errdisable recovery
!
conf t
!
errdisable recovery cause psecure-violation
!
end
wr
!
show errdisable recovery
您还可以打开all
自动恢复的原因,但例如,如果端口因 BPDUGuard 违规而关闭,则这是有风险的。一些可能的 errdisabled 原因您可以从以下位置自动恢复:
#errdisable recovery cause ?
all Enable timer to recover from all causes
arp-inspection Enable timer to recover from arp inspection error disable
state
bpduguard Enable timer to recover from BPDU Guard error disable
state
channel-misconfig Enable timer to recover from channel misconfig disable
state
dhcp-rate-limit Enable timer to recover from dhcp-rate-limit error
disable state
dtp-flap Enable timer to recover from dtp-flap error disable state
gbic-invalid Enable timer to recover from invalid GBIC error disable
state
l2ptguard Enable timer to recover from l2protocol-tunnel error
disable state
link-flap Enable timer to recover from link-flap error disable
state
mac-limit Enable timer to recover from mac limit disable state
pagp-flap Enable timer to recover from pagp-flap error disable
state
psecure-violation Enable timer to recover from psecure violation disable
state
security-violation Enable timer to recover from 802.1x violation disable
state
udld Enable timer to recover from udld error disable state
unicast-flood Enable timer to recover from unicast flood disable state