Answers:
看来答案是这是不必要的配置。如果DHCP侦听未在该VLAN上运行,则此配置无效。
我仍然找不到清楚说明这一点的文档,所以我决定自己测试一下。
从对所有VLAN启用DHCP侦听开始,速率限制为每秒一(1)个DHCP数据包(假设如果DHCP服务器响应足够快,客户端将在一秒钟内发送DISCOVER和REQUEST):
router#show ip dhcp snoop
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
1-4094
Insertion of option 82 is disabled
Interface Trusted Rate limit (pps)
------------------------ ------- ----------------
FastEthernet0/8 no 1
router#show run int fa 0/8
Building configuration...
Current configuration : 230 bytes
!
interface FastEthernet0/8
switchport access vlan 841
switchport mode access
ip dhcp snooping limit rate 1
shutdown
end
控制测试的时间,应该错误禁用端口,这恰好是端口转换为up / up后大约一秒钟的时间:
router#term mon
router#config t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#int fa 0/8
router(config-if)#no shut
router(config-if)#
Feb 13 22:57:04.589 CST: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
Feb 13 22:57:07.701 CST: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to up
Feb 13 22:57:08.553 CST: %PM-4-ERR_DISABLE: dhcp-rate-limit error detected on Fa0/8, putting Fa0/8 in err-disable state
Feb 13 22:57:08.561 CST: %DHCP_SNOOPING-4-DHCP_SNOOPING_RATE_LIMIT_EXCEEDED: The interface Fa0/8 is receiving more than the threshold set
Feb 13 22:57:10.561 CST: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
router(config-if)#shut
由于控件按预期工作,因此我现在从DHCP侦听配置中删除VLAN 841,然后再次启用端口。一分钟后,我关闭了端口(以显示时间戳记):
router(config-if)#no ip dhcp snooping vlan 841
router(config)#do sh ip dhcp snoop
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
1-840,842-4094
Insertion of option 82 is disabled
Interface Trusted Rate limit (pps)
------------------------ ------- ----------------
FastEthernet0/8 no 1
router(config)#int fa 0/8
router(config-if)#no shut
router(config-if)#
Feb 13 22:58:49.150 CST: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
Feb 13 22:58:52.290 CST: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to up
Feb 13 22:58:53.290 CST: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up
router(config-if)#shut
Feb 13 22:59:55.119 CST: %LINK-5-CHANGED: Interface FastEthernet0/8, changed state to administratively down
Feb 13 22:59:56.119 CST: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
使用以下命令重复多次,结果相同:
仍然很乐意为某人找到有关此文档。
我觉得最好在所有端口上保留该命令,因为它对尚未为其分配dhcp snooping启用vlan的端口没有任何影响。这样做的好处是,您可以随时将端口更改为任何访问端口,而不必每次都检查它们是否属于dhcp snooping vlan的一部分,并在需要时添加limit命令。