取消
显示结果 
搜索替代 
您的意思是: 
cancel
3218
查看次数
20
有帮助
1
评论
Terence.Jh
Spotlight
Spotlight
本帖最后由 terence 于 2018-11-25 18:51 编辑
173523c2j8if7xzck77wjo.png
如图所示,客户的网路里需要添加DAI,原本已经有了 Dhcp snooping
(这篇帖子不想太多讲解DHCP snooing,虽然DAI可以关联snooping的database做inspection,但我觉得技术分开讲吧 )
以下为DAI的static-inspection
首先DAI用作干什么?



  • IP&MAC 依据 arp access-list的 规则,要么一一对应,要么允许一个ip可以解析多个MAC
  • 如果解析不符合ARP Access-list 规则,则被ARP流量干掉,无法正常通信
  • 当一个用户配置了一个ip,连始发的第一个ARP包都无法正确解析,则他永远无法访问网络

该拓扑的配置注意项:



  • 首先,两台4506用作核心,拓扑为HSRP,则两台设备都需要配置DAI,否则两边DAI有不匹配,DAI的配置不能正确生效规则
  • 如果两台全部配置了 DAI,则中间互连port-channel 最好开启 ip arp inspection trust,避免其他错误
  • 开启trust的接口不接收DAI规则检查
  • 如果网络中接口DAI检查并且违规的数据包很多,可以更改交换机 port-security 的参数,由 shutdown -change to protect,不然交换机默认行为接收过多错误包会认为自己遭受了DDOS东西,errdisable接口,shutdown
  • 第四条的行为是很粗狂的,可以使用更细腻的命令, ip arp inspection limit none / rate
  • 当然你也可以配置 Errdisablerecovery cause arp-inspection ,进行端口恢复,但是当你ARP一直发的时候,并不能恢复。。。。只有在端口非违规行为过去一段时间才可以recovery

配置示例:
1:针对vlan 开启 DAI
ip arp inspection vlan 200
do show ip arp inspection 200 // 验证配置
2:配置4506互连端口信任,配置port-channel属性默认下发至物理端口
interface port-channel 1
ip arp inspection trust // trust的接口不受DAI管理,不接受DAI ACL检查,默认所有接口都是untrust
3:配置ARP过滤列表 // 一定要获取正确的ip关联 MAC
arp access-list arp-mac-A1F
permit ip host 10.220.110.1 mac host6c62.6d7b.24b6
permit ip host 10.220.110.3 mac host78e3.b599.34f2
permit ip host 10.220.110.2 mac host78e3.b59c.f874
permit ip host 10.220.110.98 mac hosta048.1ca0.1b66

do show arp access-list // 检查配置
4:在vlan下应用该列表进行filter
ip arp inspection filter arp-mac-a1f vlan 200 static (这里的vlan 200 可以是range)
do show ip arp inspection vlan 200 // check配置
show ip arp inspection statistics vlan 200
5:options 5.1-4 我建议一定要配置
5.1
arp 错误禁用恢复,errdisable,之前提到的交换机认知行为默认
errdisable recovery cause arp-inspection
5.2
修改下行端口的 违规行为, shutdown to protect 默认是shutdown,参考思科设备命令执行文档
https://www.cisco.com/c/m/en_us/ ... rity-violation.html
Syntax Description



protect
Drops all the packets from the insecure hosts at the port-security process level but does not increment the security-violation count.
restrict
Drops all the packets from the insecure hosts at the port-security process level and increments the security-violation count.
shutdown
Shuts down the port if there is a security violation.
Command Default
shutdown

interface gi2/11
switchport port-securty violation protect // 如果下行交换机,如汇聚的端口被shutdown,后果 - -
5.2 new // 推荐做法
针对下行端口不进行 arp inspections报文数量限制
接口下 ip arp inspection limit none
接入层交换机或主机端口可以写限制每秒指定数量,默认15
ip arp inpsection limit rate 15
5.3 // options 中很关键 修改日志大小和日志刷新时间,避免占用CPU过多资源
ip arp inspection log-buffer entries 1024
ip arp inspection log-buffer logs 30 interval 1800 // 1800秒发30个错误log
5.4 由于思科设备,boot request 经过启用 dhcp snooping设备时,会在dhcp包中插入options 82,这时候
request 中数据包gateway ipadress = 0.0.0.0 那dhcp relay 检查到这种包,就直接丢了
所以如果启用中中继dhcp
则需要输入
ip dhcp relay information trust-all
或者 SVI接口下输入
ip dhcp relay information trusted
5.5
针对不存在地址MAC检查丢弃,
ip arp inspection validate src-mac dst-mac ip // 后面的 匹配源目可以自己添加,敲第二句默认覆盖第一句
评论
weih.2011
Community Member
P刚刚看到DHCP SNOOPING
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接