set MTU in different network confs
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
2f9ec8103e
commit
f4ae168f5a
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- New documentation for development environment (Vagrant)
|
||||
- Ability to duplicate an image with `wwctl container copy` or the API
|
||||
- New documentation for container duplication procedure
|
||||
- Configure network device MTU in nework configuration scripts. #807
|
||||
|
||||
### Fixed
|
||||
- Fix hard CPU architecture on proto's installation in the Makefile
|
||||
|
||||
@@ -20,12 +20,18 @@ autoconnect=true
|
||||
{{ if eq $netdev.Type "ethernet" -}}
|
||||
[ethernet]
|
||||
mac-address={{ $netdev.Hwaddr }}
|
||||
{{ if $netdev.MTU -}}
|
||||
mtu={{ $netdev.MTU }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq $netdev.Type "infiniband" -}}
|
||||
[infiniband]
|
||||
transport-mode=datagram
|
||||
{{ if $netdev.MTU -}}
|
||||
mtu={{ $netdev.MTU }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if $netdev.IpCIDR -}}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
auto {{.NetDevs.default.Device}}
|
||||
allow-hotplug {{.NetDevs.default.Device}}
|
||||
iface {{.NetDevs.default.Device}} inet static
|
||||
address {{.NetDevs.default.Ipaddr}}
|
||||
netmask {{.NetDevs.default.Netmask}}
|
||||
gateway {{.NetDevs.default.Gateway}}
|
||||
up ifmetric {{.NetDevs.default.Device}} 30
|
||||
{{- $host := .BuildHost }}
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{range $devname, $netdev := .NetDevs -}}
|
||||
{{- $filename := print $devname }}
|
||||
{{- file $filename }}
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{ $host }}
|
||||
# Time: {{ $time }}
|
||||
# Source: {{ $source }}
|
||||
auto {{$netdev.Device}}
|
||||
allow-hotplug {{$netdev.Device}}
|
||||
iface {{$netdev.Device}} inet static
|
||||
address {{$netdev.Ipaddr}}
|
||||
netmask {{$netdev.Netmask}}
|
||||
gateway {{$netdev.Gateway}}
|
||||
mtu {{$netdev.MTU}}
|
||||
up ifmetric {{$netdev.Device}} 30
|
||||
{{- end}}
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
TYPE={{ $netdev.Type }}
|
||||
DEVICE={{ $netdev.Device }}
|
||||
NAME={{ $devname }}
|
||||
{{ if $netdev.MTU -}}
|
||||
MTU={{ $netdev.MTU }}
|
||||
{{ end -}}
|
||||
BOOTPROTO=static
|
||||
DEVTIMEOUT=10
|
||||
IPADDR={{ $netdev.Ipaddr }}
|
||||
|
||||
@@ -15,6 +15,9 @@ Source: {{ $source }}
|
||||
{{ if $netdev.Type -}}
|
||||
<link-type>{{ $netdev.Type }}</link-type>
|
||||
{{ end -}}
|
||||
{{ if $netdev.MTU -}}
|
||||
<mtu>{{ $netdev.MTU }}</mtu>
|
||||
{{ end -}}
|
||||
<control>
|
||||
<mode>boot</mode>
|
||||
</control>
|
||||
|
||||
Reference in New Issue
Block a user