3750 specific commands for configuring DHCP snooping

Source: Internet
Author: User

DHCP servers are widely used in routers or switches. So here we will explain this knowledge. First, let's take a look at the content of 3750 configuring DHCP snooping. Useless parts have been deleted.) the specific operation is as follows:

 
 
  1. Clock timezone WST 8
  2. Switch 1 provision ws-c3750g-48ts
  3. System mtu routing 1500
  4. Ip subnet-zero
  5. Ip dhcp excluded-address 192.168.1.1 reserved address)
  6. !
  7. Ip dhcp pool test starts DHCP)
  8. Network 192.168.1.0 255.255.255.0
  9. Default-router 192.168.1.1
  10. Dns-server 192.168.1.1
  11. !
  12. Ip dhcp snooping vlan 1 (specify the vlan protected by DHCP snooping)
  13. Ip dhcp snooping information option allow-untrusted
  14. Ip dhcp snooping database flash: snooping specifies the database path)
  15. Ip dhcp snooping (3750 enable DHCP snooping first in DHCP snooping configuration)
  16. !
  17. !
  18. Interface GigabitEthernet1/0/1
  19. !
  20. Interface GigabitEthernet1/0/31 normal port)
  21. Switchport mode access
  22. Spanning-tree portfast
  23. !
  24. Interface GigabitEthernet1/0/32
  25. !
  26. Interface GigabitEthernet1/0/42
  27. !
  28. Interface GigabitEthernet1/0/43 enable ip dhcp snooping port)
  29. Switchport mode access
  30. Switchport port-security
  31. Spanning-tree portfast
  32. Ip verify source

(Enable IP address verification. Users on this port cannot set their own IP addresses, which can only be obtained through DHCP, but there is no mac layer security control.

3750 test the DHCP snooping configuration. If the user of the g1/0/43 port has the IP address 192.168.1.2, and the user of g1/0/42 intentionally modifies the IP address to 192.168.1.2, the user of g1/0/43 will also be affected, although g1/0/42 cannot access the network by changing the IP address, g1/0/43 will prompt an IP conflict. Therefore, you must use DAI to protect the mac layer)

 
 
  1. !  
  2. interface GigabitEthernet1/0/44  
  3. !  
  4. interface GigabitEthernet1/0/45  
  5. switchport mode access  
  6. switchport port-security  
  7. switchport port-security violation restrict  
  8. spanning-tree portfast  
  9. ip verify source port-security     

After the port is enabled, the IP address cannot be registered through DHCP. The reason is that MAC cannot be registered due to port-security restrictions)

 
 
  1. (Ip verify source port-security is used together with the startup IP soure binding
  2. Ip source binding 001b. a111.5e11 vlan 1 192.168.1.200 interface Gi1/0/45, note that ip source binding and dynamic DHCP cannot be used at the same time)
  3. !
  4. Interface GigabitEthernet1/0/46

The above is the details about configuring DHCP snooping in 3750.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.