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,
32 # set a MTU lower than the VXLAN MTU and the MTU on the link between A and
33 # R1. Send IPv4 packets, exceeding the MTU between R1 and B, over VXLAN
73 # created if link layer MTU is not exceeded, then exceed it and check that
75 # below for IPv6 doesn't apply here, because, on IPv4, administrative MTU
81 # created by exceeding link layer MTU with ping to other endpoint. Then
82 # decrease and increase MTU of tunnel, checking that route exception PMTU
87 # endpoints. Check that MTU assigned to vti interface is the MTU of the
95 # Set up vti4 interface passing MTU value at link creation, check MTU is
96 # configured, and that link is not created with invalid MTU values
103 # and check that configured MTU is used on link creation and changes, and
104 # that MTU is properly calculated instead when MTU is not configured from
156 pmtu_vti4_default_mtu vti4: default MTU assignment 0
157 pmtu_vti6_default_mtu vti6: default MTU assignment 0
158 pmtu_vti4_link_add_mtu vti4: MTU setting on link creation 0
159 pmtu_vti6_link_add_mtu vti6: MTU setting on link creation 0
160 pmtu_vti6_link_change_mtu vti6: MTU changes on link changes 0
601 mtu() { function
604 mtu="${3}"
606 ${ns_cmd} ip link set dev ${dev} mtu ${mtu}
617 [ "${i}" = "mtu" ] && next=1
658 err " found PMTU exception with incorrect MTU ${value}, expected ${expected}, after ${event}"
681 # Set up initial MTU values
682 mtu "${ns_a}" veth_A-R1 2000
683 mtu "${ns_r1}" veth_R1-A 2000
684 mtu "${ns_r1}" veth_R1-B 1400
685 mtu "${ns_b}" veth_B-R1 1400
687 mtu "${ns_a}" veth_A-R2 2000
688 mtu "${ns_r2}" veth_R2-A 2000
689 mtu "${ns_r2}" veth_R2-B 1500
690 mtu "${ns_b}" veth_B-R2 1500
698 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
700 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
702 # Decrease local MTU below PMTU, check for PMTU decrease in route exception
703 mtu "${ns_a}" veth_A-R1 1300
704 mtu "${ns_r1}" veth_R1-A 1300
706 check_pmtu_value "1300" "${pmtu_1}" "decreasing local MTU" || return 1
709 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
711 # Increase MTU, check for PMTU increase in route exception
712 mtu "${ns_a}" veth_A-R1 1700
713 mtu "${ns_r1}" veth_R1-A 1700
715 check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
718 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
723 # Decrease remote MTU on path via R2, get new exception
724 mtu "${ns_r2}" veth_R2-B 400
725 mtu "${ns_b}" veth_B-R2 400
728 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
730 # Decrease local MTU below PMTU
731 mtu "${ns_a}" veth_A-R2 500
732 mtu "${ns_r2}" veth_R2-A 500
734 check_pmtu_value "500" "${pmtu_2}" "decreasing local MTU" || return 1
736 # Increase local MTU
737 mtu "${ns_a}" veth_A-R2 1500
738 mtu "${ns_r2}" veth_R2-A 1500
740 check_pmtu_value "1500" "${pmtu_2}" "increasing local MTU" || return 1
745 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
784 # Create route exception by exceeding link layer MTU
785 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
786 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
787 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
788 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
790 mtu "${ns_a}" ${type}_a $((${ll_mtu} + 1000))
791 mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
796 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${type} interface"
864 # Create route exception by exceeding link layer MTU
865 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
866 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
867 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
868 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
870 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
871 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
876 check_pmtu_value ${exp_mtu} "${pmtu}" "exceeding link layer MTU on ${encap} interface"
923 mtu "${ns_a}" veth_a ${veth_mtu}
924 mtu "${ns_b}" veth_b ${veth_mtu}
925 mtu "${ns_a}" vti4_a ${vti_mtu}
926 mtu "${ns_b}" vti4_b ${vti_mtu}
928 # Send DF packet without exceeding link layer MTU, check that no
934 # Now exceed link layer MTU by one byte, check that exception is created
947 # Create route exception by exceeding link layer MTU
948 mtu "${ns_a}" veth_a 4000
949 mtu "${ns_b}" veth_b 4000
950 mtu "${ns_a}" vti6_a 5000
951 mtu "${ns_b}" vti6_b 5000
956 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
958 # Decrease tunnel MTU, check for PMTU decrease in route exception
959 mtu "${ns_a}" vti6_a 3000
961 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
963 # Increase tunnel MTU, check for PMTU increase in route exception
964 mtu "${ns_a}" vti6_a 9000
966 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
974 # Check that MTU of vti device is MTU of veth minus IPv4 header length
978 err " vti MTU ${vti4_mtu} is not veth MTU ${veth_mtu} minus IPv4 header length"
986 # Check that MTU of vti device is MTU of veth minus IPv6 header length
990 err " vti MTU ${vti6_mtu} is not veth MTU ${veth_mtu} minus IPv6 header length"
1008 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1009 # This can fail, or MTU can be adjusted to a proper value
1011 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1012 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1013 err " vti tunnel created with invalid MTU ${mtu}"
1021 …run_cmd ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} …
1022 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
1024 if [ "${mtu}" != "${v}" ]; then
1025 err " vti MTU ${mtu} doesn't match configured value ${v}"
1046 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1047 # This can fail, or MTU can be adjusted to a proper value
1049 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1050 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
1051 err " vti6 tunnel created with invalid MTU ${v}"
1059 …run_cmd ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr}…
1060 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1062 if [ "${mtu}" != "${v}" ]; then
1063 err " vti6 MTU ${mtu} doesn't match configured value ${v}"
1074 run_cmd ${ns_a} ip link add dummy0 mtu 1500 type dummy
1076 run_cmd ${ns_a} ip link add dummy1 mtu 3000 type dummy
1085 # Create vti6 interface bound to device, passing MTU, check it
1086 …run_cmd ${ns_a} ip link add vti6_a mtu 1300 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1087 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1088 if [ ${mtu} -ne 1300 ]; then
1089 err " vti6 MTU ${mtu} doesn't match configured value 1300"
1093 # Move to another device with different MTU, without passing MTU, check
1094 # MTU is adjusted
1096 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1097 if [ ${mtu} -ne $((3000 - 40)) ]; then
1098 err " vti MTU ${mtu} is not dummy MTU 3000 minus IPv6 header length"
1102 # Move it back, passing MTU, check MTU is not overridden
1103 …run_cmd ${ns_a} ip link set vti6_a mtu 1280 type vti6 remote ${dummy6_0_prefix}2 local ${dummy6_0_…
1104 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
1105 if [ ${mtu} -ne 1280 ]; then
1106 err " vti6 MTU ${mtu} doesn't match configured value 1280"
1136 # Create route exception by exceeding link layer MTU
1137 mtu "${ns_a}" veth_A-R1 $((${ll_mtu} + 1000))
1138 mtu "${ns_r1}" veth_R1-A $((${ll_mtu} + 1000))
1139 mtu "${ns_b}" veth_B-R1 ${ll_mtu}
1140 mtu "${ns_r1}" veth_R1-B ${ll_mtu}
1142 mtu "${ns_a}" ${encap}_a $((${ll_mtu} + 1000))
1143 mtu "${ns_b}" ${encap}_b $((${ll_mtu} + 1000))
1225 # Set up initial MTU values
1226 mtu "${ns_a}" veth_A-R1 2000
1227 mtu "${ns_r1}" veth_R1-A 2000
1228 mtu "${ns_r1}" veth_R1-B 1500
1229 mtu "${ns_b}" veth_B-R1 1500
1231 mtu "${ns_a}" veth_A-R2 2000
1232 mtu "${ns_r2}" veth_R2-A 2000
1233 mtu "${ns_r2}" veth_R2-B 1500
1234 mtu "${ns_b}" veth_B-R2 1500
1280 # Set up initial MTU values
1281 mtu "${ns_a}" veth_A-R1 2000
1282 mtu "${ns_r1}" veth_R1-A 2000
1283 mtu "${ns_r1}" veth_R1-B 1500
1284 mtu "${ns_b}" veth_B-R1 1500
1286 mtu "${ns_a}" veth_A-R2 2000
1287 mtu "${ns_r2}" veth_R2-A 2000
1288 mtu "${ns_r2}" veth_R2-B 1500
1289 mtu "${ns_b}" veth_B-R2 1500