VMware Cloud Community
JagWireZ
Contributor
Contributor
Jump to solution

Change MTU in VCSA 6.5

I need to lower the MTU for eth0 in the vCenter Server Appliance. This will be a persistent configuration. What is the proper way to do that for 6.5?

1 Solution

Accepted Solutions
JagWireZ
Contributor
Contributor
Jump to solution

Found the correct answer. I appreciate the above reply, but the "ip link" command only applies to the running configuration and is not persistent. So this command needs to be set during boot.

The instructions below were derived from https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#creating-a-startup-service:

  1. Login to the vCenter bash shell prompt.
  2. Type the following to create a new service that will set the MTU. (Replace 1460 with correct MTU size.)
    • cat << EOF >> /lib/systemd/system/eth0.service

      [Unit] Description=Network interface initialization
      After=local-fs.target network-online.target network.target
      Wants=local-fs.target network-online.target network.target

      [Service] ExecStart=/usr/sbin/ip link set dev eth0 mtu 1460
      Type=oneshot

      [Install]
      WantedBy=multi-user.target
      EOF
  3. Type the following to set the service to start at boot:
    • cd /lib/systemd/system/multi-user.target.wants/
    • ln -s ../eth0.service eth0.service
  4. Reboot vCenter Server to confirm the changes persist.

View solution in original post

0 Kudos
4 Replies
Camero
VMware Employee
VMware Employee
Jump to solution

please refer to the following KB: Troubleshooting Tools for Networking on vCenter Server Appliance 6.5 (2147148) | VMware KB

Photon OS Command
ip addr
ss
ip route
ip maddr
ip link set eth0 up 
ip -s neigh
ip link set eth0 mtu 9000
0 Kudos
JagWireZ
Contributor
Contributor
Jump to solution

Found the correct answer. I appreciate the above reply, but the "ip link" command only applies to the running configuration and is not persistent. So this command needs to be set during boot.

The instructions below were derived from https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#creating-a-startup-service:

  1. Login to the vCenter bash shell prompt.
  2. Type the following to create a new service that will set the MTU. (Replace 1460 with correct MTU size.)
    • cat << EOF >> /lib/systemd/system/eth0.service

      [Unit] Description=Network interface initialization
      After=local-fs.target network-online.target network.target
      Wants=local-fs.target network-online.target network.target

      [Service] ExecStart=/usr/sbin/ip link set dev eth0 mtu 1460
      Type=oneshot

      [Install]
      WantedBy=multi-user.target
      EOF
  3. Type the following to set the service to start at boot:
    • cd /lib/systemd/system/multi-user.target.wants/
    • ln -s ../eth0.service eth0.service
  4. Reboot vCenter Server to confirm the changes persist.
0 Kudos
dustinn3
Contributor
Contributor
Jump to solution

I wasn't able to get that to work but this did the trick

vi /etc/systemd/network/10-eth0.network

Add

[Link]

MTUBytes=1450

https://www.freedesktop.org/software/systemd/man/systemd.link.html

JudgementDay
Enthusiast
Enthusiast
Jump to solution

Format of the file was incorrect. Got this working with below:

Login to the vCenter bash shell prompt.

Type the following to create a new service that will set the MTU. (Replace 1460 with correct MTU size.)

cat << EOF >> /lib/systemd/system/eth0.service
[Unit]
Description=Network interface initialization
After=local-fs.target network-online.target network.target
Wants=local-fs.target network-online.target network.target

[Service]
ExecStart=/usr/sbin/ip link set dev eth0 mtu 1460
Type=oneshot

[Install]
WantedBy=multi-user.target
EOF

Type the following to set the service to start at boot:

cd /lib/systemd/system/multi-user.target.wants/
ln -s ../eth0.service eth0.service

Reboot vCenter Server to confirm the changes persist.

0 Kudos