No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R008C00 CLI-based Configuration Guide

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuration Examples for DHCP Snooping

Configuration Examples for DHCP Snooping

Example for Configuring DHCP Snooping Attack Defense

Networking Requirements

In Figure 26-17, SwitchA and SwitchB are access devices, and AP is a DHCP relay agent. Authorized users Client1 and Client2 connect to the network through SwitchA and use DHCP to obtain IP addresses. Attacks from unauthorized users prevent authorized users from obtaining IP addresses. The administrator needs to enable the device to defend against DHCP attacks on the network and provide better service to DHCP clients.

Figure 26-17  Networking diagram for configuring DHCP snooping attack defense

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable DHCP snooping.
  2. Configure an interface as the trusted interface to ensure that DHCP clients obtain IP addresses from the authorized server.
  3. Enable association between ARP and DHCP snooping to enable the device to update the binding entries when a DHCP user is disconnected.
  4. Enable the device to check DHCP messages against the binding table to prevent bogus DHCP message attacks.
  5. Set the maximum rate of sending DHCP messages to the processing unit to prevent DHCP flood attacks.
  6. Set the maximum number of access DHCP clients and enable the device to check whether the MAC address in the Ethernet frame header matches the CHADDR field in the DHCP message to prevent DHCP server DoS attacks.

Procedure

  1. Enable DHCP snooping.

    # Enable DHCP snooping globally.

    <Huawei> system-view
    [Huawei] sysname AP
    [AP] dhcp enable
    [AP] dhcp snooping enable

    # Enable DHCP snooping on the user-side interface. GE0/0/1 is used as an example. The configuration on GE0/0/2 is the same as the configuration on GE0/0/1 and is not mentioned here.

    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] dhcp trust port
    [AP-GigabitEthernet0/0/1] quit

  2. Configure the interface connected to the DHCP server as the trusted interface.

    [AP] interface gigabitethernet 0/0/3
    [AP-GigabitEthernet0/0/3] dhcp snooping trusted
    [AP-GigabitEthernet0/0/3] quit

  3. Enable association between ARP and DHCP snooping.

    [AP] arp dhcp-snooping-detect enable

  4. Enable the device to check DHCP messages against the DHCP snooping binding table.

    # Configure the user-side interface. GE0/0/1 is used as an example. The configuration on GE0/0/2 is the same as the configuration on GE0/0/1 and is not mentioned here.

    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] dhcp snooping check dhcp-request enable
    [AP-GigabitEthernet0/0/1] quit

  5. Set the maximum rate of sending DHCP messages to the processing unit to 90 pps.

    [AP] dhcp snooping check dhcp-rate enable
    [AP] dhcp snooping check dhcp-rate 90

  6. Enable the device to check whether the GIADDR field in a DHCP Request message is 0.

    # Configure the user-side interface. GE0/0/1 is used as an example. The configuration on GE0/0/2 is the same as the configuration on GE0/0/1 and is not mentioned here.

    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] dhcp snooping check dhcp-giaddr enable
    [AP-GigabitEthernet0/0/1] quit

  7. Set the maximum number of access users allowed on the interface and enable the device to check the CHADDR field.

    # Configure the user-side interface. GE0/0/1 is used as an example. The configuration on GE0/0/2 is the same as the configuration on GE0/0/1 and is not mentioned here.

    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] dhcp snooping max-user-number 20
    [AP-GigabitEthernet0/0/1] dhcp snooping check dhcp-chaddr enable
    [AP-GigabitEthernet0/0/1] quit

  8. Configure the trap function for the number of discarded messages and the rate limit.

    # Configure the user-side interface. GE0/0/1 is used as an example. The configuration on GE0/0/2 is the same as the configuration on GE0/0/1 and is not mentioned here.

    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-chaddr enable
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-request enable
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-reply enable
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-chaddr threshold 120
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-request threshold 120
    [AP-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-reply threshold 120
    [AP-GigabitEthernet0/0/1] quit
    

    # Enable the trap function for the rate limit and set the alarm threshold.

    [AP] dhcp snooping alarm dhcp-rate enable
    [AP] dhcp snooping alarm dhcp-rate threshold 500
    

  9. Verify the configuration.

    # Run the display dhcp snooping configuration command to view the DHCP snooping configuration.

    [AP] display dhcp snooping configuration
    #                                                                               
    dhcp snooping enable                                                           
    dhcp snooping check dhcp-rate enable                                            
    dhcp snooping check dhcp-rate 90                                                
    dhcp snooping alarm dhcp-rate enable                                            
    dhcp snooping alarm dhcp-rate threshold 500                                     
    arp dhcp-snooping-detect enable                                                 
    #                                                                               
    interface GigabitEthernet0/0/1                                        
     dhcp snooping enable                                                          
     dhcp snooping check dhcp-giaddr enable  
     dhcp snooping check dhcp-request enable                                           
     dhcp snooping alarm dhcp-request enable                                           
     dhcp snooping alarm dhcp-request threshold 120                                    
     dhcp snooping check dhcp-chaddr enable                                         
     dhcp snooping alarm dhcp-chaddr enable                                         
     dhcp snooping alarm dhcp-chaddr threshold 120                                  
     dhcp snooping alarm dhcp-reply enable                                       
     dhcp snooping alarm dhcp-reply threshold 120                                
     dhcp snooping max-user-number 20
    #                                                                               
    interface GigabitEthernet0/0/2                                        
     dhcp snooping enable                                                          
     dhcp snooping check dhcp-giaddr enable  
     dhcp snooping check dhcp-request enable                                           
     dhcp snooping alarm dhcp-request enable                                           
     dhcp snooping alarm dhcp-request threshold 120                                    
     dhcp snooping check dhcp-chaddr enable                                         
     dhcp snooping alarm dhcp-chaddr enable                                         
     dhcp snooping alarm dhcp-chaddr threshold 120                                  
     dhcp snooping alarm dhcp-reply enable                                       
     dhcp snooping alarm dhcp-reply threshold 120                                
     dhcp snooping max-user-number 20
    #                                                                               
    interface GigabitEthernet0/0/3                
     dhcp trust port                                                          
    #                                                           

    # Run the display dhcp snooping interface command to view DHCP snooping information on an interface.

    [AP] display dhcp snooping interface gigabitethernet 0/0/1
     DHCP snooping running information for interface GigabitEthernet0/0/1 :        
     DHCP snooping                            : Enable                              
     Trusted interface                        : No                                  
     Dhcp user max number                     : 20                                  
     Current dhcp and nd user number          : 0                                           
     Check dhcp-giaddr                        : Enable                              
     Check dhcp-chaddr                        : Enable                              
     Alarm dhcp-chaddr                        : Enable                              
     Alarm dhcp-chaddr threshold              : 120                                 
     Discarded dhcp packets for check chaddr  : 0                                   
     Check dhcp-request                       : Enable                              
     Alarm dhcp-request                       : Enable                              
     Alarm dhcp-request threshold             : 120                                 
     Discarded dhcp packets for check request : 0                                   
     Check dhcp-rate                          : Disable  (default)                  
     Alarm dhcp-rate                          : Disable  (default)                  
     Alarm dhcp-rate threshold                : 500                                  
     Discarded dhcp packets for rate limit    : 0     
     Alarm dhcp-reply                         : Enable                              
     Alarm dhcp-reply threshold               : 120                                 
     Discarded dhcp packets for check reply   : 0                                   
    [AP] display dhcp snooping interface gigabitethernet 0/0/3
     DHCP snooping running information for interface GigabitEthernet0/0/3 :
     DHCP snooping                            : Disable  (default)                  
     Trusted interface                        : Yes                                 
     Dhcp user max number                     : 1024     (default)                  
     Current dhcp and nd user number          : 0                              
     Check dhcp-giaddr                        : Disable  (default)                  
     Check dhcp-chaddr                        : Disable  (default)                  
     Alarm dhcp-chaddr                        : Disable  (default)                  
     Check dhcp-request                       : Disable  (default)                  
     Alarm dhcp-request                       : Disable  (default)                  
     Check dhcp-rate                          : Disable  (default)                  
     Alarm dhcp-rate                          : Disable  (default)                  
     Alarm dhcp-rate threshold                : 500                                  
     Discarded dhcp packets for rate limit    : 0                                   
     Alarm dhcp-reply                         : Disable  (default)   

Configuration Files

# Configuration file of the AP

#                                                                               
 sysname AP
#                                                                               
dhcp enable                                                                     
#                                                                               
dhcp snooping enable                                                        
dhcp snooping check dhcp-rate enable                                            
dhcp snooping check dhcp-rate 90                                                
dhcp snooping alarm dhcp-rate enable                                            
dhcp snooping alarm dhcp-rate threshold 500                                      
arp dhcp-snooping-detect enable   
#
interface GigabitEthernet0/0/1
 dhcp snooping enable                                                           
 dhcp snooping check dhcp-giaddr enable                                         
 dhcp snooping check dhcp-request enable                                           
 dhcp snooping alarm dhcp-request enable                                           
 dhcp snooping alarm dhcp-request threshold 120                                    
 dhcp snooping check dhcp-chaddr enable                                         
 dhcp snooping alarm dhcp-chaddr enable                                         
 dhcp snooping alarm dhcp-chaddr threshold 120                                  
 dhcp snooping alarm dhcp-reply enable                                       
 dhcp snooping alarm dhcp-reply threshold 120                                
 dhcp snooping max-user-number 20 
#
interface GigabitEthernet0/0/2
 dhcp snooping enable                                                           
 dhcp snooping check dhcp-request enable                                           
 dhcp snooping alarm dhcp-request enable                                           
 dhcp snooping alarm dhcp-request threshold 120                                    
 dhcp snooping check dhcp-chaddr enable                                         
 dhcp snooping alarm dhcp-chaddr enable                                         
 dhcp snooping alarm dhcp-chaddr threshold 120                                  
 dhcp snooping alarm dhcp-reply enable                                       
 dhcp snooping alarm dhcp-reply threshold 120
 dhcp snooping max-user-number 20 
#
interface GigabitEthernet0/0/3
 dhcp trust port
#
return
Translation
Download
Updated: 2019-01-11

Document ID: EDOC1000176006

Views: 116173

Downloads: 309

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next