From 0bdc9aac4fb8c323526073da7c086189a5904c3e Mon Sep 17 00:00:00 2001 From: Russell Adams Date: Tue, 7 Jul 2020 15:19:11 -0700 Subject: [PATCH 1/4] default mtu for eth0 --- templates/header.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/header.j2 b/templates/header.j2 index f2e4a49..f790a0a 100644 --- a/templates/header.j2 +++ b/templates/header.j2 @@ -11,4 +11,5 @@ iface lo inet loopback {% if 'eth0' not in config.interfaces|default({}) %} auto eth0 iface eth0 inet dhcp + mtu 1500 {% endif %} From 0c7df71093a4d7fcacde926984a96f9cc1f4ebd1 Mon Sep 17 00:00:00 2001 From: Russell Adams Date: Wed, 8 Jul 2020 14:53:00 -0700 Subject: [PATCH 2/4] IG-8904 updating README to reflect updated syntax on global mtu setting, and to include info regarding the etho default settings. --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6ab2bc5..f2df87d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This role employs the use of a `vars_plugin` for slave interfaces used in a bond to inherit `mstpctl` parameters from the bond interface, as well as set their `alias_name` to -_Master:_. +_Master:_. NOTE: Ansible variable precedence means if one sets one of these attributes of an interface in the host_vars, that will override the vars plugin. @@ -14,9 +14,20 @@ host_vars, that will override the vars plugin. `cumulus_ntp_servers`: List of ntp servers to use - Default: Cumulus ntp servers `cumulus_ntp_interface`: Interface to listen on for ntp - Default eth0 +## Default management interface + +This role uses the following default configuration for the dedicated management port when that port is `eth0`. Note, some Cumulus supported hardware uses `eth1` for the management interface, it is up to the user to know this and edit the default if needed. The configuration can be found in `/templates/header.j2`. The default will result in the following being put in `/etc/network/interfaces` unless `eth0` is defined elsewhere: + +``` +# The primary network interface +auto eth0 +iface eth0 inet dhcp + mtu 1500 +``` + ## Port Policies -It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json. +It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json. Note, setting this example policy will apply the MTU 9216 to _all_ ports on the switch that are not explicitly set on the interface config. Example: @@ -25,7 +36,7 @@ config: port_policy: address: defaults: - mtu: 9216 + mtu: "9216" ``` For more information, see [Setting a Policy for Global System MTU](https://docs.cumulusnetworks.com/display/DOCS/Layer+1+and+Switch+Port+Attributes#Layer1andSwitchPortAttributes-SettingaPolicyforGlobalSystemMTU) From 255b17e5a3e361e376f799885c1b3d69f0b232ad Mon Sep 17 00:00:00 2001 From: Russell Adams Date: Wed, 8 Jul 2020 14:56:29 -0700 Subject: [PATCH 3/4] IG-8904 minor minor update on wording --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2df87d..4820a53 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ iface eth0 inet dhcp ## Port Policies -It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json. Note, setting this example policy will apply the MTU 9216 to _all_ ports on the switch that are not explicitly set on the interface config. +It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json. Note, setting this example policy will apply the MTU 9216 to _all_ ports on the switch that do not have an MTU explicitly set on the interface config. Example: From 935e8fa39d3f67b2a04c6985fe97e777f300e62a Mon Sep 17 00:00:00 2001 From: Russell Date: Fri, 10 Jul 2020 09:32:27 -0700 Subject: [PATCH 4/4] Update README.md Co-authored-by: Peter Pletcher --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4820a53..ef3ed5a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ iface eth0 inet dhcp ## Port Policies It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json. Note, setting this example policy will apply the MTU 9216 to _all_ ports on the switch that do not have an MTU explicitly set on the interface config. - +NOTE: This role by default sets an MTU of 1500 on the `eth0` interface to protect against eth0 becoming inoperable if a global MTU above 1500 is set on hardware where `eth0` is not capable of going above 1500, ie Dell S3048 or Dell Z9100. If one defines this interface elsewhere via `config.interfaces` one may override the MTU to the desired size or remove it altogether. Example: ```yaml