After installation of the dhcp server role, why is it necessary to restart the dhcp service?

Configuring a DHCP Server to Allocate IP Addresses to Clients

Context

DHCP servers can allocate IP addresses to DHCP and BOOTP clients.

  • Creating an Address Pool
  • Enabling the DHCP Server Function
  • (Optional) Configuring the Range of IP Addresses That Cannot Be Automatically Allocated to Clients from an Address Pool
  • (Optional) Configuring a DHCP Server to Allocate Fixed IP Addresses to Specified Clients
  • (Optional) Configuring an Address Lease Time
  • (Optional) Configuring the Logging Function During IP Address Allocation
  • (Optional) Configuring IP Address Conflict Detection Before a DHCP Server Allocates IP Addresses
  • (Optional) Configuring a DHCP Server to Automatically Save IP Address Allocation Information
  • (Optional) Associating an IP Address Pool with NQA

Creating an Address Pool

Context

Address pools allow DHCP servers to allocate network parameters including IP addresses to clients. You can specify network parameters in an address pool, including an IP address range, gateway address, and the IP address of a DNS server.

Address pools are classified into interface address pools and global address pools.

  • Interface address pool: After an IP address is configured for an interface on a DHCP server, you can create an address pool on the same network segment as this interface. Addresses in the address pool can be allocated only to clients connected to the interface. The interface address pool can allocate IP addresses to clients on the same network segment as the DHCP server. When no DHCP relay agent is deployed. A DHCP server allocates IP addresses to clients connected to one interface or allocates IP addresses on different network segments to clients connected to multiple interfaces.
  • Global address pool: On a DHCP server, you can create an address pool on the specified network segment in the system view. Addresses in the address pool can be allocated to all clients connected to the DHCP server. The global address pool applies to the following scenarios:
    • The DHCP server and clients are not on the same network segment, and a DHCP relay agent is deployed.
    • The DHCP server and clients are on the same network segment, and the DHCP server needs to allocate an IP address to a client connected to one interface or allocate IP addresses to clients connected to multiple interfaces.

NOTE:

Configuring interface address pools is recommended for scenarios where a DHCP server and clients reside on the same network segment.

A DHCP server selects address pools according to the following rules:

  • When no DHCP relay agent is deployed, the DHCP server selects the address pool on the same network segment as the IP address of the interface receiving DHCP Request messages.
  • When DHCP relay agents are deployed, the DHCP server selects the address pool on the same network segment as the IP address specified in the Giaddr field of received DHCP Request messages.

Procedure

  • Create an interface address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. (Optional) Configure a DHCP server to dynamically allocate IP addresses to BOOTP clients.
      1. Run:

        dhcp server bootp

        The DHCP server is enabled to respond to BOOTP requests.

        By default, a DHCP server responds to a BOOTP request.

      2. Run:

        dhcp server bootp automatic

        The DHCP server is enabled to dynamically allocate IP addresses to BOOTP clients.

        By default, a DHCP server does not dynamically allocate IP addresses to BOOTP clients.

        In addition to dynamically allocating IP addresses to BOOTP clients, the device functioning as the DHCP server can allocate IP addresses to the BOOTP clients in static binding mode using the dhcp server static-bind ip-address ip-address mac-address mac-address command.

    3. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    4. Run:
      ip address ip-address { mask | mask-length }

      An IP address is configured for the interface.

      The IP address segment of the interface is the interface address pool.

  • Create a global address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. (Optional) Configure a DHCP server to dynamically allocate IP addresses to BOOTP clients.
      1. Run:

        dhcp server bootp

        The DHCP server is enabled to respond to BOOTP requests.

        By default, a DHCP server responds to a BOOTP request.

      2. Run:

        dhcp server bootp automatic

        The DHCP server is enabled to dynamically allocate IP addresses to BOOTP clients.

        By default, a DHCP server does not dynamically allocate IP addresses to BOOTP clients.

        In addition to dynamically allocating IP addresses to BOOTP clients, the device functioning as the DHCP server can allocate IP addresses to the BOOTP clients in static binding mode using the dhcp server static-bind ip-address ip-address mac-address mac-address command.

    3. Run:
      ip pool ip-pool-name

      A global address pool is created and the global address pool view is displayed.

      By default, no global address pool is created on the device.

      The parameter ip-pool-name uniquely specifies the name of an address pool. For example, create a global address pool named global_f1 for employees on the first floor.

      [Huawei] ip pool global_f1

    4. Run:
      network ip-address [ mask { mask | mask-length } ]

      The range of IP addresses that can be dynamically allocated from the global address pool is specified.

      By default, the range of IP addresses that can be allocated dynamically to clients is not specified.

      An address pool can be configured with only one IP address segment. The IP address range is determined by the mask length.

      NOTE:

      When specifying the IP address range, ensure that IP addresses within the range are on the same network segment as the interface IP address of the DHCP server or DHCP relay agent to avoid incorrect IP address allocation.

    5. (Optional) Run:
      vpn-instance vpn-instance-name

      A VPN instance is configured for the address pool.

      By default, no VPN instance is configured for an address pool.

      In most cases, an address pool allocates IP addresses to clients on only one network segment to prevent IP address conflicts. In a BGP/MPLS IP VPN scenario, different VPNs use IP addresses on the same network segment. If clients in different VPNs apply to the same DHCP server for IP addresses, perform this step to use the same address pool to allocate IP addresses on the same network segment to the clients.

      Only the S5720HI and S5720EI support this step.Only the S5320EI supports this step.Only the S5720HI, S5720EI, S5720SI, S5720S-SI and S6720EI support this step.Only the S5320EI, S5320SI and S6320EI support this step.

Enabling the DHCP Server Function

Context

After the DHCP server function is enabled on an interface, the DHCP function can allocate network parameters including IP addresses to clients.

Procedure

  • Enabling the DHCP server function based on an interface address pool:
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      dhcp select interface

      The interface is enabled to use the interface address pool to provide the DHCP server function.

      By default, an interface does not use the interface address pool to provide the DHCP server function.

      An interface address pool is actually the network segment where the interface IP address resides, and such an interface address pool applies only to this interface.

      If the device functioning as the DHCP server provides the DHCP service for clients connected to multiple interfaces, repeat this step to enable the DHCP server function on all the interfaces.

  • Enabling the DHCP server function based on a global address pool
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      ip address ip-address { mask | mask-length } [ sub ]

      The primary and secondary interface IP addresses are configured.

      When a client on the interface applies for an IP address after the interface IP addresses are configured:

      • If the device and client are located in the same network segment (that is, no relay exists), the device first selects the address pool in the same network segment as the primary interface IP address to assign an IP address. If this address pool is used up or no mapping address pool is configured for the primary IP address, the device uses the address pool mapping the secondary IP address.If the interface is not configured with an IP address or no address pool is in the same network segment as the interface address, the client cannot obtain an IP address.

        NOTE:

        The device can select the global address pool based on the primary and secondary interface IP addresses only when the DHCP client and server are located in the same network segment.

      • If the device and client are located in different network segments (that is, a relay exists), the DHCP server parses the IP address specified by the giaddr field in the received DHCP request packet and selects the address pool in the same network segment as this IP address to assign an IP address to the client. If no address pool matches the parsed IP address, the client cannot obtain an IP address.
    4. Run:
      dhcp select global

      The interface is enabled to use the global address pool to provide the DHCP server function.

      By default, an interface does not use the global address pool to provide the DHCP server function.

      Clients connected to the interface can obtain network parameters including IP addresses from the global interface pool.

      NOTE:

      This step is optional if a DHCP relay agent exists between the device and clients; this step is mandatory if no relay agent exists.

Follow-up Procedure

A DHCP client sends a DHCP Discover message in broadcast mode. When multiple DHCP servers including bogus DHCP servers exist on a network segment, the DHCP client accepts only the first received DHCP Offer message and therefore may obtain an unexpected IP address from a bogus DHCP server. To ensure that a client obtains an IP address from the correct DHCP server, configure DHCP snooping on the client. For detailed configuration of DHCP snooping, see DHCP Snooping Configuration in Huawei AR Series IOT Gateway Configuration Guide - Security.

(Optional) Configuring the Range of IP Addresses That Cannot Be Automatically Allocated to Clients from an Address Pool

Context

Some servers and clients may use specific IP addresses in an address pool, so that the DHCP server does not automatically allocate these IP addresses to other clients. For example, in an enterprise, a DHCP server allocates IP addresses on the network segment 192.168.1.0/24 to employee PCs. On this network segment, 192.168.1.1 is used as the gateway IP address, and 192.168.1.10 is used as the DNS server IP address. The DNS server IP address is manually configured to ensure stability, and other hosts obtain IP addresses using DHCP. Therefore, 192.168.1.10 must be excluded from the range of IP addresses that can be automatically allocated.

NOTE:

A DHCP server automatically excludes a gateway address configured using the gateway-list command and the IP addresses of interfaces that connect a DHCP server to clients. The DHCP server automatically adds these addresses to the list of IP addresses that cannot be automatically allocated.

Procedure

  • Exclude IP addresses from an interface address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      dhcp server excluded-ip-address start-ip-address [ end-ip-address ]

      The range of IP addresses that are not automatically allocated from the address pool is configured.

      By default, all IP addresses are automatically allocated from the address pool.

      To set multiple IP address ranges that cannot be automatically allocated from the address pool, run this command multiple times.

      For example, to exclude 192.168.1.10 from the range of IP addresses that can be automatically allocated, run:

      [Huawei-GigabitEthernet0/0/1] dhcp server excluded-ip-address 192.168.1.10

  • Exclude IP addresses from a global address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      ip pool ip-pool-name

      The global address pool view is displayed.

    3. Run:
      excluded-ip-address start-ip-address [ end-ip-address ]

      The range of IP addresses that are not automatically allocated from the address pool is configured.

      By default, all IP addresses are automatically allocated from the address pool.

      To set multiple IP address ranges that cannot be automatically allocated from the address pool, run this command multiple times.

      For example, to exclude 192.168.1.10 from the range of IP addresses that can be automatically allocated, run:

      [Huawei-ip-pool-global_f1] excluded-ip-address 192.168.1.10

(Optional) Configuring a DHCP Server to Allocate Fixed IP Addresses to Specified Clients

Context

A DHCP server leases IP addresses to clients. When the lease expires, the clients must apply for new IP addresses. To ensure stability, certain clients require fixed IP addresses. In this case, configure the DHCP server to allocate fixed IP addresses to these clients. The MAC addresses of these clients are then bound to fixed IP addresses. When such a client applies to the DHCP server for an IP address, the DHCP server searches the binding entries for the MAC address of the client and allocates the matched IP address to the client. DHCP static allocation prevents manual configuration errors and facilitates unified management.

Before performing this configuration task, ensure that the IP addresses for static allocation have not been allocated. (To check related information, run the display ip pool { interface interface-pool-name | name ip-pool-name } used command.) If such an IP address has been allocated, use another IP address or release the allocated address using the reset ip pool { interface pool-name | name ip-pool-name } start-ip-address [ end-ip-address ] command and perform the binding again.

DHCP static allocation,IPSG Configuration, and static ARP all involve the binding of IP addresses and MAC addresses. For their usage scenarios and implementations, see the following Table 3-8.

Table 3-8  Differences between DHCP static allocation, IPSG, and static ARP

FunctionScenarioImplementation
DHCP static allocation

Some clients (such as servers and PCs) require fixed IP addresses from a DHCP server.

The MAC addresses of these clients are bound to fixed IP addresses. When such a client applies to the DHCP server for an IP address, the DHCP server searches the binding entries for the MAC address of the client and allocates the matched IP address to the client.

IPSG

Attacks including IP address spoofing and ARP spoofing need to be prevented:

  • IP address spoofing: An attacker uses a forged IP address and its own MAC address to obtain rights of the attacked device and intercept packets destined for the attacked device.
  • ARP spoofing: An attacker sends ARP packets using a forged MAC address to intercept packets destined for the attacked device or using the MAC address of the gateway to intercept all packets destined for the gateway.

The mapping between IP addresses and MAC addresses is set up on a device. When receiving an ARP Request packet, the device searches for the mapped MAC address based on the source IP address of the packet and compares the mapped MAC address with the source MAC address in the packet header. If the two MAC addresses are different from each other, the device considers the packet invalid and discards it.

Static ARP

The mapping between IP addresses and MAC addresses is manually configured in the following scenarios:

  • Packets whose destination IP addresses are not on the local network segment need to be forwarded by a gateway on the local network segment.
  • Destination IP addresses of invalid packets need to be bound to a nonexistent MAC address to filter them out.
  • Critical devices need to forward packet securely and be protected against attacks, such as ARP flooding. In this situation, static ARP entries can be configured to bind MAC addresses to specific IP addresses. Network attackers cannot modify the mapping between the IP and MAC addresses, which ensures communication between the two devices.

The mapping between IP addresses and MAC addresses is set up on a device. When receiving an ARP Request packet, the device searches for the MAC address mapped to the IP address in the packet and responds with an ARP Reply packet.

Static ARP entries are manually configured and maintained. These entries are neither aged nor overwritten by dynamic ARP entries, and therefore improve communication security.

Procedure

  • Configure a DHCP server to allocate fixed IP addresses from an interface address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      dhcp server static-bind ip-address ip-address mac-address mac-address

      The DHCP server is configured to allocate fixed IP addresses to specified clients.

      By default, a DHCP server does not allocate fixed IP addresses to specified clients.

      The fixed IP addresses to be allocated must be within the range of IP addresses that can be dynamically allocated from the interface address pool.

  • Configure a DHCP server to allocate fixed IP addresses from a global address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      ip pool ip-pool-name

      The global address pool view is displayed.

    3. Run:
      static-bind ip-address ip-address mac-address mac-address

      The DHCP server is configured to allocate fixed IP addresses to specified clients.

      By default, a DHCP server does not allocate fixed IP addresses to specified clients.

      The fixed IP addresses to be allocated must be within the range of IP addresses that can be dynamically allocated from the global address pool.

(Optional) Configuring an Address Lease Time

Context

NOTE:

This task does not take effect for BOOTP clients.

Except for allocating fixed IP addresses to specified clients, a DHCP server can dynamically allocate IP addresses with leases to clients in scenarios where hosts temporarily access the network and the number of idle IP addresses is less than the total number of hosts.

The lease time varies depending on network access requirements. By default, the IP address lease is one day.

  • In locations where clients often move, for example, in cafes, airports, and hotels, plan a short-term lease to ensure that IP addresses are released quickly after the clients go offline.
  • In locations where clients seldom move, for example, in office areas of an enterprise, plan a long-term lease to prevent services from being affected by frequent address renewals.

Different address pools on a DHCP server can be configured with different IP address leases, but the IP addresses in the same address pool must be configured with the same lease.

Procedure

  • Configure a lease time based on an interface address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      dhcp server lease { day day [ hour hour [ minute minute ] ] | unlimited }

      An IP address lease is set.

      By default, the IP address lease is one day.

  • Configure a lease time based on a global address pool.
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      ip pool ip-pool-name

      The global address pool view is displayed.

    3. Run:
      lease { day day [ hour hour [ minute minute ] ] | unlimited }

      An IP address lease is set.

      By default, the IP address lease is one day.

(Optional) Configuring the Logging Function During IP Address Allocation

Context

When the DHCP server allocates IP addresses to clients, it records address allocation information to facilitate routine maintenance and fault location. After the logging function during IP address allocation of the DHCP server is configured, the DHCP server records logs about address allocation, conflict, lease renewal, and release.

NOTE:

If a large number of DHCP clients request for IP addresses after the logging function during IP address allocation of the DHCP server is configured, the server frequently records logs and therefore the device performance may be affected.

Procedure

  • Based on interfaces:
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      interface interface-type interface-number [.subinterface-number ]

      The interface view or sub-interface view is displayed.

    3. Run:
      dhcp server logging

      The logging function during IP address allocation of the DHCP server is enabled.

      By default, the logging function during IP address allocation of the DHCP server is disabled.

  • Based on the global mode:
    1. Run:
      system-view

      The system view is displayed.

    2. Run:
      ip pool ip-pool-name

      The global address pool is created and the global address pool view is displayed.

      By default, no global address pool is created on the device.

    3. Run:
      logging

      The logging function during IP address allocation of the DHCP server is enabled.

      By default, the logging function during IP address allocation of the DHCP server is disabled.

Checking the Configuration

Run the display ip pool command to view the status of the logging function during IP address allocation of the DHCP server.

Follow-up Procedure

Configure the information center to display the IP address allocation logs recorded by the DHCP server on user terminals or log hosts or generate them in log files. For details on how to configure the information center, see Configuring Log Output in Huawei AR Series IOT Gateway Configuration Guide - Device Management - Information Center Configuration.

(Optional) Configuring IP Address Conflict Detection Before a DHCP Server Allocates IP Addresses

Context

A DHCP server configured with IP address conflict detection checks whether an IP address to be allocated to a client conflicts with other IP addresses.

After IP address conflict detection is configured, a DHCP server sends an ICMP Echo Request packet before it sends a DHCP Offer message. The packet contains the source and destination IP addresses, which are both a specified IP address. If the DHCP server does not receive an ICMP Echo Reply packet after the maximum waiting period (specified using the dhcp server ping timeout milliseconds command), the DHCP server continues to send the ICMP Echo Request packet until the maximum number of detection times (specified using the dhcp server ping packet number command) has been reached.

  • If the DHCP server receives no ICMP Echo Reply packet within the detection period (number of detection times x maximum waiting period), this IP address is not used by any client, and the DHCP server allocates the IP address to the client by sending a DHCP Offer message to the client.
  • If the DHCP server receives an ICMP Echo Reply packet within the detection period (number of detection times x maximum waiting period), this IP address is being used by a client, and the DHCP server lists this IP address as a conflicting IP address and waits for the next DHCP Discover message.

This configuration task takes effect for both the interface and global address pools.

NOTE:

If the detection period is too long, clients may fail to obtain IP addresses. Set the detection period to less than 8 seconds.

Procedure

  1. Run:
    system-view

    The system view is displayed.

  2. Run:
    dhcp server ping packet number

    The number of times that the device detects IP address conflicts before allocating IP addresses is set.

    By default, the device does not detect IP address conflicts before allocating IP addresses.

  3. Run:
    dhcp server ping timeout milliseconds

    The maximum wait time for each conflict detection is set.

    By default, the maximum wait time for each conflict detection is 500 milliseconds.

(Optional) Configuring a DHCP Server to Automatically Save IP Address Allocation Information

Context

If a DHCP server is restarted upon an upgrade or is faulty, IP address allocation information on the DHCP server is lost. After the restart, the DHCP server must re-allocate IP addresses. To prevent data loss and to support data recovery upon a restart, configure a DHCP server to automatically save IP address allocation information, including address leases and conflicting IP addresses, in files. When the DHCP server restarts, it can recover the data from the files.

This configuration task takes effect for both the interface and global address pools.

Procedure

  1. Run:
    system-view

    The system view is displayed.

  2. Run:
    dhcp server database enable

    The DHCP server is enabled to automatically save IP address allocation information.

    By default, a DHCP server does not periodically save IP address allocation information.

    After this function is enabled, the DHCP server generates lease.txt and conflict.txt files in the DHCP folder in storage. The lease.txt file stores lease information, and the conflict.txt file stores conflicting IP addresses. To view information about the DHCP database, run the display dhcp server database command.

  3. Run:
    dhcp server database write-delay interval

    The interval at which the DHCP server saves IP address allocation information is set.

    By default, IP address allocation information is saved every 300 seconds in data files. The new data files overwrite the earlier data files.

  4. Run:
    dhcp server database recover

    The DHCP server is enabled to recover IP address allocation information.

    After this command is run, the DHCP server can recover IP address allocation information from the data files in storage.

(Optional) Associating an IP Address Pool with NQA

Context

As shown in Figure 3-14 and Figure 3-15, the router functions as the backup DHCP server. You can associate the IP address pool on the router with NQA test instances to check the DHCP server status (including the link and DHCP server function). This can improve network reliability. When the DHCP server is working properly, the IP address pool on the router is locked, and PC1 and PC2 obtain IP addresses through the DHCP server. When NQA detects that the DHCP server is faulty, the IP address pool on the router is unlocked and assigns an IP address to PC3 that is newly online. When NQA detects that the DHCP server fault is rectified, the IP address pool on the router is locked again, and PC4 that is newly online obtains an IP address through the DHCP server.

This function is configured only for a global address pool.

NOTE:

When the DHCP server is faulty, PC3 obtains an IP address from the router; when the DHCP server is recovered, the DHCP function is switched back to the DHCP server. At this time, if the IP address lease of PC3 has expired, the lease renewal will fail. After PC3 goes offline temporarily, it re-obtains an IP address from the DHCP server. In addition, the two IP addresses obtained by PC3 are different because the IP address pools on the DHCP server and router have different address ranges.

Figure 3-14  Associating the IP address pool with NQA (router and client locating in the same network segment)

Figure 3-15  Associating the IP address pool with NQA (router and client locating in different network segments)

Procedure

  1. Configure and start NQA test instances.

    An IP address pool can be associated with NQA test instances of the DHCP and ICMP types. NQA test instances of the DHCP type are used to test whether the DHCP server function is normal; those of the ICMP type are used to test whether routes to the DHCP server are reachable. When the device uses NQA test instances of the ICMP type, it cannot detect the status of the DHCP server function. Therefore, the device cannot detect the situation in which the route is reachable but the DHCP server function is unavailable, and users cannot go online.

    • Configuring and starting an NQA test instance of the DHCP type

      1. Run:

        system-view

        The system view is displayed.

      2. Run:

        nqa test-instance admin-name test-name

        An NQA test instance is created and the test instance view is displayed.

        By default, no NQA test instance is configured.

      3. Run:

        test-type dhcp

        The NQA test instance type is set to DHCP.

        By default, no test type is configured for an NQA test instance.

      4. Run:

        source-interface interface-type interface-number

        The source interface is specified to send DHCP packets.

        By default, no source interface is configured for an NQA test instance.

      5. Run:

        frequency interval

        The automatic test interval is set for the NQA test instance.

        By default, no automatic test interval is set. The system performs the test only once.

      6. Run:

        start

        The NQA test instance is started.

        An NQA test instance can be started immediately, at a specified time, or after a specified delay.

        • Run the start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance immediately.

        • Run the start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance at a specified time.

        • Run the start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance after a specified delay.

      7. Run:

        quit

        Exit from the NQA test instance view.

      NOTE:

      Before using the test instance of the DHCP type, ensure that the DHCP server provides the address pool for the network segment of the source interface (specified running the source-interface interface-type interface-number command). You can use the source interface to simulate a DHCP client to send a DHCP request, and determine the DHCP server status depending on whether an IP address can be obtained.

    • Configuring and starting an NQA test instance of the ICMP type

      1. Run:

        system-view

        The system view is displayed.

      2. Run:

        nqa test-instance admin-name test-name

        An NQA test instance is created and the test instance view is displayed.

        By default, no NQA test instance is configured.

      3. Run:

        test-type icmp

        The test type is set to ICMP.

        By default, no test type is configured for an NQA test instance.

      4. Run:

        destination-address ipv4 ipv4-address

        The destination address is configured.

        By default, no test destination address is configured.

      5. Run:

        frequency interval

        The automatic test interval is set for the NQA test instance.

        By default, no automatic test interval is set. The system performs the test only once.

      6. Run:

        start

        The NQA test instance is started.

        An NQA test instance can be started immediately, at a specified time, or after a specified delay.

        • Run the start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance immediately.

        • Run the start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance at a specified time.

        • Run the start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ] command to start the test instance after a specified delay.

      7. Run:

        quit

        Exit from the NQA test instance view.

    NOTE:

    • To persistently detect the DHCP server status, you need to perform periodical test for NQA test instances. Therefore, run the frequency interval command to set the automatic test interval for NQA test instances.
    • This section only mentions basic configuration parameters of the DHCP and ICMP NQA test instances. For details on how to configure other parameters, see Configuring DHCP Test and Configuring ICMP Test in the Huawei AR Series IOT Gateway Configuration Guide-Network Management and Monitoring-Configuring the NQA.

  2. Run:
    ip pool ip-pool-name

    The global address pool view is displayed.

  3. Run:
    excluded-ip-address start-ip-address [ end-ip-address ]

    The IP addresses that are not automatically allocated in the address pool are configured.

    By default, all IP addresses in an address pool can be automatically allocated to clients.

    NOTE:

    The IP addresses assigned by the backup DHCP server cannot overlap with those assigned by the DHCP server, which prevents repeated assignment of an IP address. Therefore, you need to run the excluded-ip-address start-ip-address [ end-ip-address ] command to exclude the IP addresses that are repeated with those of the remote DHCP service.

  4. Run:
    lock track nqa admin-name test-name

    The IP address pool is associated with the NQA test instance. The device determines whether to lock the address pool according to the test result of the NQA test instance.

    By default, no IP address pool is locked.

    NOTE:

    When the NQA test instance type is not DHCP and ICMP, the association between the IP address pool and NQA do not take effect. In this case, the IP address pool is locked.

Why is it necessary to restart the DHCP service?

Starting, stopping, and restarting the DHCP service affects the running of the daemon only at the current session. For example, if you stop the DHCP service, the currently running daemon terminates but restarts when you reboot the system. DHCP data tables are not affected by stopping the service.

What is the purpose of installing the DHCP server role?

A DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with other IP networks. DHCP is an enhancement of an older protocol called BOOTP. DHCP is an important part of the DDI solution (DNS-DHCP-IPAM).

On which server will the DHCP server role normally be installed?

Before you configure the DHCP service, you must install it on the server. DHCP is not installed by default during a typical installation of Windows Standard Server 2003 or Windows Enterprise Server 2003.

What is the functionality of a lease for a DHCP server?

During the lease time, the DHCP server cannot assign that IP address to any other clients. The purpose of a lease is to limit the length of time that a client can use an IP address. A lease prevents unused clients from taking up IP addresses when there are more clients than addresses.