Client cannot obtain IP address through DHCP
Network Topology
Physical Network Topology
Nodeb-------RouterA------RouterB--------DHCP server
Fault Description
RouterA connects to a client and functions as a DHCP relay agent. As a result, the client cannot obtain an IP address through DHCP.
Configuration Files
Router A:
#
interface Ethernet0/3/0.661
vlan-type dot1q 661
ip binding vpn-instance WCDMA
ip address 10.50.66.33 255.255.255.252
ip relay address 172.21.200.102
ip relay address 172.21.200.103
dhcp select relay
interface Ethernet0/3/1
ip address 1.1.1.1 30
#
Router B:
#
interface Ethernet0/3/1
ip address 1.1.1.2 30
#
Troubleshooting Location
Troubleshooting Procedure
Step 1 Log in to the routerA. Run the display current-configuration interface Ethernet0/3/0.661 command to check the configuration of the port connected to the BTS. Ensure that the dhcp select relay is configured.
interface Ethernet0/3/0.661
vlan-type dot1q 661
ip binding vpn-instance WCDMA
ip address 10.50.66.33 255.255.255.252
ip relay address 172.21.200.102
ip relay address 172.21.200.103
dhcp select relay
Step 2 Run the display dhcp relay statistics command to check the DHCP statistics. If the value of the DHCP DISCOVER packets received field is 0, it indicates that the DHCP module does not receive the DHCP DISCOVER packet from the base station.
<Huawei> display dhcp relay
statistics
Bad Packets
recieved:
0
DHCP packets received from clients: 0
DHCP DISCOVER packets received: 0
DHCP REQUEST packets received: 0
DHCP INFORM packets received: 0
DHCP DECLINE packets received: 0
Force authen packets received: 0
DHCP packets received from servers: 0
DHCP OFFER packets received: 0
DHCP ACK packets
received: 0
DHCP NAK packets
received: 0
DHCP packets sent to
servers: 0
DHCP packets sent to
clients: 0
Unicast packets sent to clients: 0
Broadcast packets sent to clients: 0
Force renew packets sent to clients: 0
Force start packets sent to clients: 0
Force ack packets sent to clients: 0
Step 3 Run the display interface Ethernet0/3/0 command to check the port statistics. If the Broadcast: 10 packets field is displayed, it indicates that the routerA receives the DHCP DISCOVER packet from the client. The DHCP DISCOVER packet is a broadcast packet. Therefore, it is suspected that the DHCP DICOVER packet sent by the client is discarded on the routerA device.
<Huawei> display
interface Ethernet0/3/0
Ethernet0/3/0 current state : Administratively DOWN
Statistics last cleared:never
Input:
Unicast: 0 packets, Multicast: 0 packets
Broadcast: 10 packets, JumboOctets: 0 packets
CRC: 0 packets, Symbol: 0 packets
Overrun: 0 packets, InRangeLength: 0 packets
LongPacket: 0 packets, Jabber: 0 packets, Alignment: 0 packets
Fragment: 0 packets, Undersized Frame: 0 packets
RxPause: 0 packets
Output:
Unicast: 0 packets, Multicast: 0 packets
Broadcast: 0 packets, JumboOctets: 0 packets
Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets
System: 0 packets, Overruns: 0 packets
TxPause: 0 packets
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
Step 4 The dhcp select relay is configured on the sub-interface. If the DHCP DISCOVER packet sent by the base station does not carry the VLAN ID, the packet is discarded on the dhcp select relay. Perform the ping -vpn-instance WCDMA 10.50.66.34 operation (the IP address is the IP address planned by the client) to trigger the ARP Request, enable the client to learn the VLAN of the port corresponding to the routerA. After this operation is performed, the DHCP client on the client goes online successfully. It is confirmed that the DHCP client fails to go online through DHCP because the DHCP DISCOVER packet does not carry VLAN tags.
----End
Root Cause
The prerequisite for this problem is that the service is configured on the sub-interface. In normal cases, the client is started. VLAN Detection and active sending ping request and trigger ARP request to enable the client to learn the received ARP. In the packet VLANID. If the client does not learn form the relay on the device VLANID. In this case, you need to manually perform the ping to trigger the ARP request.