<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Ratan, Alexander,<br>
    <br>
    I've pushed code to improve DHCP recently which may be of value in
    this instance.<br>
    <br>
<a class="moz-txt-link-freetext" href="https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/24665">https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/24665</a><br>
<a class="moz-txt-link-freetext" href="https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/24666">https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/24666</a><br>
    <a class="moz-txt-link-freetext" href="https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/24725">https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/24725</a><br>
    <br>
    This implements a greater set of control over the DHCP from
    Redfish.  I believe I tested using DHCP, while UseNTPServers = false
    was active.  I then explicitly defined a static NTP server from one
    of the Intel chimers.  I was able to get my clock updated from the
    assigned NTP server.  Prior to this change NTP requests to the
    google chimers went unanswered, as our BMC network can't get to the
    internet.<br>
    <br>
    <div class="moz-cite-prefix">On 8/27/19 3:32 AM, Ratan Gupta wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:93b03449-207d-cf0a-a454-ac32fef4f410@linux.vnet.ibm.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 27/08/19 1:13 PM, Alexander A.
        Filippov wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:20190827074336.GA14200@bbwork.lan">
        <pre class="moz-quote-pre" wrap="">On Mon, Aug 26, 2019 at 10:23:15AM -0700, Vernon Mauery wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">This is pretty common behavior for DHCP settings.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">On Tue, Aug 27, 2019 at 11:28:36AM +0530, Ratan Gupta wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Why this is wrong,
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">Ok, ok.  I wasn't clear enough. My appologies.

I've meant that the impossibility to add a custom ntp server while dhcp is
enabled is wrong. Of course, the list of ntp servers received from DHCP-server
must be used. And I propose to move only manual settings.

I believe that it is a same stuff with DNS-servers, routes. But probably, the
BMC is not such kind of devices which is required such deep settings. One of the
possible reasons was specified by Vernon quoted below:

On Mon, Aug 26, 2019 at 10:23:15AM -0700, Vernon Mauery wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">It seems to me that if you are using static settings for your network, 
then you would also have static (or user-supplied) settings for NTP and 
DNS. But if you are using DHCP for the network, it would make sense to 
use the NTP and DNS settings supplied by the DHCP server.

Now it might also be nice to have some reasonable defaults for NTP 
servers. It is not uncommon to have IP gateways also be NTP servers, so 
it might be reasonable to attempt to use the gateway as an NTP server if 
none was specified in the DHCP response. I don't like the idea of 
setting the default NTP server to be something that is globally 
addressable because that makes the assumption that the BMC can reach 
global networks, which should not be the case.
</pre>
        </blockquote>
      </blockquote>
      <tt>I have the following suggestion</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">=> By default all the DHCP optional parameters will be set to false(i.e Don't ask the optional info from the DHCP server)
=> If users wants the DHCP provided configuration then it has to set the specific optional parameters to true(Say NTPEnabled=true).
=> User configures the Static NTP
=> Check if DHCP is enabled then look for the DHCP configuration parameters, if "NTP Enabled is true"</span></tt><tt><br>
      </tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">then user wants the NTP server from the DHCP and in that case don't allow the static configuration.</span></tt><tt><br>
      </tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">=> if DHCP is enabled but in DHCP configuration parameters "</span></tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">NTP Enabled is false</span>"</span></tt><tt><br>
      </tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">then user doesn't want the NTP server from the DHCP and allow the static configuration.</span></tt><tt><br>
      </tt><tt><br>
      </tt><tt>Link: </tt><tt><a href="https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Network/DHCPConfiguration.interface.yaml" target="_blank" rel="noopener" class="style-scope gr-linked-text" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px none; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-weight: 400; font-stretch: inherit; font-size: 13px; line-height: inherit; vertical-align: baseline; color: rgb(42, 102, 217); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" moz-do-not-send="true">https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Network/DHCPConfiguration.interface.yaml</a></tt><tt><br>
      </tt><tt><span style="color: rgb(33, 33, 33); font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"></span></tt><tt><br>
      </tt><tt>Note: It may happen that user has set DHCP Configuration
        parameters on the BMC to take the NTP server details from the</tt><tt><br>
      </tt><tt>DHCP server but have not configured the DHCP server to
        provide the NTP server, in that case</tt><tt><br>
      </tt><tt>Static NTP server configuration will not be allowed.</tt>
      <blockquote type="cite"
        cite="mid:20190827074336.GA14200@bbwork.lan">
        <pre class="moz-quote-pre" wrap="">On Tue, Aug 27, 2019 at 11:28:36AM +0530, Ratan Gupta wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap=""> * The NTP servers defined in|/etc/systemd/timesyncd.conf|will be
   appended to the per-interface list at runtime and the daemon will
   contact the servers in turn until one is found that responds.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">So, my propose is to implement this point.

Regards,
Alexander

</pre>
      </blockquote>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <font color="#1F497D"><font face="Century Gothic">Johnathan Mantey<br>
          <small>Senior Software Engineer</small><br>
          <big><font color="#555555"><small><b>azad te</b><b>chnology
                  partners</b></small><br>
              <small><font color="#1F497D"><small>Contributing to
                    Technology Innovation since 1992</small></font><small><br>
                  <font color="#1F497D">Phone: (503) 712-6764<br>
                    Email: <a href="mailto:johnathanx.mantey@intel.com">johnathanx.mantey@intel.com</a></font></small><br>
                <br>
              </small></font></big></font></font> </div>
  </body>
</html>