switch 3560上做安全:
模型:R1 and R2 (dhcp client )-->SW 3560-->R3(dhcp server)所有設備在同一個VLAN.
R1 and R2上開 ip address dhcp
R3上做dhcp pool
- 此時R1、R2可以拿到ip address
- 當SW開啓ip dhcp snooping和 ip address snooping vlan 20,拿不到地址,當然,在連接R3(DHCP Server這個接口已經敲 ip dhcp snooping trust)
- 有三種方式可以解決
- 在R3對應的SW接口上敲ip dhcp relay information trusted
- 在所有untrust的SW接口上敲 ip dhcp snooping information option allow-untrusted
- 或者在SW的全局下敲no ip dhcp snooping information option
- 當做IPSG=ip source guard的時候。R1先用dhcp獲得地址,ping R2,看arp 表象,arp是全的。此時可以在SW上開啓IPSG 的這個feature。可以有兩種方式
- ip 過濾 命令爲ip verify source
- ip+mac 過濾 命令爲ip verify source port-security
- 最後還要在untrust接口上敲switch port-security
- 當做DAI的時候。dynamic arp inspection。 命令爲ip arp inspection vlan 10。同上,測試方法爲,修改R1的地址和MAC地址,然後ping R2,都會被幹掉。
- 問題1:兩種的表現方式都是一樣的,那兩種技術的區別本質在哪。DAI是過濾ARP的欺騙的。IPSG是做源檢測的。也有可能測試的方法不對。原因是當R1先用dhcp獲取地址,然後ping R2。此時arp表對的。然後修改R1的地址。此時R1的ARP的cache沒有了。所以要發ARP request。此時被DAI技術幹掉
- 那麼什麼方式的測試,DAI技術做不到,而IPSG可以做到呢???未知
- 兩者的共同點:都可以使用DHCP snooping binding database來做動態處理,也可以手動寫靜態表象。IPSG不同於DAI的是,IPSG還有自己的表象,是ip source binding database
- 檢查命令:show ip dhcp snooping binding ,show ip verify source , sh ip source binding dhcp-snooping 。