diff --git a/roles/common/templates/10-static-ethernet.network.j2 b/roles/common/templates/10-static-ethernet.network.j2
index 30d6b99693b8ee6fc09be3cfab947dc59c95d997..a2351104471558e0316c50f5b0e582f09277bd09 100644
--- a/roles/common/templates/10-static-ethernet.network.j2
+++ b/roles/common/templates/10-static-ethernet.network.j2
@@ -25,7 +25,7 @@ Peer={{ ipv4_gateway }}{{ ipv4_netmask}}
 Address={{ ipv6_address }}{{ ipv6_netmask }}
 {% endif %}
 
-{% if not ipv6_gateway.startswith("fe80") %}
+{% if ipv6_gateway is defined and not ipv6_gateway.startswith("fe80") %}
 [Route]
 Destination={{ ipv6_gateway }}
 {% endif %}