Description

Prior to Apstra release 4.1.1, the Apstra Junos reference design implemented a stateful DHCP relay. However, stateful DHCP relay is not supported by Juniper for EVPN-VXLAN-based data center Edge-routed bridging (ERB) fabrics. 

To work around this issue, Juniper Apstra 4.0 and 4.1.0 users must configure Juniper Apstra configlets, which modify the implementation of the DHCP relay in the current Apstra Juniper Junos reference design. This article lists the steps to work around the issue.

Since Apstra 4.1.1, Apstra automatically renders the DHCP `forward-only` command (i.e., stateless DHCP relay) for non-default VRF.
 

Symptoms

EVPN and stateful DHCP cannot coexist on the QFX platform as per design. In stateful DHCP, for every IP-binding, an access-internal route gets created. This access-internal route programs the ARP in the kernel.

In the EVPN-VXLAN environment, the MAC-IP route also programs the ARP in the kernel. Now if the access-internal route gets deleted (due to loss of DHCP binding), it deletes the ARP in the kernel. But the EVPN/L2ALD can still have a MAC-IP route and therefore, the system will go out-of-sync.

As a result, the "stateful" mode can cause a mismatch in the DHCP-binding-based ARP entries and the ARP entries in EVPN.

Solution

 

Apstra Configlet Changing DHCP Relay From Stateful to Stateless (for Apstra 4.1.0 and prior release only)

If Juniper Apstra 4.0 and 4.1.0 users are using DHCP relay in a blueprint with any device running Junos OS, these users must use a Juniper Apstra configlet, which will modify the stateful DHCP relay configuration rendered by Juniper Apstra to a stateless configuration by adding "forward-only" to any Juniper Apstra routing zone (VRF) that is configured with the DHCP server.

From Design > Configlets, create a Junos SYSTEM configlet with the following Template Text.

{% for vrf in dhcp_servers %}
 {% if (dhcp_servers[vrf].get('dhcp_servers') or
dhcp_servers[vrf].get('dhcpv6_servers')) %}
   {% if vrf != 'default' %}
routing-instances {
   {{ vrf }} {
   {% endif %}
       forwarding-options {
           dhcp-relay {
               {% if dhcp_servers[vrf].get('dhcp_servers') %}
               forward-only;
               {% endif %}
               {% if dhcp_servers[vrf].get('dhcpv6_servers') %}
               dhcpv6 {
                   forward-only;
               }
{% endif %} }
       }
   {% if vrf != 'default' %}
   }
}
   {% endif %}
 {% endif %}
{% endfor %}

From your blueprint > Staged > Catalog > Configlets, import the configlet and set the scope for leafs by using DHCP relay.

 

DHCP Relay Limitations on Juniper QFX10000 Devices and Any Junos-EVO Devices.

Juniper does not support having DHCP clients on QFX10000 devices (for example QFX10002) and also Any Junos-EVO devices that are being used as border-leafs in an EVPN-VXLAN-based data center Edge-routed bridging (ERB) fabric.

From Design > Configlets, create a Junos SYSTEM configlet with the following Template Text. Note that this Jinja-based configlet will disable the DHCP relay based configuration on the QFX10k devices that are used as border leafs and comply with Juniper-qualified network designs for DHCP relay on EVPN.

{% for vrf in dhcp_servers %}
  {% if (dhcp_servers[vrf].get('dhcp_servers') or
dhcp_servers[vrf].get('dhcpv6_servers')) %}
    {% if vrf != 'default' %}
routing-instances {
   {{ vrf }} {
    {% endif %}
       forwarding-options {
           delete: dhcp-relay;
       }
    {% if vrf != 'default' %}
   }
}
{% endfor %}

From your blueprint > Staged > Catalog > Configlets, import the configlet and set the scope for the Juniper QFX10000 devices and also any Junos-EVO devices that are acting as border-leafs. For more information, see Import Configlet.

Note: Note that users will need to "re-import" the configlet if they add or delete routing zones. In case the configlet is not "re-imported" on adding or deleting the routing zone, DHCP on the devices running Junos OS will remain in a stateful state, which is not supported with EVPN.

Modification History

2022-07-05: Added Jinja Configlet Templates to be used in Apstra to make DHCP Relay stateless from stateful

2025-08-14: Added "Any Junos-EVO Devices" which has the same limitation when the devices are used as Border Leaf.