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
|
|
IntroductionByteBlower 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 typesRetransmission policyBoth 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:
A detailed description of these parameters is provided below. For both DHCPv4 and DHCPv6, the following methods exist: RetransmissionPolicy.Set.FromStringThis will set the retransmission policy. The following values are supported:
RetransmissionPolicy.String.GetThis returns the current configured retransmission policy. Timing parametersThe 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 parametersInitial time-outThe 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 retriesBoth 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 durationThe 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-outThis 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 parametersDHCPv4 has the following configurable stages in ByteBlower:
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.GetWith these two methods, you can set the value or get the current configured value for the time-out value during the DHCPv4 solicit stage.
Discover.MaxRetries.Set and Discover.MaxRetries.GetThese methods can be used the Set or Get the maximum number of retries in the discover stage. Request.InitialTimeout.Set and Request.InitialTimeout.GetWith these two methods, you can set the value or get the current configured value for the time-out value during the DHCPv4 solicit stage.
Request.MaxRetries.Set and Request.MaxRetries.GetThese methods can be used the Set or Get the maximum number of retries in the request stage. DHCPv6 parametersFor DHCPv6, you can configure the parameters for the following stages:
For each stage, the values can be get and set using the following methods: <<StageName>>.InitialTimeout.Set and <<StageName>>.InitialTimeout.GetFor each stage, the initial time-out can be set using these methods.
<<StageName>>.MaxTimeout.Set and <<StageName>>.MaxTimeout.GetFor each stage, the maximum time-out can be set using these methods.
<<StageName>>.MaxRetries.Set and <<StageName>>.MaxRetries.GetFor each stage, the maximum number of retries can be set and get using these methods.
<<StageName>>.MaxDuration.Set and <<StageName>>.MaxDuration.GetFor each stage, the maximum duration can be set and get using these methods.
| |
|