Lines Matching full:mtu

4 # Check that route PMTU values match expectations, and that initial device MTU
20 # decrease and increase the MTU of the local link for one of the paths,
41 # set a MTU lower than the VXLAN MTU and the MTU on the link between A and
42 # R1. Send IPv4 packets, exceeding the MTU between R1 and B, over VXLAN
75 # MTU on the B-R1 link is lower than other MTUs.
94 # which is handled by Open vSwitch and bridged to C. MTU on the B-R1 link
125 # created if link layer MTU is not exceeded, then exceed it and check that
127 # below for IPv6 doesn't apply here, because, on IPv4, administrative MTU
136 # route exception is not created if link layer MTU is not exceeded, then
137 # lower MTU on second part of routed environment and check that exception
143 # created by exceeding link layer MTU with ping to other endpoint. Then
144 # decrease and increase MTU of tunnel, checking that route exception PMTU
156 # endpoints. Check that MTU assigned to vti interface is the MTU of the
164 # Set up vti4 interface passing MTU value at link creation, check MTU is
165 # configured, and that link is not created with invalid MTU values
172 # and check that configured MTU is used on link creation and changes, and
173 # that MTU is properly calculated instead when MTU is not configured from
259 pmtu_vti4_default_mtu vti4: default MTU assignment 0
260 pmtu_vti6_default_mtu vti6: default MTU assignment 0
261 pmtu_vti4_link_add_mtu vti4: MTU setting on link creation 0
262 pmtu_vti6_link_add_mtu vti6: MTU setting on link creation 0
263 pmtu_vti6_link_change_mtu vti6: MTU changes on link changes 0
950 mtu() { function
953 mtu="${3}"
955 ${ns_cmd} ip link set dev ${dev} mtu ${mtu}
966 [ "${i}" = "mtu" ] && next=1
1013 err " found PMTU exception with incorrect MTU ${value}, expected ${expected}, after ${event}"
1036 # Set up initial MTU values
1037 mtu "${ns_a}" veth_A-R1 2000
1038 mtu "${ns_r1}" veth_R1-A 2000
1039 mtu "${ns_r1}" veth_R1-B 1400
1040 mtu "${ns_b}" veth_B-R1 1400
1042 mtu "${ns_a}" veth_A-R2 2000
1043 mtu "${ns_r2}" veth_R2-A 2000
1044 mtu "${ns_r2}" veth_R2-B 1500
1045 mtu "${ns_b}" veth_B-R2 1500
1053 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1055 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1057 # Decrease local MTU below PMTU, check for PMTU decrease in route exception
1058 mtu "${ns_a}" veth_A-R1 1300
1059 mtu "${ns_r1}" veth_R1-A 1300
1061 check_pmtu_value "1300" "${pmtu_1}" "decreasing local MTU" || return 1
1064 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1066 # Increase MTU, check for PMTU increase in route exception
1067 mtu "${ns_a}" veth_A-R1 1700
1068 mtu "${ns_r1}" veth_R1-A 1700
1070 check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
1073 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1078 # Decrease remote MTU on path via R2, get new exception
1079 mtu "${ns_r2}" veth_R2-B 400
1080 mtu "${ns_b}" veth_B-R2 400
1083 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1085 # Decrease local MTU below PMTU
1086 mtu "${ns_a}" veth_A-R2 500
1087 mtu "${ns_r2}" veth_R2-A 500
1089 check_pmtu_value "500" "${pmtu_2}" "decreasing local MTU" || return 1
1091 # Increase local MTU
1092 mtu "${ns_a}" veth_A-R2 1500
1093 mtu "${ns_r2}" veth_R2-A 1500
1095 check_pmtu_value "1500" "${pmtu_2}" "increasing local MTU" || return 1
1100 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1120 # Set up initial MTU values
1121 mtu "${ns_a}" veth_A-R1 2000
1122 mtu "${ns_r1}" veth_R1-A 2000
1123 mtu "${ns_r1}" veth_R1-B 1400
1124 mtu "${ns_b}" veth_B-R1 1400
1126 mtu "${ns_a}" veth_A-R2 2000
1127 mtu "${ns_r2}" veth_R2-A 2000
1128 mtu "${ns_r2}" veth_R2-B 1500
1129 mtu "${ns_b}" veth_B-R2 1500
1131 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1145 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1148 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1165 # Set up initial MTU values
1166 mtu "${ns_a}" veth_A-R1 2000
1167 mtu "${ns_r1}" veth_R1-A 2000
1168 mtu "${ns_r1}" veth_R1-B 1400
1169 mtu "${ns_b}" veth_B-R1 1400
1171 mtu "${ns_a}" veth_A-R2 2000
1172 mtu "${ns_r2}" veth_R2-A 2000
1173 mtu "${ns_r2}" veth_R2-B 1500
1174 mtu "${ns_b}" veth_B-R2 1500
1176 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1195 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1197 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1228 # Create route exception by exceeding link layer MTU
1229 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1230 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1231 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1232 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1234 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1235 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1240 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${type} interface"
1305 # Create route exception by exceeding link layer MTU
1306 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1307 mtu "${ns_a}" br0 $((${ll_mtu} + 1000))
1308 mtu "${ns_a}" veth_A-C $((${ll_mtu} + 1000))
1309 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1310 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1311 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1312 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1314 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1315 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1322 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on bridged ${type} interface"
1324 …check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on locally bridged ${type} interfa…
1357 check_pmtu_value ${exp_mtu} "${pmtu}" "tcp: exceeding link layer MTU on bridged ${type} interface"
1359 …check_pmtu_value ${exp_mtu} "${pmtu}" "tcp exceeding link layer MTU on locally bridged ${type} int…
1430 # Create route exception by exceeding link layer MTU
1431 mtu "" veth_A-R1 $((${ll_mtu} + 1000))
1432 mtu "" ovs_br0 $((${ll_mtu} + 1000))
1433 mtu "" veth_A-C $((${ll_mtu} + 1000))
1434 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1435 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1436 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1437 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1439 mtu "" ${tun_a} $((${ll_mtu} + 1000))
1440 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1446 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on Open vSwitch ${type} interface"
1514 # Create route exception by exceeding link layer MTU
1515 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1516 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1517 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1518 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1520 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1521 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
1526 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${encap} interface"
1588 # Create route exception by exceeding link layer MTU
1589 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1590 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1591 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1592 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1594 mtu "${ns_a}" ip_a $((${ll_mtu} + 1000)) || return
1595 mtu "${ns_b}" ip_b $((${ll_mtu} + 1000)) || return
1600 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ip${inner}ip${outer} interface"
1631 mtu "${ns_a}" veth_a ${veth_mtu}
1632 mtu "${ns_b}" veth_b ${veth_mtu}
1633 mtu "${ns_a}" vti4_a ${vti_mtu}
1634 mtu "${ns_b}" vti4_b ${vti_mtu}
1636 # Send DF packet without exceeding link layer MTU, check that no
1642 # Now exceed link layer MTU by one byte, check that exception is created
1655 # Create route exception by exceeding link layer MTU
1656 mtu "${ns_a}" veth_a 4000
1657 mtu "${ns_b}" veth_b 4000
1658 mtu "${ns_a}" vti6_a 5000
1659 mtu "${ns_b}" vti6_b 5000
1664 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1666 # Decrease tunnel MTU, check for PMTU decrease in route exception
1667 mtu "${ns_a}" vti6_a 3000
1669 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1671 # Increase tunnel MTU, check for PMTU increase in route exception
1672 mtu "${ns_a}" vti6_a 9000
1674 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1691 mtu "${ns_a}" veth_a ${veth_mtu}
1692 mtu "${ns_b}" veth_b ${veth_mtu}
1693 mtu "${ns_a}" vti4_a ${vti_mtu}
1694 mtu "${ns_b}" vti4_b ${vti_mtu}
1696 # Send DF packet without exceeding link layer MTU, check that no
1702 # Now exceed link layer MTU by one byte, check that exception is created
1715 # Create route exception by exceeding link layer MTU
1716 mtu "${ns_a}" veth_a 4000
1717 mtu "${ns_b}" veth_b 4000
1718 mtu "${ns_a}" vti6_a 5000
1719 mtu "${ns_b}" vti6_b 5000
1724 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1726 # Decrease tunnel MTU, check for PMTU decrease in route exception
1727 mtu "${ns_a}" vti6_a 3000
1729 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1731 # Increase tunnel MTU, check for PMTU increase in route exception
1732 mtu "${ns_a}" vti6_a 9000
1734 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1751 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1752 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1753 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1754 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1756 mtu "${ns_a}" vti4_a ${vti_mtu}
1757 mtu "${ns_b}" vti4_b ${vti_mtu}
1759 # Send DF packet without exceeding link layer MTU, check that no
1765 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1767 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1785 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1786 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1787 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1788 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1790 # mtu "${ns_a}" vti6_a ${vti_mtu}
1791 # mtu "${ns_b}" vti6_b ${vti_mtu}
1799 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1801 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1811 # Check that MTU of vti device is MTU of veth minus IPv4 header length
1815 err " vti MTU ${vti4_mtu} is not veth MTU ${veth_mtu} minus IPv4 header length"
1823 # Check that MTU of vti device is MTU of veth minus IPv6 header length
1827 err " vti MTU ${vti6_mtu} is not veth MTU ${veth_mtu} minus IPv6 header length"
1845 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1846 # This can fail, or MTU can be adjusted to a proper value
1848 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1849 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1850 err " vti tunnel created with invalid MTU ${mtu}"
1858 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1859 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1861 if [ "${mtu}" != "${v}" ]; then
1862 err " vti MTU ${mtu} doesn't match configured value ${v}"
1883 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1884 # This can fail, or MTU can be adjusted to a proper value
1886 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1887 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1888 err " vti6 tunnel created with invalid MTU ${v}"
1896 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1897 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1899 if [ "${mtu}" != "${v}" ]; then
1900 err " vti6 MTU ${mtu} doesn't match configured value ${v}"
1911 run_cmd ${ns_a} ip link add dummy0 mtu 1500 type dummy
1913 run_cmd ${ns_a} ip link add dummy1 mtu 3000 type dummy
1922 # Create vti6 interface bound to device, passing MTU, check it
1923 …run_cmd ${ns_a} ip link add vti6_a mtu 1300 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1924 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1925 if [ ${mtu} -ne 1300 ]; then
1926 err " vti6 MTU ${mtu} doesn't match configured value 1300"
1930 # Move to another device with different MTU, without passing MTU, check
1931 # MTU is adjusted
1933 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1934 if [ ${mtu} -ne $((3000 - 40)) ]; then
1935 err " vti MTU ${mtu} is not dummy MTU 3000 minus IPv6 header length"
1939 # Move it back, passing MTU, check MTU is not overridden
1940 …run_cmd ${ns_a} ip link set vti6_a mtu 1280 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1941 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1942 if [ ${mtu} -ne 1280 ]; then
1943 err " vti6 MTU ${mtu} doesn't match configured value 1280"
1980 # Create route exception by exceeding link layer MTU
1981 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1982 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1983 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1984 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1986 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1987 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
2086 # Set up initial MTU values
2087 mtu "${ns_a}" veth_A-R1 2000
2088 mtu "${ns_r1}" veth_R1-A 2000
2089 mtu "${ns_r1}" veth_R1-B 1500
2090 mtu "${ns_b}" veth_B-R1 1500
2092 mtu "${ns_a}" veth_A-R2 2000
2093 mtu "${ns_r2}" veth_R2-A 2000
2094 mtu "${ns_r2}" veth_R2-B 1500
2095 mtu "${ns_b}" veth_B-R2 1500
2140 # Set up initial MTU values
2141 mtu "${ns_a}" veth_A-R1 2000
2142 mtu "${ns_r1}" veth_R1-A 2000
2143 mtu "${ns_r1}" veth_R1-B 1500
2144 mtu "${ns_b}" veth_B-R1 1500
2146 mtu "${ns_a}" veth_A-R2 2000
2147 mtu "${ns_r2}" veth_R2-A 2000
2148 mtu "${ns_r2}" veth_R2-B 1500
2149 mtu "${ns_b}" veth_B-R2 1500
2201 # Set up initial MTU values
2202 mtu "${ns_a}" veth_A-R1 2000
2203 mtu "${ns_r1}" veth_R1-A 2000
2204 mtu "${ns_r1}" veth_R1-B 1400
2205 mtu "${ns_b}" veth_B-R1 1400
2207 mtu "${ns_a}" veth_A-R2 2000
2208 mtu "${ns_r2}" veth_R2-A 2000
2209 mtu "${ns_r2}" veth_R2-B 1500
2210 mtu "${ns_b}" veth_B-R2 1500
2218 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
2220 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1