OpenShift 4 with Jumbo frames in the installation stage

why Jumbo Frames

About Jumbo Frames

Restriction

In OpenShift

Manifests

Start the installation

$ mkdir ~/install/
$ openshift-install create manifests --dir=./

Physical Interfaces

$ mkdir /tmp/mtu
$ cd /tmp/mtu
$ echo '#!/bin/shMTU=9000ifaces=$(ip -br addr show | grep -i up | grep -v veth | awk '{print $1}')for iface in ${ifaces}; do 
ip link set ${iface} mtu ${MTU}
done' > 30-mtu
$ cat 30-mtu | base64 -w0
IyEvYm.........................fQpkb25lCg==
$ cd ~/install/openshift
$ cat > 10-workers-jumbo-frames.yaml << EOF
kind: MachineConfig
apiVersion: machineconfiguration.openshift.io/v1
metadata:
name: 10-worker-mtu
creationTimestamp:
labels:
machineconfiguration.openshift.io/role: worker
spec:
osImageURL: ''
config:
ignition:
version: 3.2.0
storage:
files:
- filesystem: root
path: "/etc/NetworkManager/dispatcher.d/30-mtu"
contents:
source: data:text/plain;charset=utf-8;base64,$(cat /tmp/mtu/30-mtu | base64 -w0)
verification: {}
mode: 0755
systemd:
units:
- contents: |
[Unit]
Requires=systemd-udevd.target
After=systemd-udevd.target
Before=NetworkManager.service
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/sbin/restorecon /etc/NetworkManager/dispatcher.d/30-mtu
[Install]
WantedBy=multi-user.target
name: one-shot-mtu.service
enabled: true
EOF
$ cat > 10-masters-jumbo-frames.yaml << EOF
kind: MachineConfig
apiVersion: machineconfiguration.openshift.io/v1
metadata:
name: 10-master-mtu
creationTimestamp:
labels:
machineconfiguration.openshift.io/role: master
spec:
osImageURL: ''
config:
ignition:
version: 3.2.0
storage:
files:
- filesystem: root
path: "/etc/NetworkManager/dispatcher.d/30-mtu"
contents:
source: data:text/plain;charset=utf-8;base64,$(cat /tmp/mtu/30-mtu | base64 -w0)
verification: {}
mode: 0755
systemd:
units:
- contents: |
[Unit]
Requires=systemd-udevd.target
After=systemd-udevd.target
Before=NetworkManager.service
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/sbin/restorecon /etc/NetworkManager/dispatcher.d/30-mtu
[Install]
WantedBy=multi-user.target
name: one-shot-mtu.service
enabled: true
EOF

SDN MTU

$ echo $((9000-192))
8808
$ cd ../manifests
$ vi cluster-network-02-config.yml
apiVersion: config.openshift.io/v1
kind: Network
metadata:
creationTimestamp: null
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/13
hostPrefix: 23
externalIP:
policy: {}
networkType: OpenShiftSDN
serviceNetwork:
- 172.30.0.0/16
status: {}
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: NetworkPolicy
mtu: 8808
vxlanPort: 4789
apiVersion: config.openshift.io/v1
kind: Network
metadata:
creationTimestamp: null
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/13
hostPrefix: 23
externalIP:
policy: {}
networkType: OpenShiftSDN
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: NetworkPolicy
mtu: 8808
vxlanPort: 4789

--

--

Open Source contributer for the past 15 years

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store