Specifying the DHCP server selecting algorithm

About DHCP server selecting algorithm

The DHCP relay agent supports the polling and master-backup DHCP server selecting algorithms.

By default, the DHCP relay agent uses the polling algorithm. It forwards DHCP requests to all DHCP servers. The DHCP clients select the DHCP server from which the first received DHCP reply comes.

If the DHCP relay agent uses the master-backup algorithm, it forwards DHCP requests to the master DHCP server first. If the master DHCP server is not available, the relay agent forwards the subsequent DHCP requests to a backup DHCP server. If the backup DHCP server is not available, the relay agent selects the next backup DHCP server, and so on. If no backup DHCP server is available, it repeats the process starting from the master DHCP server.

The master DHCP server is determined in one of the following ways:

DHCP server selection supports the following functions:

Specifying the DHCP server selecting algorithm in interface view

  1. Enter system view.

    system-view

  2. Enter interface view.

    interface interface-type interface-number

  3. Specify the DHCP server selecting algorithm.

    dhcp relay server-address algorithm { master-backup | polling }

    By default, the polling algorithm is used. The DHCP relay agent forwards DHCP requests to all DHCP servers.

  4. (Optional.) Set the DHCP server response timeout time for DHCP server switchover.

    dhcp relay dhcp-server timeout time

    By default, the DHCP server response timeout time is 30 seconds.

  5. (Optional.) Enable the switchback to the master DHCP server and set the delay time.

    dhcp relay master-server switch-delay delay-time

    By default, the DHCP relay agent does not switch back to the master DHCP server.

Specifying the DHCP server selecting algorithm in DHCP address pool view

  1. Enter system view.

    system-view

  2. Enter DHCP address pool view.

    dhcp server ip-pool pool-name

  3. Specify the DHCP server selecting algorithm.

    dhcp relay server-address algorithm { master-backup | polling }

    By default, the polling algorithm is used. The DHCP relay agent forwards DHCP requests to all DHCP servers.

  4. (Optional.) Set the DHCP server response timeout time for DHCP server switchover.

    dhcp-server timeout time

    By default, the DHCP server response timeout time is 30 seconds.

  5. (Optional.) Enable the switchback to the master DHCP server and set the delay time.

    master-server switch-delay delay-time

    By default, the DHCP relay agent does not switch back to the master DHCP server.