-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add correct bond to network scripts * Support multiple bonds * by default python loops through the keys. so you shouldn't need to use .keys() * Only put public ip on bond0 for now
- Loading branch information
1 parent
502d376
commit a6443a6
Showing
9 changed files
with
62 additions
and
55 deletions.
There are no files selected for viewing
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
6 changes: 4 additions & 2 deletions
6
packetnetworking/distros/redhat/templates/bonded/etc_modprobe.d_bonding.conf.j2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
alias bond0 bonding | ||
options bond0 mode={{ net.bonding.mode }} miimon=100 downdelay=200 updelay=200 xmit_hash_policy=layer3+4 lacp_rate=1 | ||
{% for bond in net.bonds %} | ||
alias {{ bond }} bonding | ||
options {{ bond }} mode={{ net.bonding.mode }} miimon=100 downdelay=200 updelay=200 xmit_hash_policy=layer3+4 lacp_rate=1 | ||
{% endfor %} |
25 changes: 0 additions & 25 deletions
25
...etnetworking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_ifcfg-bond0.j2
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...networking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_ifcfg-bond0_0.j2
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...etnetworking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_ifcfg-bondX.j2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
DEVICE={bond} | ||
NAME={bond} | ||
{{% if ip4pub %}} | ||
IPADDR={{{{ ip4pub.address }}}} | ||
NETMASK={{{{ ip4pub.netmask }}}} | ||
GATEWAY={{{{ ip4pub.gateway }}}} | ||
{{% else %}} | ||
IPADDR={{{{ ip4priv.address }}}} | ||
NETMASK={{{{ ip4priv.netmask }}}} | ||
GATEWAY={{{{ ip4priv.gateway }}}} | ||
{{% endif %}} | ||
BOOTPROTO=none | ||
ONBOOT=yes | ||
USERCTL=no | ||
TYPE=Bond | ||
BONDING_OPTS="mode={{{{ net.bonding.mode }}}} miimon=100 downdelay=200 updelay=200" | ||
|
||
{{% if ip6pub %}} | ||
IPV6INIT=yes | ||
IPV6ADDR={{{{ ip6pub.address }}}}/{{{{ ip6pub.cidr }}}} | ||
IPV6_DEFAULTGW={{{{ ip6pub.gateway }}}} | ||
{{% endif %}} | ||
{{% for dns in resolvers %}} | ||
DNS{{{{ loop.index }}}}={{{{ dns }}}} | ||
{{% endfor %}} |
11 changes: 11 additions & 0 deletions
11
...networking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_ifcfg-bondX_0.j2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DEVICE={bond}:0 | ||
NAME={bond}:0 | ||
IPADDR={{{{ ip4priv.address }}}} | ||
NETMASK={{{{ ip4priv.netmask }}}} | ||
GATEWAY={{{{ ip4priv.gateway }}}} | ||
BOOTPROTO=none | ||
ONBOOT=yes | ||
USERCTL=no | ||
{{% for dns in resolvers %}} | ||
DNS{{{{ loop.index }}}}={{{{ dns }}}} | ||
{{% endfor %}} |
2 changes: 1 addition & 1 deletion
2
...etworking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_ifcfg-template.j2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
DEVICE={iface} | ||
ONBOOT=yes | ||
HWADDR={{{{ interfaces[{i}].mac }}}} | ||
MASTER=bond0 | ||
MASTER={{{{ interfaces[{i}].bond }}}} | ||
SLAVE=yes | ||
BOOTPROTO=none |
3 changes: 0 additions & 3 deletions
3
...etnetworking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_route-bond0.j2
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...etnetworking/distros/redhat/templates/bonded/etc_sysconfig_network-scripts_route-bondX.j2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{% for subnet in private_subnets %}} | ||
{{{{ subnet }}}} via {{{{ ip4priv.gateway }}}} dev {bond}:0 | ||
{{% endfor %}} |