3、启动dai

  1. ip subnet-zero  
  2. ip dhcp excluded-address 192.168.1.1  
  3. !  
  4. ip dhcp pool test  
  5. network 192.168.1.0 255.255.255.0  
  6. default-router 192.168.1.1   
  7. dns-server 192.168.1.1   
  8. lease infinite  
  9. !  
  10. ip dhcp snooping vlan 1                             (需要DHCP为基础)  
  11. ip dhcp snooping information option allow-untrusted  
  12. ip dhcp snooping database flash:snooping指定snooping 数据保存位置)  
  13. ip dhcp snooping                                   启动DHCP snooping)  
  14. ip arp inspection vlan 1                         启动DAI)  
  15. ip arp inspection validate src-mac dst-mac ip    检测项目)  
  16. !  
  17. !  
  18. !  
  19. interface GigabitEthernet1/0/31  
  20. switchport mode access  
  21. ip arp inspection trust          如果设置trust可以改IP,设置untrust不可以改IP,因为DAI检测)  
  22. spanning-tree portfast  
  23. !  
  24. interface GigabitEthernet1/0/32  
  25. !  
  26. nterface GigabitEthernet1/0/44  
  27. !  
  28. interface GigabitEthernet1/0/45  
  29. switchport mode access  
  30. switchport port-security  
  31. switchport port-security violation restrict  
  32. spanning-tree portfast  
  33. ip verify source port-security  
  34. !  
  35. !  
  36. Switch#sh ip arp inspection  


相关内容