blob: 5dc08d30f638de75d344a5def9c2727e2a52c1a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#cloud-config
bootcmd:
- /usr/sbin/ifdown eth0
- /usr/sbin/ifup eth0
- /usr/sbin/ifdown eth1
- ip link set dev eth0 mtu 1300
- ip link set dev eth1 mtu 1300
- /usr/sbin/ifup eth1
- ip link set dev eth0 mtu 1300
- ip link set dev eth1 mtu 1300
- setenforce 0
- /sbin/sysctl -w net.ipv6.conf.all.forwarding=1
- /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra=2
- /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=1
- /sbin/sysctl -w net.ipv6.conf.eth0.router_solicitations=1
packages:
- radvd
runcmd:
- /usr/sbin/ifdown eth1
- /usr/sbin/ifup eth1
- ip link set dev eth0 mtu 1300
- ip link set dev eth1 mtu 1300
- /usr/bin/systemctl disable NetworkManager
- /usr/bin/systemctl start radvd
- echo 'complete' >> /tmp/cloud-config.log
write_files:
- content: |
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERROUTES="yes"
IPV6_PEERDNS="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
path: /etc/sysconfig/network-scripts/ifcfg-eth0
permissions: '0755'
owner: root:root
- content: |
TYPE="Ethernet"
BOOTPROTO=static
IPV6INIT=yes
IPV6ADDR="2001:db8:0:2::1/64"
NAME=eth1
DEVICE=eth1
ONBOOT=yes
NM_CONTROLLED=no
path: /etc/sysconfig/network-scripts/ifcfg-eth1
permissions: '0755'
owner: root:root
- content: |
interface eth1
{
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvHomeAgentFlag off;
AdvManagedFlag on;
AdvOtherConfigFlag on;
prefix 2001:db8:0:2::/64
{
AdvOnLink on;
### On link tells the host that the default router is on the same "link" as it is
AdvAutonomous on;
AdvRouterAddr off;
};
};
path: /etc/radvd.conf
permissions: '0644'
owner: root:root
- content: |
IPV6FORWARDING=yes
path: /etc/sysconfig/network
permissions: '0644'
owner: root:root
|