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
1044 mtu() { function
1047 mtu="${3}"
1049 ${ns_cmd} ip link set dev ${dev} mtu ${mtu}
1060 [ "${i}" = "mtu" ] && next=1
1107 err " found PMTU exception with incorrect MTU ${value}, expected ${expected}, after ${event}"
1130 # Set up initial MTU values
1131 mtu "${ns_a}" veth_A-R1 2000
1132 mtu "${ns_r1}" veth_R1-A 2000
1133 mtu "${ns_r1}" veth_R1-B 1400
1134 mtu "${ns_b}" veth_B-R1 1400
1136 mtu "${ns_a}" veth_A-R2 2000
1137 mtu "${ns_r2}" veth_R2-A 2000
1138 mtu "${ns_r2}" veth_R2-B 1500
1139 mtu "${ns_b}" veth_B-R2 1500
1147 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1149 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1151 # Decrease local MTU below PMTU, check for PMTU decrease in route exception
1152 mtu "${ns_a}" veth_A-R1 1300
1153 mtu "${ns_r1}" veth_R1-A 1300
1155 check_pmtu_value "1300" "${pmtu_1}" "decreasing local MTU" || return 1
1158 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1160 # Increase MTU, check for PMTU increase in route exception
1161 mtu "${ns_a}" veth_A-R1 1700
1162 mtu "${ns_r1}" veth_R1-A 1700
1164 check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
1167 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1172 # Decrease remote MTU on path via R2, get new exception
1173 mtu "${ns_r2}" veth_R2-B 400
1174 mtu "${ns_b}" veth_B-R2 400
1177 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1179 # Decrease local MTU below PMTU
1180 mtu "${ns_a}" veth_A-R2 500
1181 mtu "${ns_r2}" veth_R2-A 500
1183 check_pmtu_value "500" "${pmtu_2}" "decreasing local MTU" || return 1
1185 # Increase local MTU
1186 mtu "${ns_a}" veth_A-R2 1500
1187 mtu "${ns_r2}" veth_R2-A 1500
1189 check_pmtu_value "1500" "${pmtu_2}" "increasing local MTU" || return 1
1194 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1214 # Set up initial MTU values
1215 mtu "${ns_a}" veth_A-R1 2000
1216 mtu "${ns_r1}" veth_R1-A 2000
1217 mtu "${ns_r1}" veth_R1-B 1400
1218 mtu "${ns_b}" veth_B-R1 1400
1220 mtu "${ns_a}" veth_A-R2 2000
1221 mtu "${ns_r2}" veth_R2-A 2000
1222 mtu "${ns_r2}" veth_R2-B 1500
1223 mtu "${ns_b}" veth_B-R2 1500
1225 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1239 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1242 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1259 # Set up initial MTU values
1260 mtu "${ns_a}" veth_A-R1 2000
1261 mtu "${ns_r1}" veth_R1-A 2000
1262 mtu "${ns_r1}" veth_R1-B 1400
1263 mtu "${ns_b}" veth_B-R1 1400
1265 mtu "${ns_a}" veth_A-R2 2000
1266 mtu "${ns_r2}" veth_R2-A 2000
1267 mtu "${ns_r2}" veth_R2-B 1500
1268 mtu "${ns_b}" veth_B-R2 1500
1270 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1289 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1291 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1322 # Create route exception by exceeding link layer MTU
1323 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1324 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1325 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1326 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1328 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1329 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1334 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${type} interface"
1399 # Create route exception by exceeding link layer MTU
1400 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1401 mtu "${ns_a}" br0 $((${ll_mtu} + 1000))
1402 mtu "${ns_a}" veth_A-C $((${ll_mtu} + 1000))
1403 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1404 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1405 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1406 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1408 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1409 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1416 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on bridged ${type} interface"
1418 …check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on locally bridged ${type} interfa…
1451 check_pmtu_value ${exp_mtu} "${pmtu}" "tcp: exceeding link layer MTU on bridged ${type} interface"
1453 …check_pmtu_value ${exp_mtu} "${pmtu}" "tcp exceeding link layer MTU on locally bridged ${type} int…
1524 # Create route exception by exceeding link layer MTU
1525 mtu "" veth_A-R1 $((${ll_mtu} + 1000))
1526 mtu "" ovs_br0 $((${ll_mtu} + 1000))
1527 mtu "" veth_A-C $((${ll_mtu} + 1000))
1528 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1529 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1530 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1531 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1533 mtu "" ${tun_a} $((${ll_mtu} + 1000)) 2>/dev/null || \
1534 mtu "" ${type}_a $((${ll_mtu} + 1000)) 2>/dev/null
1535 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1541 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on Open vSwitch ${type} interface"
1609 # Create route exception by exceeding link layer MTU
1610 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1611 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1612 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1613 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1615 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1616 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
1621 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${encap} interface"
1683 # Create route exception by exceeding link layer MTU
1684 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1685 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1686 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1687 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1689 mtu "${ns_a}" ip_a $((${ll_mtu} + 1000)) || return
1690 mtu "${ns_b}" ip_b $((${ll_mtu} + 1000)) || return
1695 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ip${inner}ip${outer} interface"
1726 mtu "${ns_a}" veth_a ${veth_mtu}
1727 mtu "${ns_b}" veth_b ${veth_mtu}
1728 mtu "${ns_a}" vti4_a ${vti_mtu}
1729 mtu "${ns_b}" vti4_b ${vti_mtu}
1731 # Send DF packet without exceeding link layer MTU, check that no
1737 # Now exceed link layer MTU by one byte, check that exception is created
1750 # Create route exception by exceeding link layer MTU
1751 mtu "${ns_a}" veth_a 4000
1752 mtu "${ns_b}" veth_b 4000
1753 mtu "${ns_a}" vti6_a 5000
1754 mtu "${ns_b}" vti6_b 5000
1759 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1761 # Decrease tunnel MTU, check for PMTU decrease in route exception
1762 mtu "${ns_a}" vti6_a 3000
1764 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1766 # Increase tunnel MTU, check for PMTU increase in route exception
1767 mtu "${ns_a}" vti6_a 9000
1769 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1786 mtu "${ns_a}" veth_a ${veth_mtu}
1787 mtu "${ns_b}" veth_b ${veth_mtu}
1788 mtu "${ns_a}" vti4_a ${vti_mtu}
1789 mtu "${ns_b}" vti4_b ${vti_mtu}
1791 # Send DF packet without exceeding link layer MTU, check that no
1797 # Now exceed link layer MTU by one byte, check that exception is created
1810 # Create route exception by exceeding link layer MTU
1811 mtu "${ns_a}" veth_a 4000
1812 mtu "${ns_b}" veth_b 4000
1813 mtu "${ns_a}" vti6_a 5000
1814 mtu "${ns_b}" vti6_b 5000
1819 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1821 # Decrease tunnel MTU, check for PMTU decrease in route exception
1822 mtu "${ns_a}" vti6_a 3000
1824 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1826 # Increase tunnel MTU, check for PMTU increase in route exception
1827 mtu "${ns_a}" vti6_a 9000
1829 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1846 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1847 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1848 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1849 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1851 mtu "${ns_a}" vti4_a ${vti_mtu}
1852 mtu "${ns_b}" vti4_b ${vti_mtu}
1854 # Send DF packet without exceeding link layer MTU, check that no
1860 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1862 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1880 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1881 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1882 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1883 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1885 # mtu "${ns_a}" vti6_a ${vti_mtu}
1886 # mtu "${ns_b}" vti6_b ${vti_mtu}
1894 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1896 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1906 # Check that MTU of vti device is MTU of veth minus IPv4 header length
1910 err " vti MTU ${vti4_mtu} is not veth MTU ${veth_mtu} minus IPv4 header length"
1918 # Check that MTU of vti device is MTU of veth minus IPv6 header length
1922 err " vti MTU ${vti6_mtu} is not veth MTU ${veth_mtu} minus IPv6 header length"
1940 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1941 # This can fail, or MTU can be adjusted to a proper value
1943 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1944 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1945 err " vti tunnel created with invalid MTU ${mtu}"
1953 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1954 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1956 if [ "${mtu}" != "${v}" ]; then
1957 err " vti MTU ${mtu} doesn't match configured value ${v}"
1978 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1979 # This can fail, or MTU can be adjusted to a proper value
1981 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1982 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1983 err " vti6 tunnel created with invalid MTU ${v}"
1991 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1992 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1994 if [ "${mtu}" != "${v}" ]; then
1995 err " vti6 MTU ${mtu} doesn't match configured value ${v}"
2006 run_cmd ${ns_a} ip link add dummy0 mtu 1500 type dummy
2008 run_cmd ${ns_a} ip link add dummy1 mtu 3000 type dummy
2017 # Create vti6 interface bound to device, passing MTU, check it
2018 …run_cmd ${ns_a} ip link add vti6_a mtu 1300 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
2019 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
2020 if [ ${mtu} -ne 1300 ]; then
2021 err " vti6 MTU ${mtu} doesn't match configured value 1300"
2025 # Move to another device with different MTU, without passing MTU, check
2026 # MTU is adjusted
2028 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
2029 if [ ${mtu} -ne $((3000 - 40)) ]; then
2030 err " vti MTU ${mtu} is not dummy MTU 3000 minus IPv6 header length"
2034 # Move it back, passing MTU, check MTU is not overridden
2035 …run_cmd ${ns_a} ip link set vti6_a mtu 1280 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
2036 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
2037 if [ ${mtu} -ne 1280 ]; then
2038 err " vti6 MTU ${mtu} doesn't match configured value 1280"
2075 # Create route exception by exceeding link layer MTU
2076 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
2077 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
2078 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
2079 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
2081 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
2082 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
2181 # Set up initial MTU values
2182 mtu "${ns_a}" veth_A-R1 2000
2183 mtu "${ns_r1}" veth_R1-A 2000
2184 mtu "${ns_r1}" veth_R1-B 1500
2185 mtu "${ns_b}" veth_B-R1 1500
2187 mtu "${ns_a}" veth_A-R2 2000
2188 mtu "${ns_r2}" veth_R2-A 2000
2189 mtu "${ns_r2}" veth_R2-B 1500
2190 mtu "${ns_b}" veth_B-R2 1500
2235 # Set up initial MTU values
2236 mtu "${ns_a}" veth_A-R1 2000
2237 mtu "${ns_r1}" veth_R1-A 2000
2238 mtu "${ns_r1}" veth_R1-B 1500
2239 mtu "${ns_b}" veth_B-R1 1500
2241 mtu "${ns_a}" veth_A-R2 2000
2242 mtu "${ns_r2}" veth_R2-A 2000
2243 mtu "${ns_r2}" veth_R2-B 1500
2244 mtu "${ns_b}" veth_B-R2 1500
2296 # Set up initial MTU values
2297 mtu "${ns_a}" veth_A-R1 2000
2298 mtu "${ns_r1}" veth_R1-A 2000
2299 mtu "${ns_r1}" veth_R1-B 1400
2300 mtu "${ns_b}" veth_B-R1 1400
2302 mtu "${ns_a}" veth_A-R2 2000
2303 mtu "${ns_r2}" veth_R2-A 2000
2304 mtu "${ns_r2}" veth_R2-B 1500
2305 mtu "${ns_b}" veth_B-R2 1500
2313 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
2315 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1