< Home

Example for Configuring a Device as a DHCP Server (Based on an Interface Address Pool)

Networking Requirements

In Figure 1, an enterprise divides two network segments for office terminals: 10.1.1.0/24 for employees with fixed office terminals and 10.1.2.0/24 for employees on business trips to temporarily access the network. The enterprise requires that DHCP be used to assign IP addresses to employees with fixed office terminals and employees on business trips. A PC (DHCP Client_1) requires fixed IP address 10.1.1.100/24 to meet service requirements.
Figure 1 Networking diagram for configuring the device as a DHCP server

Configuration Roadmap

The configuration roadmap is as follows:

Configure the DHCP server function on the gateway device Switch to dynamically allocate IP addresses to terminals on the two network segments. PCs on the network segment 10.1.1.0/24 are employees' fixed office terminals, and the network segment 10.1.2.0/24 is used by travelling employees to access the network temporarily.

Configure interface link types and VLANs on LSW_1 and LSW_2 to implement Layer 2 communication.

Procedure

  1. Configure the VLANs to which interfaces belong.
    1. Choose Configuration > Basic Services > Interface Settings > Service Interface Setting. Click Connect to PC.
    2. Select GE0/0/1 under Step 2: Select Interface, and set Interface Status and Default VLAN under Step 3: Configure Interface to ON and 10, as shown in Figure 2. You do not need to configure other parameters under Step 3: Configure Interface.

      Figure 2 Connecting an interface to a PC

    3. Click Apply. In the dialog box that is displayed, click OK.
    4. Configure GE0/0/2 using the same method.
  2. Configure an IP address for each VLANIF interface.
    1. Choose Configuration > Basic Services > VLAN in the navigation tree to open the VLAN configuration page.
    2. Click the VLAN data under VLAN ID to open the Modify VLAN page, select Create VLANIF, and set an appropriate address for IPv4 address, as shown in Figure 3.

      Figure 3 Configuring a VLANIF interface

    3. Set the parameters and click OK.
  3. Configure an interface address pool.
    1. Choose Configuration > Basic Services > DHCP > DHCP Address Pool.
    2. Set DHCP status to ON to enable the DHCP function.
    3. Click Create. On the Create DHCP Address Pool page, set Address pool type to Interface address pool, select Vlanif10 for Select Interface, and click OK, as shown in Figure 4. Repeat the preceding operations to configure an address pool for VLANIF 11.

      Figure 4 Configuring an interface address pool



    4. In Address Pool List, select the check box of Vlanif10, and click Display Address Pool. On the Address Pool Information page, select the check box of 10.1.1.100, and click Bind IP. On the Bind IP page, enter 286e-d488-XXXX in the MAC address text box, and click OK, as shown in Figure 5.

      Figure 5 Statically binding an IP address to a MAC address

Operation Result

Choose Configuration > Basic Services > DHCP and click the data lines of Vlanif10 and Vlanif11 in Address Pool List to view address allocation of interface address pools, as shown in Figure 6.

Figure 6 Displaying address pool information



Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >