https://github.com/cilium/cilium
Revision 38fdd12ea39022f5684d20b253363bbdbe057928 authored by John Fastabend on 14 February 2020, 17:05:11 UTC, committed by Daniel Borkmann on 18 February 2020, 17:24:44 UTC
[ upstream commit 6ce55626e436c2831892941801143cda03c6e754 ]

Currently the tunnel device MTU will not be set. If the underlying device
is running some other mtu size this creates a case where mtu on tunnel
device is not in-sync. For example on system with 9000 mtu,

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
7: cilium_net@cilium_host: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 9001 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 56:92:81:65:04:b6 brd ff:ff:ff:ff:ff:ff
8: cilium_host@cilium_net: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 9001 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether f6:9f:7e:fd:be:4a brd ff:ff:ff:ff:ff:ff
9: cilium_vxlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether de:d3:72:2a:69:8a brd ff:ff:ff:ff:ff:ff

Or going the other way with network facing interface <1500 my GKE setup
is the following,

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 42:01:0a:8a:00:19 brd ff:ff:ff:ff:ff:ff
13: cilium_net@cilium_host: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 82:80:8c:7a:36:4a brd ff:ff:ff:ff:ff:ff
14: cilium_host@cilium_net: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ca:98:07:56:a1:2f brd ff:ff:ff:ff:ff:ff
15: cilium_vxlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 52:a7:67:e4:53:e4 brd ff:ff:ff:ff:ff:ff

Sending 1500 MTU on a 1460 interface doesn't make sense. But the routes
configured in the main table will help,

$ kubectl exec -ti -n cilium cilium-cwcbc -- ip r s
default via 10.138.0.1 dev eth0 proto dhcp src 10.138.0.25 metric 100
10.36.0.0/24 via 10.36.1.3 dev cilium_host src 10.36.1.3 mtu 1333
10.36.1.0/24 via 10.36.1.3 dev cilium_host src 10.36.1.3 mtu 1333
10.36.1.3 dev cilium_host scope link
10.138.0.1 dev eth0 proto dhcp scope link src 10.138.0.25 metric 100
169.254.123.0/24 dev docker0 proto kernel scope link src 169.254.123.1 linkdown

Still it would be best if the tunnel interface uses the same mtu size as
cilium_{host|net}.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
1 parent e01dd97
History
Tip revision: 38fdd12ea39022f5684d20b253363bbdbe057928 authored by John Fastabend on 14 February 2020, 17:05:11 UTC
cilium: set mtu on tunnel device
Tip revision: 38fdd12
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
common
contrib
daemon
envoy
examples
hack
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.dockerignore -rw-r--r-- 884 bytes
.gitignore -rw-r--r-- 818 bytes
.gitmodules -rw-r--r-- 0 bytes
.mailmap -rw-r--r-- 1.3 KB
.travis.yml -rw-r--r-- 365 bytes
.travis.yml.tmpl -rw-r--r-- 387 bytes
AUTHORS -rw-r--r-- 10.2 KB
CHANGELOG.md -rw-r--r-- 11.3 KB
CODEOWNERS -rw-r--r-- 1.3 KB
CONTRIBUTING.md -rw-r--r-- 208 bytes
Dockerfile -rw-r--r-- 2.0 KB
Dockerfile.builder -rw-r--r-- 1.7 KB
FURTHER_READINGS.rst -rw-r--r-- 4.4 KB
GO_VERSION -rw-r--r-- 7 bytes
Jenkinsfile.nightly -rw-r--r-- 5.3 KB
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.rst -rw-r--r-- 1.4 KB
Makefile -rw-r--r-- 17.6 KB
Makefile.defs -rw-r--r-- 2.5 KB
Makefile.quiet -rw-r--r-- 626 bytes
README.rst -rw-r--r-- 14.8 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 3.5 KB
VERSION -rw-r--r-- 10 bytes
Vagrantfile -rw-r--r-- 12.1 KB
cilium-docker-plugin.Dockerfile -rw-r--r-- 552 bytes
cilium-operator.Dockerfile -rw-r--r-- 705 bytes
docs.Jenkinsfile -rw-r--r-- 2.6 KB
flannel.Jenkinsfile -rw-r--r-- 4.4 KB
ginkgo-kubernetes-all.Jenkinsfile -rw-r--r-- 20.7 KB
ginkgo.Jenkinsfile -rw-r--r-- 13.3 KB
go.mod -rw-r--r-- 48.2 KB
go.sum -rw-r--r-- 67.5 KB
kubernetes-upstream.Jenkinsfile -rw-r--r-- 5.0 KB
vagrant_box_defaults.rb -rw-r--r-- 204 bytes

README.rst

back to top