Knowledge base: Knowledge Base > ByteBlower > Automation > Tcl
How to: Setting the DHCP/DHCPv6 parameters using the API
Posted by Admin Kayako, Last modified by Dries Decock on 03 April 2018 02:16 PM

Introduction

ByteBlower allows the user to configure different parameters of the DHCP and DHCPv6 protocol.

This guide explains what parameters exist and how they can be configured through the ByteBlower API.

Different parameter types

Retransmission policy

Both the DHCPv4 and DHCPv6 protocol have different stages, in which information is requested from the DHCP server, and an answer is expected. If the answer is not received within an acceptable time, the client must retransmit its request. The maximum number of retries,  the maximum duration, ... are all parameters described in the next section. The policy defines how the client will react on a time-out: will it wait longer, will it wait the same amount of time, ... These questions are the responsibility of the retransmission policy. Currently, the following policies are supported:

  • Fixed timing

    This type of retransmission policy will use the same time-out for each retry. It is a simple policy, which consists out of two parameters:

    • (Initial) time-out
    • Maximum retries
  • RFC suggested

    This type of retransmission policies are more advanced, and described in RFC2131 for DHCPv4 and RFC3315 for DHCPv6. Each time a request times out, the next time-out is increased. To make sure that two different clients starting at the same time are not sending each retry at the same time, a random variable is used to divert the time-out values.

    The following parameters are defined:

    • Initial time-out
    • Maximum retries
    • Maximum duration (DHCPv6)
    • Maximum time-out (DHCPv6)
  • A detailed description of these parameters is provided below.

For both DHCPv4 and DHCPv6, the following methods exist:

RetransmissionPolicy.Set.FromString

This will set the retransmission policy. The following values are supported:
  • RfcSuggested
  • FixedTiming/li>

RetransmissionPolicy.String.Get

This returns the current configured retransmission policy.

Timing parameters

The retransmission policy above already reveals the different timing parameters which exists. ByteBlower goes one step further and allows you to define each parameter in each stage of the protocol.

Meaning of the different parameters

Initial time-out

The initial time-out is the time-out value for the first attempt in each stage. If the first attempt fails, the retransmission policy will decide if a new attempt is required, and will calculate the new time-out value.

This parameter is used for both the fixed timing and RFC suggested retransmission policy.

Maximum retries

Both retransmission policies accept a maximum number of retries. When this maximum is reached, no further attempts will be tried and an error is returned.

This parameter is used for both the fixed timing and RFC suggested retransmission policy.

Maximum duration

The RFC suggested retransmission policy excepts a maximum duration parameter. This parameter defines the maximum allowed total duration of all attempts in the specified stage.

This parameter is only used by the RFC suggested retransmission policy for DHCPv6.

Maximum time-out

This parameter defines an absolute maximum value for the calculated time-out.

This parameter is only used by the RFC suggested retransmission policy for DHCPv6.

DHCPv4 parameters

DHCPv4 has the following configurable stages in ByteBlower:

  • Discover stage
  • Request stage

For each of these stages, you can set the initial time-out and the maximum retries, as shown below:

Discover.InitialTimeout.Set and Discover.InitialTimeout.Get

With these two methods, you can set the value or get the current configured value for the time-out value during the DHCPv4 solicit stage.

  • Units
    By default, the unit is nanosecond, but with the set command, you can provide the unit.
    E.g. Discover.InitialTimeout.Set 2 s
  • Default value: 1 s
  • Valid range: 1 - 4,294,967,295

Discover.MaxRetries.Set and Discover.MaxRetries.Get

These methods can be used the Set or Get the maximum number of retries in the discover stage.

  • Default value: 5
  • Valid range: 1 - 4,294,967,295
  • Request.InitialTimeout.Set and Request.InitialTimeout.Get

    With these two methods, you can set the value or get the current configured value for the time-out value during the DHCPv4 solicit stage.

    • Units
      By default, the unit is nanosecond, but with the set command, you can provide the unit.
      E.g. Discover.InitialTimeout.Set 2 s
    • Default value: 1s
    • Valid range: 1 - 4,294,967,295

    Request.MaxRetries.Set and Request.MaxRetries.Get

    These methods can be used the Set or Get the maximum number of retries in the request stage.

  • Default value: 5
  • Valid range: 1 - 4,294,967,295
  • DHCPv6 parameters

    For DHCPv6, you can configure the parameters for the following stages:

    • Solicit stage
    • Request stage
    • Confirm stage
    • Renew stage
    • Inform stage

    For each stage, the values can be get and set using the following methods:

    <<StageName>>.InitialTimeout.Set and <<StageName>>.InitialTimeout.Get

    For each stage, the initial time-out can be set using these methods.

    • Units
      By default, the unit is nanosecond, but with the set command, you can provide the unit.
      E.g. Solicit.InitialTimeout.Set 2 s
    • Default value:
      • Solicit: 1 s
      • Request: 1 s
      • Confirm: 1 s
      • Renew: 1 s
      • Inform: 1 s
    • Valid range: 1 - 4,294,967,295 nanoseconds

    <<StageName>>.MaxTimeout.Set and <<StageName>>.MaxTimeout.Get

    For each stage, the maximum time-out can be set using these methods.

    • Units
      By default, the unit is nanosecond, but with the set command, you can provide the unit.
      E.g. Solicit.MaximumTimeout.Set 2 s
    • Default value:
      • Solicit: 120 s
      • Request: 30 s
      • Confirm: 4 s
      • Renew: 600 s
      • Inform: 120 s
    • Valid range: 1 - 4,294,967,295 nanoseconds

    <<StageName>>.MaxRetries.Set and <<StageName>>.MaxRetries.Get

    For each stage, the maximum number of retries can be set and get using these methods.

    • Default value:
      • Solicit: 65535
      • Request: 100
      • Confirm: 65535
      • Renew: 65535
      • Inform: 65535
    • Valid range: 1 - 4,294,967,295

    <<StageName>>.MaxDuration.Set and <<StageName>>.MaxDuration.Get

    For each stage, the maximum duration can be set and get using these methods.

    • Units
      By default, the unit is nanosecond, but with the set command, you can provide the unit.
      E.g. Solicit.MaximumDuration.Set 30 s
    • Default value:
      • Solicit: 30 s
      • Request: 30 s
      • Confirm: 10 s
      • Renew: 65535 s
      • Inform: 65535 s
    • Valid range: 1 - 4,294,967,295 nanoseconds
    (0 vote(s))
    Helpful
    Not helpful

    Comments (0)

    We to help you!