{"id":188,"date":"2020-06-05T00:37:45","date_gmt":"2020-06-04T23:37:45","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=188"},"modified":"2020-07-20T12:29:51","modified_gmt":"2020-07-20T11:29:51","slug":"docker-mtu-docker-tcpdump","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2020\/06\/05\/docker-mtu-docker-tcpdump\/","title":{"rendered":"Docker MTU + Docker tcpdump"},"content":{"rendered":"\n<p>I am troubleshooting an issue in a docker setup with some Arista cEOS where I can&#8217;t ping inside a VRF. First I though it was  a MTU issue as when you use MPLS, there is an extra tag in the L2 frame.<\/p>\n\n\n\n<p>&#8230;But my pings weren&#8217;t that big.<\/p>\n\n\n\n<p>Still wanted to increase the MTU because that&#8217;s the expected thing to do in your WAN links if you run MPLS and want your users in different VRFs to be able to use the full 1500 bytes.<\/p>\n\n\n\n<p>After some searching, It seems you can change the default value using the config file as per this <a href=\"http:\/\/atodorov.org\/blog\/2017\/12\/08\/how-to-configure-mtu-for-the-docker-network\/\">link<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ip link show docker0\n9: docker0: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default\nlink\/ether 02:42:be:73:8c:d3 brd ff:ff:ff:ff:ff:ff\n$ cat \/etc\/docker\/daemon.json\n{\n\"data-root\": \"\/home\/somebody\/storage\/docker\",\n\"mtu\": 1600\n}\n$ sudo service docker restart\n..\n$ ip link show docker0\n9: docker0: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default\nlink\/ether 02:42:fb:c0:cf:a2 brd ff:ff:ff:ff:ff:ff<\/pre>\n\n\n\n<p>And restart docker. But still had mtu 1500. Checking another <a href=\"https:\/\/github.com\/moby\/moby\/issues\/26382\">link<\/a> it seems I actually need to create a container so the bridge come up with the new value<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ docker run -d busybox top\n...\n9: docker0: mtu 1600 qdisc noqueue state UP mode DEFAULT group default\nlink\/ether 02:42:fb:c0:cf:a2 brd ff:ff:ff:ff:ff:ff\n<\/pre>\n\n\n\n<p>Funny thing, once I started my lab again (using docker-topo) still got MTU 1500!!!  <\/p>\n\n\n\n<p>Will have to dig a bit why docker-topo doesnt take the docker mtu 1600 from the config file.<\/p>\n\n\n\n<p><strong>Solution<\/strong>: docker-topo is creating <a href=\"https:\/\/docs.docker.com\/network\/bridge\/\">user-defined bridges<\/a>, so it needs to be told that the mtu is different. The &#8220;mtu:1600&#8221; in the docker config it is only for the default bridge so when you start the busybox, it is attached to the default bridge and you see 1600.<\/p>\n\n\n\n<p>The other thing I was curious was if I could tcpdump the networks created by docker.<\/p>\n\n\n\n<p>Yes, you can!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># docker network ls\n\n# ifconfig \n\n# tcpdump -i br-xxxx <\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am troubleshooting an issue in a docker setup with some Arista cEOS where I can&#8217;t ping inside a VRF. First I though it was a MTU issue as when you use MPLS, there is an extra tag in the L2 frame. &#8230;But my pings weren&#8217;t that big. Still wanted to increase the MTU because &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2020\/06\/05\/docker-mtu-docker-tcpdump\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Docker MTU + Docker tcpdump&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2],"tags":[],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-unix","category-networks"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":3,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/188\/revisions\/314"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}