Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750469
D3078.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3078.id.diff
View Options
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -194,6 +194,7 @@
- saas-wordpress
network:
ipv6_tunnel: False
+ ipv6_native: True
canonical_public_ipv4: 51.255.124.10
@@ -211,6 +212,10 @@
address: 51.255.124.10
netmask: 255.255.255.255
gateway: 51.210.99.254
+ ipv6:
+ address: 2001:41d0:303:d971::517e:c0de
+ gateway: 2001:41d0:303:d9ff:ff:ff:ff:ff
+ prefix: 64
ysul:
forest: nasqueron-dev
diff --git a/roles/core/network/files/FreeBSD/netif_ipv6.rc b/roles/core/network/files/FreeBSD/netif_ipv6.rc
--- a/roles/core/network/files/FreeBSD/netif_ipv6.rc
+++ b/roles/core/network/files/FreeBSD/netif_ipv6.rc
@@ -12,5 +12,8 @@
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
-
+{% if ipv6_address is defined %}
+ifconfig_{{ interface }}_ipv6="inet6 {{ ipv6_address }} prefixlen {{ ipv6_prefix }}"
+{%- else -%}
ifconfig_{{ interface }}_ipv6="inet6 accept_rtadv"
+{% endif -%}
diff --git a/roles/core/network/files/FreeBSD/routing_ipv6.rc b/roles/core/network/files/FreeBSD/routing_ipv6.rc
--- a/roles/core/network/files/FreeBSD/routing_ipv6.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv6.rc
@@ -13,4 +13,10 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if interface is defined and not salt["network_utils.can_directly_be_discovered"](ipv6_gateway, ipv6_address, ipv6_prefix) %}
+ipv6_static_routes="gw default"
+ipv6_route_gw="{{ ipv6_gateway }} -iface {{ interface }}"
+ipv6_route_default="default {{ ipv6_gateway }}"
+{%- else -%}
ipv6_defaultrouter="{{ ipv6_gateway }}"
+{% endif -%}
diff --git a/roles/core/network/ipv6.sls b/roles/core/network/ipv6.sls
--- a/roles/core/network/ipv6.sls
+++ b/roles/core/network/ipv6.sls
@@ -28,11 +28,8 @@
{% for interface_name, interface in network["interfaces"].items() %}
{% if "ipv6" in interface %}
- {% if "gateway" in interface["ipv6"] %}
- {% set ipv6_gateway = interface["ipv6"]["gateway"] %}
- {% endif %}
-
{% if grains['os'] == 'FreeBSD' %}
+
/etc/rc.conf.d/netif/ipv6_{{ interface['device'] }}:
file.managed:
- source: salt://roles/core/network/files/FreeBSD/netif_ipv6.rc
@@ -43,8 +40,21 @@
ipv6_address: {{ interface['ipv6']['address'] }}
ipv6_prefix: {{ interface['ipv6']['prefix'] | default(64) }}
has_native_ipv6: True
+
+ {% if "gateway" in interface["ipv6"] %}
+ /etc/rc.conf.d/routing/ipv6:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/routing_ipv6.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: {{ interface['device'] }}
+ ipv6_address: {{ interface['ipv6']['address'] }}
+ ipv6_prefix: {{ interface['ipv6']['prefix'] | default(64) }}
+ ipv6_gateway: {{ interface['ipv6']['gateway'] }}
{% endif %}
+ {% endif %}
{% endif %}
{% endfor %}
{% endif %}
@@ -63,7 +73,7 @@
{% endif %}
# -------------------------------------------------------------
-# Routes
+# Routes - legacy configuration for ipv6_gateway
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if "ipv6_gateway" in network %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 00:53 (1 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249969
Default Alt Text
D3078.id.diff (3 KB)
Attached To
Mode
D3078: Setup native IPv6 connectivity on web-001
Attached
Detach File
Event Timeline
Log In to Comment