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
956 mtu() { function
959 mtu="${3}"
961 ${ns_cmd} ip link set dev ${dev} mtu ${mtu}
972 [ "${i}" = "mtu" ] && next=1
1019 err " found PMTU exception with incorrect MTU ${value}, expected ${expected}, after ${event}"
1042 # Set up initial MTU values
1043 mtu "${ns_a}" veth_A-R1 2000
1044 mtu "${ns_r1}" veth_R1-A 2000
1045 mtu "${ns_r1}" veth_R1-B 1400
1046 mtu "${ns_b}" veth_B-R1 1400
1048 mtu "${ns_a}" veth_A-R2 2000
1049 mtu "${ns_r2}" veth_R2-A 2000
1050 mtu "${ns_r2}" veth_R2-B 1500
1051 mtu "${ns_b}" veth_B-R2 1500
1059 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1061 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1063 # Decrease local MTU below PMTU, check for PMTU decrease in route exception
1064 mtu "${ns_a}" veth_A-R1 1300
1065 mtu "${ns_r1}" veth_R1-A 1300
1067 check_pmtu_value "1300" "${pmtu_1}" "decreasing local MTU" || return 1
1070 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1072 # Increase MTU, check for PMTU increase in route exception
1073 mtu "${ns_a}" veth_A-R1 1700
1074 mtu "${ns_r1}" veth_R1-A 1700
1076 check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
1079 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
1084 # Decrease remote MTU on path via R2, get new exception
1085 mtu "${ns_r2}" veth_R2-B 400
1086 mtu "${ns_b}" veth_B-R2 400
1089 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1091 # Decrease local MTU below PMTU
1092 mtu "${ns_a}" veth_A-R2 500
1093 mtu "${ns_r2}" veth_R2-A 500
1095 check_pmtu_value "500" "${pmtu_2}" "decreasing local MTU" || return 1
1097 # Increase local MTU
1098 mtu "${ns_a}" veth_A-R2 1500
1099 mtu "${ns_r2}" veth_R2-A 1500
1101 check_pmtu_value "1500" "${pmtu_2}" "increasing local MTU" || return 1
1106 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
1126 # Set up initial MTU values
1127 mtu "${ns_a}" veth_A-R1 2000
1128 mtu "${ns_r1}" veth_R1-A 2000
1129 mtu "${ns_r1}" veth_R1-B 1400
1130 mtu "${ns_b}" veth_B-R1 1400
1132 mtu "${ns_a}" veth_A-R2 2000
1133 mtu "${ns_r2}" veth_R2-A 2000
1134 mtu "${ns_r2}" veth_R2-B 1500
1135 mtu "${ns_b}" veth_B-R2 1500
1137 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1151 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1154 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1171 # Set up initial MTU values
1172 mtu "${ns_a}" veth_A-R1 2000
1173 mtu "${ns_r1}" veth_R1-A 2000
1174 mtu "${ns_r1}" veth_R1-B 1400
1175 mtu "${ns_b}" veth_B-R1 1400
1177 mtu "${ns_a}" veth_A-R2 2000
1178 mtu "${ns_r2}" veth_R2-A 2000
1179 mtu "${ns_r2}" veth_R2-B 1500
1180 mtu "${ns_b}" veth_B-R2 1500
1182 len=$((2000 - 20 - 8)) # Fills MTU of veth_A-R1
1201 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
1203 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
1234 # Create route exception by exceeding link layer MTU
1235 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1236 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1237 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1238 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1240 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1241 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1246 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${type} interface"
1311 # Create route exception by exceeding link layer MTU
1312 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1313 mtu "${ns_a}" br0 $((${ll_mtu} + 1000))
1314 mtu "${ns_a}" veth_A-C $((${ll_mtu} + 1000))
1315 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1316 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1317 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1318 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1320 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
1321 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1328 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on bridged ${type} interface"
1330 …check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on locally bridged ${type} interfa…
1401 # Create route exception by exceeding link layer MTU
1402 mtu "" veth_A-R1 $((${ll_mtu} + 1000))
1403 mtu "" ovs_br0 $((${ll_mtu} + 1000))
1404 mtu "" veth_A-C $((${ll_mtu} + 1000))
1405 mtu "${ns_c}" veth_C-A $((${ll_mtu} + 1000))
1406 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1407 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1408 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1410 mtu "" ${tun_a} $((${ll_mtu} + 1000))
1411 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
1417 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on Open vSwitch ${type} interface"
1485 # Create route exception by exceeding link layer MTU
1486 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1487 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1488 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1489 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1491 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1492 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
1497 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${encap} interface"
1559 # Create route exception by exceeding link layer MTU
1560 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1561 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1562 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1563 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1565 mtu "${ns_a}" ip_a $((${ll_mtu} + 1000)) || return
1566 mtu "${ns_b}" ip_b $((${ll_mtu} + 1000)) || return
1571 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ip${inner}ip${outer} interface"
1602 mtu "${ns_a}" veth_a ${veth_mtu}
1603 mtu "${ns_b}" veth_b ${veth_mtu}
1604 mtu "${ns_a}" vti4_a ${vti_mtu}
1605 mtu "${ns_b}" vti4_b ${vti_mtu}
1607 # Send DF packet without exceeding link layer MTU, check that no
1613 # Now exceed link layer MTU by one byte, check that exception is created
1626 # Create route exception by exceeding link layer MTU
1627 mtu "${ns_a}" veth_a 4000
1628 mtu "${ns_b}" veth_b 4000
1629 mtu "${ns_a}" vti6_a 5000
1630 mtu "${ns_b}" vti6_b 5000
1635 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1637 # Decrease tunnel MTU, check for PMTU decrease in route exception
1638 mtu "${ns_a}" vti6_a 3000
1640 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1642 # Increase tunnel MTU, check for PMTU increase in route exception
1643 mtu "${ns_a}" vti6_a 9000
1645 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1662 mtu "${ns_a}" veth_a ${veth_mtu}
1663 mtu "${ns_b}" veth_b ${veth_mtu}
1664 mtu "${ns_a}" vti4_a ${vti_mtu}
1665 mtu "${ns_b}" vti4_b ${vti_mtu}
1667 # Send DF packet without exceeding link layer MTU, check that no
1673 # Now exceed link layer MTU by one byte, check that exception is created
1686 # Create route exception by exceeding link layer MTU
1687 mtu "${ns_a}" veth_a 4000
1688 mtu "${ns_b}" veth_b 4000
1689 mtu "${ns_a}" vti6_a 5000
1690 mtu "${ns_b}" vti6_b 5000
1695 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
1697 # Decrease tunnel MTU, check for PMTU decrease in route exception
1698 mtu "${ns_a}" vti6_a 3000
1700 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
1702 # Increase tunnel MTU, check for PMTU increase in route exception
1703 mtu "${ns_a}" vti6_a 9000
1705 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
1722 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1723 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1724 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1725 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1727 mtu "${ns_a}" vti4_a ${vti_mtu}
1728 mtu "${ns_b}" vti4_b ${vti_mtu}
1730 # Send DF packet without exceeding link layer MTU, check that no
1736 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1738 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1756 mtu "${ns_a}" veth_A-R1 ${veth_mtu}
1757 mtu "${ns_r1}" veth_R1-A ${veth_mtu}
1758 mtu "${ns_b}" veth_B-R1 ${veth_mtu}
1759 mtu "${ns_r1}" veth_R1-B ${veth_mtu}
1761 # mtu "${ns_a}" vti6_a ${vti_mtu}
1762 # mtu "${ns_b}" vti6_b ${vti_mtu}
1770 # Now decrease link layer MTU by 8 bytes on R1, check that exception is created
1772 mtu "${ns_r1}" veth_R1-B $((veth_mtu - 8))
1782 # Check that MTU of vti device is MTU of veth minus IPv4 header length
1786 err " vti MTU ${vti4_mtu} is not veth MTU ${veth_mtu} minus IPv4 header length"
1794 # Check that MTU of vti device is MTU of veth minus IPv6 header length
1798 err " vti MTU ${vti6_mtu} is not veth MTU ${veth_mtu} minus IPv6 header length"
1816 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1817 # This can fail, or MTU can be adjusted to a proper value
1819 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1820 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1821 err " vti tunnel created with invalid MTU ${mtu}"
1829 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1830 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1832 if [ "${mtu}" != "${v}" ]; then
1833 err " vti MTU ${mtu} doesn't match configured value ${v}"
1854 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1855 # This can fail, or MTU can be adjusted to a proper value
1857 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1858 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1859 err " vti6 tunnel created with invalid MTU ${v}"
1867 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1868 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1870 if [ "${mtu}" != "${v}" ]; then
1871 err " vti6 MTU ${mtu} doesn't match configured value ${v}"
1882 run_cmd ${ns_a} ip link add dummy0 mtu 1500 type dummy
1884 run_cmd ${ns_a} ip link add dummy1 mtu 3000 type dummy
1893 # Create vti6 interface bound to device, passing MTU, check it
1894 …run_cmd ${ns_a} ip link add vti6_a mtu 1300 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1895 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1896 if [ ${mtu} -ne 1300 ]; then
1897 err " vti6 MTU ${mtu} doesn't match configured value 1300"
1901 # Move to another device with different MTU, without passing MTU, check
1902 # MTU is adjusted
1904 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1905 if [ ${mtu} -ne $((3000 - 40)) ]; then
1906 err " vti MTU ${mtu} is not dummy MTU 3000 minus IPv6 header length"
1910 # Move it back, passing MTU, check MTU is not overridden
1911 …run_cmd ${ns_a} ip link set vti6_a mtu 1280 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1912 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1913 if [ ${mtu} -ne 1280 ]; then
1914 err " vti6 MTU ${mtu} doesn't match configured value 1280"
1944 # Create route exception by exceeding link layer MTU
1945 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1946 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1947 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1948 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1950 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1951 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
2049 # Set up initial MTU values
2050 mtu "${ns_a}" veth_A-R1 2000
2051 mtu "${ns_r1}" veth_R1-A 2000
2052 mtu "${ns_r1}" veth_R1-B 1500
2053 mtu "${ns_b}" veth_B-R1 1500
2055 mtu "${ns_a}" veth_A-R2 2000
2056 mtu "${ns_r2}" veth_R2-A 2000
2057 mtu "${ns_r2}" veth_R2-B 1500
2058 mtu "${ns_b}" veth_B-R2 1500
2103 # Set up initial MTU values
2104 mtu "${ns_a}" veth_A-R1 2000
2105 mtu "${ns_r1}" veth_R1-A 2000
2106 mtu "${ns_r1}" veth_R1-B 1500
2107 mtu "${ns_b}" veth_B-R1 1500
2109 mtu "${ns_a}" veth_A-R2 2000
2110 mtu "${ns_r2}" veth_R2-A 2000
2111 mtu "${ns_r2}" veth_R2-B 1500
2112 mtu "${ns_b}" veth_B-R2 1500
2164 # Set up initial MTU values
2165 mtu "${ns_a}" veth_A-R1 2000
2166 mtu "${ns_r1}" veth_R1-A 2000
2167 mtu "${ns_r1}" veth_R1-B 1400
2168 mtu "${ns_b}" veth_B-R1 1400
2170 mtu "${ns_a}" veth_A-R2 2000
2171 mtu "${ns_r2}" veth_R2-A 2000
2172 mtu "${ns_r2}" veth_R2-B 1500
2173 mtu "${ns_b}" veth_B-R2 1500
2181 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
2183 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1