DHCP relay troubleshooting cannot obtain IP addresses of different network segments

Source: Internet
Author: User

We have also introduced two DHCP relay faults before. I don't know if you still remember them. If you are not clear about it, You can briefly review it. The DHCP relay fault described here is about the problem that clients of different business types cannot obtain IP addresses of different network segments through relay.

DHCP relay failure ◆ Network Environment

Shows the networking environment. During use, it is found that the client cannot obtain the IP address of the same network segment as the relay proxy interface from DHCP relay.

Figure shows typical networking applications for which IP addresses are assigned to clients of different business types.

DHCP relay fault ◆ Fault Analysis

1. Run the "display dhcp server tree all" command to check whether the DHCP server is configured with the address pool of the slave IP address segment of the relay proxy.

2. Run the display ip interface brief command to view the configuration information of the relay proxy and DHCP server interfaces. Check whether the primary IP address and slave IP address are correctly configured for each interface.

Go to the interface view of GigabitEthernet1/0/0 to view the configuration of the relay proxy interface.

 
 
  1. <HUAWEI> system-view  
  2. [HUAWEI] interface gigabitethernet 1/0/0  
  3. [HUAWEI-GigabitEthernet1/0/0] display this 
  4. #  
  5. interface GigabitEthernet1/0/0   
  6. ip address 10.110.1.1 255.255.0.0   
  7. ip address 11.110.1.1 255.255.0.0 sub   
  8. ip address 12.110.1.1 255.255.0.0 sub   
  9. ip address 13.110.1.1 255.255.0.0 sub  
  10. ip relay address 20.110.1.1   
  11. ip relay giaddr 13.110.1.1 dhcp-option 12   
  12. ip relay giaddr 12.110.1.1 dhcp-option 60   
  13. ip relay giaddr 11.110.1.1 dhcp-option 82  
  14. dhcp select relay  
  15. isis enable 1  
  16. dhcp snooping enable  
  17. dhcp option82 insert enable  
  18. #  
  19. return 

3. Run the display dhcp relay address all command to check whether DHCP Option is configured with the DHCP server address and relay proxy address for the interface enabling the relay proxy function.

4. Run the display fib 11.110.1.1 command to view the route information.

View the route information on the server side and find the route to the Relay.

Run the ping pai110.1.1 command on the relay proxy to ping the proxy. On the DHCP server, run ping 11.110.1.1, ping 12.110.1.1, and ping 13.110.1.1. The route is normal.

5. enable DHCP debugging on the DHCP server and run the debugging dhcp server packet command.

It is found that no matter which client applies, the configured option82 is used to select the relay proxy address. After checking, it is found that the dhcp option82 insert enable is configured. In this way, packets arriving at the relay proxy are first processed by dhcp snooping and option82 information is added to the message. Then, the packet is forwarded to the relay proxy for processing. At this time, no matter which client sends the packet to the relay proxy, the option82 option will be parsed, in this way, all packets will be forwarded according to the configuration associated with dhcp-option 82, so that the client cannot correctly apply for an IP address.

DHCP relay fault ◆ handling steps

1. Check whether DHCP is enabled for the relay proxy and DHCP server.

2. Check whether the DHCP server is configured with an address pool in the same network segment as the IP address required by the DHCP client.

3. Check whether the IP address of the proxy DHCP server is correctly configured on the interface connecting to the IP address of the DHCP client; whether the IP address of the proxy is conflicted due to the configuration of Multiple DHCP server addresses.

4. Check whether the DHCP relay proxy and DHCP server are configured with mutually accessible routes, that is, the primary IP address that arrives at the relay proxy interface and the route from the IP address.

5. Check the configuration of the DHCP server. A maximum of four relay proxies can be configured between the DHCP server and the client.

6. Check whether commands for DHCP relay proxy are enabled on the relay proxy interface. If no enable is available, go to the interface view of GigabitEthernet1/0/0 and run the dhcp select relay command.

7. check whether the relay proxy address on the relay proxy interface is the master or slave IP address of the interface. If the relay proxy address is not configured, the primary IP address of the relay proxy interface is selected as the trunk proxy address by default; if you configure giaddr as the interface master or slave address, otherwise the route cannot be published and the client cannot obtain the IP address normally ).

8. Check whether the DHCP Option configured on the relay proxy interface is correctly associated with the relay proxy address.

9. Check whether dhcp snooping is configured because option 82 Information is added to the message, which affects the selection of the relay proxy address and DHCP server address.

The relay proxy address selection rules are similar to the DHCP server IP address selection rules: When the relay proxy processes packets, it searches for the configuration based on the DHCP option number parsed by the DHCP protocol packet. If there are multiple DHCP option configurations, select the DHCP option with the largest number to configure the forwarding packet. If the selected DHCP option number is 60, the matching configuration is first searched based on the string content. If no matching configuration exists, option 60 with no string content is selected. If no DHCP option is configured on the relay agent, the packet is forwarded based on the configuration without DHCP option. If no DHCP server address is configured for the relay proxy, the relay proxy discards the Protocol packet. If no relay proxy address is configured, the primary IP address of the interface is used as the relay proxy address by default.

DHCP relay fault ◆ case summary

Although the relay configuration is not complex, it is easy to encounter mismatching commands, missing commands, and other situations. By default, the server assigns an IP address from the global address pool. To assign an IP address from the interface address pool, you must run the dhcp select interface command. If you want to assign an IP address from the relay, the dhcp select relay command must be executed. In addition, the ip relay address and dhcp select relay commands must be executed on the Interface connected to the client, GigabitEthernet1/0/0), and cannot be configured on the GigabitEthernet1/0/1 interface.
 

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.