How to configure networking with Netplan on Ubuntu

I have some Ubuntu 14.04 machines running in an Amazon VPC. When they start, they have an MTU of 9001, but this appears to cause some problems when communicating with other servers which have an MTU of 1500. When I use ip link set dev eth0 mtu 1500 these problems go away. The problem is I can't seem to hit upon the correct way to make this I am triyng to set an MTU of 9000 on my NICs but I don't seem to be able to get netplan to set them. If I manually do it with "sudo ip link set ens160 mtu 9000" then everything is fine and it works, but obviously doesn't stick after a reboot. The MTU in simple terms is the maximum size of a packet that can be sent on a Network Interface card. The default MTU size is 1500 bytes. To dynamically change the MTU in real time while the server is in use, redhatlinux# ip link set dev eth0 mtu 1350. where eth0 is the Ethernet interface and 1350 is the mtu size (1350 bytes) Take that value and add 28 to the value to account for the various TCP/IP headers. Eg. let's say that 1452 was the proper packet size (where you first got an ICMP reply to your ping). The actual MTU size would be 1480, which is the optimum for the network we're working with. You can read more about MTU in the respective Wikipedia article.

Feb 04, 2015

Download Ubuntu desktop, Ubuntu Server, Ubuntu for Raspberry Pi and IoT devices, Ubuntu Core and all the Ubuntu flavours. Ubuntu is an open-source software platform that runs everywhere from the PC to the server and the cloud. Linux MTU Change Size - nixCraft

Install ubuntu 7 server | Linux.org

Alternative method: ip addr | grep mtu For example: ip addr | grep mtu 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 2: enp0s31f6: mtu 1300 qdisc fq_codel state UP group default qlen 1000 3: wlp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 4: veth0@if5: