{"id":1053,"date":"2023-11-20T11:48:20","date_gmt":"2023-11-20T09:48:20","guid":{"rendered":"https:\/\/valentijn.sessink.nl\/?p=1053"},"modified":"2023-11-20T11:48:20","modified_gmt":"2023-11-20T09:48:20","slug":"homeassistant-network-mtu","status":"publish","type":"post","link":"https:\/\/valentijn.sessink.nl\/?p=1053","title":{"rendered":"HomeAssistant network MTU"},"content":{"rendered":"\n<p>I&#8217;m running HomeAssistant on a virtual PC, HAOS and all, but I&#8217;m using a tunnel that doesn&#8217;t have a 1500 bytes ethernet MTU. How to change the MTU?<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>HomeAssistant (HA) on Home Assistant Operating System (HAOS) is a pretty slick and pretty well thought out system. The tight coupling between the domotica-part (HomeAssistant) and operating system (OS) part, HAOS, ensures that both keep running well, both are updatable from the web interface and both can be managed easily.<\/p>\n\n\n\n<p>The downside of this coupling is, that once you need specific OS settings, it isn&#8217;t always clear how to proceed. Home Assistant itself runs in a container, so you cannot change OS settings. Or can you? Turns out: yes, you can.<\/p>\n\n\n\n<p>Here is how to proceed.<\/p>\n\n\n\n<p>Connect a monitor and a keyboard to your HAOS installation. If it&#8217;s a virtual machine (like mine is), you just need to &#8220;connect&#8221; to the virtual display of the host machine. You will see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>| |  | |                          \/\\           (_)   | |            | |  \n| |__| | ___  _ __ ___   ___     \/  \\   ___ ___ _ ___| |_ __ _ _ __ | |_ \n|  __  |\/ _ \\| '_ \\ _ \\ \/ _ \\   \/ \/\\ \\ \/ __\/ __| \/ __| __\/ _\\ | '_ \\| __|\n| |  | | (_) | | | | | |  __\/  \/ ____ \\\\__ \\__ \\ \\__ \\ || (_| | | | | |_ \n|_|  |_|\\___\/|_| |_| |_|\\___| \/_\/    \\_\\___\/___\/_|___\/\\__\\__,_|_| |_|\\__|\n\nWelcome to the Home Assistant command line.\n\nSystem information\n  IPv4 addresses for enp1s0: 192.168.112.170\/24\n  IPv6 addresses for enp1s0: fe80::cf78:914d:7da6:2265\/64\n\n  OS Version:               Home Assistant OS 11.1\n  Home Assistant Core:      2023.11.2\n\n  Home Assistant URL:       \nhttp&#91;s]:\/\/......:8123\n  Observer URL:             \nhttp&#91;s]:\/\/...:4357\nha ><\/code><\/pre>\n\n\n\n<p>On this HAOS prompt, type <code>login<\/code><\/p>\n\n\n\n<p>You&#8217;ll now get a rather minimal &#8220;HAOS&#8221; Linux root prompt, just saying #. The &#8220;<code>nmcli c<\/code>&#8221; command will tell you the name of your network interface:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nmcli c\nNAME               UUID                                  TYPE      DEVICE \nSupervisor enp1s0  bf97b94b-9d4a-3728-9609-7ff76b1ae1a5  ethernet  enp1s0<\/code><\/pre>\n\n\n\n<p>The <code>Supervisor enp1s0<\/code> link is the one you are looking for. View its MTU by typing <code>nmcli con show 'Supervisor enp1s0'<\/code>, change it to 1234 by typing <code>nmcli con modify 'Supervisor enp1s0' ethernet.mtu 1234<\/code>. This change will be saved automatically by NetworkManager, but it is not active immediately.<\/p>\n\n\n\n<p>Type <code>nmcli c up 'Supervisor enp1s0'<\/code> to enable the new setting. Check the new setting with <code>ip link list dev enp1s0<\/code>, it should say something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2: enp1s0: mtu 1234 qdisc fq_codel state UP mode DEFAULT group default qlen 1000\nlink\/ether 98:fa:9b:05:16:ae brd ff:ff:ff:ff:ff:ff<\/code><\/pre>\n\n\n\n<p>To remove the new MTU, use <code>nmcli c modify 'Supervisor enp1s0' ethernet.mtu \"\"<\/code>.<\/p>\n\n\n\n<p>Finally, type &#8220;exit&#8221; to quit the shell.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m running HomeAssistant on a virtual PC, HAOS and all, but I&#8217;m using a tunnel that doesn&#8217;t have a 1500 bytes ethernet MTU. How to change the MTU?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[181,180,84,182],"class_list":["post-1053","post","type-post","status-publish","format-standard","hentry","category-happy-hacking","tag-home-assistant","tag-homeassistant","tag-mtu","tag-networking"],"_links":{"self":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1053"}],"version-history":[{"count":5,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}