<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    I think I understand most of your plan.<br>
    <br>
    What does it mean to "use the default metric"?<br>
    <br>
    <div class="moz-cite-prefix">On 4/28/20 8:16 AM, Ratan Gupta wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1f8f6dd4-c62e-7165-c1ba-7466e407d594@linux.vnet.ibm.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi Jonathan,</p>
      <div class="moz-cite-prefix">On 4/28/20 1:00 AM, Johnathan Mantey
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:7c9a2b08-1224-9828-9175-41566532602a@intel.com">
        Ratan,<br>
        <br>
        Can you provide more info about how you plan to implement this?<br>
      </blockquote>
      I am not getting, Do you mean to say how to get the per interface
      gateway from system?  that would be through netlink, and during
      configuration we would use the systemd-networkd file
      configuration.<br>
      <blockquote type="cite"
        cite="mid:7c9a2b08-1224-9828-9175-41566532602a@intel.com"> <br>
        The Redfish schemas already have a per IP addr Gateway entry,
        which OBMC is ignoring. Is it better to modify the existing
        D-Bus schema (i.e. versioning discussion), or just use what is
        presently in existence?<br>
      </blockquote>
      Redfish schema are getting changed to accommodate this through the
      following issue <a class="moz-txt-link-freetext"
        href="https://github.com/DMTF/Redfish/issues/3609"
        moz-do-not-send="true">https://github.com/DMTF/Redfish/issues/3609</a>.<br>
      <p>The above issue(gateway/interface) exist only for the IPv4
        redfish schema, IPv6 redfish is already having default gateway
        per interface <br>
      </p>
      <p><a class="moz-txt-link-freetext"
href="http://redfish.dmtf.org/schemas/v1/EthernetInterface.v1_5_1.json#/definitions/EthernetInterface"
          moz-do-not-send="true">http://redfish.dmtf.org/schemas/v1/EthernetInterface.v1_5_1.json#/definitions/EthernetInterface</a><br>
      </p>
      <blockquote type="cite"
        cite="mid:7c9a2b08-1224-9828-9175-41566532602a@intel.com"> <br>
        That said, doing as you propose melds better with how IPMI (i.e
        Set LAN Configuration Parameter 12) works.<br>
        <br>
        As Patrick pointed out, there's no IPMI or Redfish control over
        the routing metric parameter. What are your thoughts on how to
        reconcile applying a metric value?<br>
      </blockquote>
      We will go with default metric value as today as underlying stack
      tries for fallback gateway.
      <blockquote type="cite"
        cite="mid:7c9a2b08-1224-9828-9175-41566532602a@intel.com"> I've
        long been desirous of getting Williams submission merged: <a
          class="moz-txt-link-freetext"
href="https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/20799"
          moz-do-not-send="true">https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/20799</a><br>
        as it can be used to improve the collection of netlink stats.<br>
        <br>
        Redfish exacerbates this whole problem by allowing a collection
        of static IP addresses (and a DHCP addr) per NIC, unlike IPMI
        which was very one to one with IP addr/NIC. <br>
        <br>
        Thanks for investigating this and working to implement a
        solution.<br>
        <br>
        <div class="moz-cite-prefix">On 4/27/20 4:11 AM, Ratan Gupta
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:32f161d2-784e-8fe5-a00b-e9bec181a265@linux.vnet.ibm.com">
          <p>Thanks Patrick, William for sharing the feedbacks<br>
          </p>
          <p>I will start working on the changes.<br>
          </p>
          <p><br>
          </p>
          <div class="moz-cite-prefix">On 4/24/20 11:15 PM, William
            Kennington wrote:<br>
          </div>
          <blockquote type="cite"
cite="mid:CAPnigKkaj5aU-3KXKsL_LxAdZg2pccXiQz0bPPb+h8RToBzotg@mail.gmail.com">
            <div dir="ltr">Sounds good to me, we have needed this for a
              long time because the current gateway configuration breaks
              our v6 stack with multiple NICs.<br>
            </div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Fri, Apr 24, 2020 at
                8:21 AM Patrick Williams <<a
                  href="mailto:patrick@stwcx.xyz" moz-do-not-send="true">patrick@stwcx.xyz</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">On Fri, Apr 24, 2020
                at 08:36:26PM +0530, Ratan Gupta wrote:<br>
                > ~~~~~~~~~~~~~<br>
                > Kernel IP routing table<br>
                > Destination     Gateway         Genmask        
                Flags   MSS Window  irtt <br>
                > Iface<br>
                > 0.0.0.0         19.168.2.1      0.0.0.0        
                UG        0 0          0 <br>
                > eth0<br>
                > 0.0.0.0         10.10.10.1      0.0.0.0        
                UG        0 0          0 <br>
                > eth1<br>
                > ~~~~~~~~~~~~~~<br>
                > <br>
                > Kernel will first try using the default gateway
                having higher metric <br>
                > value and then fall back to the lower.<br>
                <br>
                I'm not seeing us with an interface to adjust the metric
                for an<br>
                interface.  I think we need to add that at the same
                time?</blockquote>
            </div>
          </blockquote>
          <p>Not now, As per my testing if metric value is not defined
            and both the routes</p>
          <p>having same metric then kernel tries one after other. We
            can bring the metric</p>
          <p>later.<br>
          </p>
          <blockquote type="cite"
cite="mid:CAPnigKkaj5aU-3KXKsL_LxAdZg2pccXiQz0bPPb+h8RToBzotg@mail.gmail.com">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">  Otherwise, I<br>
                don't think we have a way to specify which interface
                outside-the-subnet<br>
                should go (vs today we can set the default-gateway to
                the desired<br>
                interface's gateway).<br>
                -- <br>
                Patrick Williams<br>
              </blockquote>
            </div>
          </blockquote>
        </blockquote>
        <br>
        <div class="moz-signature">-- <br>
          <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"
                          moz-do-not-send="true">johnathanx.mantey@intel.com</a></font></small><br>
                  </small></font></big></font></font></div>
      </blockquote>
      <p><font color="#1F497D"><font face="Century Gothic">Ratan</font></font></p>
    </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>