Skip to content

Commit a8f60ea

Browse files
authored
Fix DHCPv6 client on Ubuntu/Netplan, enable IPv6 LLA on Linux (#2616)
* IPv6 LLA already worked with non-Ubuntu interface config (because it's shared with FRR) * Added 'link-local' attribute to Netplan interface config for LLA interfaces on Ubuntu * Added 'accept-ra' attribute to DHCPv6-enabled interfaces to ensure the DHCPv6 client is started if the RA contains "*-config" flag * Added another 'netplan apply' to Ubuntu DHCP configuration script. Like with kids, it looks like you have to tell 'netplan' twice what it should do, and then hope for the best.
1 parent 9aac9ca commit a8f60ea

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

netsim/ansible/templates/dhcp/linux.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# This is a placeholder file. DHCP is configured during initial configuration
22
#
33
if [ `grep 'ID=ubuntu' /etc/os-release` ]; then
4-
echo "DHCP is supported"
4+
echo "DHCP is supported, it should work after another plea to netplan"
5+
netplan apply
56
else
67
echo "netlab supports DHCP only on Ubuntu" >&2
78
exit 1

netsim/ansible/templates/initial/linux/ubuntu.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ network:
148148
{% endif %}
149149
{% if l.dhcp.client.ipv6|default(False) %}
150150
dhcp6: true
151+
accept-ra: true
152+
{% endif %}
153+
{% if l.ipv6|default(false) is true %}
154+
link-local: [ ipv6 ]
151155
{% endif %}
152156
{% for af in ('ipv4','ipv6') if af in l and l[af] is string %}
153157
{% if loop.first %}

netsim/devices/linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ features:
1313
ipv4:
1414
unnumbered: peer
1515
ipv6:
16+
lla: true
1617
use_ra: true
1718
roles: [ host ]
1819
libvirt:

0 commit comments

Comments
 (0)