Skip to content

Commit

Permalink
Merge pull request #4 from locationlabs/IG-8904-eth0-mtu
Browse files Browse the repository at this point in the history
default mtu for eth0
  • Loading branch information
russelltadams authored Jul 10, 2020
2 parents be7a1ef + 935e8fa commit e0e8f27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<bond_name>_.
_Master:<bond_name>_.

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.
Expand All @@ -14,18 +14,29 @@ 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

## Port Policies
## 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
```

It may be desirable to set a default switch-wide port configuration, such as MTU. This is simply yaml to json.
## 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
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)
Expand Down
1 change: 1 addition & 0 deletions templates/header.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ iface lo inet loopback
{% if 'eth0' not in config.interfaces|default({}) %}
auto eth0
iface eth0 inet dhcp
mtu 1500
{% endif %}

0 comments on commit e0e8f27

Please sign in to comment.