当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
每个数据库实体(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