Last active
August 29, 2015 14:28
-
-
Save andrewwebber/90e44c1d92091d35a1c9 to your computer and use it in GitHub Desktop.
bonding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
users: | |
- name: core | |
passwd: $1$XMZXIbkN$WKmZMCgi5pQWXb7jSywjp1 | |
write_files: | |
- path: /tmp/reset-interfaces | |
permissions: 0700 | |
owner: root | |
content: | | |
#!/bin/bash | |
logger "Resetting network interfaces for bonding." | |
ip link set enp2s0f0 down | |
ip link set enp2s0f1 down | |
ip link set enp2s0f2 down | |
ip link set enp2s0f3 down | |
logger "Network interfaces have been reset" | |
- path: /etc/modprobe.d/bonding.conf | |
permissions: 0644 | |
owner: root | |
content: | | |
options bonding miimon=100 mode=4 lacp_rate=1 | |
- path: /etc/modules-load.d/bonding.conf | |
permissions: 0644 | |
owner: root | |
content: | | |
bonding | |
coreos: | |
units: | |
- name: systemd-networkd.service | |
command: stop | |
- name: 10-create-bond0.network | |
content: | | |
[Match] | |
Name=e* | |
[Network] | |
Bond=bond0 | |
- name: 20-setup-bond0.netdev | |
content: | | |
[NetDev] | |
Name=bond0 | |
Kind=bond | |
[Bond] | |
Mode=802.3ad | |
LACPTransmitRate=fast | |
MIIMonitorSec=1s | |
UpDelaySec=3s | |
DownDelaySec=9s | |
- name: 30-static.network | |
runtime: false | |
content: | | |
[Match] | |
Name=bond0 | |
[Network] | |
DNS=8.8.8.8 | |
Address=10.200.0.184/24 | |
Gateway=10.200.0.1 | |
DHCP=no | |
- name: reset-interfaces.service | |
command: start | |
content: | | |
[Unit] | |
Description=Setting interfaces to down and restarting networking post boot. | |
After=network-online.target | |
[Service] | |
Type=oneshot | |
ExecStart=/tmp/reset-interfaces | |
- name: systemd-networkd.service | |
command: start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment