DHCP SNOOPING BINDING DATABASE

当DHCP snooping被启用时,交换机使用DHCP snooping binding database去存储关于非可信接口的信息。数据库可以维持8192个绑定。
每个数据库实体(binding)有一个IP,对应mac地址,释放时间(hexadecimal格式),接口对应哪个绑定应用,接口所属于的Vlan。
数据库agent存储bindings到一个配置好路径的文件中。每个实体结尾处是一个checksum(记录所有的字节,从文件开始到这个entry)。每一个entry是72字节,紧跟其后的是一个空格和checksum值。


当交换重启时,为了能保持bindings,你必须使用DHCP snooping database agent。如果agent被禁用,多动态的ARP 检测或ip source guard启用,dhcp snooping binding数据库有一个动态的bindings,交换机丢失它的链接。如果agent被禁用,只有dhcp snooping启用,交换机不丢失它的连接,但dhcp snooping或许不能阻止dhcp snooping 攻击。


当重启时,交换机读bindings文件去修正dhcp snooping binding数据库。交换机更新文件(当数据库变化修改时)。


当交换机学习到新的bindings或者当它失去bindings,交换机立即更新数据库中的entries。交换机也更新binding文件中的entries。每个文件的更新频率是基于一个可配置的延迟,可批量更新。


这个是一个binding文件的默认格式:
<initial-checksum> 
TYPE DHCP-SNOOPING 
VERSION 1 
BEGIN 
<entry-1> <checksum-1> 
<entry-2> <checksum-1-2> 
... 
... 
<entry-n> <checksum-1-2-..-n> 
END 


例如:
2bb4c2a1
TYPE DHCP-SNOOPING
VERSION 1
BEGIN
192.1.168.1 3 0003.47d8.c91f 2BB6488E interface-id 21ae5fbb
192.1.168.3 3 0003.44d6.c52f 2BB648EB interface-id 1bdb223f
192.1.168.2 3 0003.47d9.c8f1 2BB648AB interface-id 584a38f0
END

解决IP地址冲突的完美方法--DHCP SNOOPING 使用的方法是采用DHCP方式为用户分配IP,然后限定这些用户只能使用动态IP的方式,如果改成静态IP的方式则不能连接上网络;也就是使用了DHCP SNOOPING功能。 例子: version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption service compress-config ! hostname C4-2_4506 ! enable password xxxxxxx! clock timezone GMT 8 ip subnet-zero no ip domain-lookup ! ip dhcp snooping vlan 180-181 // 对哪些VLAN 进行限制 ip dhcp snooping ip arp inspection vlan 180-181 ip arp inspection validate src-mac dst-mac ip errdisable recovery cause udld errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause pagp-flap errdisable recovery cause dtp-flap errdisable recovery cause link-flap errdisable recovery cause l2ptguard errdisable recovery cause psecure-violation errdisable recovery cause gbic-invalid errdisable recovery cause dhcp-rate-limit errdisable recovery cause unicast-flood errdisable recovery cause vmps errdisable recovery cause arp-inspection errdisable recovery interval 30 spanning-tree extend system-id ! ! interface GigabitEthernet2/1 // 对该端口接入的用户进行限制,可以下联交换机 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/2 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/3 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/4 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 --More-- 编者注:对不需要明确地址的所有人的时候是一个很好的解决办法。另外,可以查看www.cisco.com的 IP Source Guard Similar to DHCP snooping, this feature is enabled on a DHCP snooping untrusted Layer 2 port. Initially, all IP traffic on the port is blocked except for DHCP packets that are captured by the DHCP snooping process. When a client receives a valid IP address from the DHCP server, or when a static IP source binding is configured by the user, a per-port and VLAN Access Control List (PACL) is installed on the port. This process restricts the client IP traffic to those source IP addresses configured in the binding; any IP traffic with a source IP address other than that in the IP source binding will be filtered out. This filtering limits a host's ability to attack the network by claiming neighbor host's IP address.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值