Description

Customer wants to migrate dhcp subscribers from one dhcp relay agent to another.

Set "minimum-wait-time" on old device may help the migration process smoothly. This article explains how "minimum-wait-time" works on dhcp rely agent.

 

Symptoms

The configuration reference as below:

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/minimum-wait-time-edit-forwarding-options.html

 

After set minimum-wait-time to a value, for example 10 seconds as below.

#set forwarding-options dhcp-relay group dhcpv4-relay minimum-wait-time 10

 

Once device(relay agent) received dhcp message, it will check "secs" field. If this field value is smaller than minimum-wait-time 10 seconds, the dhcp message will be dropped.

 

Solution

The "secs" field is Filled in by client, it is seconds elapsed since client began address acquisition or renewal process.

The first dhcp message secs field is always "0".

 

Feb 27 11:47:51.419938 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP  from == 0.0.0.0, port == 68 ]--

Feb 27 11:47:51.419953 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP  size == 296, op == 1 ]--

Feb 27 11:47:51.419962 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP flags == 8000 ]--

Feb 27 11:47:51.419971 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP htype == 1, hlen == 6 ]--

Feb 27 11:47:51.419980 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP  hops == 0, xid == 7 ]--

Feb 27 11:47:51.419995 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP  secs == 0, flags == 8000 ]--    <<<<<"secs" filed is "0".

Feb 27 11:47:51.420012 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP ciaddr == 0.0.0.0 ]--

Feb 27 11:47:51.420029 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP yiaddr == 0.0.0.0 ]--

Feb 27 11:47:51.420059 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP siaddr == 0.0.0.0 ]--

Feb 27 11:47:51.420079 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP giaddr == 0.0.0.0 ]--

Feb 27 11:47:51.420122 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP chaddr == 00 10 94 00 00 02 00 00 00 00 00 00 00 00 00 00 ]--

Feb 27 11:47:51.420179 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP sname == ]--

Feb 27 11:47:51.420189 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ DHCP/BOOTP  file == ]--

Feb 27 11:47:51.420217 [MSTR][DEBUG][default:default][RLY][INET][xe-0/2/0.3221225483] --[ OPTION code 53, len  1, data DHCP-DISCOVER ]--

 

From dhcp relay statistics, the message is dropped by "wait time".

 

user@mx# run show dhcp relay statistics

Packets dropped:

  Total           21

  Wait time         21      <<<<The dhcp message will be dropped by "wait time"

 

This process will be applied on address acquisition and rebound process. The device will check discover/request messages's "secs" filed.

The dhcp renew process (dhcp request) has no impact by this setting.

That means even renew message(dhcp request) "secs" is "0"(smaller than minimum-wait-time), it's still be forwarded. 

 

Modification History

2024-02-27 : Article Created