<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - systemd-networkd: Routes added before network is up fail (DHCP)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83172">83172</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>systemd-networkd: Routes added before network is up fail (DHCP)
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>freedesktop@techmunk.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have this configuration on systemd 216:

[Match]
Name=eno1

[Network]
DHCP=yes

[Route]
Gateway=192.168.0.254
Destination=192.168.68.0/24


I can't recall when this stopped working correctly, but it seems that the
routes are being added before the network is up. I'm not really in a position
to push the routes via DHCP, which would obviously be a solution to this,
though is this actually expected to work correctly?

What I'm seeing in the logs is the following:

Aug 27 14:35:27 scarecrow systemd-networkd[214]: eno1            : gained
carrier
Aug 27 14:35:27 scarecrow systemd-networkd[214]: eno1            : could not
set route: Network is unreachable
Aug 27 14:35:28 scarecrow systemd-networkd[214]: eno1            : DHCPv4
address 192.168.0.7/24

So the route is being set before the address is set.

Is this actually a bug? Or something that was not anticipated i.e. it was
assumed that routes would be sent via DHCP?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>