# Bind the DHCP server group to VLANIF 100.
[RouterA-Vlanif100] dhcp relay server-select dhcpgroup1
[RouterA-Vlanif100] quit
l Configure a default route on RouterA.
[RouterA] ip route-static 0.0.0.0 0.0.0.0 100.10.20.2
l Configure RouterB to function as a DHCP server based on a global address pool.
1. Enable the DHCP service.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] dhcp enable
2. Configure Ethernet3/0/0 to select a global address pool for address allocation.
[RouterB] interface ethernet 3/0/0
[RouterB-Ethernet3/0/0] ip address 100.10.10.1 24
[RouterB-Ethernet3/0/0] dhcp select global
[RouterB-Ethernet3/0/0] quit
3. Create an address pool and configure related attributes.
[RouterB] ip pool pool1
[RouterB-ip-pool-pool1] network 20.20.20.0 mask 24
[RouterB-ip-pool-pool1] gateway-list 20.20.20.1
[RouterB-ip-pool-pool1] quit
4. Configure a static route from the DHCP server to RouterA. This ensures that the route
from the DHCP server to the network segment 20.20.20.0/24 is reachable. (The
configuration details are not provided here.)
l Configure a default route on RouterB.
[RouterA] ip route-static 0.0.0.0 0.0.0.0 100.10.10.2
l Verify the configuration.
# Run the display dhcp relay command on RouterA. You can view the DHCP relay
configurations on VLANIF 100.
[RouterA] display dhcp relay interface vlanif 100
** Vlanif100 DHCP Relay Configuration **
DHCP server group name : dhcpgroup1
DHCP server IP [0] :100.10.10.1
# Run the display ip pool command on RouterB. You can view the configurations of the
IP address pool.
[RouterB] display ip pool
-----------------------------------------------------------------------
Pool-name : pool1
Pool-No : 0
Position : Local Status : Unlocked
Gateway-0 : 10.1.1.1
Mask : 255.255.255.0
Vpn instance : --
IP address Statistic
Total :250
Used :0 Idle :248
Expired :0 Conflict :0 Disable :2
----End
Configuration Files
Configuration file of RouterA
Huawei AR150&200 Series Enterprise Routers
Configuration Guide - IP Service 6 DHCP Configuration
Issue 02 (2012-03-30) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
166