Home | History | Annotate | Download | only in net

Lines Matching defs: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 # created if link layer MTU is not exceeded, then exceed it and check that
34 # below for IPv6 doesn't apply here, because, on IPv4, administrative MTU
40 # created by exceeding link layer MTU with ping to other endpoint. Then
41 # decrease and increase MTU of tunnel, checking that route exception PMTU
46 # endpoints. Check that MTU assigned to vti interface is the MTU of the
54 # Set up vti4 interface passing MTU value at link creation, check MTU is
55 # configured, and that link is not created with invalid MTU values
62 # and check that configured MTU is used on link creation and changes, and
63 # that MTU is properly calculated instead when MTU is not configured from
77 pmtu_vti4_default_mtu vti4: default MTU assignment
78 pmtu_vti6_default_mtu vti6: default MTU assignment
79 pmtu_vti4_link_add_mtu vti4: MTU setting on link creation
80 pmtu_vti6_link_add_mtu vti6: MTU setting on link creation
81 pmtu_vti6_link_change_mtu vti6: MTU changes on link changes"
313 mtu() {
316 mtu="${3}"
318 ${ns_cmd} ip link set dev ${dev} mtu ${mtu}
329 [ "${i}" = "mtu" ] && next=1
370 err " found PMTU exception with incorrect MTU ${value}, expected ${expected}, after ${event}"
393 # Set up initial MTU values
394 mtu "${ns_a}" veth_A-R1 2000
395 mtu "${ns_r1}" veth_R1-A 2000
396 mtu "${ns_r1}" veth_R1-B 1400
397 mtu "${ns_b}" veth_B-R1 1400
399 mtu "${ns_a}" veth_A-R2 2000
400 mtu "${ns_r2}" veth_R2-A 2000
401 mtu "${ns_r2}" veth_R2-B 1500
402 mtu "${ns_b}" veth_B-R2 1500
410 check_pmtu_value "1400" "${pmtu_1}" "exceeding MTU" || return 1
412 check_pmtu_value "1500" "${pmtu_2}" "exceeding MTU" || return 1
414 # Decrease local MTU below PMTU, check for PMTU decrease in route exception
415 mtu "${ns_a}" veth_A-R1 1300
416 mtu "${ns_r1}" veth_R1-A 1300
418 check_pmtu_value "1300" "${pmtu_1}" "decreasing local MTU" || return 1
421 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
423 # Increase MTU, check for PMTU increase in route exception
424 mtu "${ns_a}" veth_A-R1 1700
425 mtu "${ns_r1}" veth_R1-A 1700
427 check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
430 check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
435 # Decrease remote MTU on path via R2, get new exception
436 mtu "${ns_r2}" veth_R2-B 400
437 mtu "${ns_b}" veth_B-R2 400
440 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
442 # Decrease local MTU below PMTU
443 mtu "${ns_a}" veth_A-R2 500
444 mtu "${ns_r2}" veth_R2-A 500
446 check_pmtu_value "500" "${pmtu_2}" "decreasing local MTU" || return 1
448 # Increase local MTU
449 mtu "${ns_a}" veth_A-R2 1500
450 mtu "${ns_r2}" veth_R2-A 1500
452 check_pmtu_value "1500" "${pmtu_2}" "increasing local MTU" || return 1
457 check_pmtu_value "lock 552" "${pmtu_2}" "exceeding MTU, with MTU < min_pmtu" || return 1
480 mtu "${ns_a}" veth_a ${veth_mtu}
481 mtu "${ns_b}" veth_b ${veth_mtu}
482 mtu "${ns_a}" vti4_a ${vti_mtu}
483 mtu "${ns_b}" vti4_b ${vti_mtu}
485 # Send DF packet without exceeding link layer MTU, check that no
491 # Now exceed link layer MTU by one byte, check that exception is created
504 # Create route exception by exceeding link layer MTU
505 mtu "${ns_a}" veth_a 4000
506 mtu "${ns_b}" veth_b 4000
507 mtu "${ns_a}" vti6_a 5000
508 mtu "${ns_b}" vti6_b 5000
513 check_pmtu_value any "${pmtu}" "creating tunnel exceeding link layer MTU" || return 1
515 # Decrease tunnel MTU, check for PMTU decrease in route exception
516 mtu "${ns_a}" vti6_a 3000
518 check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
520 # Increase tunnel MTU
521 mtu "${ns_a}" vti6_a 9000
523 check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
531 # Check that MTU of vti device is MTU of veth minus IPv4 header length
535 err " vti MTU ${vti4_mtu} is not veth MTU ${veth_mtu} minus IPv4 header length"
543 # Check that MTU of vti device is MTU of veth minus IPv6 header length
547 err " vti MTU ${vti6_mtu} is not veth MTU ${veth_mtu} minus IPv6 header length"
565 ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} key 10 2>/dev/null
566 # This can fail, or MTU can be adjusted to a proper value
568 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
569 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
570 err " vti tunnel created with invalid MTU ${mtu}"
578 ${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} key 10
579 mtu="$(link_get_mtu "${ns_a}" vti4_a)"
581 if [ "${mtu}" != "${v}" ]; then
582 err " vti MTU ${mtu} doesn't match configured value ${v}"
603 ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr} key 10 2>/dev/null
604 # This can fail, or MTU can be adjusted to a proper value
606 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
607 if [ ${mtu} -lt ${min} -o ${mtu} -gt ${max} ]; then
608 err " vti6 tunnel created with invalid MTU ${v}"
616 ${ns_a} ip link add vti6_a mtu ${v} type vti6 local ${veth6_a_addr} remote ${veth6_b_addr} key 10
617 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
619 if [ "${mtu}" != "${v}" ]; then
620 err " vti6 MTU ${mtu} doesn't match configured value ${v}"
631 ${ns_a} ip link add dummy0 mtu 1500 type dummy
633 ${ns_a} ip link add dummy1 mtu 3000 type dummy
642 # Create vti6 interface bound to device, passing MTU, check it
643 ${ns_a} ip link add vti6_a mtu 1300 type vti6 remote ${dummy6_0_addr} local ${dummy6_0_addr}
644 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
645 if [ ${mtu} -ne 1300 ]; then
646 err " vti6 MTU ${mtu} doesn't match configured value 1300"
650 # Move to another device with different MTU, without passing MTU, check
651 # MTU is adjusted
653 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
654 if [ ${mtu} -ne $((3000 - 40)) ]; then
655 err " vti MTU ${mtu} is not dummy MTU 3000 minus IPv6 header length"
659 # Move it back, passing MTU, check MTU is not overridden
660 ${ns_a} ip link set vti6_a mtu 1280 type vti6 remote ${dummy6_0_addr} local ${dummy6_0_addr}
661 mtu="$(link_get_mtu "${ns_a}" vti6_a)"
662 if [ ${mtu} -ne 1280 ]; then
663 err " vti6 MTU ${mtu} doesn't match configured value 1280"